/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GENERAL */
body {
    font-family: 'Segoe UI', 'Open Sans', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
}

/* ENCABEZADO */
header {
    background-color: #004080;
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 160px;
    height: auto;
}



/* ====== HEADER Y NAVEGACIÓN ====== */
header {
    background-color: #1c3d6c;
    padding: 1rem;
}

header nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 1rem;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
}

header nav ul li a:hover {
    background-color: #143055;
    border-radius: 4px;
}


/* ====== MENÚ DE NAVEGACIÓN ====== */
nav {
  position: relative;
  background: linear-gradient(135deg, #003366, #007acc);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  padding: 1.5rem 1rem; /* AUMENTADO */
  min-height: 70px;     /* ALTURA MÍNIMA */
}


nav ul.menu {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  flex-wrap: wrap;
  transition: max-height 0.3s ease;
}

nav ul.menu li a {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav ul.menu li a:hover {
  color: #ffeb3b;
  text-decoration: underline;
}

/* ====== BOTÓN TOGGLE ====== */
.menu-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1000;
}


nav ul.menu li a.activo {
  color: #ffeb3b;
  text-decoration: underline;
}



/* ====== RESPONSIVE: MÓVILES ====== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul.menu {
    flex-direction: column;
    align-items: flex-start;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    background-color: var(--azul-oscuro);
    padding: 0;
  }

  nav ul.menu.active {
    max-height: 500px;
    padding: 1rem;
  }

  nav ul.menu li {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  nav ul.menu li a {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
  }
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}








/* SECCIONES DEL DIRECTORIO */
section.directorio {
    padding: 2rem;
    margin: 2rem auto;
    width: 90%;
    max-width: 1000px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Alternar colores suaves entre secciones */
section.directorio:nth-of-type(odd) {
    background-color: #ffffff;
}

section.directorio:nth-of-type(even) {
    background-color: #f1f6fb;
}

section.directorio h2 {
    font-size: 1.8rem;
    color: #004080;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ccc;
    padding-bottom: 0.5rem;
    text-align: center;
}

/* PERSONAS */
.persona {
    background-color: #ffffff;
    padding: 1.5rem;
    margin: 1rem auto;
    border-radius: 8px;
    max-width: 800px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-align: left;
    border-left: 5px solid #0c71c3;
}

.persona h3 {
    font-size: 1.2rem;
    color: #0c71c3;
    margin-bottom: 0.5rem;
}

.persona p {
    font-size: 1rem;
    color: #555;
    margin: 0.2rem 0;
}

.persona a {
    color: #0c71c3;
    text-decoration: none;
}

.persona a:hover {
    text-decoration: underline;
}

.persona:hover {
    background-color: #e0f2ff; /* Azul claro */
    transition: background-color 0.3s ease;
}


/* PIE DE PÁGINA */
footer {
    background-color: #1c3d6c;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

footer a {
    color: #ffffff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    section.directorio {
        padding: 1.5rem 1rem;
    }

    .persona {
        padding: 1rem;
    }
}



.logos-institucionales {
  background-color: #0d47a1;
  padding: 2rem 1rem;
  text-align: center;
}

.logo-container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  align-items: center;
}

.logo-item img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1); /* Blanco si el logo es SVG oscuro */
  transition: transform 0.3s ease;
}

.logo-item img:hover {
  transform: scale(1.05);
}
