/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-color: #db0909; /* Azul oscuro */
    --secondary-color: #da920cf8; /* Amarillo */
    --light-color: #f8f9fa;
    --dark-color: #0f1233;
    --font-family: 'Arial', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*Hero Sectión*/

        .hero-section {
            position: relative;
            /* Asumiendo un header fijo de 70px.
               Ajusta `calc(100vh - 70px)` y `margin-top` si la altura de tu header es diferente.
               Si no tienes header fijo, usa `height: 100vh;` y quita `margin-top`. */
            margin-top: 70px;
            height: calc(100vh - 70px);
            min-height: 450px; /* Altura mínima para pantallas muy bajas */

            /* Configuración de la imagen de fondo */
            background-size: cover; /* <- ESTO HACE LA IMAGEN RESPONSIVA */
            background-position: center; /* <- ESTO CENTRA LA IMAGEN */

            /* Centrado del contenido (vertical y horizontal) */
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            overflow: hidden; /* Previene desbordamientos */
        }

        /* Superposición oscura sobre la imagen para que el texto sea legible */
        .hero-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--color-superposicion);
        }

        /* Contenido de texto sobre la imagen */
        .hero-content {
            position: relative; /* Asegura que esté sobre la superposición */
            z-index: 1;
            color: var(--color-blanco);
            max-width: 800px; /* Ancho máximo para el texto */
            padding: 20px; /* Espaciado interno */
            
            /* Animación sutil para la aparición del texto */
            opacity: 0;
            animation: fadeInContent 1.5s 0.3s ease-out forwards;
        }

        @keyframes fadeInContent {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .hero-content h2 {
            font-size: 3rem; /* Tamaño de fuente para pantallas grandes */
            font-weight: 700;
            margin-top: 0;
            margin-bottom: 20px;
        }

        .hero-content p {
            font-size: 1.2rem; /* Tamaño de fuente para pantallas grandes */
            margin-bottom: 0;
        }

        /* --- MEDIA QUERIES PARA RESPONSIVIDAD --- */

        /* Para tabletas y pantallas medianas (hasta 768px) */
        @media (max-width: 768px) {
            .hero-content h2 {
                font-size: 2.5rem; /* Hacemos el título más pequeño */
            }

            .hero-content p {
                font-size: 1.1rem; /* Ajustamos el párrafo */
            }
        }

        /* Para móviles (hasta 480px) */
        @media (max-width: 480px) {
            .hero-section {
                min-height: 400px; /* Reducimos la altura mínima en móviles */
            }

            .hero-content h2 {
                font-size: 1.8rem; /* Título aún más pequeño y manejable */
            }

            .hero-content p {
                font-size: 1rem; /* Párrafo más legible en pantallas chicas */
            }
        }


/*boton regresar*/
header #botonRegresar {
    background: #dbb407;
    color: #000000;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 20px;
    transition: background-color 0.3s ease;
}

header #botonRegresar:hover {
    background: #d80a0a;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
}

html {
    scroll-behavior: smooth;
}

.section {
    padding: 60px 20px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.bg-light {
    background-color: var(--light-color);
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--dark-color);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #758626;
}

/* --- HEADER Y NAVEGACIÓN --- */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu-item {
    margin-left: 20px;
}

.nav-menu-link {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-menu-link:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.nav-toggle {
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    display: none;
}


/* --- ACTIVIDADES --- */
.activities-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.activity {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.activity:hover {
    transform: translateY(-10px);
}

.activity img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.activity h3 {
    padding: 20px 20px 10px;
    color: var(--primary-color);
}

.activity p {
    padding: 0 20px 20px;
}

/* --- PROYECTOS --- */
.projects-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.project {
    background: var(--primary-color);
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    text-align: left;
}
.project h3{
    margin-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}


/* --- CURSOS --- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.course-card {
    background: var(--primary-color);
    color: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.3s, background-color 0.3s;
}
.course-card:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: scale(1.05);
}


/* --- Vida Estudiantil --- */
.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.teacher {
    text-align: center;
}

.teacher img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
    margin-bottom: 15px;
}
.teacher h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/*SECCION DE VIDEOS*/
 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .gallery-container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            background-color: #fff;
            padding: 20px;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
        }

        .main-video-container {
            grid-column: 1 / 2;
            display: flex;
            flex-direction: column;
        }

        #main-video {
            width: 100%; /* Make video take full width of its container */
            max-height: 450px; /* Set a max height to prevent excessive stretching */
            height: auto; /* Allow height to adjust proportionally */
            margin: 0 auto;
            border-radius: var(--border-radius);
            background-color: #000;
        }

        .main-video-title {
            font-size: clamp(1rem, 1.5vw + 0.5rem, 2rem); /* Responsive font size */
            color: var(--secondary-color);
            margin-top: 15px;
            word-wrap: break-word; /* Prevent long titles from overflowing */
        }

        .video-list-container {
            grid-column: 2 / 3;
            max-height: 500px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 15px;
            padding-right: 5px; /* Add some padding for scrollbar */
        }

        /* Custom scrollbar for webkit browsers */
        .video-list-container::-webkit-scrollbar {
            width: 8px;
        }

        .video-list-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .video-list-container::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 10px;
        }

        .video-list-container::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

        .video-item {
            display: flex;
            align-items: center;
            cursor: pointer;
            border-radius: var(--border-radius);
            padding: 10px;
            transition: background-color 0.3s ease, border-color 0.3s ease;
            border: 2px solid transparent;
        }

        .video-item:hover,
        .video-item.active {
            background-color: #e0e0e0;
            border-color: var(--primary-color);
        }

        .video-item video {
            width: 100px;
            min-width: 80px; /* Ensure a minimum width */
            height: 60px;
            min-height: 50px; /* Ensure a minimum height */
            object-fit: cover;
            border-radius: 5px;
        }

        .video-item-title {
            font-size: clamp(0.8rem, 1vw + 0.3rem, 1.2rem); /* Responsive font size */
            color: var(--text-color);
            margin-left: 15px;
            flex-grow: 1; /* Allow title to take available space */
            word-wrap: break-word; /* Prevent long titles from overflowing */
        }

        /* --- Media Queries --- */

        /* For tablets and smaller laptops */
        @media (max-width: 992px) {
            .gallery-container {
                grid-template-columns: 1fr; /* Stack main video and list vertically */
                max-width: 800px; /* Adjust max width */
            }

            .main-video-container {
                grid-column: 1 / -1; /* Make it span full width */
            }

            .video-list-container {
                grid-column: 1 / -1; /* Make it span full width */
                max-height: 300px; /* Adjust max height for smaller screens */
            }
        }

        /* For mobile devices */
        @media (max-width: 576px) {
            .gallery-container {
                padding: 15px;
                gap: 15px;
            }

            .main-video-title {
                margin-top: 10px;
            }

            .video-item {
                padding: 8px;
            }

            .video-item video {
                width: 80px;
                height: 50px;
            }

            .video-item-title {
                margin-left: 10px;
            }
        }

/* --- DESTACADOS --- */
.featured-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: auto;
}

.featured-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 350px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.featured-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.featured-card img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

/* --- EVENTOS --- */
.events-list {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.events-list li {
    background: var(--light-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}
.events-list li:hover{
    background-color: #e2e6ea;
}

.event-date {
    background: var(--secondary-color);
    color: var(--dark-color);
    padding: 10px 15px;
    border-radius: 5px;
    margin-right: 20px;
    font-weight: bold;
    text-align: center;
}

/* --- CONTACTO --- */
.contact-section {
    background: var(--primary-color);
    color: #fff;
}
.contact-section .section-title, .contact-section p {
    color: #fff;
}
.contact-form {
    max-width: 600px;
    margin: 20px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-family: var(--font-family);
}
.contact-form .btn {
    align-self: center;
    border: none;
    cursor: pointer;
}


/* --- FOOTER --- */
.footer {
    background: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 20px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        background-color: #fff;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        transition: right 0.3s ease-in-out;
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-menu-item {
        margin: 20px 0;
    }
    .nav-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
    .activities-container, .team-container, .featured-container {
        grid-template-columns: 1fr;
    }
}