/* Header principal */
header {
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    padding: 0.3rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

/* Header reducido al hacer scroll */
header.shrink {
    padding: 0.3rem 0;
    background-color: rgba(0, 0, 0, 0.9);
}

header.shrink .logo img {
    height: 40px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.logo img {
    max-height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.5);
}

/* Navegación */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 40px;
}

/* Botón hamburguesa visible en móviles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Estilo links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    padding: 0.625rem;
    transition: background 0.3s ease-in-out;
}

.nav-links a:hover {
    background-color: #1abc9c;
    border-radius: 5px;
}

/* MOBILE: menú hamburguesa */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .nav-links.show {
        max-height: 300px;
        padding: 1rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        width: 100%;
        padding: 1rem;
    }
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-selector .flag {
    width: 30px;
    height: auto;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.6;
}

.language-selector .flag:hover {
    transform: scale(1.1);
    opacity: 1;
}

.language-selector .flag.active {
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
