/* Blog theme (Manus-like) - static */
:root{
  --bg:#0b0b10;
  --panel:#101018;
  --card:#131321;
  --border:rgba(255,255,255,.08);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.68);
  --link:#9bbcff;
  --linkHover:#c4d6ff;
  --accent:#ff7a00;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
  --radiusSm:14px;
  --max:1100px;

  /* Ajusta aquí el alto máximo del HERO del artículo */
  --heroMaxH: 420px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:radial-gradient(1200px 600px at 20% -10%, rgba(255,122,0,.14), transparent 60%),
             radial-gradient(900px 500px at 90% 0%, rgba(155,188,255,.12), transparent 55%),
             var(--bg);
  color:var(--text);
  font-family:"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.6;
}
a{color:var(--link); text-decoration:none}
a:hover{color:var(--linkHover); text-decoration:underline}

.wrap{max-width:var(--max); margin:0 auto; padding:28px 18px 70px}
.top{display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px}
.brand{
  font-family:"Montserrat", system-ui, sans-serif;
  font-weight:800;
  letter-spacing:.2px;
  font-size:18px;
}
.back{
  color:var(--muted);
  border:1px solid var(--border);
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.02);
}
.back:hover{color:var(--text); text-decoration:none; border-color:rgba(255,255,255,.14)}
h1,h2,h3{font-family:"Montserrat", system-ui, sans-serif; line-height:1.2}
h1{font-size:34px; margin:18px 0 8px}
.sub{margin:0 0 22px; color:var(--muted); max-width:70ch}

.grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}
@media (max-width: 980px){ .grid{grid-template-columns:repeat(2, minmax(0,1fr));} }
@media (max-width: 640px){ .grid{grid-template-columns:1fr;} }

.card{
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 0 0 rgba(0,0,0,0);
  transform:translateY(0);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow);
  border-color:rgba(255,255,255,.14);
  text-decoration:none;
}
.thumb{
  display:block;
  position:relative;
  aspect-ratio: 16/9;
  background:rgba(255,255,255,.03);
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.cbody{display:flex; flex-direction:column; gap:10px; padding:16px 16px 18px}
.ctitle{
  font-family:"Montserrat", system-ui, sans-serif;
  font-weight:800;
  font-size:16px;
  letter-spacing:.1px;
}
.cex{color:var(--muted); font-size:13px; line-height:1.55}
.meta{color:rgba(255,255,255,.55); font-size:12px}

/* ===== Artículo ===== */
.article{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:26px 22px;
  margin-top:18px;
}
@media (max-width: 640px){ .article{padding:20px 16px;} }

.article h1{font-size:34px; margin-top:0}
.article h2{font-size:22px; margin:26px 0 10px}
.article h3{font-size:18px; margin:18px 0 8px}
.article p{margin:10px 0; color:var(--text)}
.article ul, .article ol{margin:10px 0 14px 22px; color:var(--text)}
.article li{margin:7px 0}
.article a{font-weight:600}

.article blockquote{
  margin:16px 0;
  padding:14px 16px;
  border-left:4px solid rgba(255,122,0,.7);
  background:rgba(255,122,0,.08);
  border-radius:12px;
  color:rgba(255,255,255,.9);
}
hr{border:0; border-top:1px solid var(--border); margin:22px 0}

/* Imágenes dentro del artículo (normaliza siempre) */
.article img,
.article picture img,
.article figure img{
  max-width:100%;
  height:auto;
  display:block;
  border-radius:16px;
}

/* === HERO del artículo (la primera imagen grande) ===
   Cubre 3 casos: img directo, picture, figure.
   Pone borde naranja para control visual.
*/
.article > img:first-of-type,
.article > picture:first-of-type img,
.article > figure:first-of-type img{
  width:100%;
  height: var(--heroMaxH);
  max-height: var(--heroMaxH);
  object-fit:cover;
  outline:4px solid var(--accent);
  border-radius:16px;
}

/* Si el HERO va envuelto en figure/picture, evitamos que el wrapper “estire” */
.article > picture:first-of-type,
.article > figure:first-of-type{
  max-height: var(--heroMaxH);
  overflow:hidden;
  border-radius:16px;
}

/* Related articles */
#articulos-relacionados{margin-top:28px; padding-top:10px; border-top:1px solid var(--border)}
#articulos-relacionados ul{margin:10px 0 0 22px}
#articulos-relacionados li{margin:8px 0}

/* Card title as H2 */
h2.ctitle{margin:0; font-size:16px;}

/* ===== Header + footer (Manus-like) ===== */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(9,10,14,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.navwrap{
  max-width:var(--max);
  margin:0 auto;
  padding:12px 18px;
  display:flex;
  align-items:center;
  gap:16px;
}
.logo{display:flex; align-items:center; gap:10px; font-weight:900; text-decoration:none}
.logo-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:28px;
  border-radius:10px;
  background:linear-gradient(180deg, rgba(255,122,0,.95), rgba(255,122,0,.65));
  color:#0b0b10;
  font-family:"Montserrat",system-ui,sans-serif;
  font-weight:900;
}
.nav{display:flex; gap:14px; margin-left:6px; flex:1}
.nav a{color:rgba(255,255,255,.78); font-weight:600; text-decoration:none; font-size:13px}
.nav a:hover{color:rgba(255,255,255,.95); text-decoration:none}
.site-header .cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(255,122,0,.95), rgba(255,122,0,.7));
  color:#0b0b10;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}
.site-header .cta:hover{filter:brightness(1.02); text-decoration:none}
@media (max-width: 920px){
  .nav{display:none}
}

/* Page spacing below sticky header */
.page-wrap{padding-top:22px}

/* CTA band + footer */
.cta-band{
  margin-top:44px;
  padding:44px 0;
  background:radial-gradient(900px 450px at 50% 10%, rgba(255,122,0,.18), transparent 60%),
             rgba(255,255,255,.02);
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:center;
}
.cta-band h2{margin:0 0 10px; font-size:26px}
.cta-band p{margin:0 0 18px; color:var(--muted)}
.cta-band .cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,122,0,.95), rgba(255,122,0,.7));
  color:#0b0b10;
  font-weight:900;
  text-decoration:none;
}
.cta-band .cta:hover{text-decoration:none}

.site-footer{
  background:rgba(10,14,26,.92);
  padding:34px 0 18px;
}
.fgrid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:26px;
}
@media (max-width: 980px){ .fgrid{grid-template-columns:1fr; } }
.fbrand{font-family:"Montserrat",system-ui,sans-serif; font-weight:900; font-size:18px; margin-bottom:8px}
.site-footer p{color:rgba(255,255,255,.7); margin:0 0 12px}
.site-footer ul{margin:0; padding-left:18px; color:rgba(255,255,255,.75)}
.site-footer li{margin:8px 0}
.site-footer a{color:rgba(255,255,255,.8); text-decoration:none}
.site-footer a:hover{color:#fff; text-decoration:underline}
.fhead{font-family:"Montserrat",system-ui,sans-serif; font-weight:800; margin-bottom:10px}
.contact{list-style:none; padding-left:0}
.contact li{margin:10px 0}
.fcopy{margin-top:18px; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); color:rgba(255,255,255,.55); font-size:12px; text-align:center}
.social{display:inline-flex; gap:8px; align-items:center; font-weight:700}
/* ===== FIX ÚNICO (DEJAR ASÍ): “CUADRO NARANJA” + tamaño controlado SOLO en ARTÍCULOS ===== */
/* No toca las cards del listado (/blog/) */
.grid .thumb img{
  width:100% !important;
  height:100% !important;
  max-height:none !important;
  object-fit:cover !important;
  outline:none !important;
}

/* Solo páginas de artículo: la imagen grande va dentro de .wrap.page-wrap */
.wrap.page-wrap .article img{
  width:100% !important;
  max-width:100% !important;
  height:auto !important;

  max-height:520px !important;
  object-fit:cover !important;

  outline:4px solid #ff7a00 !important; /* cuadro naranja */
  border-radius:16px !important;

  display:block !important;
  margin:12px 0 18px !important;
}