@keyframes fadeInOut {
    0% {
      opacity: 1;
      background-color: #002958; /* Color azul */
    }
    100% {
      opacity: 0;
      background-color: transparent;
    }
  }
  
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #002958; /* Color azul */
    animation: fadeInOut 2s ease;
    animation-fill-mode: forwards;
    z-index: 9999; /* Asegura que esté sobre todo el contenido */
    pointer-events: none; /* Permite que el contenido subyacente sea accesible después de la animación */
  }
  
/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    background-color: #002958;
    background: linear-gradient(to bottom right, #001d40, #0044aa);
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

/* Membrete con 5 logos - Imágenes grandes, header compacto */
.membrete {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    background-color: white;
    padding: 12px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    height: 75px;
}


/* Contenedor de los 5 logos */
.membrete .logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    gap: 8px;
    height: 100%;
}
.logo-item.logo-principal {
    flex: 0 0 50%; /* Ocupa exactamente la mitad */
    max-width: 50%;
    display: flex;
    justify-content: flex-start; /* ← CAMBIO: Pegado a la izquierda */
    align-items: center;
    margin-right: auto; /* ← CAMBIO: Empuja los otros logos a la derecha */
}
.logo-item.logo-secundario {
    flex: 1;
    max-width: 10%;
    display: flex;
    justify-content: center; /* Los otros logos siguen centrados */
    align-items: center;
}
.logo-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 55px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(1.05) contrast(1.1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Efecto hover */
.logo-item:hover .logo-img {
    transform: scale(1.08);
    transition: transform 0.3s ease;
}

/* Responsividad para tablets */
@media screen and (max-width: 1024px) {
    .membrete .logo-container {
        padding: 0 15px;
        gap: 6px; /* Más compacto */
    }
    
    .logo-img {
        height: 50px; /* Imágenes ligeramente más pequeñas pero membrete mantiene altura */
    }
}
/* Responsividad para móviles - 3-2 distribución */
@media screen and (max-width: 768px) {
    .membrete {
        height: 75px; /* ALTURA FIJA - NO CAMBIA */
        padding: 8px 0;
    }
    
    .membrete .logo-container {
        padding: 0 8px;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
        height: 100%; /* Asegura que use toda la altura disponible */
    }
    
    /* Logo 1 ocupa fila completa superior */
    .logo-item.logo-principal {
        flex: 0 0 100%;
        max-width: 100%;
        height: 35px; /* Altura reducida para primera fila */
        margin-bottom: 2px;
    }
    
    /* Logos 2-6 en fila inferior compartiendo espacio */
    .logo-item.logo-secundario {
        flex: 1;
        max-width: 18%; /* 5 logos en ~18% cada uno */
        height: 30px; /* Altura reducida para segunda fila */
    }
    
    .logo-img {
        height: 100%; /* Las imágenes ocupan toda la altura disponible */
        max-height: 100%;
    }
}

/* Para pantallas muy pequeñas */
@media screen and (max-width: 480px) {
    .membrete {
        height: 75px; /* ALTURA FIJA MANTENIDA */
    }
    
    .membrete .logo-container {
        padding: 0 5px;
        gap: 3px;
    }
    
    .logo-item.logo-principal {
        height: 32px;
    }
    
    .logo-item.logo-secundario {
        height: 28px;
        max-width: 17%;
    }
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

/* NAVBAR AJUSTADO - ELEMENTOS EN LA PARTE INFERIOR */
.navbar {
    position: fixed;
    top: 75px;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #002958;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 8px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px 5px 20px;
    height: 100%;
}

/* LOGO - Ajustado hacia abajo */
.navbar .logo {
    flex-shrink: 0;
    margin: 0;
    padding-bottom: 0;
}

.navbar .logo img {
    height: 48px;
    width: auto;
    margin-bottom: -10px; /* Aumentamos el margen negativo para bajar más la imagen */
    transform: translateY(5px); /* Movemos la imagen hacia abajo */
}

/* MENÚ PRINCIPAL - Ajustado hacia abajo */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0 0 0 0; /* Reducimos margen inferior */
    flex: 1;
}

.nav-links > li {
    margin: 0;
    padding-bottom: 0; /* Eliminamos padding inferior */
}

.nav-links a {
    text-decoration: none;
    font-weight: bold;
    color: #002958;
    font-size: 16px;
    padding: 8px 12px 12px 12px; /* Más padding solo en la parte inferior */
    transition: 0.3s;
    border-radius: 5px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #58d3f8;
    background: rgba(0, 41, 88, 0.1);
}

/* BOTÓN CONECTARSE - Ajustado hacia abajo */
.connect-button {
    position: relative;
    flex-shrink: 0;
    margin: 0;
    padding-bottom: 0; /* Eliminamos padding inferior */
    align-self: flex-end; /* Forzamos alineación al fondo */
}

#connectBtn {
    background: white;
    color: #002958;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 18px 10px 18px;
    border: 2px solid #002958;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    margin-bottom: -3px;
}

#connectBtn:hover {
    background: white;
    color: #002958;
}

/* DROPDOWN MENUS - Ajustados para no cambiar posición */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #002958;
    list-style: none;
    padding: 10px 0;
    min-width: 220px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
}

.dropdown-menu li a {
    color: white;
    display: block;
    padding: 10px 20px;
    border-radius: 0;
}

.dropdown-menu li a:hover {
    background: white;
    color: #002958;
}

/* MENÚ CONECTARSE DROPDOWN - Ajustado */
.connect-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #002958;
    list-style: none;
    padding: 10px 0;
    min-width: 160px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
}

.connect-menu.show {
    display: block;
}

.connect-menu li a {
    color: white;
    padding: 10px 15px;
    border-radius: 0;
}

.connect-menu li a:hover {
    background: #002958;
    color: white;
    cursor: default;
}

/* Flecha del dropdown */
.dropdown-arrow {
    margin-left: 4px;
    font-size: 12px;
}

/* RESPONSIVE NAVBAR - Ajustado */
@media screen and (max-width: 1024px) {
    .nav-container {
        padding: 0 15px 5px 15px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 6px 10px 8px 10px;
    }
    
    .navbar .logo img {
        height: 45px;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        top: 85px;
        height: 60px;
        align-items: center;
        padding-bottom: 0;
    }
    
    .nav-container {
        padding: 0 15px;
        align-items: center;
    }
    
    .nav-links, 
    .connect-button {
        display: none;
    }
    
    .navbar .logo {
        margin: 0 auto;
        padding-bottom: 0;
    }
    
    .navbar .logo img {
        height: 42px;
    }
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

/* Menú hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: fixed;
    top: 110px;
    left: auto; /* Cambiar esto */
    right: 20px; /* Posicionar desde la derecha */
    transform: none; /* Eliminar esto */
    z-index: 1000;
  }


.hamburger .bar {
  height: 3px;
  width: 30px;
  background-color: white;
  margin: 3px 0;
}

.mobile-menu {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  background-color: #002958;
  transition: top 0.3s ease-in-out;
  padding: 75px 20px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.mobile-menu ul {
  list-style-type: none;
  padding: 0;
}

.mobile-menu li {
  margin: 20px 0;
}

.mobile-menu a {
  color: white;
  font-size: 18px;
  text-decoration: none;
}

@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu.open {
    top: 0;
  }
  .connect-button {
        display: none;
    }
}

.movil-dropdown-menu {
  display: none;
  list-style: none;
  padding: 10px 0;
  margin: 0px 0 0 0;
  background-color: #004080;
  border-radius: 0px;
}

.movil-dropdown-menu li {
  padding: 10px 0;
  text-align: center;
}

.movil-dropdown-menu a {
  color: white;
  font-size: 18px;
  text-decoration: none;
  display: block;
  padding: 0px 0;
}

.movil-dropdown.open .movil-dropdown-menu {
  display: block;
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

/* FONDO PRINCIPAL */
main {
    background: url('img-style/main1.jpg') no-repeat center top;
    background-size: cover;
    position: relative;
    padding-top: 80px;
    min-height: 75vh;
    transition: background-image 1s ease-in-out;
}

@media screen and (max-width: 768px) {
   main {
    min-height: 40vh;
   }
}

main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, #002958, transparent);
    z-index: 1;
}

.main-text {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    z-index: 2;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.main-button {
    position: absolute;
    top: 56%;
    left: 9%;
    transform: translateY(-50%);
}

#saldoBtn {
    background: transparent;
    color: white;
    font-size: 25px;
    font-weight: bold;
    padding: 10px 15px;
    border: solid 2px white;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
}

#saldoBtn:hover {
    background: white;
    color: black;
}

@media screen and (max-width: 768px) {
    main {
        background-size: auto 100%;
        text-align: center;
    }
    .main-text {
        font-size: 1.5rem;
        left: 13%;
    }
    .main-button {
        position: absolute;
        top: 56%;
        left: 15%;
        transform: translateY(-50%);
    }
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

/* SLIDER DE OPCIONES */
.options-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #002958;
    padding: 15px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.options-slider {
    display: flex;
    transition: transform 0.5s ease;
    width: calc(33.33% * 5);
}

.option {
    flex: 0 0 33.33%;
    text-align: center;
    margin: 0 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transition: 0.3s;
}

.option img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.option p, a {
    color: white;
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}

.option:hover {
    transform: scale(1.2);
    cursor: pointer;
    border-bottom: solid 1px white;
}

.option:hover img {
    transform: scale(1.2);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    opacity: 0;
}

.slider-arrow:hover {
    width: 50px;
    height: 50px;
    opacity: 0;
}

.left-arrow {
    left: 20px;
}

.right-arrow {
    right: 20px;
}

.slider-arrow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    .option {
        flex: 0 0 32%;
    }
    .options-slider-container {
        padding: 10px;
    }
}

/* FOOTER */
footer {
    background-color: #001d3f;
    color: whitesmoke;
    padding: 20px;
    text-align: center;
}

.enlaces-interes,
.redes-sociales,
.informacion-adicional {
    margin-bottom: 20px;
}

.enlaces-interes ul {
    list-style-type: none;
    padding: 0;
}

.enlaces-interes li {
    display: inline;
    margin-right: 10px;
}

.redes-sociales img {
    width: 40px;
    height: 40px;
    margin-right: 25px;
}

/* VISTA DE NOTICIA COMPLETA */
.noticia-content {
    max-width: 800px;
    margin: 160px auto 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative; /* PARA ASEGURAR QUE ESTÉ ENCIMA */
    z-index: 10; /* PARA ASEGURAR QUE ESTÉ ENCIMA */
}

.noticia-header {
    text-align: center;
    margin-bottom: 30px;
}

.noticia-img-principal {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.noticia-fecha {
    color: #777;
    font-size: 0.9rem;
    text-align: right;
}

.noticia-relacionadas {
    margin-top: 50px;
}

.noticia-relacionada {
    display: block;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.noticia-relacionada:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #4e73df;
}

.collage-container {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.collage-img {
    max-width: 30%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.collage-img:hover {
    transform: scale(1.05);
}

.noticia-content {
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.noticia-header h1 {
    font-size: 2.5rem;
    color: #2e59d9;
    margin-bottom: 0.5rem;
}

.noticia-descripcion {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #5a5c69;
}

.noticia-descripcion p {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .collage-container {
        flex-direction: column;
    }
    
    .collage-img {
        max-width: 100%;
    }
    
    .noticia-header h1 {
        font-size: 1.8rem;
    }
    
    /* AJUSTES RESPONSIVE PARA EL ESPACIO DEL NAVBAR */
    body {
        padding-top: 120px; /* MENOS ESPACIO EN MÓVIL */
    }
    
    .navbar {
        height: 60px; /* NAVBAR MÁS PEQUEÑO EN MÓVIL */
    }
}