/* Resetear márgenes y padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Barra superior Contenedor de la imagen */
.image-container {
    padding: 0px;
    padding: 3px 15px;
    display: flex;
    justify-content: center;
    /*text-align: center;*/
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999; /* Asegura que la barra esté encima del menú */
    height: 80px;
    transition: top 0.3s ease;
}

/* Efecto de ocultar la barra superior al hacer scroll */
body.scrolled .image-container {
    top: -80px; /* Mueve la barra superior hacia arriba cuando hace scroll */
}

.image-container img {
    width: 50%;
    max-width: 600px;
    height: auto;
    display: inline-block;
    border-radius: 10px;
}

/* Header principal */
header {
    background-color: #002147;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 20px;  /*Alto y ancho del menú*/  
    position: fixed;
    top: 80px; /* Mantenerlo justo abajo de la barra superior */
    left: 0;
    right: 0;
    z-index: 1000; /* Menú debajo de la barra superior */
    transition: background-color 0.3s ease-in-out;
}

body.scrolled header {
    /*background: #FFFFFF;*/
    position: fixed;
    top: 0; /* Hace que el menú quede pegado arriba */
    left: 0;
    right: 0;
    /*background-color: #FFFFFF;*/
    z-index: 999;
}

/* Logo */
.logo-container {
    flex: 1;
}

.logo-container2 {
    display: none;
}

.logo {
    max-height: 50px;
}

/* Menú de navegación */
.navbar {
    flex: 6;
}

.nav-list {
    display: flex;
    list-style-type: none;
}

.nav-list li {
    margin-left: 5px; /*Espacio entre secciones del menú*/
    position: relative;
}

.nav-list li a {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: white;
    display: flex;
    padding: 10px 15px;
    border-radius: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    align-items: center;
    text-decoration: none;
}

.nav-list li a:hover {
    /*background-color: rgba(187, 93, 94, 0.8);*/
    background-color: #3a5f7d;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.nav-list li a i {
    margin-right: 8px;
    vertical-align: middle;
    margin-left: 8px;
    line-height: 1;
}

/* Submenús */
.dropdown {
    display: none;
    position: absolute;
    /*background-color: rgba(192, 192, 192, 1.0);*/
    background-color: #5f7990;
    border-radius: 5px;
    margin-top: 10px;
    padding: 10px;
    list-style-type: none;
    z-index: 1000;
}

.dropdown li a {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: #FFFFFF;
}

/* Ícono de hamburguesa */
.menu-toggle {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    font-size: 2rem;
    color: white;
}

.menu-toggle .bar {
    display: block;
    width: 35px;
    height: 4px;
    margin: 6px auto;
    background-color: white;
    transition: all 0.3s ease;
}

/* ===================== */
/*     MODO RESPONSIVE   */
/* ===================== */

@media screen and (max-width: 820px) {
    
    .image-container{
        display: none;
    }
    header {
        top: 0;
        flex-direction: row;
        justify-content: space-between;
    }

    /* Mostrar el ícono hamburguesa */
    .menu-toggle {
        display: block;
    }

    /* Ocultar el menú por defecto */
    .nav-list {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100%;
        /*background-color: #800040;/*color de la barra de navegación*/
        background-color: #002147;
        padding-top: 60px;
        transition: left 0.3s ease;
    }

    /* Mostrar el menú cuando tiene la clase "show" */
    .nav-list.show {
        left: 0;
    }

    .nav-list li {
        margin: 0;
        padding: 10px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-list li a {
        justify-content: flex-start;
        width: 100%;
    }

    /* Submenús dentro del panel */
    .dropdown {
        position: relative;
        /*background-color: #d678a4;*/
        background-color: #5f7990;
        margin-top: 5px;
        padding-left: 20px;
    }

    .dropdown li a {
        color: white;
    }
}

/* Estilo cuando el header está fijado en la parte superior */
header.fixed {
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/*----------------Foter---------------------------------------------------------*/
/* Estilos para el footer */
.footer {
    /*background-color: #343a40; /* Color oscuro para contrastar con el menú */
    background-color: rgba(52, 58, 64, 0.6); /* Gris claro con transparencia */
    color: white;              /* Texto blanco para el contraste */
    padding: 20px 0;
    text-align: left;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Hace que los elementos se adapten en pantallas pequeñas */
    padding: 0 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links h3, .footer-contact h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.footer-links ul li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-links ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #f9a825; /* Color amarillo para resaltar el enlace al pasar el ratón */
}

.footer-contact p {
    margin: 5px 0;
    font-size: 12px;
}

.footer-contact i {
    margin-right: 10px;
}

/* Adaptación para pantallas pequeñas */
@media (max-width: 768px) {
    .footer{
        /*background-color: #800040; /* color de fondo del footer*/    
        background-color: #002147;
    }

    .footer-content {
        flex-direction: column;
        text-align: left;
    }
}

/*------ Parte del Preolader -----*/

#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .loader-ring {
    position: relative;
    width: 150px;
    height: 150px;
  }
  
  .loader-logo {
    width: 100px;
    height: 100px;
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 2;
  }
  
  /* Anillo animado */
  .loader-ring::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 8px solid transparent;
    border-top: 8px solid #002147; 
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  