/* ===== Variables y Reset ===== */
:root {
    --fuenteHeading: 'PT Sans', sans-serif;
    --fuenteParrafos: 'Open Sans', sans-serif;
    --primario: #034C53;
    --secundario: #007074;
    --fondo1: #f17761;
    --fondo2: #ffc1b4;
    --fuenteOscura: #034C53;
    --fuenteClara: #80e2eb;
    --fuenteClarita: #b2ebf0;
    --border-radius: 5px;
    --transition: all 0.3s ease;
}

/* Reset y estilos base */
th, tr {
    color: var(--fuenteClarita);
}

html {
    box-sizing: border-box;
    font-size: 62.5%; /* 1 rem = 10px */
    height: 100%;
}
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    font-family: var(--fuenteParrafos);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--primario);
    color: hsl(0, 0%, 20%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Layout Principal ===== */
.contenedor {
    width: min(90%, 120rem);
    margin: 0 auto;
}

/* Header y Footer */
.header, .footer {
    background-color: var(--secundario);
    color: white;
    padding: 2rem 0;
}

.header {
    margin-bottom: 2rem;
}

.footer {
    margin-top: auto;
    padding: 3rem 0;
}

.barra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.barra__nombre {
    font-weight: 700;
    font-size: 3rem;
    color: var(--fuenteClara);
    transition: var(--transition);
    text-decoration: none;
}

.barra__nombre:hover {
    color: var(--fuenteClarita);
    cursor: pointer;
}

.navegacion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.navegacion__enlace {
    font-size: 1.7rem;
    color: var(--fuenteClara);
    transition: var(--transition);
    text-align: center;
}

.navegacion__enlace:hover {
    color: var(--fuenteClarita);
    transform: scale(1.05);
}

/* ===== Contenido Principal ===== */

.header__texto{
    color: #ffffff;
}
.main-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 3rem;
    padding-bottom: 4rem;
}
.data-display, .tabla-audios{
    color: var(--fuenteClarita);
    font-size: 1.4rem;
    }
.content-row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap; /* evitar que se acomode en varias filas */
    gap: 2rem;
}

/* Hacer que content-blog y bird-section usen 70% y 30% */
.content-blog {
    flex: 0 0 70%;
    padding: 1rem;
}
.blog-title{
    font-size: 1.7rem;
    color: var(--fuenteClara);
    text-align: center;
}
.blog-text{
    color: var(--fuenteClara);
    text-align: center;
}
.blog-titulo{
    color: var(--fuenteClara);
    font-size: 2.2rem;
    text-align: center;
    }
.blog-contenido{
    color: var(--fuenteClara);
    font-size: 1.7rem;
    text-align: justify;
    }
.blog-diagrama {
    display: block;           
    max-width: 80%;           
    height: auto;             
    margin: 0 auto;           
    /*border: 1px solid #ccc;*/   
    box-sizing: border-box;   
}

.bird-section {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column; /* asegura disposici贸n vertical de su contenido */
}

.bird-section, .alert-section {
    flex: 1;
    min-width: 300px;
    padding: 2rem;
    border-radius: var(--border-radius);
    color: white;
}

.bird-section {
    background-color: var(--secundario);
}

.alert-section {
    background-color: var(--fondo1);
    font-size: 1.4rem;
    
}

.bird-summary {
    padding: 2rem;
    color: var(--fuenteOscura);
    background-color: var(--fuenteClarita);
    border-radius: var(--border-radius);
    width: 100%;
    margin-top: 1rem;
}

/* Estilos de contenido */
h2 {
    font-family: var(--fuenteHeading);
    font-weight: 700;
    margin-top: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1rem;
    font-size: 2.2rem;
}

h3 {
    font-family: var(--fuenteHeading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}


.bird-info, .alert-item {
    text-align: left;
}

.info-item {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.label {
    font-weight: 700;
    display: inline-block;
    min-width: 200px;
}

/* ===== Media Queries ===== */
@media (min-width: 768px) {
    .barra {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .navegacion {
        flex-direction: row;
        gap: 2rem;
    }
}

.integrantes {
    padding: 2rem 1rem;
    background-color: #f5f5f5;
    border-radius: 12px;
}

.integrantes__titulo {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
    font-family: 'PT Sans', sans-serif;
}

.integrantes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.integrante__card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.integrante__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.integrante__card h3 {
    font-size: 1.25rem;
    color: #222;
    margin-bottom: 0.5rem;
    font-family: 'Open Sans', sans-serif;
}

.integrante__card a {
    color: #0077cc;
    text-decoration: none;
    word-break: break-word;
}

.integrante__card a:hover {
    text-decoration: underline;
}

/* === Globo flotante === */
.alert-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--fondo1);
    color: white;
    border-radius: 999px;
    font-size: 1.6rem;
    font-weight: bold;
    padding: 1rem 1.8rem;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.alert-float:hover {
    background-color: var(--fondo2);
    transform: scale(1.05);
}


/* === Popup de alertas === */
/*.alert-popup {
    position: fixed;
    bottom: 9rem;
    right: 2rem;
    width: 300px;
    background-color: var(--secundario);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    z-index: 998;
    transition: var(--transition);
}

.alert-popup h3, .alert-popup h4 {
    margin: 0.5rem 0;
    font-family: var(--fuenteHeading);
    color: white;
}
.alert-popup {
    background-color: #ff3b3b;
}
.alert-popup .alert-item {
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

.hidden {
    display: none;
}*/
/*
@keyframes parpadeo {
    0%, 100% {
        background-color: #ff3b3b;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
    }
    50% {
        background-color: #ffffff; /* rojo alerta visible 
        box-shadow: 0 0 12px rgba(255, 59, 59, 0.7);
    }
}

/* Clase que se agrega cuando hay alerta activa
.alerta-activa {
    animation: parpadeo 1s infinite;
}
*/
/* Animación para mostrar el popup */
/*@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}*/

/* Animación para ocultar el popup */
/*@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}*/

/*.alert-popup.show {
    display: block;
    animation: slideIn 0.3s ease-out forwards;
}

.alert-popup.hide {
    animation: slideOut 0.2s ease-in forwards;
}
.alert-close {
    position: absolute;
    top: 0.7rem;
    right: 1rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    font-weight: bold;
}
.alert-close:hover {
    color: var(--fuenteClarita);
}*/

/* ===== Dispositivos móviles (hasta 768px) ===== */
@media (max-width: 768px) {
    /* --- Header --- */
    .barra {
        flex-direction: column;
        gap: 1.5rem;
    }

    .barra__logos {
        order: -1; /* Mueve los logos arriba */
        margin-bottom: 1rem;
    }

    .barra__logo img {
        max-width: 80px; /* Reduce el tamaño de logos */
    }

    .navegacion {
        flex-direction: column;
        align-items: center;
    }

    /* --- Contenido Principal --- */
    .main-content {
        padding: 0 1rem;
    }
    hmtl {
        font-size: 30%;
    }
    .content-blog {
        padding: 0;
    }

    .blog-diagrama {
        max-width: 100%;
    }

    /* --- Alertas flotantes --- */
    .alert-float {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.5rem;
        font-size: 1.6rem;
        font-weight: bold;
        border-radius: 999px;
        line-height: normal;
        width: auto;
        height: auto;
    }

    .alert-popup {
        width: 90%;
        right: 5%;
        bottom: 7rem;
    }

    /* --- Footer --- */
    .footer .barra {
        text-align: center;
    }
}

/* ===== Tablets (769px a 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .barra__nombre {
        font-size: 2.5rem;
    }

    .blog-diagrama {
        max-width: 90%;
    }
}
html {
    font-size: 50%; /* Móviles: 1rem = 8px */
}
@media (min-width: 768px) {
    html {
        font-size: 56.25%; /* Tablets: 1rem = 9px */
    }
}
@media (min-width: 1024px) {
    html {
        font-size: 62.5%; /* Desktop: 1rem = 10px */
    }
}
img {
    max-width: 100%;
    height: auto;
}

.menu-toggle {
    display: none; /* Oculto en desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    z-index: 1000;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--fuenteClara);
    position: relative;
    transition: var(--transition);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--fuenteClara);
    left: 0;
    transition: var(--transition);
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    top: 8px;
}

/* Estado abierto del menú */
.menu-toggle.open .menu-icon {
    background: transparent;
}

.menu-toggle.open .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.open .menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Media Query para móviles */
@media (max-width: 768px) {
    .barra__superior {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-bottom: 4rem;
}
    .menu-toggle {
        display: block; /* Mostrar solo en móviles */
    }
    
    .navegacion {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--secundario);
        flex-direction: column;
        padding: 8rem 2rem 2rem;
        transition: right 0.3s ease-out;
        z-index: 999;
    }
    
    .navegacion.open {
        right: 0;
    }
    
    .navegacion__enlace {
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none; /* Oculta encabezado */
    }

    tr {
        margin-bottom: 1.5rem;
        background-color: #007074;
        padding: 1rem;
        border: 1px solid #ccc;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    td {
        padding: 0.5rem 0;
        position: relative;
        padding-left: 50%;
        border: none;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
    }

    td::before {
        position: absolute;
        top: 0.5rem;
        left: 1rem;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        color: #ffffff;
        content: attr(data-label); /* Muestra el nombre de la columna */
    }

    .data_espectrograma img {
        width: 100%; /* más grande en móviles */
        max-width: 100%;
        height: auto;
    }
    .imagen-diagrama {
    max-width: 100%;
    max-height: none !important;
    height: auto;
    width: 100%;
  }
}
.tabla-responsive {
    overflow-x: auto;
    width: 100%;
}

.tabla-responsive table {
    width: 100%;
    min-width: 600px;
}
/* Estilos para las etiquetas de rol */
.rol-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

/* Estilos específicos para cada tipo de tarjeta */
.integrante__card.estudiante {
    border-top: 4px solid #4CAF50; /* Verde para estudiantes */
}

.integrante__card.asesor {
    border-top: 4px solid #2196F3; /* Azul para asesores */
}

.integrante__card.colaborador {
    border-top: 4px solid #FF9800; /* Naranja para colaboradores */
}

.integrante__card.estudiante .rol-tag {
    background-color: #4CAF50;
    color: white;
}

.integrante__card.asesor .rol-tag {
    background-color: #2196F3;
    color: white;
}

.integrante__card.colaborador .rol-tag {
    background-color: #FF9800;
    color: white;
}

/* Estilo para la sección de asesores */
.asesores {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #eee;
    font-size: 1.2rem;
    color: #555;
}

/* Ajustar el grid para mejor visualización */
.integrantes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.grupo__titulo {
    color: white;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-family: 'PT Sans', sans-serif;
}

@media (max-width: 768px) {
    .integrantes__grid {
        grid-template-columns: 1fr;
    }
    
    .rol-tag {
        font-size: 0.9rem;
        padding: 0.2rem 0.6rem;
    }
    
    .asesores {
        font-size: 1.1rem;
    }
}