:root {
    /* Symphony of Blues - High Contrast & Vibrancy */
    --navy-blue: #002347;
    /* Primary Text / Headings */
    --primary-blue: #0056b3;
    /* Primary Actions */
    --royal-blue: #003d82;
    /* Hover States */
    --pool-blue: #00bcd4;
    /* Accents / Water Elements */
    --pool-dark: #008ba3;
    /* Darker Accent */

    /* Gradients - Deep & Modern */
    --primary-gradient: linear-gradient(135deg, var(--navy-blue) 0%, var(--primary-blue) 100%);
    --secondary-gradient: linear-gradient(135deg, var(--pool-blue) 0%, #17a2b8 100%);
    --accent-gradient: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    --pool-gradient: linear-gradient(180deg, #4fc3f7 0%, #0288d1 100%);
    /* Lighter, more "pool-like" */

    /* Neutrals */
    --white: #ffffff;
    --off-white: #f4f7f6;
    --light-gray: #e9ecef;
    --dark-text: #1a1e21;
    --muted-text: #676d75;
    /* Darker for better accessibility */

    /* Effects */
    --shadow-soft: 0 10px 30px rgba(0, 35, 71, 0.05);
    --shadow-medium: 0 15px 45px rgba(0, 35, 71, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 35, 71, 0.15);
    --glass: rgba(255, 255, 255, 0.90);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);

    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll Reveal Base */
.reveal-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.reveal-ready.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Base Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--off-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--navy-blue);
    font-weight: 800;
    /* Heavy weight for impact */
    letter-spacing: -0.5px;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px; /* Increased from 1200px for more spread */
    margin: 0 auto;
    padding: 10px 30px;
}

/* Header & Glass Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95); /* Aumentado de 0.85 a 0.95 para legibilidad sin blur */
    border-bottom: 2px solid var(--pool-blue); /* Borde ms slido para presencia */
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo-img { 
    margin-right: 0; /* Let flex justify-content: space-between handle it */
    height: 65px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 25px; /* Increased from 15px for better breathing */
    align-items: center;
}

.nav-links>li {
    position: relative;
    padding: 12px 0;
}

.nav-links a {
    font-weight: 700;
    font-size: 0.78rem; white-space: nowrap;
    color: var(--navy-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover {
    color: var(--pool-blue);
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 12px 25px;
    text-transform: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted-text);
    letter-spacing: 0;
    transition: all 0.2s ease;
    display: block;
    width: 100%;
}

.dropdown-menu a:hover {
    background: var(--light-gray);
    color: var(--primary-blue);
    padding-left: 30px;
}

.dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--navy-blue);
    cursor: pointer;
    z-index: 200000;
    /* Higher than the modal (100000) */
    transition: var(--transition);
    position: relative;
}

.scrolled .mobile-menu-toggle {
    color: var(--navy-blue);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .nav-container {
        padding: 10px 20px;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1000001; /* Above nav links */
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.85); /* Light glass effect */
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 80px 40px;
        gap: 20px;
        z-index: 1000000;
        display: none;
        opacity: 0;
        transition: opacity 0.4s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    [data-theme="dark"] .nav-links {
        background: rgba(15, 23, 42, 0.85); /* Darker glass for dark mode */
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
    }

    .nav-links>li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        color: var(--navy-blue) !important;
        font-size: 1.4rem;
        font-weight: 800;
        padding: 15px 0;
    }

    [data-theme="dark"] .nav-links a {
        color: white !important;
    }

    /* Mobile Dropdowns */
    .dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none;
        padding: 10px 0;
        display: none;
        background: rgba(0, 0, 0, 0.05) !important;
        border-radius: 15px;
        width: 100%;
    }

    .dropdown.active .dropdown-menu {
        display: block !important;
    }

    /* Hero Section Mobile Fix */
    .hero {
        height: 70vh !important;
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2.8rem !important;
    }

    .hero-content p {
        font-size: 1.2rem !important;
        padding: 0 20px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    /* CTAs Adjustment */
    .major-ctas {
        margin-top: -50px !important;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2rem !important;
    }

    .container {
        width: 92%;
    }

    /* Services & Merit Cards */
    .reveal-ready[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .reveal-ready img {
        height: 300px !important;
    }

    .merit-card {
        grid-template-columns: 1fr !important;
    }

    .merit-card img {
        height: 350px !important;
        order: -1;
        /* Always image on top */
    }

    .footer-col h4::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .footer-col img {
        margin: 0 auto 20px !important;
    }

    /* General Grids Stacking */
    .disciplines-grid, 
    .major-ctas, 
    .footer-columns,
    .natacion-grid-2col,
    .biomedical-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .section-title h2 {
        font-size: 2.2rem !important;
        padding: 50px 0 !important;
    }

    /* Noticias Page Responsiveness */
    .news-filter-container {
        padding: 20px !important;
        gap: 15px !important;
    }

    .search-group {
        width: 100% !important;
    }

    .news-grid {
        grid-template-columns: 1fr !important;
    }

    /* Institucional Page Responsiveness */
    .institutional-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .institutional-content img {
        height: 300px !important;
    }

    /* Servicios Page Fixes */
    .natacion-grid-2col {
        grid-template-columns: 1fr !important;
    }

    #capf .grid,
    #capf div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    #educacion div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    #cifar div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .biomedical-grid {
        grid-template-columns: 1fr !important;
    }


    /* Typography & Spacing Fixes */
    .page-header h1 {
        font-size: 2.2rem !important;
    }

    .page-header p {
        font-size: 1rem !important;
    }

    .modal-content-box {
        width: 95% !important;
        margin: 10px auto !important;
    }

    .modal-body-content {
        padding: 25px 15px !important;
    }

    section {
        padding: 40px 0 !important;
    }

    h2 {
        font-size: 2rem !important;
    }
}

/* Buttons with Micro-interactions */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--navy-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-pay {
    background: var(--accent-gradient);
    color: var(--navy-blue);
    animation: pulse 3s infinite;
    padding: 8px 20px;
    font-size: 0.7rem;
}

.btn-pay:hover {
    transform: scale(1.05);
    color: white;
}

.btn-register {
    background: var(--secondary-gradient);
    color: white;
}

.btn-register:hover {
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.4);
}

/* Hero Section - Visual Impact */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background-color: #002347; /* Fallback Navy Blue (El azulito) */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    filter: none; 
    transition: opacity 0.6s ease-in-out;
    object-fit: cover;
}

.video-active {
    opacity: 1;
    z-index: 1;
}

.video-idle {
    display: none; /* Ya no usamos dos videos a la vez */
}

.hero-content h1 {
    font-size: 4.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Sombra ms simple y ligera */
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Sections & Cards */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    color: var(--navy-blue);
    font-size: 3rem;
}

.section-title p {
    color: var(--muted-text);
    font-size: 1.1rem;
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card img,
.card .card-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.card-content p {
    color: var(--muted-text);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Features / CTAs Grid */
.major-ctas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.cta-box {
    background: #ffffff; /* Slido para mejor performance */
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border-top: 5px solid var(--pool-blue);
}

.cta-box:hover {
    transform: translateY(-10px);
}

.cta-box i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

/* Footer - Pool Design */
footer {
    background: #0093E9;
    background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
    padding: 100px 0 30px;
    color: white;
    position: relative;
    overflow: hidden;
}



.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Wave Separator */
.wave-separator {
    width: 100%;
    height: auto;
    display: block;
    line-height: 0;
}

.bg-light {
    background-color: var(--off-white);
}

.bg-white {
    background-color: var(--white);
}

/* Animations Keyframes */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
    }

}

/* Video Carousel */
.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.video-card {
    flex: 0 0 350px;
    scroll-snap-align: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 35, 71, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-card:hover .video-overlay {
    background: rgba(0, 35, 71, 0.2);
}

.play-btn {
    width: 60px;
    height: 60px;
    background: var(--pool-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
    transform: scale(0.9);
}

.video-card:hover .play-btn {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.6);
}

/* Glassmorphism Model */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    /* Max Z-Index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    /* Darker background */
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 0 20px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 700px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    color: var(--navy-blue);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 25px;
    top: 20px;
    z-index: 10;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--primary-blue);
    background: white;
    box-shadow: var(--shadow-soft);
}

.modal-header-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 40px;
    color: var(--dark-text);
}

.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--navy-blue);
}

.modal-date {
    display: block;
    margin-bottom: 25px;
    color: var(--pool-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.modal-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .video-card {
        flex: 0 0 280px;
    }
}

/* News Slider */
.news-slider-container {
    position: relative;
    padding: 0 50px;
    margin: 40px 0;
}

.news-slider-wrapper {
    overflow: hidden;
    width: 100%;
}

.news-row {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 30px;
}

.news-row .card {
    flex: 0 0 calc(33.333% - 20px);
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 65px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: var(--navy-blue);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    color: var(--pool-blue);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.2);
}

.news-nav.prev {
    left: -10px;
}

.news-nav.next {
    right: -10px;
}

@media (max-width: 1024px) {
    .news-row .card {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .news-slider-container {
        padding: 10px 20px;
    }

    .news-row .card {
        flex: 0 0 100%;
    }

    .news-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .news-nav.prev {
        left: 0;
    }

    .news-nav.next {
        right: 0;
    }
}

/* Disciplines Grid */
.disciplines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.discipline-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Premium soft shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.discipline-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--pool-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.discipline-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.discipline-card:hover::after {
    transform: scaleX(1);
}

.discipline-icon {
    width: 80px;
    height: 80px;
    background: var(--pool-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(2, 136, 209, 0.3);
    transition: var(--transition);
}

.discipline-card:hover .discipline-icon {
    transform: scale(1.1) rotate(5deg);
}

.discipline-card h3 {
    color: var(--navy-blue);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.discipline-card p {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Club Cards Specifics */
.club-card {
    border-top: 5px solid var(--pool-blue);
}

.club-img-container {
    height: 180px;
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.club-img-container img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.club-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.8em;
    /* Approximate height for 3 lines */
}

/* Specific 4-column grid for clubs page */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

@media (min-width: 1100px) {
    .clubs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.club-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.club-socials a {
    color: var(--muted-text);
    font-size: 1.5rem;
    /* Increased visibility */
    transition: var(--transition);
    padding: 5px;
    /* Bigger hit area */
}

.club-socials a:hover {
    color: var(--pool-blue);
    transform: translateY(-2px);
}

/* Symmetry Enforcers */
.club-card .card-content {
    justify-content: space-between;
    /* Distribute space evenly */
}

.club-card h3 {
    height: 3rem;
    /* Force 2 lines height */
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Center vertically if 1 line */
    justify-content: center;
    margin-bottom: 10px;
}

.club-desc {
    height: 4.5em;
    /* Force fixed height approx 3 lines */
    min-height: 4.5em;
    margin-bottom: 15px !important;
}

.club-socials {
    margin-top: auto;
    /* Push socials down */
    margin-bottom: 15px;
    padding-top: 10px;
}

/* --- Nuevas Clases para PÃ¡gina de Servicios (RediseÃ±o 2026) --- */

.service-section {
    padding: 100px 0;
    position: relative;
    background: var(--white);
}

.service-section.alt-bg {
    background: var(--off-white);
}

.service-section.dark-bg {
    background: var(--navy-blue);
    color: var(--white);
}

.service-section.dark-bg h2,
.service-section.dark-bg h3,
.service-section.dark-bg h4 {
    color: var(--white);
}

.service-grid-alt {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: stretch;
}

.service-card-modern {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 188, 212, 0.15);
    /* Soft pool blue glow */
}

.service-card-header {
    padding: 30px;
    background: var(--primary-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 20px;
}

.service-card-header.pool-bg {
    background: var(--pool-gradient);
}

.service-card-header.accent-bg {
    background: var(--accent-gradient);
}

.service-card-header h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
}

.service-card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    backdrop-filter: blur(5px);
}

.service-card-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Pricing Badges */
.price-badge {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid var(--pool-blue);
    color: var(--navy-blue);
    font-size: 0.95rem;
}

.price-badge.accent {
    border-left-color: #ff9800;
}

.price-badge strong {
    font-size: 1.1rem;
    color: var(--primary-blue);
    display: block;
    margin-bottom: 5px;
}

/* Schedule List */
.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--muted-text);
}

.schedule-list li i {
    color: var(--pool-blue);
    margin-top: 4px;
}

/* Specialized Grids */
.biomedical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.biomedical-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.biomedical-card:hover {
    border-top-color: #28a745;
    /* Health green */
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.biomedical-icon {
    width: 70px;
    height: 70px;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Glassmorphism Cards for Buceo/Premium */
.glass-card-dark {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    transition: var(--transition);
}

.glass-card-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.glass-card-dark h4 {
    color: var(--pool-blue);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Timeline/List for general requirements */
.feature-list {
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.feature-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    color: var(--muted-text);
}

.feature-list li::before {
    content: '\f00c';
    /* FontAwesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
}

/* --- Modals para Servicios (BebÃ©s, NiÃ±os, etc) --- */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 35, 71, 0.85);
    /* Dark navy overlay with high opacity */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content-box {
    background-color: var(--white);
    margin: auto;
    border-radius: 24px;
    width: 100%;
    max-width: 700px;
    /* Wider modal to fit image & text nicely */
    max-height: 90vh;
    /* Prevent overflow of viewport */
    overflow-y: auto;
    /* Scroll inside modal if content is long */
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.custom-modal.show .modal-content-box {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--navy-blue);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--pool-blue);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-header-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.modal-body-content {
    padding: 40px;
}

/* Modal Registration Button (Global) */
.btn-registration-modal {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent-gradient);
    color: var(--navy-blue) !important;
    padding: 15px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 25px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-registration-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.modal-body-content h3 {
    font-size: 2rem;
    color: var(--navy-blue);
    margin-bottom: 20px;
}

.modal-body-content p.lead {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Modal Internal Grid for Price & Schedule */
.modal-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 600px) {
    .modal-details-grid {
        grid-template-columns: 1fr;
    }
}

/* --- RediseÃ±o Premium NataciÃ³n (2 Tarjetas por Fila) --- */
.natacion-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .natacion-grid-2col {
        grid-template-columns: 1fr;
    }
}

.natacion-card-premium {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 35, 71, 0.08);
    /* Soft elegant shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.natacion-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 188, 212, 0.2);
}

.natacion-card-header-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.natacion-card-header-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 35, 71, 0.9) 0%, rgba(0, 35, 71, 0) 100%);
}

.natacion-card-title-box {
    position: relative;
    z-index: 2;
    padding: 20px 30px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.natacion-card-title-box h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.6rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.natacion-card-icon-round {
    width: 50px;
    height: 65px;
    background: var(--pool-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.natacion-card-body-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fbff 100%);
}

.natacion-card-body-content p {
    color: var(--muted-text);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-premium-action {
    margin-top: auto;
    background: var(--pool-blue);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium-action:hover {
    background: var(--navy-blue);
    transform: scale(1.05);
}

/* --- SECCIï¿½N DE FILTROS DE NOTICIAS (ADVANCED) --- */
.news-filter-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
    margin-top: -60px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-group {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pool-blue);
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid #f1f5f9;
    border-radius: 15px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: var(--navy-blue);
}

.search-input:focus {
    outline: none;
    border-color: var(--pool-blue);
    background: white;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.1);
}

.search-input:focus+i {
    color: var(--navy-blue);
    transform: translateY(-50%) scale(1.1);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    display: none;
    background: white;
    border-radius: 30px;
    border: 2px dashed #e2e8f0;
}

.no-results i {
    font-size: 5rem;
    color: var(--pool-blue);
    margin-bottom: 25px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 1.8rem;
    color: var(--navy-blue);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--muted-text);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .news-filter-container {
        margin-top: 0;
        padding: 20px;
        box-shadow: none;
        background: transparent;
        border: none;
    }

    .search-input {
        padding: 15px 15px 15px 50px;
    }
}

/* --- SISTEMA EDITORIAL: NEWSPAPER LAYOUT --- */
.news-journal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.news-journal-card {
    background: white;
    border-radius: 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    padding-bottom: 25px;
}

.news-featured {
    grid-column: span 2;
    flex-direction: row;
    gap: 30px;
    border-bottom: 3px solid var(--navy-blue);
    padding-bottom: 40px;
}

.news-featured .journal-img-container {
    flex: 1.2;
    height: 400px;
}

.news-featured .journal-content {
    flex: 1;
    padding: 0;
    justify-content: center;
}

.news-featured .journal-title {
    font-size: 3rem;
    line-height: 1.1;
    margin: 15px 0 20px;
}

.news-standard .journal-img-container {
    height: 220px;
    margin-bottom: 20px;
}

.journal-img-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.journal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.news-journal-card:hover .journal-img {
    transform: scale(1.08);
}

.journal-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--navy-blue);
    color: white;
    padding: 5px 15px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.journal-content {
    display: flex;
    flex-direction: column;
}

.journal-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.78rem; white-space: nowrap;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journal-date {
    color: var(--pool-blue);
}

.journal-tag {
    color: var(--muted-text);
    opacity: 0.7;
}

.journal-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--navy-blue);
    line-height: 1.2;
    transition: color 0.3s ease;
}

.news-journal-card:hover .journal-title {
    color: var(--pool-blue);
}

.journal-excerpt {
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured .journal-excerpt {
    -webkit-line-clamp: 5;
    font-size: 1.1rem;
}

.journal-read-more {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--navy-blue);
    margin-top: auto;
}

/* Layout Responsivo para el Diario */
@media (max-width: 1100px) {
    .news-journal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .news-featured {
        grid-column: span 2;
    }
}

@media (max-width: 850px) {
    .news-journal-grid {
        grid-template-columns: 1fr;
    }

    .news-featured {
        flex-direction: column;
        grid-column: span 1;
    }

    .news-featured .journal-img-container {
        height: 300px;
    }

    .news-featured .journal-title {
        font-size: 2.2rem;
    }
}

/* --- FIX: VISIBILIDAD DE CONTENIDO HERO --- */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 35, 71, 0.3) 0%, rgba(0, 35, 71, 0.7) 100%);
    z-index: 5;
}

.hero-video-bg {
    filter: brightness(0.8) !important;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    color: #ffffff !important;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9) !important;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9) !important;
}
/* ============================================
   SISTEMA DE TEMAS: MODO OSCURO (DARK MODE)
   Liga de Natacion de Antioquia
   ============================================ */

/* --- FIX: Mejorar legibilidad del texto gris (Modo Claro) --- */
:root {
    --muted-text: #5a6476;
}

/* --- Variables de Modo Oscuro --- */
[data-theme="dark"] {
    --navy-blue: #e2e8f0;
    --primary-blue: #60a5fa;
    --royal-blue: #93c5fd;
    --pool-blue: #22d3ee;
    --pool-dark: #06b6d4;

    --primary-gradient: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);

    --white: #1e293b;
    --off-white: #0f172a;
    --light-gray: #1e293b;
    --dark-text: #e2e8f0;
    --muted-text: #94a3b8;

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 15px 45px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.5);
    --glass: rgba(30, 41, 59, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Body en Modo Oscuro --- */
[data-theme="dark"] body {
    background-color: var(--off-white);
    color: var(--dark-text);
}

/* --- Header en Modo Oscuro --- */
[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] header.scrolled {
    background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] .nav-links a {
    color: #cbd5e1;
}

[data-theme="dark"] .nav-links a:hover {
    color: var(--pool-blue);
}

[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

[data-theme="dark"] .dropdown-menu a {
    color: #94a3b8;
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--pool-blue);
}

/* --- Cards en Modo Oscuro --- */
[data-theme="dark"] .card {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .card-content h3 {
    color: #93c5fd;
}

[data-theme="dark"] .card-content p {
    color: #94a3b8;
}

/* --- CTAs de Inicio en Modo Oscuro --- */
[data-theme="dark"] .cta-box {
    background: rgba(30, 41, 59, 0.97);
    border-top-color: var(--pool-blue);
}

[data-theme="dark"] .cta-box h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .cta-box p {
    color: #94a3b8;
}

/* --- Secciones en Modo Oscuro --- */
[data-theme="dark"] section {
    background-color: var(--off-white);
}

[data-theme="dark"] #disciplinas {
    background: #1e293b !important;
}

[data-theme="dark"] .discipline-card {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.05);
}

[data-theme="dark"] .discipline-card h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .discipline-card p {
    color: #94a3b8;
}

[data-theme="dark"] .section-title h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .section-title p {
    color: #94a3b8;
}

/* --- Noticias tipo Periodico en Modo Oscuro --- */
[data-theme="dark"] .news-journal-grid {
    background: transparent;
}

[data-theme="dark"] .news-journal-card {
    background: #1e293b;
    border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .journal-title {
    color: #e2e8f0;
}

[data-theme="dark"] .journal-excerpt {
    color: #94a3b8;
}

[data-theme="dark"] .journal-read-more {
    color: var(--pool-blue);
}

[data-theme="dark"] .news-filter-container {
    background: #1e293b;
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .search-input {
    background: #0f172a;
    border-color: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

[data-theme="dark"] .search-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .search-input:focus {
    border-color: var(--pool-blue);
    background: #1e293b;
}

[data-theme="dark"] .no-results {
    background: #1e293b;
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .no-results h3 {
    color: #e2e8f0;
}

/* --- Modales en Modo Oscuro --- */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-content-box {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="dark"] .modal-text,
[data-theme="dark"] #modalTitle {
    color: #e2e8f0;
}

[data-theme="dark"] #modalDate {
    color: var(--pool-blue);
}

/* --- Footer permanece oscuro (ya lo es) --- */
[data-theme="dark"] footer {
    background: #020d1f;
}

/* --- Boton FAB Main --- */
.theme-toggle-fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    z-index: 99999;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    background: var(--navy-blue);
    color: white;
}

.theme-toggle-fab:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .theme-toggle-fab {
    background: #ffd700;
    color: #1a1e21;
}

@media (max-width: 768px) {
    .theme-toggle-fab {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* ============================================
   DARK MODE - PARCHE EXTENSO v2
   Cubre: Olas, Botones, Servicios, Documentos
   ============================================ */

/* --- Olas SVG: Forzar bg oscuro --- */
[data-theme="dark"] .wave-container {
    background: #0f172a !important;
}

[data-theme="dark"] .wave-container path {
    fill: #0f172a !important;
}

/* Ola que separa Hero-White del noticias */
[data-theme="dark"] div[style*="background: white"],
[data-theme="dark"] div[style*="background: #fff"],
[data-theme="dark"] div[style*="background:#fff"] {
    background: #0f172a !important;
}

[data-theme="dark"] section[style*="background: white"],
[data-theme="dark"] section[style*="background-color: white"] {
    background: #1e293b !important;
}

[data-theme="dark"] section[style*="background-color: var(--light-gray)"] {
    background-color: #1e293b !important;
}

/* --- Botones --- */
[data-theme="dark"] .btn-primary {
    background: var(--pool-blue);
    color: #0f172a;
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--pool-dark);
    color: white;
}

[data-theme="dark"] .btn-pay {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1e21;
}

[data-theme="dark"] .btn-register {
    background: var(--secondary-gradient);
    color: white;
}

[data-theme="dark"] .btn-premium-action {
    background: var(--pool-blue);
    color: #0f172a;
    border: none;
}

[data-theme="dark"] .btn-premium-action:hover {
    background: var(--pool-dark);
    color: white;
}

/* --- Cards de Natacion (natacion-card-premium) --- */
[data-theme="dark"] .natacion-card-premium {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .natacion-card-body-content {
    background: #1e293b !important;
}

[data-theme="dark"] .natacion-card-body-content p {
    color: #94a3b8;
}

[data-theme="dark"] .natacion-card-body-content strong {
    color: #e2e8f0;
}

/* --- CAPF: caja blanca interior --- */
[data-theme="dark"] div[style*="background: white; border-radius: 24px"],
[data-theme="dark"] div[style*="background:white"] {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] div[style*="background: var(--light-gray)"] {
    background: #0f172a !important;
}

/* --- Service Card Modern (Servicios Adicionales) --- */
[data-theme="dark"] .service-card-modern {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .service-card-modern h4 {
    color: #e2e8f0;
}

/* --- Secciones alt-bg (fondo claro alterno) --- */
[data-theme="dark"] .service-section.alt-bg,
[data-theme="dark"] .alt-bg {
    background: #1e293b !important;
}

[data-theme="dark"] .service-section {
    background: #0f172a;
}

/* --- Biomedical Cards --- */
[data-theme="dark"] .biomedical-card {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .biomedical-card h4 {
    color: #e2e8f0;
}

/* --- Documentos / ESAL (politicas.php) --- */
[data-theme="dark"] .doc-card,
[data-theme="dark"] .document-card {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.06);
    color: #e2e8f0;
}

[data-theme="dark"] .doc-item,
[data-theme="dark"] a[style*="background: white"] {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255,255,255,0.06);
}

/* Cualquier link o div de documento que tenga fondo blanco */
[data-theme="dark"] div[style*="background: rgba(255,255,255,0.95)"],
[data-theme="dark"] div[style*="background:rgba(255,255,255,0.95)"] {
    background: rgba(30, 41, 59, 0.97) !important;
}

/* --- Price Badge --- */
[data-theme="dark"] .price-badge {
    background: rgba(255,255,255,0.06) !important;
    color: #e2e8f0 !important;
    border-left-color: var(--pool-blue);
}

[data-theme="dark"] .price-badge.accent {
    background: rgba(0, 188, 212, 0.2) !important;
    color: var(--pool-blue) !important;
}

/* --- Headings y textos generales en fondos blancos --- */
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #e2e8f0;
}

[data-theme="dark"] p {
    color: #94a3b8;
}

[data-theme="dark"] strong {
    color: #cbd5e1;
}

/* --- CTA Boxes (Institucional: Mision, Vision, etc.) --- */
[data-theme="dark"] .cta-box {
    background: #1e293b !important;
}

[data-theme="dark"] .cta-box p {
    color: #94a3b8;
}

[data-theme="dark"] .cta-box h3 {
    color: #e2e8f0;
}

/* --- Discipline Cards --- */
[data-theme="dark"] .discipline-card {
    background: #1e293b !important;
}

/* --- Glass card dark (ya oscura, pero ajuste en darkmode) --- */
[data-theme="dark"] .glass-card-dark {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(0, 188, 212, 0.2);
}

/* --- SVG waves que usan fill hardcoded blanco --- */
[data-theme="dark"] svg path[fill="#ffffff"],
[data-theme="dark"] svg path[fill="white"] {
    fill: #0f172a !important;
}

/* ============================================
   DARK MODE - PARCHE INSTITUCIONAL/DOCUMENTOS v3
   Cubre: Docs Legales, ESAL, Wave containers
   ============================================ */

/* --- Wave containers: todas las variantes de bg claro --- */
[data-theme="dark"] .wave-container[style*="background: white"],
[data-theme="dark"] .wave-container[style*="background: var(--off-white)"],
[data-theme="dark"] .wave-container[style*="background: var(--light-gray)"] {
    background: #0f172a !important;
}

/* Los SVG path del wave de noticias fill='#002347' quedan ok en dark */
/* El problema es el bg blanco del contenedor debajo del wave */
[data-theme="dark"] div.wave-container + section,
[data-theme="dark"] div.wave-container + div {
    background-color: #0f172a !important;
}

/* --- Secciones con background: white inline --- */
[data-theme="dark"] section[style*="background: white"],
[data-theme="dark"] section[style*="background:white"] {
    background: #1e293b !important;
}

/* --- Documentos Legales: cards tipo <a class="card"> --- */
[data-theme="dark"] a.card {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] a.card h4 {
    color: #e2e8f0;
}

[data-theme="dark"] a.card:hover {
    background: #253347 !important;
    transform: translateY(-3px);
}

/* --- ESAL: Description box blanco --- */
[data-theme="dark"] div[style*="background: white; padding: 40px"] {
    background: #1e293b !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}

/* --- ESAL: Links de documentos .document-link --- */
[data-theme="dark"] .document-link,
[data-theme="dark"] a.document-link {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.06);
}

[data-theme="dark"] .document-link span,
[data-theme="dark"] a.document-link span {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .document-link:hover,
[data-theme="dark"] a.document-link:hover {
    background: #253347 !important;
    transform: translateX(5px);
}

/* --- CAPF: caja blanca con padding 40px --- */
[data-theme="dark"] div[style*="background: white; border-radius: 24px; padding: 40px"] {
    background: #1e293b !important;
}

/* --- CAPF: caja interna con var(--light-gray) --- */
[data-theme="dark"] div[style*="background: var(--light-gray); padding: 30px"] {
    background: #0f172a !important;
}

/* --- Institucional: secciones con bg var(--light-gray) inline --- */
[data-theme="dark"] section[style*="background-color: var(--light-gray)"],
[data-theme="dark"] section[style*="background: var(--light-gray)"] {
    background: #1e293b !important;
    background-color: #1e293b !important;
}

/* --- ESAL y la sección de var(--light-gray) encima de doc links --- */
[data-theme="dark"] section[style*="padding: 100px 0; background: white"] {
    background: #1e293b !important;
}

[data-theme="dark"] section[style*="padding: 100px 0; background: var(--light-gray)"] {
    background: #0f172a !important;
}

/* --- Natacion Card Body (parte blanca de abajo) --- */
[data-theme="dark"] .natacion-card-body-content {
    background: #1e293b !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
}

/* --- CAPF inner grid separado del fondo --- */
[data-theme="dark"] #capf div[style*="background: white"] {
    background: #1e293b !important;
}

/* --- Centro de educacion (dark-bg section) en dark mode --- */
[data-theme="dark"] .dark-bg {
    background: #020d1f !important;
}

[data-theme="dark"] .dark-bg div[style*="background: rgba(255,255,255,0.05)"] {
    background: rgba(255,255,255,0.04) !important;
}