/* CSS Document */
/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Menú de navegación responsivo */
.navbar {
  background-color: #1e3c72;
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
}
.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 0;
}
.nav-link:hover {
  color: #a8d0ff;
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.alert {
  background: #ff4444;
  color: white;
  text-align: center;
  padding: 5px;
  margin: 5px 0;
  border-radius: 5px;
}
div.bienvenido {
  text-align: right !important;
  color: white;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 3px 0;
  transition: 0.3s;
}
.submenu {
  position: relative;
}
.submenu .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1e3c72;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
.submenu:hover .dropdown {
  display: block;
}
.submenu .dropdown li a {
  color: #fff;
  padding: 8px 12px;
  display: block;
  text-decoration: none;
  font-size: 0.9rem;
}
.submenu .dropdown li a:hover {
  background-color: #2a5298;
}
.dropdown {
  display: none;
}
.dropdown.active {
  display: block;
}
/* HEADER GENERAL */
header {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  min-height: 100px;
  position: relative;
  overflow: hidden;
}
/* ---------- HEADER-LOG: sin bordes, imagen centrada y proporcional ---------- */
.header-log {
  width: 100%;
  aspect-ratio: 1600 / 339; /* altura proporcional al ancho */
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: transparent;
  display: block;
  line-height: 0; /* evita espacio fantasma inferior */
}
.header-log .imagen-principal {
  position: absolute;
  top: 1px; /* deja 1px arriba */
  left: 0;
  right: 0;
  bottom: 0; /* bottom pegado */
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center center;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  vertical-align: bottom;
}
/* Imagen principal (para el header normal) */
.imagen-principal {
  max-width: 90%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  object-fit: contain;
}
/* Contenedor del texto en movimiento */
.texto-movil {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
}
.carrusel-container {
  position: relative;
  width: 100%;
  height: 200%;
}
.carrusel-vertical {
  position: absolute;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  animation: desplazar-arriba-abajo 30s linear infinite;
}
.ciudad-item {
  color: white;
  padding: 8px 20px;
  font-size: 1.2rem;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.5px;
  text-align: right;
  white-space: nowrap;
}
@keyframes desplazar-arriba-abajo {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(0%);
  }
}
/* DIV DE ACCESO AL USUARIO */
.acceso-usuario {
  background-color: #1e3c72;
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.8rem;
}
.campo-acceso {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.campo-acceso input {
  padding: 0.2rem 0.4rem;
  border: none;
  border-radius: 3px;
  font-size: 0.8rem;
  width: 100px;
  height: 24px;
}
.btn-salir {
  background-color: #BD0003;
  color: white;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 24px;
  white-space: nowrap;
}
.btn-salir:hover {
  background-color: #FCD0D0;
}
.btn-acceso {
  background-color: #2a5298;
  color: white;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 24px;
  white-space: nowrap;
}
.btn-acceso:hover {
  background-color: #3a62a8;
}
/* Contenido principal */
/* Contenido principal */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* antes estaba center */
  align-items: center;
  padding: 1rem 2rem;
  text-align: center;
  position: relative;
}
.contenido-adicional {
  max-width: 800px;
  margin: 0.5rem auto;
  position: relative;
  z-index: 1;
  text-align: justify;
  padding: 0 1.5rem;
}
.contenido-adicional h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #2a5298;
  text-align: center;
}
.subtitulo {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #666;
  text-align: center;
  font-weight: normal;
  font-style: italic;
}
.contenido-adicional p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
  word-spacing: -0.05em;
}
/* Imagen de fondo transparente */
.fondo-transparente {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.25;
  z-index: 0;
  background-image: url('../imagenes/bulto_fdo_02.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40%;
}
/* Footer */
footer {
  background-color: #1e3c72;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}
footer p {
  font-size: 1rem;
}
/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
  /* Menú hamburguesa visible */
  .hamburger {
    display: flex;
  }
  /* Menú en columna */
  .nav-menu {
    position: fixed; /* fijo bajo el header */
    top: 60px;
    left: -100%;
    flex-direction: column;
    align-items: center;
    background-color: #1e3c72;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    gap: 0;
    z-index: 999;
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-item {
    margin: 0; /* sin separación vertical extra */
    width: 100%;
    position: relative;
  }
  .nav-link {
    display: block;
    width: 100%;
    padding: 8px 12px; /* clicable pero compacto */
    text-align: left;
    line-height: 1.2;
    margin: 0;
  }
  /* Submenús en móvil: solo con .active */
  .submenu .dropdown {
    position: static;
    box-shadow: none;
    margin: 0;
    padding: 0;
    background-color: #2a5298;
    width: 100%;
    display: none;
  }
  .submenu .dropdown.active {
    display: block;
  }
  .submenu .dropdown li a {
    padding: 6px 24px;
    text-align: left;
    font-size: 0.9rem;
    display: block;
    width: 100%;
  }
  /* Acceso usuario */
  .acceso-usuario {
    padding: 0.3rem 1rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .campo-acceso {
    flex: 1;
    min-width: 120px;
    justify-content: flex-end;
  }
  .campo-acceso input {
    width: 100px;
  }
  /* Imagen principal */
  .imagen-principal {
    max-width: 98%;
    display: block;
    margin: 0 auto;
    height: auto;
    line-height: 0;
  }
  /* Main y contenido */
  main {
    padding: 1rem;
  }
  .contenido-adicional {
    margin: 0.5rem auto;
    padding: 0 1rem;
  }
  .contenido-adicional h2 {
    font-size: 1.7rem;
  }
  .subtitulo {
    font-size: 1.1rem;
  }
  .contenido-adicional p {
    font-size: 1rem;
  }
  .fondo-transparente {
    background-size: 70%;
    opacity: 0.2;
  }
  /* Header logueado */
  .header-log {
    aspect-ratio: 4 / 1;
    max-height: 180px;
  }
  .header-log .imagen-principal {
    display: block;
    line-height: 0;
    vertical-align: bottom;
  }
  /* Header sin logueo */
  header:not(.header-log) {
    margin: 0 !important;
    padding: 0 !important;
  }
  header:not(.header-log) .imagen-principal {
    width: 100%;
    height: auto;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  header:not(.header-log) .texto-movil, header:not(.header-log) .carrusel-container {
    margin: 0 !important;
    padding: 0 !important;
  }
}
@media (max-width: 480px) {
  .contenido-adicional {
    padding: 0 0.5rem;
  }
  .contenido-adicional h2 {
    font-size: 1.5rem;
  }
  .subtitulo {
    font-size: 1rem;
  }
  .acceso-usuario {
    flex-direction: row;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    justify-content: space-between;
  }
  .campo-acceso input {
    width: 70px;
  }
  .header-log {
    aspect-ratio: 3.5 / 1;
    max-height: 160px;
  }
  .header-log .imagen-principal {
    display: block;
    line-height: 0;
    vertical-align: bottom;
  }
}
@media (max-width: 360px) {
  .imagen-principal {
    max-width: 100%;
  }
  .header-log {
    aspect-ratio: 3 / 1;
    max-height: 140px;
  }
  .header-log .imagen-principal {
    display: block;
    line-height: 0;
    vertical-align: bottom;
  }
  .campo-acceso input {
    width: 65px;
  }
  .acceso-usuario {
    gap: 0.2rem;
  }
}
/* Header sin logueo */
header:not(.header-log) {
  margin: 0; /* elimina márgenes externos */
  padding: 0; /* elimina relleno interno */
}
header:not(.header-log) .imagen-principal {
  width: 100%; /* ocupa todo el ancho disponible */
  max-width: 1200px; /* opcional: límite para que no se deforme en pantallas grandes */
  height: auto; /* mantiene proporción */
  display: block;
  margin: 0 auto; /* centra horizontalmente */
}
/* CSS Document */