/* ========== RESET PRINCIPAL ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
*/

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 320px; /* Limite mínimo solicitado */
    overflow-x: hidden; /* Previene scroll horizontal indeseado */
}

/* ========== CONFIGURACION FUENTES ========== */
@font-face {
    font-family: titulo;
    src: url(../fonts/titulo.otf);
}

@font-face {
    font-family: subtitulo;
    src: url(../fonts/subtitulo.ttf);
}


/* ========== HEADER ========== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #003399; /*#1a1a2e;*/
    color: #FFCC00;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo {
    font-family: titulo;
    font-size: 3.5rem;
    font-weight: bold;
    color: #FFCC00;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo span {
    font-family: subtitulo;
    font-size: 1.5rem;
    color: #e5d597;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: #FC0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: white;
}

.linkActual {
    background-color: #ffc700;
    color: #039;
    cursor: none;
    padding: 30px 20px;
    border-radius: 10%;
}


/* Menú hamburguesa */
/*
*/
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #FC0;
    transition: 0.3s;
}

/* ========== SECCIONES ========== */
.section-small {
    position: relative;
    margin-top: 10px;
    width: 100%;
    max-height: 70px;
    background: transparent;
    padding: 15px 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.section-large {
    display: grid;
    /* Aquí definimos las 4 columnas iguales */
    grid-template-columns: repeat(8, 1fr); 
    /* Gap es el espacio entre secciones (opcional) */
    gap: 10px; 
    padding: 10px;
    width: 100%;
    max-width: 1400px; /* Ancho máximo para que no se estire infinito en pantallas grandes */
    margin: 0 auto; /* Centrar el main en la pantalla */
}

.section-large-caps {
    flex: 1;
    background: white;
    margin-top: 0;
    padding: 20px 0;
    min-height: 300px;    
}

.section-large-gen {
    flex: 1;
    width: 94%;
    margin-left: 3%;
    background: white;
    padding: 20px 20px;
    min-height: 300px;    
}


/* ========== CLASES PARA EL ANCHO DE LAS SECCIONES ========== */
/* Ocupa las 4 columnas (Ancho completo) */
.col-4 {
    grid-column: span 8;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    width: 80%;
    height: auto;
    margin: auto;
    align-items: center;
    justify-content: end;
    margin-bottom: 1%;
}

/* Ocupa 2 columnas (Medio ancho) */
.col-2 {
    grid-column: span 4;
    height: auto; /* Altura fija solo para demostración */
}

/* ========== SECCION FOTO ========== */
/* Imagen */
.col-4 img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Descripcion de la foto */
.contenedor-descripcion {
    text-align: center;
    color: #039;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    /*text-transform: uppercase;*/
    padding: 1rem;
    background: rgba(0, 51, 153, 0.1);
    border-left: 4px solid #039;
}

.contenedor-descripcion p.fuentes {
    color:firebrick;
    font-size: 0.6rem;
}

/* ========== SECCION LETRA CANCION ========== */
/* Contenedor */
.letraSong {
    width: 98%;
    margin: 0 auto;
    background-color:transparent;
    padding: 10px;
    color: white;
    text-align: center;
}
.modulo-frase {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Texto de la letra */
.contenedor-frase {
    margin-bottom: 1.5rem;
    position: relative;
}
.contenedor-frase::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: -0.5rem;
    font-size: 4rem;
    color: #039;
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}
#textoFrase {
    color: #039;
    font-size: 1.4rem;
    line-height: 1.6;
    font-weight: 500;
    position: relative;
    z-index: 1;
    font-style: italic;
}

/* Autor de la cancion */
.contenedor-autor {
    text-align: right;
    border-top: 2px solid rgba(0, 51, 153, 0.3);
    padding-top: 1rem;
}
#nombreAutor {
    color: #039;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    /*text-transform: uppercase;*/
    font-style: normal;
}
#nombreAutor::before {
    content: '— ';
    color: #039;
}

/* ========== SECCION EFEMERIDES ========== */
/* Modulo de las efemerides */
.efemerides-module {
    flex: 1;
    border-radius: 12px;
    border-top: 1px solid #039;
    padding-top: 10px;
    overflow: hidden;
}

/* Encabezado */
.efemerides-header {
    color: #039;
    padding: 0;
    padding-bottom: 6px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 2px 2px 5px #000;
    letter-spacing: 0.5px;
    border-radius: 5px;
}

/* Contenido */
.efemerides-content {
    padding: 16px;
}

/* Item de listado de las efemerides */
.efemeride-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px; /*margin-bottom: 3px;*/
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    /* NUEVO: Siempre imagen a la derecha */
    flex-direction: row !important;  
}
.efemeride-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Año */
.year-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2a5298 0%, #003399 100%);
    color: #FC0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-left: 0;
    margin-bottom: 7px;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

/* Imagenes de las efemerides */
.efemeride-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #039;
}

/* Texto de las efemerides */
.efemeride-text-content {
    flex: 1;
    min-width: 0; /* Para que el texto haga wrap correctamente */
   /* NUEVO: Para que el badge se alinee a la izquierda */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.event-text {
    font-size: 1.1rem;
    text-align: justify;
    line-height: 1.4;
    color: #039;
}

/* ========== SECCION HISTORIA ========== */
/* Titulo */
.modulo-titulo {
    color: #039;
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 2px 2px 5px #000;
    border-radius: 12px;
    border-bottom: 1px solid #039;
    padding-bottom: 10px;
}

/* Imagen */
.modulo-imagen {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    /*box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);*/
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    object-fit: cover;
    transition: transform 0.3s ease;
}
.modulo-imagen:hover {
    transform: scale(1.1) rotate(-5deg);
    /*transform: scale(1.05);*/
}

/* Texto */
.modulo-texto {
    color: #039;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Pie de modulo */
.modulo-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
}

/* ========== SECCION RANKING ========== */
/* Titulo */
h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(45deg, #003399, #1559a4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Panel informativo */
.info-panel {
    display: block;
    background:transparent;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.file-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 1.1rem;
}
.info-item {
    background: rgba(0, 51, 153, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 51, 153, 0.4);
}
.info-label {
    color: #039;
    font-size: 1.6rem;
    margin-right: 5px;
}

/* Tabla */
table {
    width: 90%;
    margin: auto;
    border-collapse: collapse;
    background: transparent;
    backdrop-filter: blur(10px);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Encabezado Tabla */
thead {
    background: linear-gradient(135deg, #003399 0%, #223aa5 50%);
}
th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}
th:first-child {
    width: 80px;
    text-align: center;
}
th:nth-child(2) {
    color: #FC0;
    text-align: center;
}
th:last-child {
    color: #FC0;
    text-align: center;
    width: 50px;
}

/* Cuerpo de Tabla */
tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
tbody tr:hover {
    background: rgba(0, 51, 153, 0.1);
}
tbody tr:last-child {
    border-bottom: none;
}
td {
    padding: 15px;
    vertical-align: middle;
}
td:first-child {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #003399;
    text-shadow: 0 0 10px rgba(0, 51, 153, 0.5);
}
td:nth-child(2) {
    padding-left: 30px;
    text-align: left;
}
td:nth-child(3) {
    text-align: center;
}

/* Tapa de álbum */
.album-cover {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}
.album-cover:hover {
    transform: scale(1.1) rotate(3deg);
}

/* Información del álbum */
.album-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 50px;
    padding-left: 10px;
}
.album-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #003399;
    margin-bottom: 5px;
    line-height: 1.3;
}
.album-artist {
    font-size: 1rem;
    color: #433f3f;
    font-style: italic;
}
td:last-child {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: #003399;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ========== SECCION GENEROS ========== */
/* Título */
.genero-titulo {
    color: #039;
    margin: 0;
    padding: 0;
    padding-bottom: 10px;
    font-size: 2em;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 2px 2px 5px #000;
}

/* Imagen */
.genero-imagen-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    max-width: 300px;
}
.genero-imagen-container:hover {
    transform: scale(1.1);
}
.genero-imagen-container {
    display: flex;
    width: 90%;
    height: auto;
    justify-content: center;
    margin: 5%;
    overflow: hidden;
    align-items: center;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Descripción */
.genero-descripcion {
    color: #039;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;

}

/* Lista de artistas horizontal */
.genero-artistas {
    margin-bottom: 0;
    padding: 0 25px 20px;
    color: #039;
    font-size: 0.95em;
    line-height: 1.5;
}

.artistas-label {
    font-weight: bold;
    color: #039;
    margin-right: 8px;
}

.artistas-lista {
    color: #039;
    font-style: italic;
}

/* ========== SECCION DICCIONARIO ========== */
/* Título */
.artista-titulo {
    color: #039;
    margin: 0;
    padding: 0;
    padding-bottom: 10px;
    font-size: 2em;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 2px 2px 5px #000;
}

/* Contenedor de imagen */
.artista-imagen-container {
    display: flex;
    width: 90%;
    height: auto;
    justify-content: center;
    margin: 5%;
    padding-bottom: 10px;
    object-fit: cover;
}
.artista-imagen-container img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

/* Descripción */
.artista-descripcion {
    color: #039;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* ========== FOOTER ========== */
footer {
    background: #003399;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 0.9rem;
    color: #FC0;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: #FC0;
    font-size: 1.3rem;
    transition: color 0.3s, transform 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    color: #e94560;
    transform: translateY(-3px);
}

/* ========== LINK VER MAS ========== */
.ver-mas-link {
    display: block;
    text-align: right; /* CAMBIADO: de center a right */
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    margin-right: 10px;
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;
    /** NUEVO */
    margin-left: auto; /* Empuja a la derecha si tiene ancho definido */
    width: fit-content; /* Que ocupe solo lo necesario */
}
.ver-mas-link:hover {
    background: #667eea;
    color: #FC0;
    transform: scale(1.05);
}
/* LINK VER MAS */

/* ========== SECCIONES ========== */
section {
    padding: 20px;
    text-align: center;
}


.sec-1 { background-color: transparent; } /* FOTO */
.sec-2 { background-color: transparent; } /* LETRA CANCION */
.sec-3 { background-color: transparent; } /* EFEMERIDES */
.sec-4 { background-color: transparent; } /* HISTORIA */
.sec-5 { /* RANKINGS */
    width: 90%;
    border-radius: 12px;
    border-left: 1px solid #039;
    border-right: 1px solid #039;
} 
.sec-6 { /* GENEROS */
    border-radius: 12px;
    border-right: 1px solid #039;
}
.sec-7 { /* DICIONARIO */
    border-radius: 12px; 
    border-left: 1px solid #039;
}



/* ========== RESPONSIVE ========== */
/* ========== RESPONSIVE ESTILOS ========== */
@media screen and (max-width: 1300px) {
    .logo span { display: none; }
}

@media screen and (max-width: 920px) {
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #039;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        display: none;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }
    nav ul.active { display: flex; }
    
    .menu-toggle {
        display: flex;
        justify-content: end;
        align-items: end;
    }
    .menu-toggle span {
        width: 25px;
        height: 3px;
        background: #FC0;
        transition: 0.3s;
        z-index: 1500;
    }
    .linkActual {
        padding: 10px 5px;
        border-radius: 5%;
    }
    header { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .col-4, .col-2 {
        grid-column: span 8; /* Soluciona el error de la grilla */
        width: 100%;
        margin-bottom: 5%;
    }
    .contenedor-descripcion {
        font-size: 0.8rem;
        font-weight: 400;
        letter-spacing: 0;
    }
    .contenedor-descripcion p.fuentes { font-size: 0.5rem; }
    
    .efemerides-module { max-width: 100%; }
    .event-text { font-size: 1.1rem; }
    
    /* Permite que la tabla de rankings se deslice horizontalmente sin romper la web */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }
}

@media (max-width: 710px) {
    .copyright span {
        display: none;
    }
 
}

@media (max-width: 510px) {
    footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .copyright { display: none; } /* Se muestra apilado en lugar de ocultarse */
    .social-icons { 
        gap: 30px; 
        justify-content: center; 
    }
}

