/* ==========================================================================
   MOBILE NAVIGATION — hamburger + fullscreen overlay
   Breakpoint: se muestra por debajo de 1024px, oculta el menú desktop
   ========================================================================== */

/* Por defecto (escritorio, >=1024px): el menú móvil está oculto */
.mobile-navigation {
    display: none;
}

/* ==========================================================================
   BARRA SUPERIOR MÓVIL
   ========================================================================== */

.mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background-color: var(--ink-900);
}

.mobile-nav-bar .mobile-logo,
.mobile-nav-overlay-header .mobile-logo {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--white-warm);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.mobile-nav-bar .mobile-logo img,
.mobile-nav-overlay-header .mobile-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* ==========================================================================
   BOTÓN HAMBURGUESA (se transforma en X con CSS, sin icono de Lucide)
   ========================================================================== */

.mobile-nav-toggle {
    position: relative;
    z-index: 1100;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-icon {
    position: relative;
    width: 26px;
    height: 18px;
    display: inline-block;
}

.hamburger-icon .line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--gold-400);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}

.hamburger-icon .line-1 { top: 0; }
.hamburger-icon .line-2 { top: 8px; }
.hamburger-icon .line-3 { top: 16px; }

/* Estado abierto: el botón lleva la clase .is-active (via JS) */
.mobile-nav-toggle.is-active .line-1 {
    top: 8px;
    transform: rotate(45deg);
}

.mobile-nav-toggle.is-active .line-2 {
    opacity: 0;
}

.mobile-nav-toggle.is-active .line-3 {
    top: 8px;
    transform: rotate(-45deg);
}

/* ==========================================================================
   OVERLAY A PANTALLA COMPLETA
   ========================================================================== */

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background-color: var(--ink-900);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-overlay.is-open {
    visibility: visible;
    opacity: 1;
}

.mobile-nav-overlay-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem 2.5rem;
}

.mobile-nav-overlay-header {
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ink-600);
}

/* ==========================================================================
   ENLACES DE NAVEGACIÓN (sin submenús)
   ========================================================================== */

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-links li {
    border-bottom: 1px solid var(--ink-700);
}

.mobile-nav-links a {
    display: block;
    padding: 1rem 0;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--white-warm);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:focus {
    color: var(--gold-400);
}

/* Ocultamos cualquier submenú por si el menú "primary" tuviera hijos */
.mobile-nav-links .sub-menu {
    display: none;
}

/* CTA dentro del overlay */
.btn-nav-mobile {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.9rem 1.75rem;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-900);
    background-color: var(--gold-400);
    border-radius: 2px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-nav-mobile:hover,
.btn-nav-mobile:focus {
    background-color: var(--gold-300);
}

/* ==========================================================================
   FOOTER DEL OVERLAY (solo visible cuando el menú está abierto)
   ========================================================================== */

.mobile-nav-footer {
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--ink-600);
}

.mobile-nav-contact-email,
.mobile-nav-contact-phone {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink-100);
    text-decoration: none;
}

.mobile-nav-contact-email:hover,
.mobile-nav-contact-phone:hover {
    color: var(--gold-400);
}

.mobile-nav-social {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.mobile-nav-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--ink-500);
    border-radius: 50%;
    color: var(--gold-400);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-social a:hover {
    border-color: var(--gold-400);
    color: var(--gold-300);
}

.mobile-nav-social a svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   BLOQUEO DE SCROLL EN EL BODY CUANDO EL OVERLAY ESTÁ ABIERTO
   ========================================================================== */

body.mobile-nav-open {
    overflow: hidden;
}

/* ==========================================================================
   BREAKPOINT 1024px
   ========================================================================== */

@media (max-width: 1023.98px) {
    .desktop-navigation {
        display: none;
    }

    .mobile-navigation {
        display: block;
    }
}