/* --- Estilos Globales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto; 
}

/* --- Fondo y Superposición --- */
body {
    background-image: url('images/master_class_hm.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1;
}

/* --- Contenedor Principal --- */
.container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    
    /* AJUSTE DE "AIRE": 50px arriba y abajo */
    padding-top: 50px;
    padding-bottom: 50px;
}

/* --- Logo --- */
.logo {
    width: 100%;
    /* REDUCCIÓN 20%: De 350px a 280px */
    max-width: 280px;
    margin-bottom: 0.5rem; /* Margen reducido ligeramente */
}

.logo.invert-color {
    filter: brightness(0) invert(1);
}

/* --- Textos --- */
h1 {
    /* REDUCCIÓN 20%: De 2.5rem a 2rem */
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

p {
    /* REDUCCIÓN TAMAÑO: De 1.1rem a 0.9rem */
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    /* REDUCCIÓN ANCHO: De 600px a 500px */
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Estilos de las Miniaturas Verticales (338x600) --- */
.thumbnails-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 10px; /* Reducido el margen superior */
    flex-wrap: wrap;
    width: 100%;
}

.media-thumb-wrapper {
    position: relative;
    width: 338px;
    height: 600px;
    max-width: 90vw;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.media-thumb-wrapper:hover {
    transform: translateY(-10px);
    z-index: 10;
}

.media-thumb-wrapper:hover .media-thumb {
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Icono Play */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: 0.3s ease;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.media-thumb-wrapper:hover .play-overlay {
    color: white;
    transform: translate(-50%, -50%) scale(1.2);
}

/* --- Íconos de Redes Sociales --- */
.social-links {
    margin-top: 40px;
}

.social-links a {
    color: #ffffff;
    font-size: 1.6rem; /* Ligeramente más pequeño */
    margin: 0 15px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #f0c5d4;
    transform: scale(1.2);
}

/* --- ESTILOS DEL POPUP (MODAL) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    animation: zoom 0.3s;
}

@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}
.close:hover { color: #ccc; transform: scale(1.1); }

video.modal-content { width: auto; height: auto; max-width: 95vw; max-height: 95vh; }

/* --- Diseño Responsive para Móviles --- */
@media (max-width: 768px) {
    .container {
        padding-top: 30px;
    }

    .logo {
        /* Reducido proporcionalmente en móvil */
        max-width: 220px;
    }

    h1 {
        /* Reducido proporcionalmente en móvil */
        font-size: 1.6rem;
    }

    p {
        /* Reducido proporcionalmente en móvil */
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
        max-width: 90%;
    }
    
    .thumbnails-container {
        gap: 25px;
    }

    .social-links a {
        font-size: 1.4rem;
        margin: 0 10px;
    }
}