:root {
    --bg-primary: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --accent-blue: #0284c7;
    --accent-cyan: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    /* AQUÍ PONES EL LINK DE TU FOTO DE FONDO */
    background-image: 
        linear-gradient(rgba(20, 74, 118, 0.88), rgba(15, 23, 42, 0.95)), 
        url('s.png');
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Mantiene la foto fija al hacer scroll */
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* HEADER & NAV */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent-cyan);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--accent-cyan);
}

.btn-nav {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff !important;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

/* HERO SECTION */
.hero {
    padding: 180px 8% 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 90vh;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 540px;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-blue), transparent, var(--accent-cyan));
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-box h3 {
    font-size: 2rem;
    color: var(--accent-cyan);
    font-weight: 800;
}

.stat-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* SERVICES SECTION */
/* Ejemplo para la sección de citas */
.section-services {
    position: relative;
    /* AQUÍ PONES EL LINK DE LA FOTO PARA ESTA SECCIÓN */
    background-image: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(6, 182, 212, 0.20)), 
        url('TU_LINK_DE_IMAGEN_AQUI.jpg');
    
    background-size: cover;
    background-position: center;
    /* Filtro CSS adicional para la foto */
    backdrop-filter: blur(4px); 
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(2, 132, 199, 0.1);
    color: var(--accent-cyan);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ANATOMÍA INTERACTIVA RODILLA */
.knee-section {
    padding: 100px 8%;
    background: var(--bg-primary);
}

.knee-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow);
}

.knee-svg-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.knee-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    touch-action: manipulation; /* Optimiza respuesta táctil en móviles */
}

.knee-part {
    cursor: pointer;
    transition: all 0.3s ease;
    fill: #334155;
    stroke: #0f172a;
    stroke-width: 2;
    -webkit-tap-highlight-color: transparent; /* Elimina el cuadro azul/gris por defecto al tocar en celular */
}

.knee-part:hover, 
.knee-part.active,
.knee-part:focus {
    fill: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.8));
    outline: none;
}

.knee-part.ligament {
    fill: #ef4444;
}

.knee-part.ligament:hover,
.knee-part.ligament.active,
.knee-part.ligament:focus {
    fill: #f87171 !important;
    filter: drop-shadow(0 0 12px rgba(248, 113, 113, 0.8));
}

.knee-part.meniscus {
    fill: #f59e0b;
}

.knee-part.meniscus:hover,
.knee-part.meniscus.active,
.knee-part.meniscus:focus {
    fill: #fbbf24 !important;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8));
}

.knee-info-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.knee-info-card h3 {
    font-size: 1.6rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.knee-info-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.knee-badge-tag {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(2, 132, 199, 0.2);
    color: var(--accent-cyan);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Responsivo para celulares */
@media (max-width: 768px) {
    .knee-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
}

/* FORM SECTION */
.appointment-section {
    padding: 100px 8%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: #0b1120;
}

.form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-cyan);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FOOTER */
footer {
    background: #070a12;
    padding: 4rem 8% 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
}

footer p {
    margin-top: 2rem;
    font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero, .appointment-section, .knee-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    nav ul {
        display: none;
    }
}

/* SECCIÓN DE TESTIMONIOS ÚNICOS */
.testimonials-section {
    padding: 100px 8%;
    background: var(--bg-primary);
    position: relative;
}

/* Filtros */
.testimonial-filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Slider Layout */
.slider-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Tarjeta del Testimonio */
.testimonial-card {
    min-width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.patient-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.patient-info h4 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.patient-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge-verified {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.rating-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    display: flex;
    gap: 4px;
}

.testimonial-text {
    color: #cbd5e1;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
}

/* Toque Único: Panel de Métricas Clínicas */
.recovery-metrics {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.metric-header strong {
    color: var(--accent-cyan);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.metric-tags {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.metric-tags .tag {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    background: rgba(2, 132, 199, 0.12);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-weight: 600;
}

/* Botones Navegación Flechas */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background: var(--accent-cyan);
    color: #0f172a;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.slider-nav.prev { left: -60px; }
.slider-nav.next { right: -60px; }

/* Paginación Dots */
.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 30px;
    border-radius: 10px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Adaptación Móvil */
@media (max-width: 900px) {
    .slider-nav.prev { left: 10px; }
    .slider-nav.next { right: 10px; }
    .testimonial-card { padding: 1.8rem; }
}

hr.linea-divisoria {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    margin: 4rem 0;
    opacity: 0.6;
}
/* ALERTAS DE FORMULARIO */
.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.alert-exito {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

/* POP-UP / MODAL CITAS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(6px);
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex; /* Se muestra al abrir */
}

.modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    max-width: 550px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}


/* Estilos para la sección FAQ */
.faq-section {
    padding: 5rem 1.5rem;
    color: #f8fafc;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-subtitle {
    color: #06b6d4;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.faq-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.faq-description {
    color: #94a3b8;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Acordeón */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: #06b6d4;
}

.faq-item.active {
    border-color: #06b6d4;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #06b6d4;
}

.faq-icon {
    color: #06b6d4;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    background-color: #1e293b;
}

.faq-answer p {
    padding: 1.25rem 1.5rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    border-top: 1px solid #334155;
}

/* ==========================================
   PRELOADER / PANTALLA DE CARGA
   ========================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #020617; /* Mismo fondo oscuro de la web */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Por encima de todo, incluyendo el modal */
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

/* Animación del Logo */
.logo-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
    animation: pulseGlow 2s infinite ease-in-out;
}

.logo-icon {
    font-size: 2.2rem;
    color: #06b6d4;
}

.loader-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    margin: 0;
}

.loader-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

/* Barra de carga animada */
.loader-bar {
    width: 160px;
    height: 3px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}

.loader-progress {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    animation: loadingBar 1.8s ease-in-out infinite;
    transform-origin: left;
}

/* Keyframes de las animaciones */
@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 35px rgba(6, 182, 212, 0.4);
    }
}

@keyframes loadingBar {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==========================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
   ========================================== */

@media (max-width: 768px) {
    
    /* 1. Ajustes del Pop-up Modal */
    .modal-card {
        padding: 1.25rem !important;
        width: 95% !important;
        max-height: 90vh; /* Para que no se corte en pantallas bajitas */
        overflow-y: auto; /* Permite scroll interno si el cel es pequeño */
    }

    /* Convertir todos los grids de 2 columnas en 1 sola columna */
    .modal-card form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    /* 2. Tipografías adaptables */
    h1, .hero-title { font-size: 1.8rem !important; }
    h2, .faq-title { font-size: 1.5rem !important; }
    
    /* 3. Ajustes de la sección del Doctor y Anatomía */
    .doctor-anatomy-wrapper {
        padding: 2rem 1rem !important;
    }

    /* 4. Preloader en móviles */
    .loader-title { font-size: 1.4rem !important; }
    .logo-wrapper { width: 65px !important; height: 65px !important; }
    .logo-icon { font-size: 1.8rem !important; }
}

/* ==========================================
   BOTÓN MÚLTIPLE / HAMBURGUESA (NAVBAR MÓVIL)
   ========================================== */

/* Oculto en computadoras */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--accent-cyan, #06b6d4);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.nav-toggle:focus {
    outline: none;
}

/* REGLAS PARA PANTALLAS PEQUEÑAS (TELÉFONOS) */
@media (max-width: 768px) {
    /* Muestra el botón de 3 líneas */
    .nav-toggle {
        display: block;
    }

    /* Oculta el menú desplegándolo desde la izquierda */
    .nav-menu {
        position: fixed;
        top: 70px; /* Si tu header mide más o menos alto, ajusta este valor */
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(12px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        gap: 2rem;
        transition: left 0.3s ease-in-out;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
        z-index: 999;
    }

    /* Clase que lo hace visible cuando tocas las 3 líneas */
    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        font-size: 1.25rem;
        display: block;
        padding: 0.8rem 0;
    }
}