/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    /* Paleta Corporativa */
    --gold: #d4af37;
    --dark-bg: #0b1120;
    --brand-blue: #002855; 
    --brand-red: #D32F2F;
    --white: #ffffff;
    --text-grey: #555;
    
    /* Variables Sección Multimedia */
    --media-primary: #007bff;
    --media-bg: #f8f9fa;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    
    /* Fuentes */
    --font-title: 'Cinzel', serif;
    --font-body: 'Manrope', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: #333;
    overflow-x: hidden;
}

/* =========================================
   2. NAVBAR Y LOGO
   ========================================= */
.navbar { position: absolute; top: 0; left: 0; width: 100%; padding: 1.5rem 5%; z-index: 100; }
.logo-container { text-decoration: none; display: inline-block; }
.logo-img {
    height: 85px; width: auto; cursor: pointer; transition: transform 0.3s ease;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 1)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}
.logo-img:hover { transform: scale(1.05); filter: drop-shadow(0 0 2px white) drop-shadow(0 0 15px white); }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    position: relative; width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #000;
}
.bg-video {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: 0; object-fit: cover;
}
.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6)); z-index: 1;
}
.glass-panel {
    position: relative; z-index: 10; padding: 2rem; max-width: 900px; text-align: center;
    animation: fadeIn 1.5s ease-out;
}
.subtitle { letter-spacing: 3px; font-size: 0.85rem; margin-bottom: 10px; color: #fff; text-shadow: 1px 1px 4px rgba(0,0,0,1); }
.hero h1 {
    font-family: var(--font-title); font-size: 3.5rem; line-height: 1.1; margin-bottom: 1rem; color: #fff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
}
.slogan {
    color: #ff4d4d; font-size: 1.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 2rem; text-shadow: 1px 1px 5px rgba(0,0,0,1);
}
.description { font-size: 1.1rem; margin-bottom: 3rem; color: #fff; text-shadow: 1px 1px 5px rgba(0,0,0,1); font-weight: 500; }

/* Botones Transparentes */
.buttons-container { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn-modern {
    display: flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 16px; padding: 12px 25px; min-width: 260px;
    text-decoration: none; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.text-box { display: flex; flex-direction: column; text-align: left; }
.small-text { font-size: 0.7rem; text-transform: uppercase; color: #e0e0e0; margin-bottom: 2px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.big-text { font-size: 1rem; font-weight: 800; color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.icon-box {
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; transition: 0.3s; background: rgba(255, 255, 255, 0.15);
}
.btn-eps .icon-box i { color: #25d366; }
.btn-eps:hover { background: rgba(37, 211, 102, 0.2); border-color: #25d366; transform: translateY(-3px); }
.btn-eps:hover .icon-box { background: #25d366; }
.btn-eps:hover .icon-box i { color: white; }
.btn-particular .icon-box i { color: #ff3333; }
.btn-particular:hover { background: rgba(255, 51, 51, 0.2); border-color: #ff3333; transform: translateY(-3px); }
.btn-particular:hover .icon-box { background: #ff3333; }
.btn-particular:hover .icon-box i { color: white; }

/* =========================================
   4. NOSOTROS (BENTO GRID)
   ========================================= */
.about-ultra { background-color: #F8F9FC; padding: 7rem 5%; position: relative; overflow: hidden; }
.container-ultra { max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }
.header-modern { text-align: center; margin-bottom: 5rem; position: relative; }
.big-watermark {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 8rem; font-family: var(--font-title); color: rgba(0, 40, 85, 0.03); white-space: nowrap; z-index: -1; pointer-events: none;
}
.tag-red { color: var(--brand-red); font-weight: 700; text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem; display: block; margin-bottom: 10px; }
.title-main { font-family: var(--font-title); font-size: 3.5rem; color: #111; margin-bottom: 1rem; }
.text-blue { color: var(--brand-blue); }
.line-decor { width: 60px; height: 4px; background: var(--brand-blue); margin: 0 auto; border-radius: 10px; }

.bento-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; align-items: stretch; }
.grid-item { border-radius: 24px; padding: 2.5rem; transition: transform 0.4s ease, box-shadow 0.4s ease; position: relative; overflow: hidden; }
.grid-item:hover { transform: translateY(-10px); }

.institution-box { background: white; box-shadow: 0 20px 50px rgba(0, 40, 85, 0.08); display: flex; flex-direction: column; justify-content: space-between; }
.institution-box h3 { font-family: var(--font-title); font-size: 1.8rem; color: var(--brand-blue); margin-bottom: 1rem; margin-top: 1rem; }
.institution-box p { color: #555; line-height: 1.7; margin-bottom: 2rem; }
.icon-floating { font-size: 3rem; color: rgba(0, 40, 85, 0.1); position: absolute; top: 20px; right: 20px; }
.stat-row { display: flex; gap: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.stat { display: flex; flex-direction: column; }
.stat .number { font-weight: 800; font-size: 1.5rem; color: var(--brand-blue); }
.stat .label { font-size: 0.8rem; color: #888; text-transform: uppercase; }

.grid-column-center { display: flex; flex-direction: column; gap: 30px; }
.card-white { background: white; box-shadow: 0 10px 30px rgba(0,0,0,0.05); flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card-white h4 { font-family: var(--font-title); font-size: 1.4rem; color: #333; margin-bottom: 0.5rem; }
.card-white p { font-size: 0.95rem; color: #666; line-height: 1.6; }
.icon-corner { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 15px; }
.icon-corner.blue { background: rgba(0, 40, 85, 0.1); color: var(--brand-blue); }
.icon-corner.red { background: rgba(211, 47, 47, 0.1); color: var(--brand-red); }

.values-dark { background: var(--brand-blue); color: white; box-shadow: 0 20px 50px rgba(0, 40, 85, 0.3); }
.values-dark h4 { font-family: var(--font-title); font-size: 1.6rem; margin-bottom: 0.5rem; position: relative; z-index: 2; }
.intro-values { opacity: 0.8; font-size: 0.9rem; margin-bottom: 2rem; position: relative; z-index: 2; }
.decor-circle { position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; background: linear-gradient(135deg, var(--brand-red), transparent); border-radius: 50%; opacity: 0.3; filter: blur(40px); }
.luxury-list { list-style: none; position: relative; z-index: 2; }
.luxury-list li { display: flex; gap: 15px; margin-bottom: 1.2rem; align-items: flex-start; }
.check-icon { width: 25px; height: 25px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; color: white; margin-top: 3px; }
.luxury-list strong { font-size: 0.95rem; display: block; color: #fff; }
.luxury-list small { opacity: 0.7; font-size: 0.8rem; display: block; margin-top: 2px; line-height: 1.4; }

/* =========================================
   5. ESTADÍSTICAS
   ========================================= */
.stats-classic { padding: 100px 5% 120px; background: radial-gradient(circle at top center, #0e4b8a 0%, #001a33 100%); position: relative; color: white; text-align: center; }
.title-classic { font-family: var(--font-body); font-size: 2.5rem; font-weight: 800; color: #ffffff; margin-bottom: 10px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.line-red-small { width: 80px; height: 4px; background: #e63946; margin: 15px auto; border-radius: 2px; }
.desc-classic { color: #b0c4de; font-size: 1rem; margin-bottom: 50px; }
.grid-4-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.card-classic { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; padding: 40px 20px; transition: all 0.4s ease; position: relative; overflow: hidden; }
.card-classic:hover { transform: translateY(-10px); background: rgba(255, 255, 255, 0.1); border-color: rgba(230, 57, 70, 0.5); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); }
.icon-top { width: 70px; height: 70px; margin: 0 auto 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: rgba(230, 57, 70, 0.15); color: #ffffff; transition: all 0.4s ease; }
.card-classic:hover .icon-top { background: #e63946; color: white; transform: scale(1.1); box-shadow: 0 0 20px rgba(230, 57, 70, 0.8); }
.number-row { font-family: var(--font-body); font-size: 2.8rem; font-weight: 800; color: #ffffff; display: flex; justify-content: center; align-items: center; margin-bottom: 5px; }
.plus { color: #e63946; font-size: 1.8rem; margin-left: 5px; }
.card-classic h3 { font-size: 0.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #ffffff; margin-bottom: 8px; }
.card-classic p { font-size: 0.85rem; color: #aabbd1; line-height: 1.4; }
.eye-divider { margin-top: 60px; display: flex; align-items: center; justify-content: center; opacity: 0.3; }
.eye-divider .line { height: 1px; width: 100px; background: white; }
.eye-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid white; display: flex; align-items: center; justify-content: center; margin: 0 15px; color: white; }

/* =========================================
   6. SERVICIOS (MODERNO LIGHT)
   ========================================= */
.services-clean { background: #f3f6f9; padding: 100px 5%; position: relative; }
.header-light { text-align: center; margin-bottom: 60px; }
.tag-outline { display: inline-block; padding: 8px 16px; border: 1px solid #002d6b; border-radius: 30px; color: #002d6b; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 15px; }
.title-dark { font-family: var(--font-body); font-size: 2.8rem; color: #1a202c; margin-bottom: 15px; }
.title-dark span { color: #004aad; }
.line-gradient { width: 70px; height: 4px; background: linear-gradient(90deg, #004aad, #e63946); margin: 0 auto 20px; border-radius: 2px; }
.desc-dark { color: #718096; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.carousel-wrapper { display: flex; align-items: center; justify-content: center; gap: 20px; position: relative; }
.carousel-view { width: 100%; overflow: hidden; padding: 20px 0 50px 0; }
.services-track { display: flex; gap: 30px; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.service-card-clean { min-width: 320px; max-width: 320px; background: #ffffff; border-radius: 24px; padding: 40px 30px; text-align: left; position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04); border: 1px solid rgba(0,0,0,0.03); transition: all 0.4s ease; overflow: hidden; }
.card-decor { position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #004aad, #e63946); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }
.service-card-clean:hover { transform: translateY(-15px); box-shadow: 0 20px 50px rgba(0, 74, 173, 0.15); }
.service-card-clean:hover .card-decor { transform: scaleX(1); }
.icon-clean { width: 60px; height: 60px; background: #f0f4f8; color: #002d6b; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 25px; transition: all 0.3s ease; }
.service-card-clean:hover .icon-clean { background: #e63946; color: white; border-radius: 50%; transform: rotate(360deg); }
.service-card-clean h3 { font-family: var(--font-title); font-size: 1.4rem; color: #1a202c; margin-bottom: 20px; font-weight: 700; }
.clean-list { padding: 0; list-style: none; }
.clean-list li { font-size: 0.95rem; color: #64748b; padding: 8px 0; border-bottom: 1px dashed #e2e8f0; display: flex; align-items: center; }
.clean-list li:last-child { border-bottom: none; }
.clean-list li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; color: #00cd96; margin-right: 10px; font-size: 0.8rem; }
.nav-btn-dark { width: 50px; height: 50px; border-radius: 50%; border: none; background: white; color: #1a202c; box-shadow: 0 5px 15px rgba(0,0,0,0.1); font-size: 1.2rem; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; z-index: 5; }
.nav-btn-dark:hover { background: #002d6b; color: white; transform: scale(1.1); }

/* =========================================
   7. ESPECIALISTAS (HERO GRANDE)
   ========================================= */
.doctors-hero { background: #f8f9fa; padding: 100px 5%; position: relative; overflow: hidden; }
.container-hero { max-width: 1300px; margin: 0 auto; }
.header-minimal { text-align: center; margin-bottom: 60px; }
.tag-minimal { color: #888; letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; font-weight: 700; display: block; margin-bottom: 10px; }
.highlight-red { color: #e63946; }
.line-animated { width: 60px; height: 4px; background: #e63946; margin: 15px auto; border-radius: 2px; }
.hero-carousel-wrapper { position: relative; display: flex; align-items: center; justify-content: center; gap: 30px; }
.hero-view { width: 100%; max-width: 1050px; overflow: hidden; padding: 40px 10px; margin: 0 auto; }
.hero-track { display: flex; width: 100%; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.hero-card { min-width: 100%; height: 450px; background: #ffffff; border-radius: 30px; display: flex; flex-direction: row; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 45, 107, 0.1); border: 1px solid rgba(0,0,0,0.02); flex-shrink: 0; }
.hero-img { width: 45%; height: 100%; position: relative; background: #eef2f5; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.hero-content { width: 55%; height: 100%; padding: 0 60px; display: flex; flex-direction: column; justify-content: center; text-align: left; }
.hero-content h3 { font-family: var(--font-body); font-size: 2.2rem; font-weight: 800; color: #002d6b; margin-bottom: 20px; line-height: 1.1; }
.divider-small { width: 50px; height: 5px; background: #e63946; margin-bottom: 25px; border-radius: 10px; }
.role-text { font-family: var(--font-body); color: #e63946; font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 2px; line-height: 1.6; }
.hero-nav { width: 60px; height: 60px; border-radius: 50%; background: white; border: 1px solid #eee; color: #002d6b; font-size: 1.5rem; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: all 0.3s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 10; }
.hero-nav:hover { background: #002d6b; color: white; transform: scale(1.1); }

/* =========================================
   8. SECCIÓN CITAS
   ========================================= */
.cta-appointment { position: relative; background: radial-gradient(circle at center, #002d6b 0%, #001529 100%); padding: 100px 5%; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.ambient-light { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(0, 74, 173, 0.4) 0%, transparent 70%); border-radius: 50%; z-index: 1; pointer-events: none; }
.container-cta { position: relative; z-index: 2; max-width: 800px; width: 100%; }
.glass-card-cta { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 30px; padding: 60px 40px; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); }
.icon-header { width: 80px; height: 80px; background: rgba(230, 57, 70, 0.2); color: #e63946; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 30px; box-shadow: 0 0 30px rgba(230, 57, 70, 0.3); border: 1px solid rgba(230, 57, 70, 0.5); }
.cta-title { font-family: var(--font-body); font-size: 2.5rem; color: white; margin-bottom: 15px; font-weight: 800; }
.cta-desc { font-size: 1.1rem; color: #b0c4de; line-height: 1.6; margin-bottom: 30px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.1); padding: 10px 25px; border-radius: 50px; color: #cbd5e0; font-size: 0.9rem; border: 1px dashed rgba(255, 255, 255, 0.3); }
.divider-line { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); margin: 40px 0; }
.cta-buttons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.btn-action { display: flex; align-items: center; justify-content: center; padding: 15px 25px; border-radius: 15px; color: white; text-decoration: none; transition: all 0.3s ease; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.btn-action:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.whatsapp-eps { background: linear-gradient(135deg, #25d366 0%, #128c7e 100%); }
.whatsapp-particular { background: linear-gradient(135deg, #e63946 0%, #9e2a2b 100%); }
.btn-icon { font-size: 2rem; margin-right: 15px; }
.btn-text { display: flex; flex-direction: column; text-align: left; }
.footer-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }

/* =========================================
   9. SEDES
   ========================================= */
.locations-white { background: #ffffff; padding: 100px 5%; }
.container-full-width { max-width: 1400px; margin: 0 auto; }
.desc-gray { color: #777; font-size: 1.1rem; margin-top: -10px; margin-bottom: 50px; }
.locations-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.loc-card-clean { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; transition: all 0.3s ease; display: flex; flex-direction: column; }
.loc-card-clean:hover { transform: translateY(-10px); box-shadow: 0 25px 60px rgba(0, 45, 107, 0.15); border-color: #e63946; }
.loc-image { width: 100%; height: 260px; position: relative; overflow: hidden; }
.loc-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.loc-card-clean:hover .loc-image img { transform: scale(1.1); }
.badge-status { position: absolute; top: 15px; left: 15px; background: rgba(255, 255, 255, 0.95); color: #002d6b; padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.loc-body { padding: 30px 25px; text-align: left; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.loc-body h3 { font-family: var(--font-body); font-size: 1.3rem; color: #1a1a1a; font-weight: 800; margin-bottom: 10px; }
.address { font-size: 0.95rem; color: #666; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; line-height: 1.5; }
.address i { color: #e63946; font-size: 1.1rem; }
.link-map { font-size: 0.9rem; font-weight: 700; color: #004aad; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s ease; padding-top: 15px; border-top: 1px solid #f0f0f0; width: 100%; }
.link-map:hover { color: #e63946; gap: 12px; }
.schedule-box { display: flex; align-items: flex-start; gap: 12px; background: #f8f9fa; padding: 12px; border-radius: 10px; margin-bottom: 20px; border: 1px solid #eee; }
.schedule-box i { color: #004aad; font-size: 1rem; margin-top: 3px; }
.schedule-info { display: flex; flex-direction: column; font-size: 0.85rem; color: #555; line-height: 1.5; font-family: var(--font-body); }
.schedule-info span { display: block; font-weight: 500; }

/* =========================================
   10. SECCIÓN MULTIMEDIA (NUEVO DISEÑO FIX)
   ========================================= */
.modern-media-section { padding: 60px 20px; background: var(--media-bg); font-family: var(--font-body); }
.modern-tabs-container { display: flex; justify-content: center; margin-bottom: 40px; }
.modern-tabs { display: inline-flex; background: #fff; padding: 8px; border-radius: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: relative; gap: 5px; flex-wrap: wrap; justify-content: center; }
.tab-btn { border: none; background: transparent; padding: 12px 24px; border-radius: 40px; font-size: 15px; font-weight: 600; color: #6c757d; cursor: pointer; transition: all 0.4s ease; display: flex; align-items: center; gap: 8px; font-family: var(--font-body); }
.tab-btn i { font-size: 1.1em; }
.tab-btn.active { background: var(--media-primary); color: white; box-shadow: 0 4px 15px rgba(0,123,255,0.3); }
.tab-btn:hover:not(.active) { background: rgba(0,0,0,0.03); color: var(--media-primary); }

/* GRID VISIBILITY LOGIC (CRÍTICO) */
.media-grid { display: none; position: relative; max-width: 1400px; margin: 0 auto; animation: fadeIn 0.5s ease; }
.media-grid.active { display: block; }

.media-track { display: flex; gap: 30px; overflow-x: auto; padding: 20px 5px 40px 5px; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.media-track::-webkit-scrollbar { display: none; }

.media-card { min-width: 300px; max-width: 300px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-soft); transition: all 0.4s ease; cursor: pointer; scroll-snap-align: start; position: relative; border: 1px solid rgba(0,0,0,0.03); }
.media-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

.card-image { height: 200px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); opacity: 0.6; transition: all 0.4s ease; }
.media-card:hover .card-image::after { background: rgba(0,123,255,0.8); opacity: 0.9; }
.card-image:hover { background-size: 110%; }

.card-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); color: white; font-weight: bold; opacity: 0; transition: all 0.4s ease; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.media-card:hover .card-overlay { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.card-tag { position: absolute; top: 15px; right: 15px; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; color: white; z-index: 2; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.card-tag.pdf { background: #e74c3c; }
.card-tag.video { background: #e67e22; }
.card-tag.gallery { background: #27ae60; }

.card-body { padding: 20px; }
.category { font-size: 12px; text-transform: uppercase; color: var(--media-primary); font-weight: 700; letter-spacing: 0.5px; display: block; margin-bottom: 8px; }
.card-body h4 { margin: 0 0 10px 0; font-size: 18px; color: #2c3e50; line-height: 1.4; font-family: var(--font-body); font-weight: 700; }
.card-body p { margin: 0; font-size: 14px; color: #6c757d; line-height: 1.5; }

.scroll-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 45px; height: 45px; border-radius: 50%; background: white; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.15); color: #2c3e50; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.scroll-arrow:hover { background: var(--media-primary); color: white; transform: translateY(-50%) scale(1.1); }
.scroll-arrow.left { left: -20px; }
.scroll-arrow.right { right: -20px; }

/* MODAL */
.modal-backdrop { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); justify-content: center; align-items: center; }
.modal-window { background: white; width: 90%; max-width: 800px; border-radius: 20px; overflow: hidden; animation: zoomIn 0.3s; }
.modal-header { padding: 15px 25px; background: #fff; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 0; background: #000; max-height: 80vh; overflow-y: auto; display: flex; justify-content: center; align-items: center; }
.modal-body iframe, .modal-body video { width: 100%; height: 450px; border: none; }
.close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: #6c757d; }

/* =========================================
   11. RESPONSIVE GENERAL
   ========================================= */
@media (max-width: 900px) {
    .bento-grid { grid-template-columns: 1fr; }
    .big-watermark { display: none; }
    .header-modern { margin-bottom: 3rem; }
    .title-main { font-size: 2.5rem; }
    .hero h1 { font-size: 2.5rem; }
    .buttons-container { flex-direction: column; width: 100%; }
    .btn-modern { width: 100%; }
}
@media (max-width: 1100px) {
    .locations-row { grid-template-columns: repeat(2, 1fr); }
    .loc-image { height: 220px; }
}
@media (max-width: 768px) {
    .nav-btn-dark { display: none; }
    .carousel-view { overflow-x: auto; }
    .cta-buttons-grid { grid-template-columns: 1fr; }
    .cta-title { font-size: 2rem; }
    .glass-card-cta { padding: 40px 20px; }
    .locations-row { grid-template-columns: 1fr; }
    .loc-image { height: 200px; }
    .hero-card { flex-direction: column; height: auto; }
    .hero-img { width: 100%; height: 350px; }
    .hero-content { width: 100%; padding: 40px 20px; text-align: center; }
    .divider-small { margin: 20px auto; }
    .hero-nav { display: none; }
    .scroll-arrow { display: none; }
    .media-card { min-width: 260px; max-width: 260px; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ESTILOS PARA VIDEO INLINE */
.card-video {
    width: 100%;
    height: 200px; /* Misma altura que tenían las imágenes */
    object-fit: cover;
    background: #000;
    border-bottom: 1px solid #ffffff;
}

/* ESTILOS PARA LA NUEVA GALERÍA INTERNA (Lightbox) */
/* === ESTILOS GALERÍA INTERNA (LIGHTBOX) === */

/* Contenedor principal del visor */
.gallery-viewer {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 80vh; /* Altura del visor (80% de la pantalla) */
    background: #000;
}

/* Área de la imagen grande */
.gallery-main-display {
    flex: 1; /* Ocupa todo el espacio disponible */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 10px;
}

/* La imagen grande en sí */
.gallery-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Asegura que la foto se vea completa sin recortarse */
    animation: fadeIn 0.4s ease;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Tira de miniaturas abajo */
.gallery-thumbnails {
    height: 80px; /* Altura fija para la tira */
    background: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    overflow-x: auto; /* Permite scroll horizontal si hay muchas fotos */
    border-top: 1px solid #333;
}

/* Cada miniatura */
.thumb-img {
    height: 60px;
    width: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* Efecto al pasar el mouse o estar activa */
.thumb-img:hover, .thumb-img.active {
    opacity: 1;
    border-color: #e63946; /* Borde rojo al seleccionar */
    transform: scale(1.05);
}

/* Scrollbar personalizada para las miniaturas */
.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}
.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

/* 1. Aumentar altura de IMÁGENES (PDFs y Galerías) */
.card-image {
    height: 280px !important; /* Puedes cambiar 280px por el número que quieras */
}

/* 2. Aumentar altura de VIDEOS */
.card-video {
    height: 280px !important; /* Debe ser igual al de arriba para que se vean parejas */
}

/* OPCIONAL: Si al hacerlas altas se ven muy flacas, 
   puedes hacerlas un poco más anchas con esto: */
.media-card {
    min-width: 320px !important; /* Antes era 300px */
    max-width: 320px !important;
}

/* === ESTILOS VISOR DE GALERÍA (Lightbox) === */
.gallery-viewer {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 500px; /* Altura fija para el visor */
    background: #000;
}

/* Donde se ve la foto grande */
.gallery-main-display {
    flex: 1; /* Ocupa todo el espacio sobrante */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.gallery-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ajusta la foto sin recortarla */
    animation: fadeIn 0.3s ease;
    border-radius: 4px;
}

/* La tira de fotos pequeñas abajo */
.gallery-thumbnails {
    height: 80px;
    background: #111;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    overflow-x: auto; /* Permite deslizar si hay muchas fotos */
    border-top: 1px solid #333;
}

.thumb-img {
    height: 60px;
    width: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
    border: 2px solid transparent;
}

.thumb-img:hover, .thumb-img.active {
    opacity: 1;
    border-color: #007bff; /* Borde azul al seleccionar */
    transform: scale(1.05);
}


/* =========================================
   12. SECCIÓN ÓPTICAS LUXURY (CSS CORREGIDO)
   ========================================= */
.opticas-luxury-section {
    padding: 100px 5%;
    background: #fdfdfd;
}

.highlight-gold { color: #c5a059; }

.opticas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

/* --- TARJETA --- */
.optica-card-luxury {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
}

.optica-card-luxury:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(197, 160, 89, 0.15);
}

/* --- GALERÍA (EL MOTOR DEL DESLIZAMIENTO) --- */
.optica-gallery-wrapper {
    position: relative;
    height: 280px; /* Altura fija para ver bien las fotos */
    background: #000;
    overflow: hidden; /* Oculta las fotos que están a los lados */
}

.gallery-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Suavidad */
}

.gallery-slide {
    min-width: 100%; /* Ocupa el 100% del visor */
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0; /* IMPORTANTE: Evita que las fotos se encojan */
}

/* --- CONTROLES (FLECHAS) --- */
.gallery-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10; /* IMPORTANTE: Pone los botones encima de la foto */
}

.nav-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
    color: white;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #c5a059;
    color: white;
    transform: scale(1.1);
}

.gallery-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #c5a059;
    color: white;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 1px;
    z-index: 5;
}
.gallery-badge.blue { background: #002855; }

/* --- INFO Y BOTONES --- */
.optica-info { padding: 30px; flex: 1; display: flex; flex-direction: column; }
.info-header { display: flex; justify-content: space-between; margin-bottom: 5px; }
.info-header h3 { font-family: var(--font-title); font-size: 1.4rem; color: #1a1a1a; font-weight: 700; }
.location-tag { font-size: 0.75rem; color: #888; background: #f5f5f5; padding: 4px 10px; border-radius: 20px; }
.address-text { font-size: 0.9rem; color: #666; margin-bottom: 15px; }
.divider-gold { width: 40px; height: 3px; background: #c5a059; margin-bottom: 15px; }
.description-text { font-size: 0.95rem; color: #555; line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }

.features-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.features-grid span { font-size: 0.8rem; color: #555; background: #fafafa; padding: 6px 12px; border-radius: 20px; border: 1px solid #eee; }
.features-grid span i { color: #c5a059; margin-right: 5px; }

.actions-footer { display: grid; grid-template-columns: 1fr; gap: 15px; }
.btn-gold-outline { display: flex; justify-content: center; align-items: center; padding: 12px; border: 1px solid #c5a059; color: #c5a059; text-decoration: none; font-weight: 700; border-radius: 8px; transition: 0.3s; gap: 8px; }
.btn-gold-outline:hover { background: #c5a059; color: white; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .opticas-grid { grid-template-columns: 1fr; }
    .optica-gallery-wrapper { height: 220px; }
}

/* =========================================
   CORRECCIÓN MÓVIL: EQUIPO MÉDICO (Responsivo)
   ========================================= */
@media (max-width: 900px) {

    /* 1. Ajuste del contenedor principal */
    .doctors-hero {
        padding: 60px 20px; /* Menos relleno para aprovechar pantalla */
    }

    /* 2. La Tarjeta: Cambia de horizontal a vertical */
    .hero-card {
        flex-direction: column; /* Foto arriba, texto abajo */
        height: auto; /* La altura se ajusta al contenido */
        border-radius: 20px; /* Bordes un poco menos redondos para ganar espacio */
        min-width: 100%; /* Ocupa todo el ancho */
    }

    /* 3. La Foto del Médico */
    .hero-img {
        width: 100%;
        height: 450px; /* Altura fija para que todas las fotos se vean iguales */
        background: #f0f0f0;
    }

    .hero-img img {
        object-position: top center; /* Enfoca la cara, no el pecho */
    }

    /* 4. El Texto (Nombre y Cargo) */
    .hero-content {
        width: 100%;
        padding: 30px 20px; /* Espacio interno cómodo */
        text-align: center; /* Todo centrado */
        align-items: center;
    }

    .hero-content h3 {
        font-size: 1.8rem; /* Letra un poco más pequeña que en PC */
        margin-bottom: 10px;
    }

    .divider-small {
        margin: 15px auto; /* Centrado */
    }

    .role-text {
        font-size: 0.9rem;
    }

    /* 5. Flechas de Navegación (IMPORTANTE: Antes estaban ocultas) */
    .hero-nav {
        display: flex !important; /* Forzamos que se vean */
        position: absolute;
        top: 175px; /* A la mitad de la altura de la FOTO (350px / 2) */
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.7); /* Semitransparente */
        backdrop-filter: blur(4px);
        border: none;
        color: #002d6b;
        font-size: 1rem;
        z-index: 20;
    }

    .hero-nav.prev {
        left: 10px;
    }

    .hero-nav.next {
        right: 10px;
    }
    
    /* 6. Ajuste del Carrusel para que no se salga */
    .hero-view {
        padding: 0; /* Quitamos padding extra */
        overflow: hidden;
    }
}

/* =========================================
   SECCIÓN UBICACIÓN LUXURY
   ========================================= */
.location-luxury-section {
    padding: 100px 5%;
    background: #fff;
    position: relative;
}

/* Contenedor Principal (Tarjeta Dual) */
.location-card-wrapper {
    display: flex;
    border-radius: 30px;
    overflow: hidden; /* Recorta el mapa en las esquinas */
    box-shadow: 0 30px 60px rgba(0, 45, 107, 0.15); /* Sombra profunda y elegante */
    min-height: 500px; /* Altura mínima */
}

/* --- LADO IZQUIERDO (INFO DARK) --- */
.loc-info-side {
    flex: 1; /* Ocupa espacio proporcional */
    background: #002855; /* AZUL CORPORATIVO */
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Patrón de fondo sutil (opcional) */
.loc-info-side::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png'); /* Textura sutil */
    opacity: 0.05;
    pointer-events: none;
}

.info-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    margin-bottom: 5px;
    color: #fff;
}

.info-subtitle {
    font-size: 1rem;
    color: #a0aec0;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Lista de detalles */
.loc-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.loc-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.loc-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.15); /* Dorado transparente */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37; /* Icono Dorado */
    font-size: 1.2rem;
    flex-shrink: 0;
}

.loc-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
}

.loc-text p {
    color: #cbd5e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Botón Llamar */
.btn-call-gold {
    align-self: flex-start;
    padding: 15px 35px;
    background: #d4af37;
    color: #002855;
    text-decoration: none;
    font-weight: 800;
    border-radius: 50px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-call-gold:hover {
    background: #fff;
    transform: translateY(-3px);
}

/* --- LADO DERECHO (MAPA) --- */
.loc-map-side {
    flex: 1.5; /* El mapa es un poco más ancho que la info */
    position: relative; /* Para el botón flotante */
    min-height: 400px;
}

.loc-map-side iframe {
    filter: grayscale(20%) contrast(1.1); /* Efecto sutil para que no se vea tan "Google básico" */
    transition: 0.3s;
}

.loc-map-side:hover iframe {
    filter: grayscale(0%); /* Vuelve a color al pasar mouse */
}

/* Botón Flotante sobre mapa */
.floating-map-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #002855;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.floating-map-btn:hover {
    background: #002855;
    color: white;
    transform: translateX(-50%) scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .location-card-wrapper {
        flex-direction: column; /* Uno encima del otro en celular */
        border-radius: 20px;
    }
    
    .loc-info-side {
        padding: 40px 30px;
    }
    
    .loc-map-side {
        height: 350px; /* Altura fija en móvil */
        min-height: 350px;
    }
}
/* =========================================
   SECCIÓN UBICACIÓN (ESTILO TECH BLUE)
   ========================================= */
.location-luxury-section {
    padding: 100px 5%;
    background: #fff;
    position: relative;
}

/* Títulos resaltados (Cambiado de dorado a azul cian) */
.highlight-gold { 
    color: #004aad; /* Azul corporativo para el título en fondo blanco */
}

/* Contenedor Principal */
.location-card-wrapper {
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 45, 107, 0.15);
    min-height: 500px;
}

/* --- LADO IZQUIERDO (INFO DARK) --- */
.loc-info-side {
    flex: 1;
    background: #002855; /* AZUL OSCURO DE FONDO */
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.info-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    margin-bottom: 5px;
    color: #fff;
}

.info-subtitle {
    font-size: 1rem;
    color: #00d4ff; /* NUEVO COLOR: CIAN BRILLANTE */
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

/* Lista de detalles */
.loc-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.loc-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.loc-icon {
    width: 50px;
    height: 50px;
    /* Fondo del icono: Azul cian muy transparente */
    background: rgba(0, 212, 255, 0.1); 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4ff; /* Icono CIAN */
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2); /* Pequeño brillo */
}

.loc-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-family: 'Manrope', sans-serif;
}

.loc-text p {
    color: #cbd5e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Botón Llamar (NUEVO ESTILO) */
.btn-call-gold {
    align-self: flex-start;
    padding: 15px 35px;
    /* Gradiente Cian a Azul */
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    border-radius: 50px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3); /* Sombra brillante */
}

.btn-call-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.5);
}

/* --- LADO DERECHO (MAPA) --- */
.loc-map-side {
    flex: 1.5;
    position: relative;
    min-height: 400px;
}

.loc-map-side iframe {
    filter: grayscale(10%) contrast(1.1);
    transition: 0.3s;
}

.loc-map-side:hover iframe {
    filter: grayscale(0%);
}

/* Botón Flotante sobre mapa */
.floating-map-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #002855;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.floating-map-btn:hover {
    background: #002855;
    color: white;
    transform: translateX(-50%) scale(1.05);
}

.floating-map-btn i {
    color: #00d4ff; /* Icono del botón en cian */
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .location-card-wrapper {
        flex-direction: column;
        border-radius: 20px;
    }
    
    .loc-info-side {
        padding: 40px 30px;
    }
    
    .loc-map-side {
        height: 350px;
        min-height: 350px;
    }
}


/* =========================================
   SECCIÓN TESTIMONIOS: MODERN LUXURY
   ========================================= */
.testimonials-luxury {
    background: linear-gradient(180deg, #ffffff 0%, #f4f7f6 100%);
    padding: 100px 5%;
    overflow: hidden;
}

/* --- HEADER CON RATING FLOTANTE --- */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 30px;
}

.header-content {
    max-width: 600px;
}

.badge-outline {
    border: 1px solid #c5a059;
    color: #c5a059;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: inline-block;
}

/* Tarjeta de Rating General */
.rating-badge-glass {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.rating-badge-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(197, 160, 89, 0.15);
}

.score-circle {
    width: 60px;
    height: 60px;
    background: #c5a059;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.rating-details {
    display: flex;
    flex-direction: column;
}

.stars-row {
    color: #ffb400;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

/* Animación de estrellas al pasar el mouse */
.rating-badge-glass:hover .animate-stars i {
    animation: popStar 0.3s ease forwards;
}
.rating-badge-glass:hover .animate-stars i:nth-child(1) { animation-delay: 0.05s; }
.rating-badge-glass:hover .animate-stars i:nth-child(2) { animation-delay: 0.1s; }
.rating-badge-glass:hover .animate-stars i:nth-child(3) { animation-delay: 0.15s; }
.rating-badge-glass:hover .animate-stars i:nth-child(4) { animation-delay: 0.2s; }
.rating-badge-glass:hover .animate-stars i:nth-child(5) { animation-delay: 0.25s; }

@keyframes popStar {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.review-count {
    font-size: 0.9rem;
    color: #666;
}

.google-g-icon img {
    width: 30px;
    opacity: 0.8;
}

/* --- CARRUSEL Y TARJETAS --- */
.testimonials-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.testimonials-track-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 5px 40px 5px; /* Espacio para sombras */
}

.testimonials-track {
    display: flex;
    gap: 25px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* TARJETA INDIVIDUAL */
.review-card {
    min-width: 320px;
    max-width: 320px;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s ease;
    position: relative;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    border-color: rgba(197, 160, 89, 0.3);
}

.review-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

/* Avatares con colores generados */
.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.color-1 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.color-2 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.color-3 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); color: #333; }
.color-4 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); color: #333; }

.reviewer-meta h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 3px;
    font-family: var(--font-body);
    font-weight: 800;
}

.stars-mini {
    color: #ffb400;
    font-size: 0.8rem;
}

.google-watermark {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.5rem;
    color: #e0e0e0;
    transition: 0.3s;
}

.review-card:hover .google-watermark {
    color: #4285F4; /* Azul Google al hover */
}

.review-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 20px;
    flex-grow: 1;
}

.review-date {
    font-size: 0.75rem;
    color: #aaa;
    text-align: right;
    font-weight: 600;
}

/* Botones de navegación */
.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
    z-index: 2;
}

.slider-btn:hover {
    background: #c5a059;
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .reviews-header { flex-direction: column; align-items: flex-start; }
    .rating-badge-glass { width: 100%; justify-content: center; }
    .slider-btn { display: none; } /* En móvil se usa scroll táctil */
    .testimonials-track { overflow-x: auto; scroll-snap-type: x mandatory; gap: 15px; }
    .review-card { min-width: 280px; scroll-snap-align: center; }
}

/* =========================================
   OPTIMIZACIÓN MÓVIL (RESPONSIVE FIXES)
   ========================================= */
@media (max-width: 900px) {

    /* --- 1. ARREGLO SECCIÓN TESTIMONIOS --- */
    .testimonials-luxury {
        padding: 60px 5%; /* Menos relleno lateral */
    }

    .reviews-header {
        flex-direction: column; /* Apilar título y rating */
        align-items: flex-start;
        gap: 30px;
    }

    /* Tarjeta de Rating General */
    .rating-badge-glass {
        width: 100%; /* Ocupar todo el ancho */
        justify-content: space-between; /* Distribuir elementos */
        padding: 15px;
    }

    /* Carrusel de Testimonios */
    .testimonials-slider-wrapper {
        width: 100%; /* Asegurar que no se salga */
        overflow: hidden; /* Evitar scroll horizontal de la página */
    }

    .testimonials-track-container {
        padding: 10px 0 30px 0; /* Espacio para sombra inferior */
        overflow-x: auto; /* Permitir deslizar con el dedo */
        scroll-snap-type: x mandatory; /* Efecto magnético */
        -webkit-overflow-scrolling: touch; /* Suavidad en iOS */
        scrollbar-width: none; /* Ocultar barra scroll */
    }
    
    .testimonials-track-container::-webkit-scrollbar { 
        display: none; 
    }

    .testimonials-track {
        gap: 15px; /* Menos espacio entre tarjetas */
        width: max-content; /* Permitir que crezca */
    }

    /* Tarjeta Individual de Testimonio */
    .review-card {
        min-width: 280px; /* Un poco más angosta para pantallas pequeñas */
        max-width: 280px;
        scroll-snap-align: center; /* Centrarse al soltar */
        padding: 20px; /* Menos padding interno */
    }

    .slider-btn {
        display: none; /* Ocultar flechas (se usa el dedo) */
    }


    /* --- 2. ARREGLO SECCIÓN UBICACIÓN --- */
    .location-luxury-section {
        padding: 60px 5%;
    }

    .location-card-wrapper {
        flex-direction: column; /* Poner mapa debajo de info */
        border-radius: 20px;
        overflow: hidden;
        min-height: auto; /* Altura automática */
    }

    /* Parte Izquierda (Información Azul) */
    .loc-info-side {
        padding: 40px 25px; /* Relleno cómodo */
        order: 1; /* Primero la info */
    }

    .info-title {
        font-size: 1.8rem; /* Título un poco más pequeño */
    }

    /* Parte Derecha (Mapa) */
    .loc-map-side {
        order: 2; /* Mapa abajo */
        height: 350px; /* Altura fija para el mapa */
        min-height: 350px;
    }

    /* Botón Flotante "Cómo llegar" */
    .floating-map-btn {
        bottom: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 80%; /* Botón ancho para dedo */
        justify-content: center;
    }
    
    /* Encabezados Generales */
    .title-dark {
        font-size: 2.2rem; /* Títulos de sección más pequeños */
    }
    
    .desc-gray {
        font-size: 1rem;
    }
}

/* =========================================
   SECCIÓN ALIADOS: INFINITY GLASS
   ========================================= */
.aliados-luxury-section {
    padding: 80px 0;
    background: #f8f9fa;
    overflow: hidden; /* Esconde lo que sale de la pantalla */
    position: relative;
}

/* Efecto de desvanecimiento a los lados (Fade edges) */
.aliados-luxury-section::before,
.aliados-luxury-section::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.aliados-luxury-section::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.aliados-luxury-section::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

/* Contenedor del Slider */
.infinity-slider {
    margin-top: 50px;
    display: flex;
    width: 100%;
}

/* Pista que se mueve */
.slide-track {
    display: flex;
    width: calc(250px * 12); /* Ancho tarjeta (250) * Cantidad total (12) */
    animation: scroll 40s linear infinite; /* 40s para una vuelta completa */
}

/* La Animación Infinita */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 6)); } /* Mueve la mitad exacta */
}

/* TARJETA DE LOGO (VIDRIO) */
.partner-card {
    width: 200px; /* Un poco menos que el espacio reservado */
    height: 120px;
    margin: 0 25px; /* Espacio entre tarjetas */
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}

.partner-card img {
    max-width: 70%;
    max-height: 70%;
    filter: grayscale(100%) opacity(0.7); /* Logos en gris por defecto */
    transition: all 0.4s ease;
    z-index: 2;
}

/* EFECTO HOVER (MAGIA) */
.partner-card:hover {
    transform: translateY(-5px) scale(1.05);
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 74, 173, 0.15); /* Sombra azul brillante */
    border-color: #00d4ff;
}

.partner-card:hover img {
    filter: grayscale(0%) opacity(1); /* Logo a todo color */
    transform: scale(1.1);
}

/* Pausar animación al pasar el mouse */
.slide-track:hover {
    animation-play-state: paused;
}

/* Brillo interno */
.glow-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: 0.4s;
    pointer-events: none;
}

.partner-card:hover .glow-effect {
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .aliados-luxury-section::before,
    .aliados-luxury-section::after {
        width: 50px; /* Bordes más delgados en celular */
    }
    
    .partner-card {
        width: 160px;
        height: 100px;
        margin: 0 15px;
    }
    
    .slide-track {
        width: calc(190px * 12); /* Ajuste de cálculo para móvil */
        animation: scroll 30s linear infinite; /* Un poco más rápido */
    }
    
    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-190px * 6)); }
    }
}

/* =========================================
   FOOTER LUXURY
   ========================================= */
footer {
    background: #0b1120; /* Dark Navy */
    color: white;
    padding: 80px 5% 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Efecto de luz superior */
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, #002855, #c5a059, #002855);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-tagline {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #c5a059; /* Dorado */
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    color: #fff !important;
}

/* Enlace de Cita */
.footer-cita-link {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-cita-link a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(90deg, #c5a059, #e6c888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 0.3s;
}

.footer-cita-link a:hover {
    letter-spacing: 1px;
}

/* =========================================
   BANNER DE COOKIES (FLOTANTE MODERN)
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Oculto abajo */
    width: 90%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px); /* Vidrio */
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    z-index: 9999;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: none; /* Se activa con JS */
}

.cookie-banner.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    gap: 25px;
}

.cookie-icon {
    font-size: 2.5rem;
    color: #c5a059;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.cookie-text h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.cookie-text p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.cookie-text a {
    color: #002855;
    font-weight: 700;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Empuja a la derecha */
}

.btn-cookie {
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-accept {
    background: #002855;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 40, 85, 0.3);
}
.btn-accept:hover { background: #003a75; transform: translateY(-2px); }

.btn-reject {
    background: #f0f0f0;
    color: #666;
}
.btn-reject:hover { background: #e0e0e0; }

.btn-settings {
    background: transparent;
    color: #002855;
    border: 1px solid #002855;
}
.btn-settings:hover { background: #f0f8ff; }

/* =========================================
   MODAL DE PRIVACIDAD (TIPO DOCUMENTO)
   ========================================= */
.privacy-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.privacy-modal.active {
    display: flex;
    opacity: 1;
}

.privacy-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 85vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.privacy-modal.active .privacy-content {
    transform: scale(1);
}

/* Header Modal */
.privacy-header {
    background: #002855;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.privacy-header h2 {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgb(220, 0, 0);
    width: 35px; height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.close-btn:hover { background: rgba(255,255,255,0.3); }

/* Cuerpo Scrollable */
.privacy-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
}

/* Estilos de Texto dentro del Modal */
.privacy-body h3 {
    color: #002855;
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-body ul, .privacy-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.privacy-body li {
    margin-bottom: 8px;
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid #c5a059;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h4 {
    color: #002855;
    margin: 0 0 5px 0;
    font-size: 1rem;
}

/* Footer Modal */
.privacy-footer {
    padding: 15px 30px;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.btn-download {
    background: #c5a059;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}
.btn-download:hover { background: #b08d4b; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .cookie-content { flex-direction: column; text-align: center; }
    .cookie-buttons { width: 100%; justify-content: center; flex-wrap: wrap; margin: 0; }
    .footer-links { flex-direction: column; gap: 10px; }
    .privacy-content { width: 100%; height: 100%; border-radius: 0; }
}

/* =========================================
   ESTILOS NAVBAR WHITE LUXURY
   ========================================= */

/* 1. La Barra Sólida BLANCA */
.white-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: #ffffff; /* BLANCO PURO */
    display: flex;
    align-items: center;
    z-index: 1000;
    /* Sombra suave para separar del contenido */
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* 2. Logo */
.nav-logo img {
    height: 65px; /* Un poco más grande para destacar en blanco */
    width: auto;
    /* Si tu logo es blanco y no se ve, borra la siguiente línea: */
    filter: none; 
}

/* 3. Menú Centrado */
.centered-menu {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
    
    /* Centrado Absoluto */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Estilo de los Enlaces (OSCUROS sobre fondo BLANCO) */
.menu-link {
    text-decoration: none;
    color: #002855; /* AZUL OSCURO CORPORATIVO */
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    font-weight: 800; /* Letra bien gruesa */
    text-transform: capitalize;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
}

/* Efecto Hover (Dorado) */
.menu-link:hover, .menu-link.active {
    color: #9e000d; /* Dorado */
}

/* Línea animada debajo al pasar el mouse */
.menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.menu-link:hover::after {
    width: 100%;
}

/* 4. Móvil (Hamburguesa) - Color Oscuro */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
}

/* Líneas oscuras porque el fondo es blanco */
.hamburger-btn span {
    width: 30px;
    height: 3px;
    background: #002855; 
    transition: 0.3s;
}

/* Overlay Móvil (Fondo oscuro al abrir menú) */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: #002855; /* Fondo azul oscuro para el menú móvil */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; visibility: hidden;
    transition: 0.4s;
    z-index: 1001;
}

.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-links-box { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.mobile-links-box a {
    color: white; font-size: 1.8rem; text-decoration: none; font-weight: 700;
    font-family: 'Cinzel', serif;
}

/* Responsivo */
@media (max-width: 1024px) {
    .centered-menu { display: none; }
    .hamburger-btn { display: flex; }
    .nav-container { justify-content: space-between; } 
}

/* =========================================
   CORRECCIÓN CENTRADO DEL TÍTULO
   ========================================= */

.header-modern {
    display: flex;             /* Activa Flexbox */
    flex-direction: column;    /* Pone los elementos uno debajo del otro */
    align-items: center;       /* CENTRA horizontalmente todo */
    justify-content: center;   /* Centra verticalmente */
    text-align: center;        /* Centra el texto dentro de sus cajas */
    position: relative;
    margin-bottom: 5rem;
    width: 100%;               /* Asegura que tome todo el ancho de la pantalla */
}

/* Marca de agua (FES IPS de fondo) */
.big-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Esto asegura el centro perfecto absoluto */
    font-size: 8rem;
    font-family: var(--font-title);
    color: rgba(0, 40, 85, 0.04); /* Muy suave */
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* Subtítulo rojo (NUESTRA ESENCIA) */
.tag-red {
    color: var(--brand-red); /* O usa #D32F2F */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px; /* Más espacio entre letras */
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* Título Principal (EXCELENCIA OFTALMOLÓGICA) */
.title-main {
    font-family: var(--font-title);
    font-size: 3.5rem; /* Tamaño grande */
    line-height: 1.2;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    color: #111; /* Color base */
}

/* Para partir el título en dos colores como la foto */
.title-main span {
    display: block; /* Fuerza el salto de línea */
    color: var(--brand-blue); /* La segunda línea en Azul */
    font-weight: 700;
}

/* Línea decorativa inferior */
.line-decor {
    width: 70px;
    height: 4px;
    background: var(--brand-blue);
    border-radius: 10px;
    margin-top: 5px; /* Separación del texto */
    position: relative;
    z-index: 1;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .big-watermark { font-size: 4rem; }
    .title-main { font-size: 2.2rem; }
}

/* =========================================
   ESTILOS ANÁLISIS DE SATISFACCIÓN
   ========================================= */

/* Línea separadora */
.stats-separator {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 60px 0 40px 0;
}

/* Contenedor de las 3 columnas */
.satisfaction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto; /* Centrado */
}

.stat-item {
    padding: 10px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

/* Los Números Grandes */
.stat-number {
    font-family: 'Manrope', sans-serif; /* Tu fuente corporal o Cinzel si prefieres */
    font-size: 3rem;
    font-weight: 800;
    /* Color Verde/Teal similar a la foto, o usa var(--brand-blue) si prefieres azul */
    color: #022967; 
    margin-bottom: 5px;
    line-height: 1;
}

/* Texto pequeño abajo */
.stat-label {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: #555;
    font-weight: 600;
    margin: 0;
}

/* RESPONSIVE: En celular uno debajo del otro */
@media (max-width: 768px) {
    .satisfaction-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 40px;
    }

    .stats-separator {
        margin: 40px 0;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}


/* =========================================
   FOOTER COMPACTO (SLIM & ELEGANT)
   ========================================= */
.footer-compact {
    background-color: #002855; /* Azul oscuro */
    color: white;
    padding: 30px 20px; /* Mucho menos relleno vertical */
    text-align: center;
    font-family: 'Manrope', sans-serif;
    border-top: 4px solid #d4af37; /* Línea dorada delgada arriba */
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espacio reducido entre elementos */
}

/* Slogan Rojo Pequeño */
.footer-slogan-small {
    color: #ff3333;
    font-size: 1.1rem; /* Letra más chica */
    font-weight: 700;
    margin: 0;
}

/* Texto Copyright */
.footer-text-block p {
    margin: 2px 0; /* Casi sin separación */
    font-size: 0.85rem;
    color: #e0e0e0;
}

/* Enlaces en línea */
.footer-links-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.footer-links-inline a {
    color: #b0c4de;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links-inline a:hover {
    color: white;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

/* Separadores verticales (|) */
.separator {
    color: #444;
    font-size: 0.8rem;
}

/* Link de Cita final */
.cita-link-small {
    font-size: 0.9rem;
    color: #d4af37; /* Dorado */
    text-decoration: underline;
    margin-top: 5px;
}

.cita-link-small:hover {
    color: white;
}

/* Responsive Móvil */
@media (max-width: 600px) {
    .separator { display: none; } /* Ocultar palitos en celular */
    .footer-links-inline { flex-direction: column; gap: 8px; }
}


/* =========================================
   ESTILOS VENTANA LEGAL (MODAL)
   ========================================= */

/* Fondo oscuro borroso */
.legal-modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Efecto vidrio */
    z-index: 99999;
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.legal-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

/* La tarjeta blanca */
.legal-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 85vh; /* Ocupa el 85% de la altura de la pantalla */
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.legal-modal-backdrop.active .legal-modal-content {
    transform: scale(1);
}

/* HEADER */
.legal-header {
    background: #002855; /* Azul FES */
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #d4af37; /* Línea dorada */
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-gold {
    font-size: 2rem;
    color: #d4af37;
}

.legal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
}

.last-update {
    font-size: 0.75rem;
    color: #ccc;
    display: block;
    margin-top: 3px;
}

/* Botón X */
.close-modal-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.close-modal-btn:hover { background: #d32f2f; transform: rotate(90deg); }

/* CUERPO DEL TEXTO */
.legal-body {
    padding: 40px;
    overflow-y: auto; /* Permite scroll */
    flex: 1;
    font-family: 'Manrope', sans-serif;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Scrollbar personalizada bonita */
.legal-body::-webkit-scrollbar { width: 8px; }
.legal-body::-webkit-scrollbar-track { background: #f1f1f1; }
.legal-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.legal-body::-webkit-scrollbar-thumb:hover { background: #002855; }

/* Tipografía interna */
.legal-section { margin-bottom: 30px; }
.legal-section h3 {
    color: #002855;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 15px;
    border-left: 4px solid #d4af37;
    padding-left: 10px;
}

.intro-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.legal-list li { margin-bottom: 8px; margin-left: 20px; }

/* Caja de Derechos */
.highlight-bg {
    background: #fdfbf7; /* Crema muy suave */
    padding: 25px;
    border-radius: 12px;
    border: 1px dashed #d4af37;
}

.rights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.rights-grid span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
}
.rights-grid i { color: #002855; margin-right: 5px; }

/* Caja de Contacto */
.contact-box-legal {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.contact-box-legal p { margin: 5px 0; font-size: 0.9rem; }
.contact-box-legal i { width: 20px; color: #d4af37; }

/* Consentimiento final */
.consent-box {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-style: italic;
    color: #666;
}

/* FOOTER DEL MODAL */
.legal-footer {
    padding: 15px 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: right;
}

.btn-accept-legal {
    background: #002855;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-accept-legal:hover { background: #004488; transform: translateY(-2px); }

/* Responsive */
@media (max-width: 768px) {
    .rights-grid { grid-template-columns: 1fr 1fr; }
    .legal-modal-content { width: 100%; height: 100%; border-radius: 0; }
    .legal-body { padding: 25px; }
}

/* =========================================
   ESTILOS BOTONES FLOTANTES (LUXURY)
   ========================================= */

.floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 9990; /* Por debajo de los modales (que tienen 99999) */
}

/* Estilo Base de los Botones */
.btn-floating {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote */
    text-decoration: none;
    position: relative;
}

/* --- BOTÓN SUBIR (SCROLL TOP) --- */
.btn-scroll-top {
    background: linear-gradient(135deg, #002855, #001a38); /* Azul Corporativo */
    border: 1px solid rgba(212, 175, 55, 0.3); /* Borde dorado sutil */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    font-size: 1.4rem;
    width: 50px; /* Un poco más pequeño que el de WhatsApp */
    height: 50px;
}

.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.btn-scroll-top:hover {
    background: #d4af37; /* Se vuelve dorado al pasar el mouse */
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    transform: translateY(-5px);
}

/* --- BOTÓN WHATSAPP --- */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    animation: pulse-green 3s infinite;
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
}

/* Tooltip (Texto que sale al lado: "¡Agenda tu cita!") */
.tooltip-text {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background: white;
    color: #002855;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    pointer-events: none;
    font-family: 'Manrope', sans-serif;
}

/* Flechita del tooltip */
.tooltip-text::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 8px;
    border-style: solid;
    border-color: transparent transparent transparent white;
}

.btn-whatsapp:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Animación de Pulso (Latido) */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Responsive (Celular) */
@media (max-width: 768px) {
    .floating-container { right: 20px; bottom: 20px; }
    .tooltip-text { display: none; } /* Ocultar texto en celular para no tapar */
}

/* =========================================
   ESTILOS COOKIE BANNER (MODERNO)
   ========================================= */

.cookie-card-luxury {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Esquina inferior izquierda */
    width: 380px;
    max-width: 90%; /* Para móviles */
    background: rgba(255, 255, 255, 0.9); /* Blanco semitransparente */
    backdrop-filter: blur(15px); /* Efecto vidrio */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 40, 85, 0.15); /* Sombra azulada suave */
    padding: 25px;
    z-index: 9980; /* Alto, pero debajo de los modales (99999) */
    
    /* Estado inicial: Oculto y abajo */
    opacity: 0;
    visibility: hidden;
    transform: translateY(50px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Clase para mostrarlo */
.cookie-card-luxury.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cookie-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Icono Dorado */
.cookie-icon-box {
    font-size: 2rem;
    color: #d4af37; /* Dorado */
    animation: floatCookie 3s ease-in-out infinite;
}

@keyframes floatCookie {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}

.cookie-text h4 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    color: #002855;
    margin: 0 0 5px 0;
    font-weight: 800;
}

.cookie-text p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.cookie-link {
    font-size: 0.8rem;
    color: #d4af37;
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
}

/* Botones */
.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cookie-primary {
    background: #002855; /* Azul Corporativo */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 40, 85, 0.2);
}

.btn-cookie-primary:hover {
    background: #d4af37; /* Dorado al hover */
    transform: translateY(-2px);
}

.btn-cookie-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-cookie-secondary:hover {
    background: #f5f5f5;
    color: #333;
}

/* Responsive Móvil */
@media (max-width: 500px) {
    .cookie-card-luxury {
        left: 5%;
        bottom: 20px;
        width: 90%;
        padding: 20px;
    }
    .cookie-content { flex-direction: row; align-items: flex-start; }
}


/* =========================================
   CORRECCIÓN FINAL: MÓVIL Y PDFs
   ========================================= */

/* --- 1. ARREGLO EQUIPO MÉDICO EN MÓVIL --- */
@media (max-width: 768px) {
    /* Ajuste del contenedor general */
    .doctors-hero {
        padding: 40px 15px; /* Menos relleno para ganar espacio */
    }

    /* La Tarjeta del Médico */
    .hero-card {
        flex-direction: column; /* Vertical */
        height: auto !important; /* Altura automática para que quepa todo */
        border-radius: 20px;
        min-width: 100%;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Sombra más suave */
    }

    /* La Foto del Médico (Reducida) */
    .hero-img {
        width: 100%;
        height: 450px !important; /* Reducimos de 350px a 280px para ver mejor */
        position: relative;
    }
    
    .hero-img img {
        object-position: top center; /* Enfoca la cara */
    }

    /* Contenido (Texto) */
    .hero-content {
        width: 100%;
        padding: 25px 20px; /* Relleno cómodo */
        text-align: center;
    }

    .hero-content h3 {
        font-size: 1.6rem; /* Nombre un poco más pequeño */
        margin-bottom: 5px;
    }

    .role-text {
        font-size: 0.85rem;
    }

    /* Flechas de Navegación (Mejor ubicadas) */
    .hero-nav {
        display: flex !important;
        top: 50%; /* Centradas respecto a la FOTO, no a la tarjeta */
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(0,0,0,0.1);
        font-size: 1rem;
    }
    .hero-nav.prev { left: 10px; }
    .hero-nav.next { right: 10px; }
}

/* --- 2. ARREGLO TARJETAS PDF / MULTIMEDIA --- */

/* Forzar que la tarjeta se adapte al contenido */
.media-card {
    height: auto !important; /* IMPORTANTE: Permite que la tarjeta crezca */
    display: flex;
    flex-direction: column; /* Asegura orden vertical */
    background: #fff;
}

/* Reducir altura de la imagen/video para que se vea el texto */
.card-image, 
.card-video {
    height: 180px !important; /* Reducido de 280px a 180px para equilibrio */
    flex-shrink: 0; /* Evita que la imagen se aplaste */
    width: 100%;
}

/* Asegurar que el cuerpo del texto tenga espacio */
.card-body {
    padding: 20px 15px;
    flex-grow: 1; /* Ocupa el espacio restante */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card-body h4 {
    font-size: 1rem; /* Título legible */
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-body p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    /* Limitar texto a 3 líneas para que no sea eterno */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ajuste específico para móvil en Multimedia */
@media (max-width: 768px) {
    .media-card {
        min-width: 260px !important; /* Un ancho cómodo para celular */
        max-width: 260px !important;
    }
    
    .media-track {
        padding-bottom: 30px; /* Espacio para el scroll y sombras */
    }
}

/* =========================================
   PARCHE FINAL: ARREGLO IMÁGENES DOCTORES MÓVIL
   ========================================= */

@media (max-width: 900px) {

    /* 1. Aseguramos que la tarjeta apile los elementos (Foto arriba, texto abajo) */
    .hero-card {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
    }

    /* 2. Definimos el contenedor de la imagen */
    .hero-img {
        width: 100% !important;
        height: 450px !important; /* Altura fija para que se vea bien la foto */
        flex-shrink: 0 !important; /* Evita que se aplaste */
        position: relative !important;
        overflow: hidden !important;
    }

    /* 3. LA SOLUCIÓN: Hacemos que la imagen recorte en lugar de estirarse */
    .hero-img img {
        width: 100% !important;
        height: 100% !important;
        
        /* Esta es la clave: cubre el espacio recortando lo que sobra */
        object-fit: cover !important; 
        
        /* Enfoca la parte superior (la cara), para no cortar la cabeza */
        object-position: top center !important; 
        
        display: block !important;
    }
}

/* =========================================
   CORRECCIONES MÓVIL - EQUIPO MÉDICO Y MULTIMEDIA
   Agregar este código al FINAL de tu archivo styles.css
   ========================================= */

/* =========================================
   1. CORRECCIÓN EQUIPO MÉDICO (HERO CARDS)
   ========================================= */
@media (max-width: 900px) {
    
    /* Ajuste del contenedor */
    .doctors-hero {
        padding: 40px 15px !important;
    }

    /* Arreglo del carrusel */
    .hero-carousel-wrapper {
        gap: 15px;
    }

    .hero-view {
        padding: 20px 0 !important;
        overflow: visible; /* Permite ver las flechas */
    }

    /* LA TARJETA DEL MÉDICO - LAYOUT VERTICAL */
    .hero-card {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        border-radius: 20px;
        width: 100% !important;
        min-width: 100% !important;
    }

    /* FOTO DEL MÉDICO - Reducida y bien ajustada */
    .hero-img {
        width: 100% !important;
        height: 450px !important; /* Reducido de 350px para mejor proporción */
        flex-shrink: 0 !important;
        position: relative;
        overflow: hidden;
    }

    .hero-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* CLAVE: Recorta en lugar de estirar */
        object-position: top center !important; /* Enfoca la cara */
        display: block;
    }

    /* CONTENIDO (Nombre y cargo) */
    .hero-content {
        width: 100% !important;
        padding: 25px 20px !important;
        text-align: center;
        align-items: center;
    }

    .hero-content h3 {
        font-size: 1.5rem !important; /* Ajustado para móvil */
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .divider-small {
        margin: 12px auto;
    }

    .role-text {
        font-size: 0.85rem !important;
        line-height: 1.4;
    }

    /* FLECHAS DE NAVEGACIÓN - VISIBLES Y BIEN UBICADAS */
    .hero-nav {
        display: flex !important;
        position: absolute;
        top: 140px; /* Mitad de la altura de la foto (280px / 2) */
        transform: translateY(-50%);
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(0,0,0,0.1);
        font-size: 1.1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        z-index: 100;
    }

    .hero-nav.prev {
        left: 15px;
    }

    .hero-nav.next {
        right: 15px;
    }

    .hero-nav:active {
        transform: translateY(-50%) scale(0.95);
    }
}

/* =========================================
   2. CORRECCIÓN SECCIÓN MULTIMEDIA (PDFs/Videos)
   ========================================= */

/* Ajustar altura de imágenes/videos para que se vea el texto */
.card-image, 
.card-video {
    height: 200px !important; /* Reducido para equilibrio */
    flex-shrink: 0;
    width: 100%;
    object-fit: cover;
}

/* Asegurar que las tarjetas tengan altura automática */
.media-card {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff;
    min-height: 340px; /* Altura mínima para que no queden muy chatas */
}

/* Cuerpo del texto con espacio adecuado */
.card-body {
    padding: 18px 15px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card-body h4 {
    font-size: 1rem !important;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #2c3e50;
}

.card-body p {
    font-size: 0.85rem !important;
    color: #666;
    line-height: 1.5;
    margin: 0;
    /* Limitar a 3 líneas para no saturar */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category {
    font-size: 0.75rem !important;
    margin-bottom: 6px;
}

/* Ajuste móvil específico para multimedia */
@media (max-width: 768px) {
    
    /* Contenedor de pestañas más compacto */
    .modern-tabs {
        gap: 3px;
        padding: 6px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .tab-btn span {
        display: none; /* Ocultar texto, solo íconos en móvil */
    }

    .tab-btn i {
        font-size: 1.3rem;
        margin: 0;
    }

    /* Tarjetas de multimedia */
    .media-card {
        min-width: 280px !important;
        max-width: 280px !important;
        min-height: 360px;
    }

    /* Track scrolleable con indicador visual */
    .media-track {
        padding: 15px 5px 30px 5px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #ccc transparent;
    }

    .media-track::-webkit-scrollbar {
        height: 4px;
    }

    .media-track::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }

    .media-card {
        scroll-snap-align: center;
    }

    /* Flechas de scroll ocultas en móvil (se usa dedo) */
    .scroll-arrow {
        display: none !important;
    }

    /* Ajuste de alturas */
    .card-image,
    .card-video {
        height: 180px !important;
    }
}

/* =========================================
   3. CORRECCIÓN MODAL DE GALERÍA
   ========================================= */
@media (max-width: 768px) {
    
    .modal-window {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        height: 100vh;
    }

    .modal-body {
        max-height: 70vh;
    }

    .gallery-viewer {
        height: 70vh;
    }

    .gallery-main-display {
        padding: 5px;
    }

    .gallery-thumbnails {
        height: 70px;
        padding: 5px;
        gap: 8px;
    }

    .thumb-img {
        height: 50px;
        width: 65px;
    }
}

/* =========================================
   4. AJUSTES ADICIONALES PARA MEJOR UX
   ========================================= */

/* Touch feedback para botones */
@media (max-width: 768px) {
    
    .hero-nav:active,
    .nav-btn:active,
    .slider-btn:active {
        opacity: 0.7;
    }

    /* Evitar zoom accidental en inputs */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Mejorar área táctil de enlaces */
    .card-body a,
    .menu-link,
    .btn-modern {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* =========================================
   5. CORRECCIÓN ESPECÍFICA PARA IMAGEN DEFORMADA
   ========================================= */

/* Forzar que TODAS las imágenes de médicos se comporten igual */
.hero-card .hero-img img,
.hero-img > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    /* Evitar cualquier distorsión */
    max-width: none !important;
    max-height: none !important;
}

/* =========================================
   6. OPTIMIZACIÓN DE RENDIMIENTO
   ========================================= */

/* Usar transform para animaciones suaves */
.media-card,
.hero-card,
.review-card {
    will-change: transform;
}

/* Reducir blur en móvil para mejor rendimiento */
@media (max-width: 768px) {
    .cookie-card-luxury,
    .glass-panel,
    .rating-badge-glass {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
}

/* =========================================
   CORRECCIÓN ESPECÍFICA: TARJETAS PDF/MULTIMEDIA MÓVIL
   Agregar este código DESPUÉS del código anterior
   ========================================= */

/* =========================================
   1. ALTURA BALANCEADA PARA TARJETAS
   ========================================= */

/* Forzar altura específica para imagen/video */
.media-card .card-image,
.media-card .card-video {
    height: 280px !important; /* Reducido para que se vea más texto */
    min-height: 280px !important;
    max-height: 280px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

/* Asegurar que la tarjeta completa sea visible */
.media-card {
    min-height: 320px !important; /* Altura total balanceada */
    max-height: 380px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* =========================================
   2. OPTIMIZACIÓN DEL TEXTO
   ========================================= */

/* Espacio del cuerpo optimizado */
.media-card .card-body {
    padding: 15px 12px !important;
    flex: 1 !important; /* Ocupa espacio restante */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow: hidden !important; /* Evita desbordamiento */
}

/* Categoría más pequeña */
.media-card .category {
    font-size: 0.7rem !important;
    margin-bottom: 5px !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Título legible y ajustado */
.media-card .card-body h4 {
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
    margin: 0 0 8px 0 !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    /* Limitar a 2 líneas máximo */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Descripción con 2 líneas máximo */
.media-card .card-body p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    color: #666 !important;
    margin: 0 !important;
    /* Limitar a 2 líneas */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* =========================================
   3. AJUSTES ESPECÍFICOS PARA MÓVIL se puede ajustar el tamaño
   ========================================= */

@media (max-width: 768px) {
    
    /* Tarjetas más estrechas y mejor proporcionadas */
    .media-card {
        min-width: 260px !important;
        max-width: 260px !important;
        min-height: 300px !important;
        max-height: 340px !important;
        margin: 0 !important;
    }

    /* Imagen aún más pequeña en pantallas chicas */
    .media-card .card-image,
    .media-card .card-video {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
    }

    /* Padding más compacto */
    .media-card .card-body {
        padding: 12px 10px !important;
    }

    /* Tipografía reducida */
    .media-card .category {
        font-size: 0.65rem !important;
    }

    .media-card .card-body h4 {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
    }

    .media-card .card-body p {
        font-size: 0.75rem !important;
        line-height: 1.35 !important;
    }

    /* Contenedor del track con mejor scroll */
    .media-track {
        padding: 10px 5px 25px 5px !important;
        gap: 15px !important; /* Menos espacio entre tarjetas */
    }

    /* Tabs más compactos (solo íconos) */
    .modern-tabs {
        padding: 5px !important;
        gap: 2px !important;
    }

    .tab-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Ocultar texto en tabs móvil */
    .tab-btn span {
        display: none !important;
    }

    .tab-btn i {
        font-size: 1.2rem !important;
        margin: 0 !important;
    }
}

/* =========================================
   4. CORRECCIÓN TAG PDF/VIDEO/GALERÍA
   ========================================= */

.card-tag {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    padding: 4px 10px !important;
    font-size: 0.7rem !important;
    border-radius: 15px !important;
    z-index: 10 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

/* =========================================
   5. OPTIMIZACIÓN VISUAL DEL OVERLAY
   ========================================= */

.card-overlay {
    font-size: 0.85rem !important;
    gap: 3px !important;
}

.card-overlay i {
    font-size: 1.3rem !important;
}

/* =========================================
   6. CORRECCIÓN PARA VIDEOS INCRUSTADOS
   ========================================= */

/* Videos deben tener la misma altura que imágenes */
.media-card video.card-video {
    height: 140px !important;
    width: 100% !important;
    object-fit: cover !important;
    background: #000 !important;
}

/* =========================================
   7. SCROLL SUAVE Y SNAP
   ========================================= */

@media (max-width: 768px) {
    .media-track {
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #ccc transparent !important;
    }

    .media-track::-webkit-scrollbar {
        height: 3px !important;
    }

    .media-track::-webkit-scrollbar-track {
        background: transparent !important;
    }

    .media-track::-webkit-scrollbar-thumb {
        background: #ccc !important;
        border-radius: 2px !important;
    }

    .media-card {
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
    }
}

/* =========================================
   8. ELIMINAR FLECHAS EN MÓVIL
   ========================================= */

@media (max-width: 768px) {
    .scroll-arrow,
    .media-grid .scroll-arrow {
        display: none !important;
    }
}

/* =========================================
   9. ESPACIADO DE LA SECCIÓN
   ========================================= */

@media (max-width: 768px) {
    .modern-media-section {
        padding: 40px 10px !important;
    }

    .modern-tabs-container {
        margin-bottom: 25px !important;
    }
}

/* =========================================
   10. PREVENIR ZOOM ACCIDENTAL
   ========================================= */

@media (max-width: 768px) {
    .media-card * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        user-select: none !important;
    }
}

/* =========================================
   11. CORRECCIÓN FINAL: PROPORCIONES PERFECTAS
   ========================================= */

/* Asegurar ratio 16:9 aproximado para imágenes */
@media (max-width: 768px) {
    .card-image {
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
        max-height: 140px !important;
    }

    /* Contenedor de la tarjeta con altura fija */
    .media-card {
        height: 320px !important;
        min-height: 320px !important;
        max-height: 320px !important;
    }

    /* Distribución del espacio */
    .card-image,
    .card-video {
        height: 140px !important; /* 44% del espacio */
    }

    .card-body {
        height: 180px !important; /* 56% del espacio */
        padding: 12px !important;
    }
}

/* =========================================
   12. VERSIÓN ULTRA-COMPACTA PARA MÓVILES PEQUEÑOS
   ========================================= */

@media (max-width: 400px) {
    .media-card {
        min-width: 240px !important;
        max-width: 240px !important;
        height: 300px !important;
    }

    .card-image,
    .card-video {
        height: 120px !important;
    }

    .card-body {
        height: 180px !important;
        padding: 10px 8px !important;
    }

    .card-body h4 {
        font-size: 0.85rem !important;
    }

    .card-body p {
        font-size: 0.7rem !important;
    }
}

/* =========================================
   13. CORRECCIÓN ESPECIAL PARA PDFS EN MÓVIL
   ========================================= */

/* CORRECCIÓN PDFS EN MÓVIL */
@media (max-width: 768px) {
    .media-card {
        min-width: 280px !important;
        max-width: 280px !important;
        height: 320px !important;
        margin: 0 5px !important;
    }
    
    .card-image {
        height: 180px !important;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .media-track {
        padding: 10px 5px !important;
        gap: 15px !important;
    }
}

/* =========================================
   14. CORRECCIÓN ESPECIAL PARA IMÁGENES DE DOCTORES EN MÓVIL esta es la clave de cambiar el tamaño y recorte
   ========================================= */
/* CORRECCIÓN IMÁGENES DOCTORES MÓVIL */
@media (max-width: 768px) {
    .hero-card {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .hero-img {
        width: 100% !important;
        height: 350px !important;
        position: relative !important;
    }
    
    .hero-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: top center !important;
    }
    
    .hero-content {
        width: 100% !important;
        padding: 30px 20px !important;
        text-align: center;
    }
}

/* =========================================
   CORRECCIÓN VISUALIZACIÓN PDF EN MODAL
   ========================================= */

/* 1. Asegurar que el modal ocupe toda la pantalla en móvil */
@media (max-width: 768px) {
    .modal-window {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .modal-body {
        height: calc(100vh - 60px) !important; /* Restar altura del header */
        max-height: calc(100vh - 60px) !important;
        padding: 0 !important;
    }

    .modal-body iframe {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
    }

    .modal-header {
        padding: 15px 20px !important;
        height: 60px !important;
    }

    .modal-header h3 {
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
    }
}

/* 2. Para pantallas grandes (PC) también mejorar */
@media (min-width: 769px) {
    .modal-body iframe {
        width: 100% !important;
        height: 600px !important; /* Altura fija más grande */
        min-height: 600px !important;
    }
}

/* 3. Forzar zoom inicial del PDF */
.modal-body iframe {
    /* Esto ayuda a que el PDF se cargue con zoom adecuado */
    transform-origin: top left !important;
}

/* =========================================
   MODAL PDF MEJORADO PARA MÓVIL
   ========================================= */

@media (max-width: 768px) {
    
    /* Fondo del modal a pantalla completa */
    .modal-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.9) !important;
        z-index: 99999 !important;
    }
    
    /* Ventana del modal */
    .modal-window {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    /* Header del modal */
    .modal-header {
        flex-shrink: 0 !important;
        padding: 15px 20px !important;
        background: #002855 !important;
        border-bottom: 3px solid #d4af37 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .modal-header h3 {
        font-size: 0.95rem !important;
        margin: 0 !important;
        color: white !important;
        flex: 1 !important;
        line-height: 1.3 !important;
        padding-right: 10px !important;
    }
    
    /* Botón cerrar (X) más grande para tocar con el dedo */
    .close-btn {
        background: rgba(255, 255, 255, 0.15) !important;
        border: none !important;
        color: white !important;
        width: 45px !important;
        height: 45px !important;
        border-radius: 50% !important;
        font-size: 1.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
    }
    
    .close-btn:active {
        background: rgba(211, 47, 47, 0.8) !important;
        transform: scale(0.9) !important;
    }
    
    /* Cuerpo del modal */
    .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        background: #f5f5f5 !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Animación de entrada del modal */
    .modal-window {
        animation: slideUp 0.3s ease-out !important;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* Evitar scroll del fondo cuando el modal está abierto */
body[style*="position: fixed"] {
    overflow: hidden !important;
}

/* =========================================
   SOLUCIÓN BUG: BOTÓN CERRAR SIEMPRE VISIBLE
   (Pegar al final del CSS)
   ========================================= */

@media (max-width: 768px) {
    /* Forzamos que el botón de cerrar flote sobre todo */
    .close-btn { 
        position: fixed !important; /* Se queda pegado a la pantalla */
        top: 15px !important;
        right: 15px !important;
        z-index: 9999999 !important; /* Por encima del PDF y de todo */
        
        /* Estilo para que se vea bien sobre cualquier fondo */
        background-color: rgba(0, 0, 0, 0.6) !important; /* Fondo oscurito */
        color: white !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    }

    /* Aseguramos que el contenido del modal no tape el botón */
    .modal-header {
        position: relative !important;
        z-index: 10 !important;
    }
}

/* =========================================
   OPTIMIZACIÓN DE RENDIMIENTO (SPEED BOOST)
   ========================================= */

/* 1. Renderizado inteligente: Solo carga lo que se ve en pantalla */
.about-ultra, 
.stats-classic, 
.services-clean, 
.doctors-hero, 
.cta-appointment, 
.locations-luxury-section, 
.testimonials-luxury, 
footer {
    content-visibility: auto; /* Magia para el rendimiento */
    contain-intrinsic-size: 1px 1000px; /* Evita saltos de scroll */
}

/* 2. Aceleración de Hardware para animaciones */
.media-card, 
.hero-card, 
.review-card, 
.btn-modern {
    will-change: transform; /* Prepara la tarjeta gráfica para animar suave */
    transform: translateZ(0); /* Truco para forzar GPU */
}

/* 3. Desactivar efectos pesados en móviles para ganar velocidad */
@media (max-width: 768px) {
    * {
        backdrop-filter: none !important; /* El efecto vidrio consume mucha batería y CPU */
        box-shadow: none !important; /* Las sombras complejas ralentizan el scroll */
    }
    
    /* Restaurar sombras simples solo donde sea vital */
    .btn-modern, .media-card {
        box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    }
}

/* =========================================
   NUEVOS ESTILOS: BOTONES DE CALIFICACIÓN
   (Agregar al final del archivo CSS)
   ========================================= */

/* Contenedor que alinea Mapa a la izquierda y Botón a la derecha */
.loc-action-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px; /* Separación del horario */
    padding-top: 15px;
    border-top: 1px solid #f0f0f0; /* Línea divisoria suave */
    width: 100%;
}

/* Estilo simple para "Abrir Mapa" (sin borde propio) */
.btn-map-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    color: #004aad; /* Azul corporativo */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-map-text:hover {
    color: #e63946; /* Rojo al pasar el mouse */
    transform: translateX(3px); /* Pequeño movimiento */
}

/* Estilo llamativo para "Calificar" */
.btn-rate-star {
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 50px; /* Bordes redondos estilo moderno */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* La estrella dorada */
.btn-rate-star i {
    color: #fbbc04; /* Amarillo Google */
    font-size: 1.1em;
}

/* Efecto Hover del Botón Calificar */
.btn-rate-star:hover {
    border-color: #fbbc04;
    color: #333;
    background-color: #fffef0; /* Fondo amarillo muy tenue */
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.1);
}

/* Ajuste Responsive para pantallas muy pequeñas */
@media (max-width: 380px) {
    .loc-action-footer {
        flex-direction: column;
        gap: 15px;
    }
    .btn-map-text, .btn-rate-star {
        width: 100%;
        justify-content: center;
    }
}


/* =========================================
   NUEVOS ESTILOS: PANEL DE ACCESIBILIDAD
   (Agregar al final del archivo CSS)
   ========================================= */

/* Variables de colores */
:root {
    --acc-primary: #004080; /* Azul oscuro elegante */
    --acc-bg: #ffffff;
    --acc-text: #333333;
    --acc-gray: #f0f0f0;
}

/* Botón Flotante (Ojo) */
.access-trigger {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: var(--acc-primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 0 50% 50% 0;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: transform 0.3s ease;
}

.access-trigger:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Panel Desplegable */
.access-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Oculto inicialmente */
    width: 380px;
    height: 100vh;
    background-color: var(--acc-bg);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 30px;
    box-sizing: border-box;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Animación suave */
    overflow-y: auto;
    font-family: 'Segoe UI', sans-serif; /* Fuente moderna */
}

.access-panel.active {
    right: 0; /* Mostrar */
}

/* Header del panel */
.access-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.access-header h2 {
    color: #2c5eff; /* Azul brillante como en la foto */
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.access-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
}

/* Opciones Generales */
.option-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--acc-text);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Control Slider y Botones */
.range-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.btn-circle {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-circle:hover {
    border-color: var(--acc-primary);
    color: var(--acc-primary);
}

input[type=range] {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* Switch (Toggle) */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--acc-primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.option-sub {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
}

/* Fondo oscuro (Overlay) */
.access-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.access-overlay.active {
    opacity: 1;
    visibility: visible;
}




/*accessibilidad:
1. Botón de Accesibilidad: Un botón flotante con un ícono de ojo

/* =========================================
   WIDGET ACCESIBILIDAD (CORREGIDO IZQUIERDA)
   ========================================= */

/* =========================================
   WIDGET ACCESIBILIDAD FES (ESTILOS)
   ========================================= */

/* 1. Botón Flotante (Ojo) */
#fes-acc-trigger {
    position: fixed;
    top: 50%;
    left: 0; /* Pegado a la izquierda */
    transform: translateY(-50%);
    background-color: #002855; /* Azul FES */
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    z-index: 2147483647; /* Máxima prioridad (Encima de todo) */
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#fes-acc-trigger:hover {
    width: 60px;
    background-color: #d32f2f; /* Rojo FES al pasar el mouse */
}

/* 2. Panel Desplegable */
#fes-acc-panel {
    position: fixed;
    top: 0;
    left: -350px; /* Oculto a la izquierda */
    width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 2147483647; /* Mismo nivel que el botón */
    box-shadow: 10px 0 50px rgba(0,0,0,0.3);
    transition: left 0.3s ease;
    padding: 25px;
    box-sizing: border-box;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
}

/* Clase para mostrar el panel (Se activa con JS) */
#fes-acc-panel.activo {
    left: 0 !important;
}

/* 3. Cabecera del panel */
.fes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.fes-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #002855;
    font-weight: 800;
}

/* 4. Botón Cerrar (X) */
#fes-close-btn {
    background: #f1f1f1;
    border: none;
    color: #333;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    line-height: 1;
}

#fes-close-btn:hover {
    background: #d32f2f;
    color: white;
}

/* 5. Opciones Internas */
.fes-option {
    margin-bottom: 25px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.fes-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: block;
    font-size: 1rem;
}

/* Controles de Zoom */
.fes-zoom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.fes-btn-zoom {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #002855;
    border-radius: 5px;
}
.fes-btn-zoom:hover { background: #eee; }

/* Switch Toggle (Interruptor) */
.fes-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.fes-switch input { opacity: 0; width: 0; height: 0; }
.fes-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.fes-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px;
    left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .fes-slider { background-color: #002855; }
input:checked + .fes-slider:before { transform: translateX(24px); }

/* 6. Fondo Oscuro (Overlay) */
#fes-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2147483646; /* Uno menos que el panel */
    display: none;
}
#fes-overlay.activo { display: block; }