    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    :root {
        --primary-black: #000000;
        --dark-gray: #1a1a1a;
        --medium-gray: #333333;
        --light-gray: #666666;
        --white: #ffffff;
        --accent-yellow: #ffd700;
        --hover-yellow: #ffed4e;
    }

    body {
        font-family: 'Poppins', sans-serif;
        background-color: var(--primary-black);
        color: var(--white);
        line-height: 1.6;
        overflow-x: hidden;
    }

    /* Preloader */
    .preloader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--primary-black);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        transition: opacity 0.5s ease;
    }

    .preloader img {
        width: 120px;
        height: auto;
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.1); opacity: 0.7; }
    }

    .preloader.fade-out {
        opacity: 0;
        pointer-events: none;
    }

    /* Header */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        padding: 1rem 0;
        transition: all 0.3s ease;
    }

    .header.scrolled {
        background: rgba(0, 0, 0, 0.98);
        padding: 0.5rem 0;
    }

    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 2rem;
    }

    .logo img {
        height: 60px;
        transition: height 0.3s ease;
    }

    .header.scrolled .logo img {
        height: 45px;
    }

    .nav-menu {
        display: flex;
        list-style: none;
        gap: 2rem;
    }

    .nav-menu a {
        color: var(--white);
        text-decoration: none;
        font-weight: 400;
        transition: color 0.3s ease;
        position: relative;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--accent-yellow);
    }

    .nav-menu a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--accent-yellow);
        transition: width 0.3s ease;
    }

    .nav-menu a:hover::after,
    .nav-menu a.active::after {
        width: 100%;
    }

    .menu-toggle {
        display: none;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
    }

    .hamburger {
        width: 25px;
        height: 3px;
        background: var(--white);
        transition: all 0.3s ease;
    }

    /* Hero Section */
/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('main.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* LÍNEA AÑADIDA PARA BAJAR EL CONTENIDO */
    padding-top: 80px; 
}

    .hero-content {
        max-width: 800px;
        padding: 0 2rem;
    }

    .hero-logo {
        width: 300px;
        height: auto;
        margin-bottom: 2rem;
        opacity: 0;
        transform: translateY(50px);
        animation: fadeInUp 1s ease 0.5s forwards;
    }

    .hero h1 {
        display: none;
    }

    .hero p {
        font-size: 1.3rem;
        margin-bottom: 2rem;
        opacity: 0;
        transform: translateY(50px);
        animation: fadeInUp 1s ease 0.8s forwards;
    }

    .cta-button {
        display: inline-block;
        background: var(--accent-yellow);
        color: var(--primary-black);
        padding: 1rem 2.5rem;
        text-decoration: none;
        font-weight: 600;
        border-radius: 50px;
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateY(50px);
        animation: fadeInUp 1s ease 1.1s forwards;
    }

    .cta-button:hover {
        background: var(--hover-yellow);
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    }

    /* Section Styles */
    .section {
        padding: 5rem 0;
        opacity: 0;
        transform: translateY(50px);
        transition: all 0.8s ease;
    }

    .section.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    .section-title {
        font-family: 'Playfair Display', serif;
        font-size: 3rem;
        text-align: center;
        margin-bottom: 3rem;
        color: var(--accent-yellow);
    }

    /* About Section */
    .about {
        background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('fondo.png');
        background-size: cover;
        background-attachment: fixed;
    }

    .about-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }

    .mission-vision {
        background: rgba(26, 26, 26, 0.8);
        padding: 2rem;
        border-radius: 15px;
        backdrop-filter: blur(10px);
    }

    .mission-vision h3 {
        color: var(--accent-yellow);
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .pillars {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
    }

    .pillar {
        background: rgba(51, 51, 51, 0.5);
        padding: 2rem;
        border-radius: 15px;
        text-align: center;
        transition: transform 0.3s ease;
    }

    .pillar:hover {
        transform: translateY(-10px);
    }

    .pillar i {
        font-size: 3rem;
        color: var(--accent-yellow);
        margin-bottom: 1rem;
    }

    /* Activities Section */
    .activities {
        background: var(--dark-gray);
    }

    .activities-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }

    .activity-card {
        background: var(--medium-gray);
        border-radius: 15px;
        overflow: hidden;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        padding: 1.5rem;
        min-height: 120px;
    }

    .activity-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
    }

    .activity-icon {
        font-size: 2.5rem;
        color: var(--accent-yellow);
        margin-right: 1.5rem;
        flex-shrink: 0;
        width: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .activity-content {
        flex: 1;
    }

    .activity-content h3 {
        color: var(--accent-yellow);
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
        font-weight: 600;
    }

    .activity-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        color: var(--light-gray);
        margin: 0;
    }

    /* Courses Section */
    .courses {
        background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8)), url('fondo.png');
        background-size: cover;
        background-attachment: fixed;
    }

    .courses-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    .course-card {
        background: rgba(26, 26, 26, 0.9);
        border-radius: 15px;
        overflow: hidden;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .course-card:hover {
        transform: translateY(-10px);
    }

    .course-image {
        width: 100%;
        height: 280px; 
        object-fit: cover;
        object-position: center;
        border-radius: 15px 15px 0 0;
        transition: transform 0.3s ease;
    }

    .course-image2 {
        width: 100%;
        height: 350px; 
        object-fit: cover;
        object-position: center;
        border-radius: 15px 15px 0 0;
        transition: transform 0.3s ease;
    }

    .course-card:hover .course-image {
        transform: scale(1.05);
    }
    
    /* Lightbox para imágenes */
    .lightbox {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .lightbox.active {
        opacity: 1;
        visibility: visible;
    }
    .lightbox-content {
        max-width: 90vw;
        max-height: 90vh;
        position: relative;
    }
    .lightbox-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 10px;
    }
    .lightbox-close {
        position: absolute;
        top: -40px;
        right: 0;
        color: var(--white);
        font-size: 2rem;
        cursor: pointer;
        background: rgba(0, 0, 0, 0.7);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    .lightbox-close:hover {
        background: var(--accent-yellow);
        color: var(--primary-black);
    }
    .lightbox-title {
        position: absolute;
        bottom: -60px;
        left: 0;
        right: 0;
        text-align: center;
        color: var(--accent-yellow);
        font-size: 1.5rem;
        font-weight: 600;
    }

    .course-content {
        padding: 1.5rem;
    }

    .course-content h3 {
        color: var(--accent-yellow);
        margin-bottom: 1rem;
    }

    /* Events Section */
    .events {
        background: var(--dark-gray);
    }

    .events-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .event-card {
        background: var(--medium-gray);
        border-radius: 15px;
        overflow: hidden;
        transition: transform 0.3s ease;
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 400px;
    }

    .event-card:hover {
        transform: scale(1.02);
    }

    .event-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .event-content {
        padding: 3rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .event-date {
        background: var(--accent-yellow);
        color: var(--primary-black);
        padding: 0.8rem 1.5rem;
        border-radius: 25px;
        font-weight: 600;
        display: inline-block;
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
        width: fit-content;
    }

    .event-card h3 {
        font-size: 2rem;
        margin-bottom: 1rem;
        color: var(--white);
    }

    .event-card p {
        font-size: 1.2rem;
        color: var(--light-gray);
        line-height: 1.6;
    }

    .event-card p strong {
        color: var(--accent-yellow);
        font-weight: 600;
    }

    /* Gallery Section */
    .gallery {
        background: var(--primary-black);
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }

    .gallery-item {
        position: relative;
        overflow: hidden;
        border-radius: 15px;
        aspect-ratio: 1;
        cursor: pointer;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.1);
    }

    .gallery-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gallery-item:hover .gallery-overlay {
        opacity: 1;
    }

    .gallery-overlay i {
        font-size: 3rem;
        color: var(--accent-yellow);
    }

    /* Contact Section */
    .contact {
        background: var(--dark-gray);
    }

    .contact-content {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 4rem;
        align-items: start;
    }

    .contact-info {
        background: rgba(51, 51, 51, 0.5);
        padding: 2rem;
        border-radius: 15px;
    }

    .contact-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .contact-item i {
        font-size: 1.5rem;
        color: var(--accent-yellow);
        width: 30px;
    }

    .map-container {
        height: 450px;
        border-radius: 15px;
        overflow: hidden;
    }

    .map-container iframe {
        width: 100%;
        height: 100%;
        border: none;
        filter: grayscale(100%) invert(92%) contrast(83%);
    }

    /* Footer */
    .footer {
        background: var(--primary-black);
        padding: 3rem 0 1rem;
        text-align: center;
        border-top: 1px solid var(--medium-gray);
    }

    .footer-logo img {
        height: 80px;
    }

    .social-links {
        display: flex;
        justify-content: center;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .social-links a {
        color: var(--white);
        font-size: 1.5rem;
        transition: color 0.3s ease, transform 0.3s ease;
    }

    .social-links a:hover {
        color: var(--accent-yellow);
        transform: translateY(-5px);
    }

    .footer-text {
        color: var(--light-gray);
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    /* Animations */
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        /* *** REGLA CORREGIDA Y AÑADIDA *** */
        .course-image2 {
            height: auto;
            object-fit: contain;
            border-radius: 15px;
        }
        
        .course-image {
            height: 250px;
        }

        .lightbox-close {
            top: -50px;
            font-size: 1.5rem;
            width: 35px;
            height: 35px;
        }

        .lightbox-title {
            bottom: -50px;
            font-size: 1.2rem;
        }

        .event-card {
            grid-template-columns: 1fr;
            min-height: auto;
        }

        .event-image {
            height: 250px;
        }

        .event-content {
            padding: 2rem;
        }

        .event-card h3 {
            font-size: 1.5rem;
        }

        .event-card p {
            font-size: 1rem;
        }

        .menu-toggle {
            display: flex;
        }

        .nav-menu {
            position: absolute; /* Changed from fixed to align with header */
            top: 100%;
            left: 0;
            width: 100%;
            background: var(--primary-black);
            flex-direction: column;
            align-items: center; /* Center nav items */
            padding: 2rem 0; /* Adjusted padding */
            transform: translateY(-200%); /* Start hidden above */
            transition: transform 0.4s ease-in-out;
        }

        .nav-menu.active {
            transform: translateY(0);
        }

        .hero p {
            font-size: 1.1rem;
        }

        .section-title {
            font-size: 2.2rem; /* Adjusted for better spacing */
        }

        .about-content,
        .contact-content,
        .pillars,
        .activities-grid,
        .courses-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        .map-container {
            height: 300px;
        }

        .activity-card {
            flex-direction: row;
            min-height: 100px;
            padding: 1.2rem;
        }

        .activity-icon {
            font-size: 2rem;
            width: 50px;
            margin-right: 1rem;
        }

        .activity-content h3 {
            font-size: 1.1rem;
        }

        .activity-content p {
            font-size: 0.85rem;
        }

        .gallery-grid {
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        }
    }

    @media (max-width: 480px) {
        .course-image {
            height: 220px;
        }

        .container {
            padding: 0 1rem;
        }

        .hero p {
            font-size: 1rem;
        }

        .cta-button {
            padding: 0.8rem 2rem;
        }

        .section {
            padding: 3rem 0;
        }
    }