/* =========================================
   1. ESTILOS GENERALES Y ANIMACIONES
   ========================================= */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    width: 100%;
    opacity: 0; 
    transition: opacity 0.5s ease;
}

body.fade-in {
    opacity: 1;
}

body.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

p, li {
    color: #000000;
    line-height: 1.6;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* =========================================
   2. HEADER Y NAVEGACIÓN
   ========================================= */
header {
    background-color: rgb(177, 216, 169);
    padding: 10px 0;
}

#logocatedra, #logofauba {
    text-align: center;
}

.navbar {
    background-color: #004080 !important;
    padding: 0.8rem 1rem;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border: 0;
}

.navbar-nav .nav-link {
    color: #e0e0e0 !important;
    margin-left: 1rem;
    transition: color 0.3s, background-color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important; /* Amarillo FAUBA para el hover */
}

/* =========================================
   3. TÍTULOS (TODOS EN AZUL #004080)
   ========================================= */
h1, h2, h3, h4, .titulo-principal {
    color: #004080 !important;
    font-weight: bold;
}

h1 {
    text-align: center;
    padding: 50px 15px;
    margin: 0;
}

h2 {
    text-align: left;
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin: 50px 0;
    font-size: 1.75rem;
}

/* Subrayado de los H2 siempre en AZUL */
h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 3px;
    width: 0;
    background-color: #004080; /* AZUL INSTITUCIONAL */
    transition: width 0.6s ease;
}

h2:hover::after {
    width: 100%;
}

section {
    margin: 0 auto;
    padding: 60px 20px;
    max-width: 1200px;
}

/* =========================================
   4. COMPONENTES DE PÁGINAS INTERNAS
   ========================================= */
.integrantes-caja {
    border-left: 5px solid #004080;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.gallery-img {
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-img:hover {
    transform: scale(1.03);
}

/* =========================================
   5. OTROS ELEMENTOS
   ========================================= */
.carousel-item img {
    height: 600px;
    object-fit: cover;
}

footer {
    text-align: center;
    background-color: rgb(177, 216, 169);
    padding: 30px;
    margin-top: 40px;
}

.map-responsive {
    position: relative;
    overflow: hidden;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
}

.map-responsive iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; margin: 30px 0; }
    .carousel-item img { height: 350px; }
}