/*
    ESTILOS GENERALES Y RESET
*/
* {
    box-sizing: border-box; /* Fundamental para el diseño responsivo */
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #cd5b1c;
    color: #333;
}

.main-header {
    background: #333;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    transition: background-color 0.3s;
}

.main-nav ul li a:hover {
    background-color: #555;
    border-radius: 5px;
}

/*
    SECCIÓN HERO (INICIO)
*/
.hero-section {
    background: #737373;
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-section h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.btn {
    display: inline-block;
    background: #ffc107;
    color: #333;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #e0a800;
}

.secondary {
    background: #28a745;
    color: white;
}

.secondary:hover {
    background: #1e7e34;
}

/*
    GALERÍA DE VIDEOS (CRUCIAL PARA LA RESPONSIVIDAD)
*/
.video-gallery {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.video-gallery h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #FFFFFF;
}

.video-grid {
    display: grid;
    /* Por defecto, una columna en dispositivos pequeños */
    grid-template-columns: 1fr; 
    gap: 20px;
}

.video-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 1rem;
}

.video-item h4 {
    padding: 0.5rem 0;
}

/* Responsividad de IFRAME (Relación de aspecto 16:9) 
    Esta es la técnica fundamental para videos responsivos.
*/
.video-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 (9/16 * 100) */
    height: 0;
    overflow: hidden;
}

.video-responsive-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/*
    SECCIÓN DE CONTACTO
*/
.contact-section {
    background: #ddd;
    padding: 3rem 2rem;
    text-align: justify;
    margin-top: 2rem;
}

/*
    PIE DE PÁGINA
*/
.main-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
}


/*
    MEDIA QUERIES - Adaptación para Tablets y Escritorio
    Aquí definimos cómo debe cambiar el diseño en pantallas más grandes.
*/

/* Para Tablets (ancho mínimo de 768px) */
@media (min-width: 768px) {
    .video-grid {
        /* Dos columnas */
        grid-template-columns: 1fr 1fr;
    }
}

/* Para Escritorio (ancho mínimo de 1024px) */
@media (min-width: 1024px) {
    .video-grid {
        /* Tres columnas */
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .hero-section {
        padding: 6rem 2rem;
    }
}
