:root{
  --bg:#F7F7F4;
  --surface:#FFFFFF;
  --text:#111827;
  --muted:#4B5563;
  --primary:#0F766E;
  --secondary:#1D4ED8;
  --accent:#D97706;
  --border:rgba(0,0,0,.08);
}

html, body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}


/* RESET */
*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:'Inter', system-ui, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.75;
}

/* LAYOUT */
.layout{
  max-width:1200px;
  margin:auto;
  padding:40px 20px;
  display:grid;
  grid-template-columns:260px 1fr;
  gap:40px;
}

/* TOC */
.toc{
  position:sticky;
  top:40px;
  background:#FAFAF8;
  border-left:3px solid var(--primary);
  padding:20px;
}

.toc h2{
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:var(--muted);
  margin:0 0 12px;
}

.toc nav a{
  display:block;
  margin-bottom:10px;
  font-size:14px;
  color:var(--text);
  text-decoration:none;
}

.toc nav a:hover{ color:var(--primary); }

/* ARTICLE */
.card{
  background:var(--surface);
  padding:60px 64px;
  box-shadow:0 10px 25px rgba(0,0,0,.04);
  max-width:860px;
  margin:auto;
}

/* HEADINGS */
h1,h2,h3{
  font-family:"Montserrat", sans-serif;
}

h1{
  font-size:42px;
  text-align:center;
  margin:0 0 32px;
}

h1::before{
  content:"";
  display:block;
  width:60px;
  height:3px;
  background:var(--primary);
  margin:0 auto 24px;
  border-radius:4px;
}

h2{
  font-size:28px;
  margin:0 0 18px;
}

h3{
  font-size:20px;
  margin:28px 0 12px;
}

/* META BOX */
.metabox{
  background:#F1F5F9;
  border-left:4px solid var(--secondary);
  padding:20px;
  font-size:16px;
  margin:0 0 44px;
}

/* SECTIONS */
section{
  margin-bottom:64px;
}

p{
  font-size:17px;
  margin:0 0 20px;
  font-family: inter;
}

strong{ font-weight:600; }

/* HERO IMAGE */
.heroImage{ margin:0 0 64px; }
.heroImage img{
  width:100%;
  height:auto;
  border-radius:8px;
  display:block;
}

/* FIGURE */
figure{ margin:0; 
  border: 1px solid #e6e6e6;
  padding: 0.75rem;
  border-radius: 8px;}

  figure img{
  width:100%;
  height:auto;
  border-radius:6px;
  display:block;
}


figcaption{
  font-size:14px;
  color:var(--muted);
  margin-top:8px;
  text-align: center;
  font-style: italic;
}

.inlineImage{ margin:28px 0 6px; }

/* SPLIT */
.split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:start;
}

/* BULLETS BOX */
.bulletsBox{
  background:#FAFAF8;
  padding:30px;
  border-left:4px solid var(--primary);
}

.bulletsBox ul{ margin:0; padding-left:20px; }

ul{ padding-left:20px; margin:0 0 18px; }
li{ margin-bottom:10px; }

/* KEY TAKEAWAYS */
.keyTakeaways{
  background:#F1F5F9;
  border-left:5px solid var(--primary);
  padding:28px;
  margin:36px 0 0;
}

.keyTakeaways h2{
  font-size:22px;
  margin:0 0 14px;
}

.keyTakeaways ul{ margin:0; }

/* QUOTE */
.quote{
  font-family:'Source Serif 4', serif;
  font-size:20px;
  background:#F1F5F9;
  padding:32px;
  border-left:4px solid var(--secondary);
}

/* ===============================
   COURSE LINK – CONTINUIDAD EDUCATIVA
================================ */

.courseLink{
  margin:64px 0;
  padding:40px 36px;
  background:#FAFAF8; /* coherente con bulletsBox */
  border-left:5px solid var(--secondary);
  border-radius:12px;
}

/* Texto introductorio */
.courseLink p{
  font-size:17px;
  color:var(--text);
  margin-bottom:24px;
}

.courseLink p strong{
  color:var(--secondary);
  font-weight:600;
}

/* Contenedor imagen */
.courseLink figure{
  margin:0;
}

/* Imagen */
.courseLink img{
  width:100%;
  height:auto;
  border-radius:10px;
  display:block;
  transition:transform .25s ease, box-shadow .25s ease;
}

/* Hover sutil (desktop) */
.courseLink a:hover img{
  transform:translateY(-2px);
  box-shadow:0 10px 25px rgba(0,0,0,.08);
}

/* Texto inferior / enlace */
.courseLink figcaption{
  margin-top:14px;
  font-size:15px;
  color:var(--secondary);
  font-weight:500;
}

.courseLink figcaption a{
  color:var(--secondary);
  text-decoration:none;
  border-bottom:1px solid rgba(29,78,216,.3);
  transition:border-color .2s ease;
}

.courseLink figcaption a:hover{
  border-bottom-color:var(--secondary);
}

/* ===============================
   MOBILE OPTIMIZATION
================================ */

@media (max-width: 960px){

  body{
    overflow-x:hidden;
  }

  .layout{
    display:block;
    width:100%;
    max-width:100%;
    padding:24px 16px;
    margin:0 auto;
  }

  .toc{
    display:none;
  }

  article.card{
    width:100%;
    max-width:100%;
    padding:32px 20px;
    margin:0 auto;
  }

  section{
    width:100%;
    max-width:100%;
    padding-left:0;
    padding-right:0;
  }
}

img,
figure,
svg{
  max-width:100%;
  height:auto;
  display:block;
}




/* FAQ */
.faq details{
  background:#FAFAF8;
  padding:20px;
  margin-bottom:16px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.04);
}

.faq summary{
  cursor:pointer;
  font-weight:600;
}

.faq p{ margin:14px 0 0; }

/* CTA – CUESTIONARIO */
.quizCTA{
  margin:4rem auto;
  padding:3rem 2.5rem;
  max-width:880px;
  text-align:center;
  background:#fdf7e6;
  border-left:6px solid #c58b1b;
  border-radius:12px;
}

.quizCTA h2{
  font-family:"Montserrat", sans-serif;
  font-size:1.8rem;
  font-weight:700;
  margin:0 0 1rem;
  color:#1a1a1a;
}

.quizCTA p{
  font-size:1.05rem;
  line-height:1.6;
  color:#333;
  margin:0 0 2rem;
}

.btnQuiz{
  display:inline-block;
  padding:0.9rem 2.2rem;
  font-family:"Montserrat", sans-serif;
  font-size:1rem;
  font-weight:600;
  color:#ffffff;
  background-color:#0a5c4d;
  border-radius:6px;
  text-decoration:none;
  transition:all 0.25s ease;
  position:relative;
}

.btnQuiz:hover{
  background-color:#08705e;
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(0, 0, 0, 0.15);
}

.btnQuiz:active{
  transform:translateY(1px) scale(0.98);
  box-shadow:0 4px 10px rgba(0,0,0,0.2);
}

.btnQuiz:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(10, 92, 77, 0.4);
}

/* AUTHOR */
/* =========================
   AUTHOR CARD
========================= */
.authorCard{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:32px;
  background:#FAFAF8;
  padding:48px;
  border-radius:16px;
  margin-top:80px;
}

/* Avatar */
.authorAvatar{
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

.authorPhoto{
  width:120px;
  height:120px;
  border-radius:100%;
  object-fit:cover;
}

/* Content */
.authorContent{
  display:flex;
  flex-direction:column;
}

.authorName{
  font-family:'Source Serif 4', serif;
  font-size:22px;
  margin-bottom:12px;
}

.authorBio{
  font-size:16px;
  line-height:1.7;
  color:var(--muted);
  margin-bottom:24px;
}

/* Social icons container */
.authorSocial{
  margin-top:auto; /* Empuja los iconos al fondo del bloque */
  display:flex;
  gap:16px;
}

/* Icon base */
.socialIcon{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#FFFFFF;
  border:1px solid var(--border);
  transition:all .2s ease;
}

.socialIcon svg{
  width:20px;
  height:20px;
  fill:var(--text);
}

/* Hover states */
.socialIcon:hover{
  transform:translateY(-2px);
}

.socialIcon.instagram:hover{
  background:#FDF2F8;
  border-color:#EC4899;
}

.socialIcon.instagram:hover svg{
  fill:#EC4899;
}

.socialIcon.youtube:hover{
  background:#FEF2F2;
  border-color:#DC2626;
}

.socialIcon.youtube:hover svg{
  fill:#DC2626;
}

/* =========================
   RESPONSIVE
========================= */
@media(max-width:768px){
  .authorCard{
    grid-template-columns:1fr;
    text-align:center;
    padding:32px 24px;
  }

  .authorAvatar{
    justify-content:center;
  }

  .authorContent{
    align-items:center;
  }

  .authorSocial{
    justify-content:center;
  }
}

/* =========================================
   MOBILE – CENTRADO REAL Y BALANCE VISUAL
========================================= */
@media (max-width: 768px){

  /* 1️⃣ CENTRAR TODOS LOS TÍTULOS */
  h1,
  h2,
  h3{
    text-align:center;
  }

  /* Mantener línea decorativa centrada */
  h1::before{
    margin-left:auto;
    margin-right:auto;
  }

  /* 2️⃣ ELIMINAR SESGO VISUAL DE BORDES LATERALES */
  .metabox,
  .bulletsBox,
  .keyTakeaways,
  .quote,
  .courseLink,
  .quizCTA{
    border-left:none;
    border-top:4px solid var(--primary);
    padding-left:20px;
    padding-right:20px;
    margin-left:auto;
    margin-right:auto;
    text-align:center;
  }

  /* Ajuste específico para bordes secundarios */
  .metabox,
  .quote{
    border-top-color:var(--secondary);
  }

  .courseLink,
  .quizCTA{
    border-top-color:var(--accent);
  }

  /* =========================================
   SPLIT – STACK EN MOBILE
========================================= */
@media (max-width: 768px){

  .split{
    display:flex;
    flex-direction:column;
    gap:24px;
  }

}


  /* 3️⃣ LISTAS SIGUEN LEGIBLES */
  .bulletsBox ul,
  .keyTakeaways ul{
    text-align:left;
    padding-left:20px;
  }

  /* 4️⃣ FIGURES Y BLOQUES INTERNOS BIEN CENTRADOS */
  figure,
  .heroImage,
  .inlineImage{
    margin-left:auto;
    margin-right:auto;
  }

  /* 5️⃣ AUTOR – PERFECTAMENTE CENTRADO */
  .authorCard{
    text-align:center;
  }

  .authorContent{
    align-items:center;
  }

  .authorSocial{
    justify-content:center;
  }
}

/* =========================================
   AJUSTE FINO H1 – MOBILE
========================================= */
@media (max-width: 768px){

  h1{
    font-size:32px;       /* antes ~42px */
    line-height:1.25;
    margin-bottom:24px;
  }

  h1::before{
    width:48px;           /* línea decorativa un poco más sutil */
    margin-bottom:20px;
  }
}

/* =========================================
   AJUSTE ICONOS SOCIALES – DESKTOP
========================================= */
@media (min-width: 769px){

  .authorSocial{
    gap:12px; /* antes 16px */
  }

  .socialIcon{
    width:32px;   /* antes 40px */
    height:32px;
  }

  .socialIcon svg{
    width:16px;   /* antes 20px */
    height:16px;
  }
}

