:root {
    --primary-dark: #0a0a0a;
    --secondary-dark: #121212;
    --accent-red: #D32F2F;
    --accent-glow: rgba(211, 47, 47, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --text-main: #f8f9fa;
}

body {
    background-color: var(--primary-dark);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

h1, h2, .italic-serif {
    font-family: 'Playfair Display', serif;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    background: url('../img/hero.jpg') center/cover no-repeat fixed;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(10,10,10,1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-red);
}

/* Buttons */
.btn-glow {
    background-color: var(--accent-red);
    color: white;
    border: none;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    background-color: #b71c1c;
    box-shadow: 0 0 25px var(--accent-red);
    color: white;
    transform: scale(1.05);
}

/* Gallery */
.bg-darker { background-color: var(--secondary-dark); }

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--accent-red);
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(211, 47, 47, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay i {
    font-size: 2rem;
    color: white;
}

/* Animations */
.fade-in {
    animation: fadeInUp 1s ease forwards;
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.text-accent { color: var(--accent-red); }
.tracking-wider { letter-spacing: 4px; }
.tracking-widest { letter-spacing: 2px; font-size: 0.7rem; }

/* Footer */
.footer-link { transition: color 0.3s ease; font-size: 1.2rem; }
.footer-link:hover { color: var(--accent-red) !important; }


/* --- Voting Page Styles --- */
.student-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.student-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-red);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.2);
}

.student-img-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}

.student-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.student-card:hover .student-img {
    transform: scale(1.1);
}

.btn-vote {
    background-color: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-vote:hover {
    background-color: var(--accent-red);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-vote.voted {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    pointer-events: none;
}

.bg-darker {
    background-color: var(--primary-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--primary-dark);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* --- New Global Styles --- */
.transition-all { transition: all 0.4s ease; }
.bg-black { background-color: #000000; }

/* Navbar */
.main-nav {
    padding: 1.5rem 0;
    z-index: 1050;
}
.main-nav.scrolled {
    padding: 0.8rem 0;
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(211, 47, 47, 0.3);
}
.nav-link {
    color: #fff !important;
    letter-spacing: 1px;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* Hero Improvements */
.hero-icon {
    animation: float 4s ease-in-out infinite;
}
.countdown-box {
    border-bottom: 2px solid transparent;
}
.countdown-box:hover {
    border-bottom-color: var(--accent-red);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.15);
}

/* Quote Cards */
.quote-card {
    border-left: 4px solid var(--accent-red);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.quote-card:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.08);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
/* Music & Nostalgia Styles */
.tiny { font-size: 0.65rem; letter-spacing: 1px; text-transform: uppercase; }
.max-w-player { max-width: 450px; border-radius: 50px; }

/* Music Cards */
.music-card {
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.album-art {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.5s ease;
    border: 1px solid rgba(211, 47, 47, 0.1);
}

.music-card:hover {
    transform: translateY(-10px);
    background: rgba(211, 47, 47, 0.05);
    border-color: var(--accent-red);
}

.music-card:hover .album-art {
    box-shadow: 0 10px 25px var(--accent-glow);
    transform: rotate(3deg);
}

.play-btn {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.music-card:hover .play-btn { opacity: 1; }

.player-thumb {
    width: 40px;
    height: 40px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse-red 2s infinite;
}

/* Nostalgia Cards */
.nostalgia-card {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.nostalgia-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(211, 47, 47, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.nostalgia-card:hover {
    transform: scale(1.05);
    border-color: var(--accent-red);
}

.nostalgia-card:hover::before { opacity: 1; }

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

/* Contenedor del Logo */
.logo-wrapper {
    height: 60px; /* Altura fija para alineación perfecta */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    filter: drop-shadow(0 0 5px rgba(211, 47, 47, 0.2)); /* Brillo sutil inicial */
    transition: all 0.4s ease;
}

.nostalgia-logo {
    max-height: 100%;
    max-width: 80%;
    object-fit: contain;
    /* Esto hace que logos blancos/de colores se integren mejor en el fondo oscuro */
    filter: grayscale(0.2) brightness(0.9); 
    transition: all 0.4s ease;
}

/* Efecto al pasar el mouse por la tarjeta */
.nostalgia-card:hover .logo-wrapper {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px var(--accent-red)); /* Glow rojo intenso */
}

.nostalgia-card:hover .nostalgia-logo {
    filter: grayscale(0) brightness(1.1);
}
/* Contenedor de la Portada */
.album-art {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background: #000; /* Fondo de seguridad */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* La imagen de fondo */
.album-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5; /* Oscurece la imagen para que resalte el icono */
    transition: all 0.5s ease;
}

/* El icono rojo encima */
.album-icon {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.8); /* Sombra para legibilidad */
    pointer-events: none;
    transition: all 0.4s ease;
}

/* Interacción al pasar el mouse */
.music-card:hover .album-cover {
    opacity: 0.8; /* Aclara un poco la imagen al hacer hover */
    transform: scale(1.1);
}

.music-card:hover .album-icon {
    transform: scale(1.2) rotate(15deg);
    color: #fff; /* Opcional: cambia a blanco para variar el estilo */
    filter: drop-shadow(0 0 10px var(--accent-red));
}

/* Contenedor Masonry Estilo Pinterest */
.masonry-grid {
    display: block; /* Anulamos el comportamiento de fila de Bootstrap */
    columns: 1; /* Por defecto 1 columna en móviles pequeños */
    column-gap: 1rem; /* Espacio entre columnas */
    width: 100%;
}

/* Ajuste de columnas según el dispositivo */
@media (min-width: 576px) {
    .masonry-grid {
        columns: 2;
    }
}

@media (min-width: 992px) {
    .masonry-grid {
        columns: 3;
    }
}

/* Ajuste de los elementos internos */
.masonry-grid .col-md-4 {
    display: inline-block; /* Evita que las imágenes se corten entre columnas */
    width: 100%;
    margin-bottom: 1rem;
    float: none; /* Limpiamos floats de Bootstrap */
}

/* Mejora de la imagen para el efecto masonry */
.gallery-item img {
    width: 100%;
    height: auto; /* Mantiene la proporción original */
    display: block;
    transition: transform 0.5s ease;
}

/* Estilos para la sección de Trofeos */
.gold-gradient {
    background: linear-gradient(45deg, #ffd700, #ffae00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

.trophy-card {
    border: 1px solid rgba(255, 215, 0, 0.1); /* Borde dorado sutil */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trophy-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-red);
    box-shadow: 0 15px 30px rgba(211, 47, 47, 0.2);
}

.trophy-icon-wrapper {
    transition: transform 0.5s ease;
}

.trophy-card:hover .trophy-icon-wrapper {
    transform: scale(1.2) rotate(-5deg);
}