/* --- GENERAL STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat';
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background-image: url(../img/backgrounds/desk.jpg);
    background-size: cover;
    background-position: center;
}




/* --- HEADER SECTION --- */
.header {
    background-image: linear-gradient(135deg, #1758a7, #1c6caa, #1758a7);
    border-bottom: 1.5px solid rgb(35, 76, 138);
    padding: 20px 0 12px 0;
    position: sticky;
    top: 0px;
}

/* Estilos del logo, titulo y las redes sociales */
.header__container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 10px;
    position: relative;
}

.header__logo {
    width: calc(95px + 1.2dvw);
    object-fit: cover;
    position: absolute;
    padding-right: 15px;
    margin-top: 27px;
    right: 86%;
}

.header__title {
    color: aliceblue;
    text-align: center;
    font-size: clamp(15px, 2.9dvw, 26px);
    font-weight: bold;
    flex-basis: auto;
    flex-grow: 2;
    margin-left: 50px;
}

.header__social-media {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
}

.social-media__li {
    display: flex;
    justify-content: center; 
    align-items: center;
}

.social-media__link {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-media__logo {
    width: 2.2em;
    height: 2.2em;
    object-fit: cover;
    color: white;
    transition: transform 0.25s ease;
}

.social-media__logo:hover {transform: scale(1.1);}


/* Barra de navegacion */
.header__nav {
    margin: auto;
    width: 74%;
    position: relative; /* Para poder ver posicionar el button del Menu Hamburguesa */
}

/* Botón hamburguesa (oculto por defecto) */
.nav__hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px;
    position: absolute;
    left: -10px;
    top: -45px;
    z-index: 20;
}

.hamburger-icon, .close-icon {
    width: 30px;
    height: 30px;
    color: white;
}

/* Enlaces */
.nav__ul {
    padding-top: 15px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: clamp(20px, 2vw, 30px);
    padding-left: 15px; /* Evita acercarse al logo */
}

.ul__item {
    text-align: center;
    flex-basis: auto;
    list-style: none;
    border-radius: 6px;
    padding: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.ul__link {
    color: aliceblue;
    text-decoration: none;
}

.ul__item:hover {background-color: rgb(56, 56, 56);}

/* El enlace del link del Login */
.ul__item--login {background-color: rgb(78, 143, 204);}




/* --- MAIN SECTION --- */
main {
    flex-grow: 1;
}
.main__title {
    color: aliceblue;
    background-color: #1d7bc4;
    width: fit-content;
    font-size: clamp(2px, 2.8dvw, 21px);
    padding: .5em .7em;
    display: inline-block;
    border-radius: 6px;
    margin: 40px 20% 40px;
}


/* Estilos de la tabla */
.tabla-docentes {
    width: 85%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden; /* Para evitar que el borde redondo rompa */
    margin: auto;
    margin-bottom: 150px;
    font-size: clamp(10px, 1.2dvw, 15px);
}

.tabla-docentes thead tr:first-child {
    background-color: #2c3e50; /* Mismo azul oscuro */
    color: white;
}

.tabla-docentes thead tr:last-child {
    background-color: #1d7bc4; /* Mismo azul vibrante */
    color: white;
    
}

.tabla-docentes th, .tabla-docentes td {
    padding: .8em 1em;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    word-break: break-word; /* Rompe palabras largas */
    white-space: normal;    /* Permite múltiples líneas */
}

.tabla-docentes th {
    font-weight: bold;
}


/* Estilos para separaciom visual entre filas y hover */
.tabla-docentes tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}
.tabla-docentes tbody tr:nth-child(even) {
    background-color: #c8d3d2;
}

.tabla-docentes tbody tr:hover {
    background-color: #b6dbf5;
    transition: background-color 0.3s;
}


/* Color para datos de contacto */
.contacto-email {color: #2980b9;}
.contacto-telefono {color: #16a085;}




/* --- FOOTER SECTION --- */
.footer {
    border-top: 1.5px solid rgb(27, 27, 27);
    background-image: linear-gradient(135deg, #3f4041, #54595c, #3f4041);
    padding: 50px 30px;
}
.footer__description {
    color: aliceblue;
    text-align: justify;
    font-size: 15px;
    padding: 2px 0;
}
.footer__description:first-child {
    font-weight: bold;
    margin-bottom: 10px;
}
.footer__description:last-child {
    margin-top: 30px;
    text-align: center;
}




/* --- RESPONSIVE DESIGN --- */
@media (width <= 768px) {
    /* --- HEADER SECTION --- */

    /* Al no haber logo, la barra de navegación puede ocupar más espacio */
    .header__nav {width: 95%;}

    /* Quitamos las redes sociales del encabezado para mantener un diseño compacto */
    .header__social-media, .header__logo {display: none;}

    /* Sin el logo y las redes, centramos el titulo del encabezado */
    .header__title {margin: 0;}
    

    /* --- Barra de navegación */
    .nav__hamburger {display: block; /* Mostrar botón hamburguesa */}
    
    .nav__ul {
        position: fixed;
        top: 0;
        left: 0;
        width: 55%;
        height: 100vh;
        background-color: rgba(23, 88, 167, 0.98);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        gap: 1.8em;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 10;
        padding: 3.8em 0 0;
    }

    .nav__ul.active {transform: translateX(0);}

    .ul__item {
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        text-align: center;
        padding: 8px 10px;
    }

    .nav__ul.active .ul__item {opacity: 1;}



    /* --- ANIMATIONS --- *
    
    /* Animación para los items del menú */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateX(-20px); }
        to { opacity: 1; transform: translateX(0); }
    }

    .nav__ul.active .ul__item {animation: fadeIn 0.3s ease forwards;}

    .nav__ul.active .ul__item:nth-child(1) { animation-delay: 0.1s; }
    .nav__ul.active .ul__item:nth-child(2) { animation-delay: 0.2s; }
    .nav__ul.active .ul__item:nth-child(3) { animation-delay: 0.3s; }
    .nav__ul.active .ul__item:nth-child(4) { animation-delay: 0.4s; }
}