/* ==========================================================
   Unidad de Género – TEE Sonora
   Sitio estático (HTML + CSS). Réplica del diseño original.
   ========================================================== */

:root {
  --color-tema: #846bb9;          /* Theme Color */
  --color-hover: #6b2f8e;         /* Hover (antes rgba(61,0,105,.53)) */
  --color-titulo: #484848;
  --color-texto: #333333;
  --color-fondo: #ffffff;
  --color-oscuro: #001d35;
  --color-morado-oscuro: #3d0d51;
  --color-naranja: #ff6900;
  --color-azul-claro: #bfd1ff;
  --color-borde: #e5e5e5;
  --ancho-contenido: 1200px;
  --fuente: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-texto);
  background: var(--color-fondo);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-tema); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus { color: var(--color-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--fuente);
  font-weight: 600;
  color: var(--color-titulo);
  line-height: 1.3;
  margin: 0 0 .6em;
}

p { margin: 0 0 1.4em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--color-tema); color: #fff; padding: .6em 1em;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Contenedores ---------- */
.container {
  width: 100%;
  max-width: var(--ancho-contenido);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 960px; }
.center { text-align: center; }

hr.sep {
  border: 0;
  border-top: 1px solid var(--color-borde);
  margin: 2.2em auto;
  max-width: var(--ancho-contenido);
}

/* ==========================================================
   CABECERA
   ========================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-borde);
  position: relative;
  z-index: 50;
}

.header-inner {
  max-width: var(--ancho-contenido);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 90px;
}

.site-logo img {
  width: 184px;
  height: 84px;
  object-fit: cover;
  object-position: 50% 52%;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-left: 1.5rem;
}

.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.menu a {
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.menu-main { flex: 1; justify-content: center; flex-wrap: wrap; }
.menu-main > li { position: relative; }
.menu-main > li > a {
  font-size: 14px;
  color: var(--color-titulo);
  padding: 32px 14px;
  border-bottom: 3px solid transparent;
}
.menu-main > li:hover > a,
.menu-main > li:focus-within > a,
.menu-main > li > a.is-active {
  color: var(--color-hover);
  border-bottom-color: var(--color-tema);
}

.menu-side > li > a {
  font-size: 12px;
  color: var(--color-texto);
  padding: 32px 10px;
}
.menu-side > li > a:hover,
.menu-side > li > a.is-active { color: var(--color-hover); }

/* Submenús */
.has-sub > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.submenu {
  list-style: none;
  margin: 0; padding: 0;
  position: absolute;
  top: 100%; left: 0;
  min-width: 260px;
  background: #fff;
  border-top: 2px solid var(--color-tema);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu a {
  font-size: 13px;
  text-transform: none;
  font-weight: 400;
  color: var(--color-texto);
  padding: 11px 18px;
  line-height: 1.45;
}
.submenu a:hover { color: var(--color-hover); background: #f5f2fa; }

/* Botón hamburguesa (solo móvil) */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

/* ==========================================================
   INICIO
   ========================================================== */
.hero {
  min-height: 560px;
  background:
    linear-gradient(143deg, rgba(61, 13, 81, .4) -50%, rgba(0, 0, 0, .4) 100%),
    url("../img/Frame-1321317467.png") 58% 27% / cover no-repeat;
}

.info-box h3 { font-size: 1.6rem; margin-bottom: .4em; }
.info-box.center { text-align: center; max-width: 900px; }
.info-box p { font-size: 1.05rem; }

.info-box.protocol { padding-top: 1em; padding-bottom: 1em; }
.info-box.protocol h3 { font-size: 1.9rem; margin-bottom: .5em; }
.info-box.protocol p { font-size: 1.9rem; line-height: 1.35; }
.info-box.protocol a { color: var(--color-naranja); }
.info-box.protocol a:hover { color: #c24f00; }

/* Tres accesos */
.features {
  max-width: var(--ancho-contenido);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.feature { text-align: center; color: var(--color-titulo); }
.feature h5 { font-size: 1rem; letter-spacing: .02em; }
.feature img { margin: 0 auto; transition: transform .25s ease; }
.feature:hover img { transform: scale(1.06); }
.feature:hover h5 { color: var(--color-hover); }

/* Slider (solo CSS) */
.slider {
  position: relative;
  max-width: 700px;
  aspect-ratio: 491 / 452;
  margin: 0 auto 3rem;
  overflow: hidden;
  background: #eee;
}
.slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slide-fade 15s infinite;
}
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }
@keyframes slide-fade {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  33%  { opacity: 1; }
  39%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Sitios de interés */
.section-heading { font-size: 1.5rem; margin-bottom: 1.2em; }

.columns { display: flex; gap: 3rem; align-items: flex-start; }
.col-2-3 { flex: 0 0 calc(66.66% - 1.5rem); }
.col-1-3 { flex: 1; }

.icon-list { list-style: none; margin: 0; padding: 0; }
.icon-list li { margin: 0 0 .9em; }
.icon-list a {
  display: flex; align-items: flex-start; gap: .8em;
  color: var(--color-texto);
  line-height: 1.45;
}
.icon-list a::before {
  content: "";
  flex: 0 0 20px; height: 20px; margin-top: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%23846bb9' d='M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z'/></svg>") center / contain no-repeat;
}
.icon-list a:hover { color: var(--color-hover); }

.sitios-side { text-align: center; }
.sitios-side img { margin: 0 auto 1.2rem; }

.social { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; }
.social-link {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--color-tema);
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.social-link svg { width: 20px; height: 20px; fill: currentColor; }
.social-link:hover { background: var(--color-hover); color: #fff; transform: translateY(-2px); }

/* ==========================================================
   PÁGINAS INTERNAS
   ========================================================== */
main { min-height: 50vh; }
main:not(.home) { padding: 2.5rem 0 3.5rem; }

.page-title { text-align: center; margin-bottom: 2rem; }
.page-title h2, .page-title h3 { font-size: 2.1rem; margin: 0; }

.lead { font-size: 1.15rem; }
.lead-list { font-size: 1.15rem; padding-left: 1.4em; }
.lead-list li { margin-bottom: .8em; }

.group-title { font-size: 1.15rem; margin: 2rem 0 .8rem; }
.link-list { padding-left: 1.3em; margin: 0 0 1rem; }
.link-list li { margin-bottom: .55em; }

/* Estadística */
.stat { margin: 0 0 2.4rem; text-align: center; }
.stat figcaption { margin-bottom: 1rem; font-size: 1.05rem; }
.stat img { margin: 0 auto; max-width: min(100%, 700px); border: 1px solid var(--color-borde); }

/* Sentencias */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.cards a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--color-borde);
  border-left: 4px solid var(--color-tema);
  background: #fff;
  color: var(--color-titulo);
  font-weight: 600;
  font-size: .95rem;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.cards a:hover {
  color: var(--color-hover);
  border-left-color: var(--color-naranja);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
  transform: translateY(-2px);
}

/* Día Naranja – galerías */
.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  scrollbar-color: var(--color-tema) #eee;
}
.carousel a { flex: 0 0 min(298px, 80%); scroll-snap-align: start; }
.carousel img { width: 100%; height: auto; border: 1px solid var(--color-borde); }
.carousel:focus-visible { outline: 2px solid var(--color-tema); outline-offset: 4px; }

/* PDFs incrustados */
.pdf-viewer object {
  width: 100%;
  height: 600px;
  border: 1px solid var(--color-borde);
  background: #f7f7f7;
}
.pdf-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.btn {
  display: inline-block;
  background: var(--color-tema);
  color: #fff;
  padding: .55em 1.6em;
  font-weight: 600;
  font-size: .95rem;
}
.btn:hover { background: var(--color-hover); color: #fff; }

/* ==========================================================
   PIE DE PÁGINA
   ========================================================== */
.site-footer {
  background: #e8e8e8;
  color: #000;
  border-top: 1px solid rgba(122, 122, 122, .13);
}
.footer-inner {
  max-width: var(--ancho-contenido);
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .95rem;
}
.footer-inner p { margin: 0; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .menu-main > li > a { padding-left: 9px; padding-right: 9px; font-size: 13px; }
}

@media (max-width: 921px) {
  .header-inner { grid-template-columns: 1fr auto; min-height: 76px; }
  .site-logo img { width: 130px; height: 60px; }

  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; cursor: pointer;
  }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after {
    display: block; width: 100%; height: 3px; background: var(--color-titulo);
    border-radius: 2px; transition: transform .25s ease, opacity .25s ease;
  }
  .nav-burger span { position: relative; }
  .nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; }
  .nav-burger span::before { top: -8px; }
  .nav-burger span::after { top: 8px; }
  .nav-toggle:checked + .nav-burger span { background: transparent; }
  .nav-toggle:checked + .nav-burger span::before { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked + .nav-burger span::after { transform: translateY(-8px) rotate(-45deg); }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--color-tema); }

  .main-nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding-bottom: 12px;
    border-top: 1px solid var(--color-borde);
  }
  .nav-toggle:checked ~ .main-nav { display: flex; }

  .menu { flex-direction: column; align-items: stretch; }
  .menu-main > li > a, .menu-side > li > a {
    padding: 13px 4px;
    font-size: 14px;
    border-bottom: 1px solid var(--color-borde);
  }
  .menu-main > li:hover > a, .menu-main > li:focus-within > a, .menu-main > li > a.is-active {
    border-bottom-color: var(--color-borde);
  }
  .has-sub > a::after { display: none; }

  .submenu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: 0;
    min-width: 0;
    padding-left: 14px;
    background: #faf8fd;
  }

  .hero { min-height: 340px; }
  .info-box.protocol h3, .info-box.protocol p { font-size: 1.35rem; }
  .features { grid-template-columns: 1fr; gap: 2rem; }
  .columns { flex-direction: column; gap: 2rem; }
  .col-2-3 { flex: 1 1 auto; width: 100%; }
  .col-1-3 { width: 100%; }
}

@media (max-width: 600px) {
  .page-title h2, .page-title h3 { font-size: 1.6rem; }
  .pdf-viewer object { height: 420px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { animation: none; }
  .slide:first-child { opacity: 1; }
  * { transition: none !important; }
}
