/* ============================================================
   SCLHH.org — Copia moderna
   Paleta corporativa original: rojo #9F0002, dorado #F9BF36,
   teal #50C9D4, grises #272727 / #393939 / #F3F3F3
   ============================================================ */

:root {
  --brand: #9f0002;
  --brand-700: #850002;
  --brand-900: #5c0001;
  --brand-soft: #fbeaea;
  --gold: #f9bf36;
  --gold-600: #e0a92b;
  --teal: #50c9d4;
  --ink: #1f2124;
  --body: #3f4246;
  --muted: #727272;
  --line: #e3e3e3;
  --soft: #f5f5f6;
  --white: #ffffff;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(20, 20, 20, 0.06);
  --shadow: 0 10px 30px rgba(20, 20, 20, 0.10);
  --shadow-lg: 0 22px 55px rgba(20, 20, 20, 0.16);

  --container: 1180px;
  --header-h: 78px;

  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Raleway", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-gold { background: var(--gold); color: #3a2a00; }
.btn-gold:hover { background: var(--gold-600); color: #3a2a00; box-shadow: var(--shadow); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; box-shadow: var(--shadow); }

.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: #f2f2f2; color: var(--brand-700); }

.btn-outline { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ============================================================
   Cabecera
   ============================================================ */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand__crest { height: 58px; width: auto; }
.brand__text {
  font-family: var(--font-head);
  color: var(--brand);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .045em;
  line-height: 1.25;
  text-transform: uppercase;
  margin: 0;
  max-width: 420px;
}
.topbar__contact { display: flex; align-items: center; gap: 26px; }
.contact-item { display: flex; align-items: center; gap: 12px; }
.contact-item .ico {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--brand);
}
.contact-item .ico svg { width: 20px; height: 20px; }
.contact-item small {
  display: block;
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}
.contact-item strong { font-size: .98rem; color: var(--ink); font-weight: 600; }
.contact-item a.social { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.contact-item a.social:hover { color: var(--brand); }
.contact-item a.social img { width: 18px; height: 18px; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--brand);
  box-shadow: 0 4px 18px rgba(90, 0, 0, .22);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__list { display: flex; align-items: stretch; }
.nav__item { position: relative; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  height: var(--header-h);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  border: 0;
  background: transparent;
}
.nav__link:hover,
.nav__item:hover > .nav__link,
.nav__item:focus-within > .nav__link { background: rgba(0, 0, 0, .22); color: #fff; }
.nav__link.is-active { background: rgba(0, 0, 0, .28); box-shadow: inset 0 -3px 0 var(--gold); }
.nav__link .chev { width: 9px; height: 9px; transition: transform .2s ease; }
.nav__item:hover > .nav__link .chev { transform: rotate(180deg); }

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  background: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 20;
}
.nav__item:hover > .nav__dropdown,
.nav__item:focus-within > .nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: .92rem;
  font-weight: 500;
}
.nav__dropdown a:hover { background: var(--brand-soft); color: var(--brand); }
.nav__dropdown a .dico { color: var(--brand); flex: 0 0 16px; }

.nav__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,.25);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  font-family: var(--font-head);
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav__toggle .bars { display: inline-flex; flex-direction: column; gap: 4px; }
.nav__toggle .bars span { width: 20px; height: 2px; background: #fff; display: block; }

/* ============================================================
   Hero / Slider
   ============================================================ */
.hero { position: relative; background: var(--brand-900); }
.slider { position: relative; overflow: hidden; }
.slides { position: relative; height: clamp(300px, 30vw, 470px); }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  background-size: cover;
  background-position: center;
}
.slide.is-active { opacity: 1; }
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(60,0,1,.72) 0%, rgba(60,0,1,.25) 42%, rgba(60,0,1,0) 62%);
}
.slide__content {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  display: flex;
  align-items: flex-end;
  z-index: 2;
}
.slide__box {
  max-width: 440px;
  margin: 0 auto 30px 0;
  padding: 20px 24px;
  background: rgba(38, 0, 1, .58);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
}
.slide__eyebrow {
  display: inline-block;
  background: var(--gold);
  color: #3a2a00;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.slide__title {
  color: #fff;
  font-size: clamp(1.15rem, 1.9vw, 1.7rem);
  text-shadow: 0 3px 18px rgba(0,0,0,.35);
  margin-bottom: 8px;
}
.slide__text { color: rgba(255,255,255,.9); margin-bottom: 16px; font-size: .95rem; }
.slide__box .btn { padding: 11px 22px; font-size: .82rem; }

.slider__arrow {
  position: absolute;
  bottom: 24px;
  z-index: 5;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.85);
  color: var(--brand);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .2s ease, transform .2s ease;
}
.slider__arrow:hover { background: #fff; transform: scale(1.07); }
.slider__arrow svg { width: 20px; height: 20px; }
.slider__arrow.prev { right: 92px; }
.slider__arrow.next { right: 24px; }
.slider__dots {
  position: absolute;
  bottom: 42px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 5;
}
.slider__dots button {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, transform .2s ease;
}
.slider__dots button.is-active { background: var(--gold); border-color: var(--gold); transform: scale(1.15); }

/* ============================================================
   Bandas y secciones
   ============================================================ */
.section { padding: clamp(48px, 6vw, 84px) 0; }
.section--soft { background: var(--soft); }

.section-title { text-align: center; margin-bottom: 42px; }
.section-title h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.section-title em { display: block; color: var(--muted); font-style: normal; font-weight: 500; font-size: 1rem; }
.section-title--left { text-align: left; }

/* Banda roja */
.band {
  background:
    radial-gradient(1200px 300px at 50% -10%, rgba(255,255,255,.08), transparent 70%),
    var(--brand);
  color: #fff;
}
.band h1, .band h2, .band h3 { color: #fff; }
.band .section-title em { color: rgba(255,255,255,.85); }

.cta { padding: clamp(46px, 6vw, 74px) 0; text-align: center; }
.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 8px;
}
.cta p { font-size: 1.08rem; color: rgba(255,255,255,.92); margin-bottom: 26px; }

/* Bienvenida */
.welcome { max-width: 900px; margin: 0 auto; text-align: center; }
.welcome h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
  margin-bottom: 26px;
}
.welcome p { text-align: justify; color: var(--body); }
@media (min-width: 760px) { .welcome p { font-size: 1.05rem; } }

/* Recursos / patrocinios */
.resources { text-align: center; }
.resources .lead { font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--brand); margin-bottom: 24px; }
.resources__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px 56px;
  margin-bottom: 22px;
}
.resources__logos img { max-height: 90px; width: auto; }
.resources .pdf-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold-600); }
.resources .pdf-link:hover { color: var(--brand); }
.resources .book { margin: 0 auto 42px; max-width: 565px; box-shadow: var(--shadow); border-radius: var(--radius); }

/* Tarjetas de actualidad */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 22px 24px 26px; }
.card__body h4 {
  text-transform: uppercase;
  font-size: 1.02rem;
  letter-spacing: .03em;
  margin-bottom: 8px;
}
.card__body p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }
.card__link { font-family: var(--font-head); font-weight: 700; font-size: .88rem; text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 8px; }
.card__link .arrow { transition: transform .2s ease; }
.card__link:hover .arrow { transform: translateX(4px); }

/* Rejilla de secciones permanentes */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-4px); }
.tile__ico {
  flex: 0 0 58px;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.tile__ico svg { width: 26px; height: 26px; }
.tile h4 { font-size: 1.05rem; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--ink); color: #c9cbcf; padding: 62px 0 34px; }
.footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 20px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 34px; }
.footer__logo { max-height: 46px; width: auto; margin-bottom: 18px; }
.footer address { font-style: normal; line-height: 1.9; }
.footer address li { display: flex; align-items: flex-start; gap: 10px; }
.footer address svg { width: 16px; height: 16px; margin-top: 5px; color: var(--gold); flex: 0 0 16px; }
.footer__links li { margin-bottom: 12px; }
.footer__links a { color: #c9cbcf; display: inline-flex; align-items: center; gap: 9px; font-size: .93rem; }
.footer__links a svg { width: 11px; height: 11px; color: var(--gold); flex: 0 0 11px; }
.footer__links a:hover { color: #fff; }
.footer__pub li { display: flex; gap: 12px; margin-bottom: 18px; }
.footer__pub .pico { color: var(--gold); flex: 0 0 20px; }
.footer__pub a { color: #fff; font-weight: 600; }
.footer__pub em { display: block; color: #9aa0a6; font-style: normal; font-size: .85rem; }

.copyright { background: #141618; color: #9aa0a6; font-size: .86rem; padding: 18px 0; }
.copyright .container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.copyright a { color: #c9cbcf; }
.copyright a:hover { color: #fff; }

/* Botón subir */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease;
  z-index: 800;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--brand-700); }
.to-top svg { width: 20px; height: 20px; }

/* ============================================================
   Modal / Aviso de bienvenida
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 6, 6, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s ease;
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 38px 34px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--brand);
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .32s ease, opacity .32s ease;
}

.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__card { transform: translateY(0) scale(1); opacity: 1; }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.modal__close:hover { background: var(--brand-soft); color: var(--brand); }
.modal__close svg { width: 16px; height: 16px; }

.modal__crest { height: 62px; width: auto; margin: 0 auto 16px; }

.modal__badge {
  display: inline-block;
  background: var(--gold);
  color: #3a2a00;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.modal__title {
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 12px;
}

.modal__text {
  font-size: 1.05rem;
  color: var(--body);
  margin-bottom: 10px;
}
.modal__text strong { color: var(--brand); }

.modal__hint {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.modal__ok { min-width: 160px; justify-content: center; }

body.modal-open { overflow: hidden; }

@media (max-width: 560px) {
  .modal__card { padding: 32px 22px 26px; }
  .modal__text { font-size: 1rem; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }

  /* Topbar colapsada */
  .topbar .container { flex-wrap: wrap; justify-content: center; text-align: center; min-height: 0; padding-top: 16px; padding-bottom: 16px; }
  .brand { justify-content: center; }
  .brand__text { font-size: .9rem; }
  .topbar__contact { width: 100%; justify-content: center; gap: 18px; }

  /* Navegación móvil */
  .nav__inner { flex-direction: column; align-items: stretch; }
  .nav__toggle { display: flex; justify-content: space-between; margin: 8px 0; }
  .nav__list {
    display: none;
    flex-direction: column;
    background: var(--brand-700);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
  }
  .nav.is-open .nav__list { display: flex; }
  .nav__item { border-top: 1px solid rgba(255,255,255,.12); }
  .nav__link { height: auto; padding: 15px 18px; width: 100%; justify-content: space-between; }
  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0,0,0,.18);
    display: none;
    padding: 6px;
  }
  .nav__item.is-expanded > .nav__dropdown { display: block; }
  .nav__dropdown a { color: #f2f2f2; }
  .nav__dropdown a:hover { background: rgba(255,255,255,.12); color: #fff; }
  .nav__dropdown a .dico { color: var(--gold); }

  .cards { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }

  .slide__content { align-items: flex-end; }
  .slide__box { margin-bottom: 74px; }
  .slider__arrow { width: 42px; height: 42px; }
  .slider__arrow.prev { right: 78px; }
  .slider__arrow.next { right: 20px; }
  .slider__dots { bottom: 34px; }
}

@media (max-width: 560px) {
  .slider__arrow { display: none; }
  .slide__box { margin-bottom: 56px; max-width: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .resources__logos { gap: 26px; }
  .resources__logos img { max-height: 64px; }
  .topbar__contact .contact-item.contact-mail { display: none; }
}

/* Accesibilidad: menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
