/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #1f6fb2;
  --green-dark: #12355b;
  --green-light: #E6EFF9;
  --green-mid: #4a90d0;
  --text: #1A1A1A;
  --text-muted: #555555;
  --border: #e2e8f0;
  --bg-light: #F9FAFB;
  --white: #FFFFFF;
  --max-w: 920px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--gray { background: var(--bg-light); }
.section--green { background: var(--green-light); }

/* ===== HEADER / NAV ===== */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.site-header .container { max-width: 1200px; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green-dark);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav__logo-img { height: 38px; width: auto; display: block; }
.nav__logo .logo-text {
  display: inline;
  letter-spacing: normal;
}
.nav__links {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}
.nav__links a {
  color: var(--text);
  font-size: .85rem;
  padding: 6px 9px;
  border-radius: 6px;
  transition: background .15s;
  font-weight: 500;
  white-space: nowrap;
}
.nav__links a:hover { background: var(--green-light); text-decoration: none; }
.nav__cta {
  background: var(--green) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
  border-radius: 6px;
}
.nav__cta:hover { background: var(--green-dark) !important; }
.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav__burger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: .25s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, rgba(18,53,91,.90) 0%, rgba(31,111,178,.80) 100%), url('/assets/hero-bg.jpg') center/cover no-repeat, var(--green-dark);
  color: var(--white);
  padding: 38px 0 34px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Vídeo de fondo del hero (home y landing) */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.hero::after, .page-header--hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(18,53,91,.84) 0%, rgba(31,111,178,.72) 100%);
}
.hero > .container, .page-header--hero > .container { position: relative; z-index: 2; }
.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  padding: 5px 18px;
  font-size: .82rem;
  margin-bottom: 14px;
  letter-spacing: .06em;
  font-weight: 600;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -.02em;
}
.hero__sub {
  font-size: 1rem;
  opacity: .9;
  max-width: 560px;
  margin: 0 auto 18px;
  line-height: 1.5;
}
.hero__checks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 20px;
  font-size: .9rem;
}
.hero__checks li::before { content: "✅ "; }
.contador-cert { margin: 14px 0 0; font-size: .95rem; text-align: inherit; }
.contador-cert strong { font-weight: 700; }
.hero__note {
  font-size: .88rem;
  opacity: .78;
  margin-top: 14px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.14); text-decoration: none; }
.btn:active { transform: none; }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-dark); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--green-dark); border: 2px solid var(--green); }
.btn--secondary:hover { background: var(--green-light); color: var(--green-dark); }
.btn--large { padding: 18px 44px; font-size: 1.08rem; }
.btn--full { display: block; width: 100%; }

/* ===== TRUST BAR ===== */
.trust-bar {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
  padding: 10px 0;
  font-size: .82rem;
  font-weight: 500;
}
.trust-bar__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
}
.trust-bar__items span::before { content: "✓ "; color: #7fffcb; font-weight: 700; }

/* ===== HEADINGS ===== */
h2 {
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--green-dark);
  line-height: 1.3;
  letter-spacing: -.01em;
}
h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

/* ===== VIDEO EMBED ===== */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}
.video-wrapper iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0;
}

/* Vídeo YouTube "lite": miniatura que carga el iframe SOLO al hacer clic.
   Evita cargar el reproductor pesado above-the-fold (mejor LCP en móvil). */
.yt-facade {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 22px auto 18px;
  aspect-ratio: 16 / 9;
  background: #000 center/cover no-repeat;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
  border: 0; padding: 0; display: block;
}
.yt-facade::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.14); transition: background .2s;
}
.yt-facade:hover::after, .yt-facade:focus-visible::after { background: rgba(0,0,0,.02); }
.yt-facade__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 68px; height: 48px; border-radius: 14px;
  background: #cc1f1f; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s;
}
.yt-facade:hover .yt-facade__play { background: #e60000; transform: translate(-50%,-50%) scale(1.06); }
.yt-facade__play::before {
  content: ""; border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff; margin-left: 4px;
}
.yt-facade__aviso { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 10px 14px; background: rgba(0,0,0,.78); color: #fff; font-size: .78rem; line-height: 1.4; text-align: center; }
.yt-facade--local { background-image: url('../assets/hero-bg.jpg'); }
.footer__linkbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline; }
.yt-facade:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Variante roja del botón de navegación (ej. "Examen") */
.nav__cta--red { background: #e63946 !important; color: var(--white) !important; font-weight: 700 !important; border-radius: 6px; }
.nav__cta--red:hover { background: #c1121f !important; }

/* ===== FORMULARIO DE CONTACTO ===== */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: .92rem; color: var(--green-dark); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text, #222);
  border: 1px solid #cfd8d3; border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,111,178,.18);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: #444; }
.form-check input { margin-top: 3px; flex: none; }
.form-result { margin: 4px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-result--ok { color: #157347; font-weight: 600; }
.form-result--err { color: #c1121f; font-weight: 600; }

/* ===== COURSE CARD ===== */
.course-card {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  box-shadow: 0 4px 24px rgba(31,111,178,.15);
  position: relative;
}
.course-card__badge {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.course-card h3 { font-size: 1.3rem; color: var(--green-dark); margin-bottom: 8px; }
.course-card p { font-size: .92rem; color: var(--text-muted); margin-bottom: 16px; }
.course-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  font-size: .88rem;
}
.course-card li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ===== STEPS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.step__num {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ===== CHECK LIST ===== */
.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list li::before { content: "✅"; flex-shrink: 0; margin-top: 1px; }

/* ===== ROLES ===== */
.roles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.role-tag {
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  color: var(--green-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .88rem;
  font-weight: 500;
}

/* ===== LEGAL BOX ===== */
.legal-box {
  background: #eef4fb;
  border: 1px solid #b9d3ee;
  border-radius: var(--radius);
  padding: 24px;
}
.legal-box ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.legal-box li::before { content: "⚖️ "; }

/* ===== AUTHOR CARD ===== */
.author-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.author-card__avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--green-light);
  border: 3px solid var(--green);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.author-card__title { font-size: .82rem; color: var(--text-muted); margin-bottom: 3px; }
.author-card__name { font-size: 1.15rem; font-weight: 700; color: var(--green-dark); margin-bottom: 3px; }
.author-card__cred { font-size: .85rem; color: var(--text-muted); margin-bottom: 12px; }
.author-card blockquote {
  font-style: italic; color: var(--text-muted);
  border-left: 3px solid var(--green-mid);
  padding-left: 14px; margin-top: 10px; font-size: .92rem;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--green);
}
.testimonial blockquote { font-style: italic; font-size: .92rem; margin-bottom: 12px; color: var(--text); }
.testimonial cite { font-size: .82rem; color: var(--text-muted); font-style: normal; font-weight: 600; }

/* ===== FAQ ===== */
.faq { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.faq__item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq__q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 16px 20px; font-size: .95rem; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; color: var(--text); gap: 14px; line-height: 1.4;
}
.faq__q::after { content: "+"; font-size: 1.4rem; color: var(--green); flex-shrink: 0; transition: transform .2s; font-weight: 300; }
.faq__item.open .faq__q::after { transform: rotate(45deg); }
.faq__a { display: none; padding: 0 20px 16px; color: var(--text-muted); font-size: .92rem; line-height: 1.7; border-top: 1px solid var(--border); }
.faq__item.open .faq__a { display: block; }

/* ===== EXAM ===== */
.exam-section {
  background: var(--bg-light);
  border: 2px solid var(--green);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 28px 0;
}
.exam-section h2 { margin-bottom: 6px; }
.exam__meta { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.question { margin-bottom: 20px; }
.question__text { font-weight: 700; margin-bottom: 14px; font-size: 1.02rem; }
.question__options { display: flex; flex-direction: column; gap: 8px; }
.option-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 15px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: .93rem;
  transition: border-color .15s, background .15s;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  line-height: 1.4;
}
.option-label:hover { border-color: var(--green); background: var(--green-light); }
.option-label input { flex-shrink: 0; margin-top: 2px; accent-color: var(--green); }
.option-label.selected { border-color: var(--green); background: var(--green-light); }
.exam__divider {
  text-align: center; color: var(--text-muted);
  font-size: .88rem; margin: 32px 0;
  display: flex; align-items: center; gap: 14px;
}
.exam__divider::before, .exam__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
#exam-result { margin-top: 24px; }
.result-pass {
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 28px;
}
.result-pass h3 { color: var(--green-dark); font-size: 1.3rem; margin-bottom: 8px; }
.result-fail {
  background: #fff8f0;
  border: 2px solid #f59e0b;
  border-radius: var(--radius);
  padding: 24px;
}
.result-fail h3 { color: #92400e; margin-bottom: 8px; }

/* ===== REGISTER FORM ===== */
.register-form {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(31,111,178,.1);
}
.register-form h3 { color: var(--green-dark); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
.form-group input {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; transition: border-color .2s; color: var(--text);
}
.form-group input:focus { outline: none; border-color: var(--green); }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.form-check input { flex-shrink: 0; margin-top: 2px; accent-color: var(--green); }
.input-with-prefix { display: flex; align-items: stretch; }
.input-prefix-select { padding: 0 10px; background: var(--bg-light); border: 1.5px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: .9rem; color: var(--text); cursor: pointer; min-width: 100px; }
.input-prefix-select:focus { outline: none; border-color: var(--green); }
.input-after-prefix { border-radius: 0 var(--radius) var(--radius) 0 !important; }
.form-error { color: #dc2626; font-size: .83rem; margin-top: 4px; }

/* ── Tarjetas de motivo del carnet ── */
.motivo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.motivo-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s, background .18s;
  background: #fff;
  font-weight: normal;
}
.motivo-option:hover { border-color: var(--green); background: var(--green-light); }
.motivo-option input[type=radio] { display: none; }
.motivo-option.selected {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 3px rgba(31,111,178,.15);
}
.motivo-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.motivo-texto { font-size: .82rem; color: var(--text); line-height: 1.4; }
.motivo-texto small { color: var(--text-muted); font-size: .75rem; }
@media (max-width: 480px) {
  .motivo-grid { grid-template-columns: 1fr; }
}

/* ===== NOTICE ===== */
.notice {
  background: #fffbeb; border-left: 4px solid #f59e0b;
  border-radius: var(--radius); padding: 14px 18px;
  font-size: .88rem; color: #78350f; margin: 18px 0;
}

/* ===== CTA SECTION ===== */
.cta-section { background: var(--green-dark); color: var(--white); text-align: center; padding: 56px 0; }
.cta-section h2 { color: var(--white); }
.cta-section p { opacity: .85; max-width: 500px; margin: 0 auto 26px; }

/* ===== VERIFY ===== */
.verify-form {
  max-width: 500px; margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.verify-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.verify-form input {
  width: 100%; padding: 13px 14px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; margin-bottom: 14px;
}
.verify-form input:focus { outline: none; border-color: var(--green); }
#verify-result { margin-top: 16px; padding: 16px; border-radius: var(--radius); display: none; font-weight: 600; font-size: .93rem; }
#verify-result.ok { background: var(--green-light); color: var(--green-dark); border: 1px solid var(--green); }
#verify-result.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.blog-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.blog-card__cat { background: var(--green); color: var(--white); font-size: .72rem; font-weight: 700; padding: 4px 12px; letter-spacing: .05em; text-transform: uppercase; }
.blog-card__body { padding: 18px; }
.blog-card h3 { font-size: .97rem; margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: .85rem; color: var(--text-muted); margin-bottom: 12px; }
.blog-card .read-more { font-size: .85rem; font-weight: 600; color: var(--green); }

/* ===== ARTICLE ===== */
.article-content { max-width: 720px; }
.article-content h2 { font-size: 1.35rem; margin-top: 32px; margin-bottom: 12px; }
.article-content h3 { margin-top: 22px; margin-bottom: 8px; }
.article-content p { line-height: 1.75; }
.article-content ul, .article-content ol { padding-left: 22px; margin-bottom: 14px; line-height: 1.7; }
.article-content strong { color: var(--green-dark); }
.article-author {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
  margin-bottom: 28px; font-size: .88rem; color: var(--text-muted);
}
.article-author__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-light); border: 2px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.article-author__foto {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--green); flex-shrink: 0;
}
.article-author a { color: var(--green-dark); font-weight: 700; text-decoration: none; }
.article-author a:hover { text-decoration: underline; }
.about__intro { display: flex; gap: 28px; align-items: flex-start; }
.about__intro p { line-height: 1.75; }
.about__foto {
  width: 240px; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 14px; box-shadow: var(--shadow); flex-shrink: 0;
}
@media (max-width: 640px) {
  .about__intro { flex-direction: column; align-items: center; }
  .about__foto { width: 200px; }
}
.article-cta {
  background: var(--green-light); border: 2px solid var(--green);
  border-radius: 12px; padding: 28px; margin: 36px 0; text-align: center;
}
.article-cta h3 { color: var(--green-dark); margin-bottom: 8px; }

/* ===== FOOTER ===== */
.site-footer { background: #0a0a0a; color: #9ca3af; padding: 40px 0 22px; font-size: .83rem; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 28px; margin-bottom: 28px;
}
.footer__brand { color: var(--white); font-weight: 700; font-size: .95rem; margin-bottom: 8px; }
.footer__author { font-size: .78rem; margin-top: 8px; line-height: 1.5; }
.footer__col h4 { color: var(--white); font-size: .85rem; margin-bottom: 10px; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.footer__col a { color: #9ca3af; }
.footer__col a:hover { color: var(--white); }
.footer__bottom { border-top: 1px solid #1f2937; padding-top: 18px; text-align: center; line-height: 1.9; }
.footer__bottom a { color: #9ca3af; }

/* ===== PAGE HEADER ===== */
.page-header { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: var(--white); padding: 44px 0 36px; }
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; line-height: 1.25; margin-bottom: 10px; letter-spacing: -.02em; }
.page-header p { opacity: .88; font-size: 1rem; max-width: 600px; }

/* ===== GRACIAS ===== */
.gracias-box {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--white); border-radius: 16px;
  padding: 48px 36px; box-shadow: 0 8px 40px rgba(31,111,178,.12);
  border-top: 4px solid var(--green);
}
.gracias-box .big-check { font-size: 4rem; margin-bottom: 16px; display: block; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: var(--white);
  padding: 14px 28px; border-radius: var(--radius);
  font-weight: 700; font-size: .95rem; margin-top: 20px;
  transition: background .15s;
}
.share-btn:hover { background: #128c7e; color: var(--white); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .nav { position: relative; }
  .nav__links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 2px solid var(--green); padding: 14px; gap: 4px; box-shadow: 0 8px 20px rgba(0,0,0,.12); }
  .nav__links.open { display: flex; }
  .nav__links a { white-space: normal; }
  .nav__burger { display: flex; }
}
@media (max-width: 680px) {
  .author-card { flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.65rem; }
  .course-card { max-width: 100%; }
  .exam-section { padding: 20px; }
}

/* ── Programmatic SEO: sectores ─────────────────────────────── */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.sector-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; }
.sector-card:hover { transform: translateY(-2px); border-color: var(--green); }
.sector-card strong { color: var(--green-dark); font-size: 1.02rem; }
.sector-card span { color: var(--text-muted); font-size: .88rem; }
.sector-links { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.sector-links a { color: var(--green); text-decoration: none; font-size: .92rem; }
.sector-links a:hover { text-decoration: underline; }
.checklist { list-style: none; padding: 0; margin: 8px 0 0; }
.checklist li { position: relative; padding: 6px 0 6px 30px; color: var(--text); line-height: 1.6; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: var(--green); font-weight: 700; }

/* ── E-E-A-T: bloque de autora ──────────────────────────────── */
.autora-box { display: flex; gap: 16px; align-items: flex-start; background: var(--green-light); border: 1px solid var(--green); border-radius: var(--radius); padding: 20px 22px; }
.autora-box__avatar { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }
.autora-box__nombre { margin: 0 0 2px; color: var(--green-dark); }
.autora-box__cred { margin: 0 0 8px; font-size: .9rem; font-weight: 600; color: var(--green-dark); }
.autora-box__txt { margin: 0; font-size: .9rem; line-height: 1.7; color: var(--text); }

/* ── Reseñas ────────────────────────────────────────────────── */
.resenas-avg { font-size: 1.05rem; margin: 4px 0 20px; }
.resenas-avg__stars { color: #f5b301; letter-spacing: 1px; }
.resenas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.resena { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.resena__stars { color: #f5b301; letter-spacing: 1px; margin-bottom: 8px; }
.resena__texto { font-size: .9rem; line-height: 1.65; color: var(--text); margin: 0 0 12px; }
.resena__autor { font-size: .85rem; color: var(--text-muted); margin: 0; }
.resena__badge { display: inline-block; background: var(--green-light); color: var(--green-dark); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 20px; margin-left: 4px; }

/* ── Contacto humano ────────────────────────────────────────── */
.contacto-strip { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.contacto-strip strong { color: var(--green-dark); font-size: 1.05rem; }
.contacto-strip p { margin: 4px 0 0; font-size: .9rem; color: var(--text-muted); max-width: 460px; }

/* ── Blog: artículos relacionados (enlazado interno) ────────── */
.articulos-relacionados { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.articulos-relacionados h2 { margin-bottom: 14px; }
.articulos-relacionados ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.articulos-relacionados a { color: var(--green); text-decoration: none; font-weight: 600; font-size: .95rem; }
.articulos-relacionados a:hover { text-decoration: underline; }

/* ── Banner de consentimiento de cookies ────────────────────── */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999; max-width: 900px; margin: 0 auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 30px rgba(0,0,0,.18); padding: 18px 20px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { font-size: .88rem; color: var(--text); line-height: 1.6; flex: 1 1 320px; }
.cookie-banner__text a { color: var(--green); }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner__actions .btn { padding: 10px 20px; }
@media (max-width: 560px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-banner__actions { justify-content: flex-end; } }

/* ── Logo en cabecera y pie ──────────────────────────────────── */
.footer__brand { display: flex; align-items: center; gap: 8px; }
.footer__logo-img { height: 32px; width: auto; border-radius: 6px; background: #fff; }
@media (max-width: 600px) { .nav__logo-img { height: 32px; } }

/* ── Hero a pantalla completa (solo landing) ─────────────────── */
.page-header--hero { min-height: 72vh; display: flex; align-items: center; position: relative; overflow: hidden; }
.page-header--hero > .container { width: 100%; }
@media (max-width: 680px) { .page-header--hero { min-height: 60vh; } }

/* ── Botón CTA rojo destacado ────────────────────────────────── */
.btn--red { background: #e63946 !important; color: #fff !important; }
.btn--red:hover { background: #c1121f !important; color: #fff !important; }

/* ── Examen pregunta a pregunta ──────────────────────────────── */
.exam-progress { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.exam-progress__bar { height: 100%; background: var(--green); border-radius: 4px; transition: width .3s ease; }
.exam-progress__count { font-size: .82rem; color: var(--text-muted); margin-bottom: 18px; font-weight: 600; }
.exam-nav { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exam-back { background: none; border: none; color: var(--green); font-size: .88rem; cursor: pointer; padding: 6px 0; font-weight: 600; }
.exam-back:hover { text-decoration: underline; }
.exam-next { padding: 9px 22px; font-size: .9rem; }
.exam-next:disabled { opacity: .45; cursor: not-allowed; }
.option-label.selected { border-color: var(--green); background: var(--green-light); font-weight: 600; }

/* ── Temario navegable (índice + una lección cada vez) ───────── */
.temario-viewer { display: flex; gap: 28px; margin-top: 24px; align-items: flex-start; }
.temario-index { flex: 0 0 240px; position: sticky; top: 80px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); max-height: calc(100vh - 100px); overflow-y: auto; }
.temario-index__title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; margin: 0 0 10px; }
.temario-index__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.temario-index__item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 8px 10px; border-radius: 6px; font-size: .84rem; color: var(--text); font-family: inherit; line-height: 1.3; transition: background .15s; }
.temario-index__item:hover { background: var(--green-light); }
.temario-index__item.active { background: var(--green); color: #fff; font-weight: 600; }
.temario-index__num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); font-weight: 700; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; }
.temario-index__item.active .temario-index__num { background: rgba(255,255,255,.25); color: #fff; }
.temario-main { flex: 1 1 auto; min-width: 0; }
.temario-content .leccion h3 { font-size: 1.25rem; color: var(--green-dark); margin-bottom: 14px; margin-top: 0; }
.temario-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.temario-nav .btn { padding: 10px 22px; font-size: .9rem; }
.temario-nav__count { font-size: .85rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
/* ── Contenido del temario (includes/temario.php) ───────────── */
.tm-meta { font-size: .88rem; color: #666; margin-bottom: 28px; }
.tm-objetivo { font-size: .9rem; color: var(--green-dark); background: var(--green-light); border-radius: 6px; padding: 8px 12px; margin-bottom: 18px; }
#temario-contenido h4 { font-size: 1.05rem; color: var(--green-dark); margin: 26px 0 8px; }
#temario-contenido p { margin-bottom: 12px; }
.tm-list { margin: 10px 0 16px; padding-left: 22px; line-height: 1.75; }
.tm-list li { margin-bottom: 4px; }
.tm-scroll { overflow-x: auto; margin: 14px 0 20px; }
.tm-table { width: 100%; border-collapse: collapse; font-size: .85rem; background: #fff; }
.tm-table th { background: var(--green); color: #fff; padding: 9px 10px; text-align: left; }
.tm-table td { padding: 9px 10px; border-bottom: 1px solid #ddd; vertical-align: top; }
.tm-table tr:nth-child(odd) td { background: #f9f9f9; }
.tm-table--colores td { background: transparent !important; }
.tm-table--colores td:first-child { font-weight: 700; white-space: nowrap; }
.tm-table .tm-table__warn td { background: #fff3cd !important; font-weight: 700; color: #856404; }
.tm-box { padding: 14px 18px; margin: 16px 0 24px; border-radius: 8px; font-size: .9rem; }
.tm-box p { margin: 0 0 8px; }
.tm-box p:last-child, .tm-box ul:last-child { margin-bottom: 0; }
.tm-box__title { font-size: .84rem; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .03em; }
.tm-box--info { background: #e8f5f0; border-left: 4px solid var(--green); border-radius: 0 8px 8px 0; margin-bottom: 32px; }
.tm-box--warn { background: #fff3cd; border-left: 4px solid #ffc107; border-radius: 0 8px 8px 0; }
.tm-box--case { background: #eef4fb; border: 1px solid var(--green); }
.tm-box--do { background: #fff; border: 2px solid var(--green); margin-top: 28px; }
.tm-box--do ul { list-style: none; padding: 0; line-height: 1.6; }
.tm-box--do li { position: relative; padding-left: 24px; margin-bottom: 6px; }
.tm-box--do li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.tm-test { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 12px 18px; margin: 0 0 8px; font-size: .9rem; }
.tm-test summary { cursor: pointer; font-weight: 700; color: var(--green-dark); }
.tm-test ol { margin: 12px 0 4px; padding-left: 20px; line-height: 1.6; }
.tm-test li { margin-bottom: 8px; }
.tm-resumen { background: var(--green-dark); color: #fff; padding: 22px 26px; border-radius: 10px; margin: 32px 0 8px; }
.tm-resumen__title { margin: 0 0 12px; font-weight: 700; font-size: 1rem; }
.tm-resumen ol { margin: 0; padding-left: 20px; line-height: 1.9; }
.temario-index__item.visto:not(.active) .temario-index__num { background: var(--green); color: #fff; }
@media (max-width: 820px) {
  .temario-viewer { flex-direction: column; gap: 14px; }
  .temario-index { flex: none; width: 100%; position: static; padding: 12px; max-height: none; }
  .temario-index__list { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .temario-index__item { flex-direction: column; gap: 0; padding: 4px; font-size: 0; }
  .temario-index__num { width: 30px; height: 30px; font-size: .9rem; }
}

/* Barra del periodo de lanzamiento (haccpcorsoonline.it) */
.lancio-bar { background: #ffd54a; color: #3d2c00; text-align: center; font-size: .88rem; padding: 8px 14px; line-height: 1.4; }
.lancio-bar a { color: #12355b; font-weight: 700; text-decoration: underline; }
.article-body h2 { margin-top: 32px; }
.article-meta { font-size: .85rem; color: #777; margin-bottom: 18px; }
