/* ============================================================
   NAVBAR GENERAL
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 1000;
    gap: 20px;
}

/* LOGO */
.logo {
    font-size: 1.75rem;
    font-family: 'Playfair Display SC', serif;
    color: var(--royal-gold);
    letter-spacing: 5px;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ESPACIO CENTRAL (para dejar el centro vacío en desktop) */
.navbar-center {
    flex: 1;
}

/* LINKS DESKTOP */
.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-family: 'Playfair Display SC', serif;
    color: var(--royal-gold);
    font-size: 1.08rem;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 4px;
    transition: 0.35s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -3px; 
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--royal-gold);
    transition: 0.35s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-links a:hover {
    color: var(--light-gold);
    text-shadow: 0 0 8px rgba(212,175,55,0.5);
}

/* ============================================================
   HAMBURGER ICON (BASE)
   ============================================================ */
.hamburger {
    width: 35px;
    height: 26px;
    display: none;              /* solo se muestra en móvil */
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    flex-shrink: 0;
}

.hamburger span {
    width: 100%;
    height: 4px;
    background: var(--royal-gold);
    border-radius: 2px;
    transition: 0.3s;
}

/* Animación X */
.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ============================================================
   SELECTOR DE IDIOMAS
   ============================================================ */
.language-switcher {
    position: relative;
    flex-shrink: 0;
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;

    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.08), rgba(0,0,0,0.95));
    border: 1px solid rgba(212,175,55,0.6);
    cursor: pointer;

    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #f2f2f2;

    box-shadow: 0 0 18px rgba(0,0,0,0.85), 0 0 18px rgba(212,175,55,0.35);
    transition: 0.3s ease;
}

.language-toggle:hover {
    background: radial-gradient(circle at top, rgba(255,255,255,0.14), rgba(0,0,0,0.95));
    border-color: rgba(255,215,128,0.9);
    box-shadow: 0 0 25px rgba(212,175,55,0.55);
    transform: translateY(-2px);
}

.language-toggle.open {
    border-color: rgba(255,215,128,1);
}

/* BANDERAS REDONDAS */
.language-flag {
    width: 20px; 
    height: 20px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

/* FLECHA */
.language-arrow {
    font-size: 0.65rem;
    opacity: 0.9;
}

/* MENÚ DESPLEGABLE */
.language-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    width: 220px;
    background: rgba(5,5,10,0.98);
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 16px;

    box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 24px rgba(212,175,55,0.35);

    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: 0.25s ease;

    /* Para que quepan todas las banderas */
    max-height: 320px;
    overflow-y: auto;
}

/* Scroll elegante (opcional) */
.language-menu::-webkit-scrollbar {
    width: 6px;
}
.language-menu::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.7);
}
.language-menu::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,0.7);
    border-radius: 10px;
}

.language-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.language-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #eaeaea;
    border-radius: 10px;
    transition: 0.25s ease;
}
.language-menu a:hover {
    background: rgba(212,175,55,0.12);
    color: var(--light-gold);
}

/* ============================
   BANDERAS (FLAGS)
   ============================ */
.flag-gb { background-image: url("https://flagcdn.com/gb.svg"); } /* Inglés */
.flag-cn { background-image: url("https://flagcdn.com/cn.svg"); } /* Chino */
.flag-ae { background-image: url("https://flagcdn.com/ae.svg"); } /* Emiratos/Dubái */
.flag-jp { background-image: url("https://flagcdn.com/jp.svg"); } /* Japonés */
.flag-it { background-image: url("https://flagcdn.com/it.svg"); } /* Italiano */
.flag-fr { background-image: url("https://flagcdn.com/fr.svg"); } /* Francés */
.flag-es { background-image: url("https://flagcdn.com/es.svg"); } /* Español */
.flag-pt { background-image: url("https://flagcdn.com/pt.svg"); } /* Portugués */
.flag-de { background-image: url("https://flagcdn.com/de.svg"); } /* Alemán */
.flag-ru { background-image: url("https://flagcdn.com/ru.svg"); } /* Ruso */

/* Nuevos idiomas */
.flag-kr { background-image: url("https://flagcdn.com/kr.svg"); } /* Coreano */
.flag-in { background-image: url("https://flagcdn.com/in.svg"); } /* Hindi (India) */
.flag-il { background-image: url("https://flagcdn.com/il.svg"); } /* Hebreo (Israel) */
.flag-tr { background-image: url("https://flagcdn.com/tr.svg"); } /* Turco */
.flag-id { background-image: url("https://flagcdn.com/id.svg"); } /* Indonesio */

/* ============================================================
   RESPONSIVE / MÓVIL
   ============================================================ */
@media (max-width: 840px) {

    .navbar {
        padding: 14px 16px;
        justify-content: space-between;
    }

    /* Ocultamos el espacio central en móvil */
    .navbar-center {
        display: none;
    }

    /* Mostrar hamburguesa en móvil */
    .hamburger {
        display: flex;
    }

    /* Menú móvil: se convierte en panel desplegable */
    .nav-links {
        position: absolute;
        top: 68px;
        right: 0;
        background: rgba(0,0,0,0.96);
        width: 240px;

        height: 0;
        overflow: hidden;

        flex-direction: column;
        gap: 0;
        border-left: 1px solid rgba(255,255,255,0.08);
        border-bottom: 1px solid rgba(255,255,255,0.08);

        padding: 0;
        transition: height 0.35s ease, padding 0.35s ease;
        z-index: 900;
    }

    .nav-links.open {
        height: 260px; /* ajusta si agregas más links */
        padding: 10px 0 8px;
    }

    .nav-links a {
        padding: 12px 18px;
        font-size: 1.02rem;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        width: 100%;
    }

    /* La etiqueta EN/ES/etc desaparece para hacer el botón más compacto */
    .language-label {
        display: none;
    }

    .language-toggle {
        padding: 7px 10px;
    }

    /* Pequeño ajuste visual para que idioma + hamburguesa respiren */
    .language-switcher {
        margin-right: 8px;
    }
}
