/* AutismoEcuador.com — tokens y detalles que Tailwind no cubre. Mobile-first. */
:root {
  --navy: #0F3D6B;
  --blue: #1B5A96;
  --sky: #2F8FD6;
  --gold: #FCC53A;
  --paper: #EEF4FA;
  --wa: #25D366;
  --wa-ink: #073B1C;
  --tap: 44px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: #12263A; background: #fff; }
h1, h2, h3, .font-display { font-family: var(--font-display); letter-spacing: -0.01em; }
img { max-width: 100%; height: auto; }
.site-logo { height: 56px !important; width: auto !important; }
@media (min-width: 640px) { .site-logo { height: 68px !important; } }

/* Fondos propios: la página sigue legible aunque Tailwind (CDN) no cargue */
.bg-navy { background: var(--navy); color: #fff; }
.bg-paper { background: var(--paper); }
.bg-gold { background: var(--gold); }
[id] { scroll-margin-top: 72px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--navy);
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy); padding: 12px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.rainbow-line {
  height: 5px;
  background: linear-gradient(90deg, #2F8FD6 0 20%, #EE5A6A 20% 40%, #FCC53A 40% 60%, #8BBF3A 60% 80%, #6B4A9E 80%);
}

/* Botones tipo píldora (objetivo táctil mínimo de 44 px) */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: 0 1.4rem;
  border-radius: 999px; font-weight: 800; text-decoration: none; text-align: center;
  border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.pill:hover { transform: translateY(-2px); }
.pill--gold { background: var(--gold); color: var(--navy); }
.pill--outline { background: transparent; color: #fff; border-color: #fff; }
.pill--white { background: #fff; color: var(--navy); }
.pill--outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.pill--wa { background: var(--wa); color: var(--wa-ink); }

.nav-link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .75rem; font-weight: 700; color: var(--navy); text-decoration: none; }
.nav-link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--sky); }
.nav-link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--navy); }

/* Menú: visible sin JavaScript; con JS se pliega en teléfonos y tabletas */
.menu-btn { display: none; min-height: var(--tap); min-width: var(--tap); border-radius: 12px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font-weight: 800; padding: 0 .9rem; }
.menu-panel { display: flex; flex-wrap: wrap; gap: .25rem; }
@media (max-width: 1023px) {
  .js .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .js .menu-panel { display: none; flex-direction: column; width: 100%; padding-bottom: .75rem; }
  .js .menu-panel.open { display: flex; }
}

/* Carrusel de tarjetas: desliza en teléfonos y tabletas, cuadrícula en escritorio */
.carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem 0 1rem; -webkit-overflow-scrolling: touch; }
.carousel > * { flex: 0 0 82%; scroll-snap-align: start; }
.carousel > article { display: flex; flex-direction: column; }
.carousel > article > div { display: flex; flex-direction: column; flex: 1; }
.carousel > article > div > p { flex: 1; }
.carousel > article > div > .pill { align-self: flex-start; }
@media (min-width: 768px) { .carousel > * { flex-basis: 46%; } }
@media (min-width: 1024px) { .carousel { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; } .carousel > * { flex: initial; } }

/* Pasos con línea vertical */
.steps { position: relative; padding-left: 2rem; border-left: 4px solid var(--navy); }
.steps > li { position: relative; padding-bottom: 2rem; }
.steps > li::before { content: attr(data-n); position: absolute; left: calc(-2rem - 18px); top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; display: grid; place-items: center; }

/* Preguntas frecuentes */
details { border-bottom: 1px solid #C9D8E8; }
details > summary { min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 800; padding: .75rem 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.5rem; color: var(--blue); }
details[open] summary::after { content: '–'; }

/* Tarjetas de ubicaciones y mapas en Contacto */
.loc-grid { display: grid; gap: 2rem; margin-top: 2rem; }
@media (min-width: 768px) { .loc-grid { grid-template-columns: repeat(2, 1fr); } }
.loc-card { display: flex; flex-direction: column; background: #fff; border-radius: 24px; padding: 1.75rem; border: 2px solid #C9D8E8; box-shadow: 0 12px 28px rgba(15, 61, 107, 0.10); }
.loc-card--oficina { border-color: var(--sky); }
.loc-card--consultorio { border-color: var(--gold); }
.loc-badge { display: inline-block; align-self: flex-start; padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .75rem; }
.loc-badge--oficina { background: #E0F2FE; color: var(--navy); }
.loc-badge--consultorio { background: #FEF3C7; color: var(--navy); }
.loc-map-frame { margin-top: 1.25rem; margin-bottom: 1.5rem; border-radius: 14px; overflow: hidden; padding: 2px; }
.loc-map-frame--oficina { background: linear-gradient(135deg, #2F8FD6, #0F3D6B); box-shadow: 0 4px 14px rgba(47, 143, 214, 0.18); }
.loc-map-frame--consultorio { background: linear-gradient(135deg, #FCC53A, #EE5A6A); box-shadow: 0 4px 14px rgba(252, 197, 58, 0.22); }
.loc-map-frame iframe { display: block; width: 100%; height: 290px; border: 0; border-radius: 12px; background: #EEF4FA; }
.loc-actions { margin-top: auto; padding-top: .25rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
