/* =====================================================
   PWB SITE HEADER — MOBILE
===================================================== */

/* Hamburger toggle — hidden on desktop, shown on mobile */
.pwb-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--custom--color--white);
    padding: var(--wp--preset--spacing--px-10);
    margin: -10px;
    line-height: 0;
}

.pwb-nav-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

@media (max-width: 960px) {

    /* Reduce header height to 90px: (90 - 40px logo) / 2 = 25px */
    .pwb-header-inner {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        /* The 160px actions-column floor above is sized for the desktop
           lang switcher + Acceder button; nav and most of the actions
           group are hidden here, leaving only the 44px hamburger, so that
           floor just overflows the padded header on narrow phones. */
        grid-template-columns: 1fr auto 1fr !important;
    }

    /* Hide desktop-only elements */
    .pwb-header-nav,
    .pwb-lang-switcher-wrap,
    .pwb-site-header .wp-block-buttons {
        display: none !important;
    }

    /* Show hamburger */
    .pwb-nav-toggle {
        display: flex;
    }

    /* Logo: 25px height, aligned left */
    .pwb-logo-link svg {
        height: 30px;
        width: auto;
    }
}

/* =====================================================
   MOBILE NAVIGATION OVERLAY
===================================================== */

.pwb-mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--wp--custom--z-index--nav-backdrop, 999);
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.pwb-mobile-nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.pwb-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 480px);
    height: 100%;
    z-index: var(--wp--custom--z-index--nav, 1000);
    display: flex;
    flex-direction: column;
    background: radial-gradient(100.91% 93.19% at -2.3% 0.81%, #1D2632 0%, #11171F 100%);
    padding-inline: var(--wp--custom--section-px);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
}

.pwb-mobile-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

.pwb-mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    flex-shrink: 0;
}

.pwb-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--custom--color--white);
    padding: var(--wp--preset--spacing--px-10);
    margin: -10px;
    line-height: 0;
}

.pwb-nav-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.pwb-mobile-nav__links {
    display: flex;
    flex-direction: column;
    margin-top: var(--wp--preset--spacing--px-40);
    flex: 1;
    min-height: 0;
}

.pwb-mobile-nav__link {
    font-family: var(--wp--preset--font-family--sora);
    font-size: var(--wp--preset--font-size--xl-plus);
    font-weight: 400;
    line-height: 44px;
    color: #B5BDC8;
    text-decoration: none;
    display: block;
}

.pwb-mobile-nav__link.is-active {
    color: var(--wp--custom--color--white);
}

/* WP Navigation block rendered inside the mobile overlay */
.pwb-mobile-nav .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pwb-mobile-nav .wp-block-navigation .wp-block-navigation-item__content {
    font-family: var(--wp--preset--font-family--sora);
    font-size: var(--wp--preset--font-size--xl-plus);
    font-weight: 400;
    line-height: 44px;
    color: #B5BDC8;
    text-decoration: none;
    display: block;
    padding: 0;
    background: none;
}

.pwb-mobile-nav .current-menu-item .wp-block-navigation-item__content,
.pwb-mobile-nav .current-menu-item .wp-block-navigation-link__content {
    color: var(--wp--custom--color--white);
}

.pwb-mobile-nav .wp-block-navigation .wp-block-navigation-item__content:hover,
.pwb-mobile-nav .wp-block-navigation .wp-block-navigation-item__content:focus {
    background: none;
    color: #B5BDC8;
}

.pwb-mobile-nav__lang {
    display: flex;
    flex-direction: column;
    margin-top: var(--wp--preset--spacing--px-40);
    flex-shrink: 0;
}

.pwb-mobile-nav__lang-option {
    font-family: var(--wp--preset--font-family--inter);
    font-size: var(--wp--custom--font-size--base);
    font-weight: 400;
    line-height: 28px;
    color: #B5BDC8;
    background: transparent;
    border: none;
    text-align: left;
    padding: 0;
    text-decoration: none;
}

.pwb-mobile-nav__lang-option.is-active {
    color: var(--wp--custom--color--white);
}

.pwb-mobile-nav__actions {
    display: flex;
    gap: var(--wp--preset--spacing--px-12);
    padding-top: var(--wp--preset--spacing--px-32);
    padding-bottom: var(--wp--preset--spacing--px-40);
    flex-shrink: 0;
}

.pwb-mobile-nav__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--wp--preset--spacing--px-12) var(--wp--preset--spacing--px-16);
    border-radius: var(--wp--custom--radius--sm);
    font-family: var(--wp--preset--font-family--inter);
    font-size: var(--wp--custom--font-size--base);
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.pwb-mobile-nav__btn:hover {
    opacity: 0.8;
}

.pwb-mobile-nav__btn--solid {
    background: var(--wp--preset--color--custom-pwb-primary-color);
    border: 1px solid var(--wp--preset--color--custom-pwb-primary-color);
    color: var(--wp--preset--color--custom-pwb-dark-navy-accent);
}
