/* Header base styles */
.header {
    background-color: rgba(34, 40, 49, 0.8);
    color: #fff;
    padding: 2px 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: space-between;
    overflow-x: visible;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 110px;
    margin-bottom: 10px;
    transition: height 0.3s ease;
}

.nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap; /* Permite que los elementos se ajusten en varias líneas */
    justify-content: center; /* Centra los elementos en dispositivos móviles */
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
    font-size: 16px;
}

.nav a:last-child {
    background-color: rgb(39, 49, 143);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.nav a:last-child:hover {
    background-color: rgb(2, 17, 153);
}

.nav a:hover {
    color: #ffffff;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.social-links a {
    color: #fff;
    margin: 0 10px;
    font-size: 1.5em;
    transition: transform 0.3s, color 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
    color: #09122C;
}

/* Eliminar menú hamburguesa */
.menu-toggle {
    display: none;
}

/* Estilos para tablets */
@media (max-width: 1024px) {
    .logo img {
        height: 80px;
    }
    
    .nav a {
        margin: 0 8px;
        font-size: 15px;
    }
    
    .social-links a {
        font-size: 1.3em;
    }
}

/* Estilos para móviles grandes */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .header-container {
        flex-direction: column; /* Cambiar a columna para dispositivos móviles */
        padding: 0 15px;
    }
    
    .logo img {
        height: 60px;
        margin-bottom: 5px;
    }
    
    .nav {
        width: 100%;
        flex-direction: row; /* Mantener los enlaces en fila */
        justify-content: center;
        padding: 10px 0;
        flex-wrap: wrap; /* Permitir que los enlaces se envuelvan */
    }
    
    .nav a {
        margin: 5px 8px;
        font-size: 14px;
        text-align: center;
        white-space: nowrap; /* Evitar que los textos se partan */
    }
    
    .nav a:last-child {
        width: auto;
        padding: 8px 15px;
        margin: 5px 8px;
    }
    
    .social-links {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
        margin-bottom: 5px;
    }
}

/* Estilos para móviles pequeños */
@media (max-width: 480px) {
    .header-container {
        padding: 5px 10px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .nav {
        padding: 5px 0;
    }
    
    .nav a {
        margin: 3px 5px;
        font-size: 13px;
        padding: 5px;
    }
    
    .nav a:last-child {
        padding: 6px 12px;
    }
    
    .social-links a {
        font-size: 1.1em;
        margin: 0 6px;
    }
    
    .social-links a:hover {
        transform: scale(1.1);
    }
}

/* Estilos para móviles muy pequeños */
@media (max-width: 360px) {
    .logo img {
        height: 45px;
    }
    
    .nav a {
        margin: 2px 3px;
        font-size: 12px;
    }
    
    .nav a:last-child {
        padding: 5px 10px;
    }
    
    .social-links a {
        font-size: 1em;
        margin: 0 5px;
    }
    
    /* Eliminar transformaciones en dispositivos muy pequeños */
    .social-links a:hover {
        transform: none;
    }
}