:root {
    --teal-brand: #0c7682;
    --blue-uniform: #1e5a9c;
    --teal-dark: #074e57;
    --blue-dark: #133a68;
    --soft-teal: #e6f4f5;
    --soft-blue: #e8f0f8;
    --bg-light: #f8fafc;
    --surface: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(12, 118, 130, 0.08);
    --shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', sans-serif;
}

/* Foco visible para quienes navegan con teclado */
:focus-visible {
    outline: 3px solid var(--blue-uniform);
    outline-offset: 3px;
}

/* ---------- Header y navegación ---------- */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--teal-brand);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--teal-brand), var(--blue-uniform));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--teal-brand);
    line-height: 1.1;
}

.logo-title span {
    color: var(--blue-uniform);
}

.logo-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    white-space: nowrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--teal-brand);
}

.btn-cta-nav {
    background: var(--teal-brand);
    color: white !important;
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(12, 118, 130, 0.2);
    transition: all 0.3s;
    font-size: 0.85rem !important;
    display: inline-block;
    white-space: nowrap;
}

.btn-cta-nav:hover {
    background: var(--teal-dark) !important;
    transform: translateY(-2px);
}

/* Botón del menú en celular */
.nav-toggle {
    display: none;
    background: var(--soft-teal);
    color: var(--teal-brand);
    border: 1px solid rgba(12, 118, 130, 0.25);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Enlaces internos no quedan tapados por el header fijo */
section {
    padding: 5rem 1.5rem;
    scroll-margin-top: 70px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, #094e57 0%, #113660 100%);
    color: white;
    padding: 5rem 1.5rem 6rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 520px;
}

#lava-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; opacity: 0.65; pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 1.2rem;
}

.hero-title span {
    color: #67e8f9;
    display: block;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.92;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: white;
    color: var(--teal-brand);
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-family: inherit;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #f0fdfa;
}

.tour-overlay .btn-primary {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tour-overlay .btn-primary:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

.hero-card-sensory {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.hero-card-sensory i {
    font-size: 3rem;
    color: #67e8f9;
    margin-bottom: 1rem;
}

/* Cerebro animado (si el navegador no soporta 3D se queda la tarjeta de arriba) */
.hero-cerebro { display: none; }
.hero.cerebro-activo .hero-cerebro {
    display: block; position: relative; width: 100%; max-width: 540px;
    margin: 0 auto; aspect-ratio: 1 / 1;
}
.hero.cerebro-activo .hero-card-sensory { display: none; }
.hero-cerebro::before {
    content: ""; position: absolute; inset: 8%;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.20) 0%, rgba(103, 232, 249, 0) 68%);
    border-radius: 50%; animation: respira 6s ease-in-out infinite;
}
#cerebro { position: absolute; inset: 0; }
#cerebro canvas { width: 100% !important; height: 100% !important; display: block; }
@keyframes respira { 0%, 100% { opacity: 0.6; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }

/* ---------- Layout de secciones ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-subtitle {
    color: var(--teal-brand);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.3rem;
    color: var(--text-dark);
}

.section-hint {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ---------- Servicios ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.service-card {
    background: var(--surface);
    padding: 2.2rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--soft-teal);
}

.service-card p {
    margin-bottom: 1.2rem;
}

.service-icon {
    width: 70px; height: 70px;
    border-radius: 20px;
    margin: 0 auto 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.ic-1 { background: #e0f2fe; color: #0284c7; }
.ic-2 { background: #dcfce7; color: #16a34a; }
.ic-3 { background: #fef3c7; color: #d97706; }
.ic-4 { background: #f3e8ff; color: #9333ea; }
.ic-5 { background: #fee2e2; color: #dc2626; }
.ic-6 { background: #dbeafe; color: #2563eb; }

.service-wa {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1.2rem;
    border: 1.5px solid #25d366;
    border-radius: 50px;
    color: #128c4a;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.service-wa:hover {
    background: #25d366;
    color: white;
}

/* ---------- Equipo (tarjetas que giran) ---------- */
.team-bg { background: var(--soft-teal); }

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.flip-card {
    background-color: transparent;
    height: 440px;
    perspective: 1000px;
    width: calc(33.333% - 17px);
    box-sizing: border-box;
    cursor: pointer;
    border-radius: var(--radius-lg);
}

.flip-card-inner {
    position: relative;
    width: 100%; height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Con mouse: gira al pasar el cursor. Con teclado o toque: gira con la clase .flipped */
@media (hover: hover) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: white;
    box-sizing: border-box;
}

.flip-card-front { border-bottom: 5px solid var(--teal-brand); }

.flip-card-back {
    background: linear-gradient(145deg, var(--teal-brand), var(--blue-uniform));
    color: white;
    transform: rotateY(180deg);
    justify-content: center;
    gap: 1rem;
    overflow-y: auto;
}

.flip-card-back p {
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Foto con iniciales como respaldo si la imagen no carga */
.avatar-circle {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px auto;
    border: 3px solid #074e57;
    background: linear-gradient(135deg, var(--teal-brand), var(--blue-uniform));
    display: flex;
    align-items: center;
    justify-content: center;
}

.initials {
    color: white;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 2.8rem;
    letter-spacing: 1px;
}

.prof-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-fail { display: none !important; }

.prof-name { font-size: 1.4rem; color: var(--blue-dark); }
.prof-role { color: var(--teal-brand); font-weight: 700; }
.flip-hint { font-size: 0.8rem; color: var(--text-muted); }

.reg-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ---------- Sede ---------- */
.virtual-tour-container {
    margin-bottom: 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--soft-teal);
}

.tour-screen {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #074e57, #133a68);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-bg-img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Velo oscuro sobre la foto para que el texto blanco se lea bien */
.tour-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(7, 78, 87, 0.80) 0%, rgba(19, 58, 104, 0.74) 100%);
}

.tour-overlay {
    position: absolute; z-index: 2;
    text-align: center; color: white; padding: 2rem;
}

.tour-play-icon {
    background: none;
    border: none;
    font-size: 4rem; color: #67e8f9;
    margin-bottom: 1rem; cursor: pointer; transition: transform 0.3s;
}

.tour-play-icon:hover { transform: scale(1.15); }

.tour-overlay h3,
.tour-overlay p {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.tour-overlay p { margin-bottom: 1rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden; height: 200px;
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, var(--soft-teal), var(--soft-blue));
}

.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.4s;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(12, 118, 130, 0.9));
    color: white; padding: 1rem 0.8rem 0.6rem;
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
}

/* ---------- Convenios ---------- */
.convenios-bg { background: linear-gradient(135deg, var(--blue-dark) 0%, #0c7682 100%); color: white; }

.convenios-card-box {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}

.badge-convenio {
    display: inline-block; background: rgba(255, 255, 255, 0.18);
    padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem;
}

.convenios-info h2 { font-size: 2.2rem; margin-bottom: 1rem; color: #67e8f9; }
.convenios-list { list-style: none; margin-top: 1.5rem; }
.convenios-list li { margin-bottom: 1rem; display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; }
.convenios-list i { color: #67e8f9; margin-top: 3px; }

.convenio-form-box {
    background: white; color: var(--text-dark); padding: 2.2rem;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}

.btn-convenio { background: var(--blue-uniform); }
.btn-convenio:hover { background: var(--blue-dark); }

/* ---------- Formularios y contacto ---------- */
.contact-container {
    display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem;
}

.contact-info-card, .form-card {
    background: white; padding: 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

.contact-info-card { border-left: 6px solid var(--blue-uniform); }
.form-card { border-top: 5px solid var(--teal-brand); }

.info-item { display: flex; gap: 1.2rem; margin-top: 1.5rem; }
.info-clickable { cursor: pointer; }

.info-icon {
    width: 45px; height: 45px; border-radius: 12px; flex-shrink: 0;
    background: var(--soft-blue); color: var(--blue-uniform);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

.email-text { overflow-wrap: anywhere; }

.social-title { margin-top: 2rem; margin-bottom: 0.8rem; }
.social-links { display: flex; gap: 1rem; }

.social-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--bg-light); color: var(--teal-brand);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: all 0.3s;
}

.social-btn:hover { background: var(--teal-brand); color: white; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }

.form-control {
    width: 100%; padding: 0.8rem 1rem;
    border: 1.5px solid #cbd5e1; border-radius: var(--radius-md); font-size: 0.95rem;
    font-family: inherit; background: white;
}

.form-control:focus { outline: none; border-color: var(--teal-brand); box-shadow: 0 0 0 3px rgba(12, 118, 130, 0.15); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.checkbox-habeas {
    display: flex; gap: 10px; margin: 1.2rem 0; font-size: 0.82rem; color: var(--text-muted);
}

.btn-submit {
    width: 100%; background: #25d366; color: white;
    border: none; padding: 1rem; border-radius: var(--radius-md);
    font-weight: 700; font-family: inherit; cursor: pointer; transition: background-color 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem;
}

.btn-submit:hover { background: #1eb954; }

.form-feedback {
    display: none;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    background: #dcfce7;
    color: #166534;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.form-feedback.visible { display: block; }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
    position: fixed; bottom: 25px; right: 25px;
    background: #25d366; color: white;
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999; text-decoration: none; transition: transform 0.3s;
}

.whatsapp-float:hover { transform: scale(1.1); }

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(180deg, #133a68 0%, #0d2b4e 100%);
    color: rgba(255, 255, 255, 0.82);
    padding: 0;
    position: relative;
}

.footer-arcoiris {
    height: 5px;
    background: linear-gradient(90deg, #e11d2e, #f59e0b, #84cc16, #14b8a6, #0ea5e9, #3b5bdb, #8b5cf6, #ec4899);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1.4fr;
    gap: 3rem;
}

.footer-col h5 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    color: #67e8f9;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.footer-marca h4 {
    font-size: 1.35rem;
    color: white;
    margin: 1rem 0 0.4rem;
}

.footer-lema {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.72);
    max-width: 320px;
    margin-bottom: 1.4rem;
}

.footer-logo {
    display: inline-block;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 10px 25px rgba(0, 0, 0, 0.25);
}

.footer-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.footer-social { display: flex; gap: 0.8rem; margin-top: 1.4rem; }

.footer-social a {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white; font-size: 1.15rem; text-decoration: none;
    transition: all 0.3s;
}

.footer-social a:hover { background: #67e8f9; color: #133a68; transform: translateY(-3px); }

.footer-links, .footer-contacto { list-style: none; }
.footer-links li { margin-bottom: 0.7rem; }

.footer-links a, .footer-contacto a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover, .footer-contacto a:hover { color: #67e8f9; }

.footer-contacto li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
}

.footer-contacto li[data-maps] { cursor: pointer; }
.footer-contacto li[data-maps]:hover span { color: #67e8f9; }

.footer-contacto i {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(103, 232, 249, 0.12);
    color: #67e8f9;
    font-size: 1rem;
}

.footer-contacto small { display: block; font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.footer-contacto a { overflow-wrap: anywhere; align-self: center; }
.footer-contacto span { align-self: center; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.6rem 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 2rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

.footer-legal-text { flex: 1 1 380px; max-width: 560px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .flip-card { width: calc(50% - 13px); }
}

@media (max-width: 900px) {
    .hero-container, .contact-container, .convenios-card-box { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    .nav-toggle { display: flex; }

    .footer-inner { grid-template-columns: 1fr; gap: 2.2rem; padding: 3rem 1.5rem 2rem; text-align: center; }
    .footer-marca { display: flex; flex-direction: column; align-items: center; }
    .footer-lema { margin-left: auto; margin-right: auto; }
    .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; }
    .footer-links li { margin-bottom: 0.3rem; }
    .footer-contacto { max-width: 340px; margin: 0 auto; }
    .footer-contacto li { justify-content: flex-start; text-align: left; }
    .footer-contacto a[href^="mailto"] { font-size: clamp(0.72rem, 3.5vw, 0.9rem); overflow-wrap: normal; }
    .footer-bottom { flex-direction: column; text-align: center; padding-bottom: 5.5rem; }
    .hero.cerebro-activo .hero-cerebro { max-width: 420px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.5rem 1.2rem;
        box-shadow: 0 12px 20px rgba(0,0,0,0.08);
        border-bottom: 3px solid var(--teal-brand);
    }

    .nav-links.open { display: flex; }
    .nav-links li { padding: 0.3rem 0; }
    .nav-links a { display: block; padding: 0.5rem 0; font-size: 1rem; }
    .nav-links .btn-cta-nav { text-align: center; margin-top: 0.4rem; }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
    .flip-card { width: 100%; }
    .hero-title { font-size: 2.1rem; }
    .section-title { font-size: 1.9rem; }
    .convenios-info h2 { font-size: 1.8rem; }
    .contact-info-card, .form-card, .convenio-form-box { padding: 1.6rem; }
}

/* Respeta a quienes piden menos movimiento */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-cerebro::before { animation: none; }
    * { transition-duration: 0.01ms !important; }
}

.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;
}