/* Shared desktop and mobile navigation system */
:root {
    --nav-breakpoint: 1160px;
    --nav-primary: #ad4b40;
    --nav-ink: #262321;
    --nav-surface: rgba(250, 248, 245, 0.96);
    --nav-drawer: #fffdf9;
}

body .header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid rgba(86, 61, 52, 0.07);
    background: var(--nav-surface);
    box-shadow: 0 4px 22px rgba(62, 42, 35, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

body .header.transparent {
    padding: 0 !important;
    border-bottom-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body .header.scrolled {
    padding: 0;
    background: rgba(250, 248, 245, 0.98);
    box-shadow: 0 4px 22px rgba(62, 42, 35, 0.1);
}

body.menu-open .header {
    transform: translateY(0) !important;
}

html.menu-open,
body.menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body .header .header-inner {
    display: grid !important;
    width: 100%;
    max-width: 1440px !important;
    min-height: 104px;
    margin: 0 auto !important;
    padding: 0 3.2rem !important;
    grid-template-columns: 180px minmax(0, 1fr) 132px;
    column-gap: 2.4rem;
    align-items: center;
    overflow: visible;
}

body .header .logo,
body .header .logo.logo-desktop-only {
    display: flex !important;
    width: 180px;
    margin: 0 !important;
    align-items: center;
    justify-content: flex-start;
    visibility: visible;
    opacity: 1;
    z-index: 2;
}

body .header .logo > a,
body .header .logo-container {
    display: flex;
    width: 100%;
    height: 76px;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
}

html body .header .logo .logo-container img {
    display: block;
    width: 168px !important;
    min-width: 0 !important;
    max-width: 168px !important;
    height: 76px !important;
    object-fit: contain;
    object-position: left center;
    filter: none;
}

body .header .main-nav {
    position: static;
    display: flex !important;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    visibility: visible;
    opacity: 1;
    justify-content: center;
    overflow: visible;
}

body .header .main-nav > ul {
    display: flex !important;
    width: auto;
    margin: 0;
    padding: 0;
    gap: clamp(0.8rem, 1.3vw, 2rem);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    list-style: none;
}

body .header .main-nav > ul > li {
    position: relative;
    display: flex;
    width: auto;
    margin: 0 !important;
    padding: 0;
    border: 0;
    align-items: center;
    flex: 0 0 auto;
}

body .header .main-nav > ul > li > a {
    position: relative;
    display: block;
    width: auto;
    padding: 1rem 0.55rem;
    border-radius: 0;
    color: var(--nav-ink);
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
}

body .header.transparent .main-nav > ul > li > a {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

body .header .main-nav > ul > li > a::after {
    position: absolute;
    right: 0.55rem;
    bottom: 0.55rem;
    left: 0.55rem;
    width: auto;
    height: 2px;
    border-radius: 2px;
    background: var(--nav-primary);
    content: "";
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

body .header .main-nav > ul > li > a:hover::after,
body .header .main-nav > ul > li > a:focus-visible::after,
body .header .main-nav > ul > li > a.active::after {
    width: auto;
    opacity: 1;
    transform: scaleX(1);
}

body .header .main-nav > ul > li > a.active {
    color: var(--nav-primary);
    font-weight: 600;
}

body .header.transparent .main-nav > ul > li > a.active {
    color: #fff;
}

body .header .has-submenu {
    display: inline-flex;
    padding-right: 0;
    align-items: center;
}

body .header .submenu-toggle {
    position: static;
    display: inline-grid;
    width: 30px;
    height: 36px;
    margin: 0 0 0 -0.3rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent !important;
    color: var(--nav-primary);
    cursor: pointer;
    place-items: center;
    transform: none;
}

body .header .submenu-toggle::before {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.22s ease;
}

body .header .submenu-toggle i {
    display: none !important;
}

body .header .has-submenu.active > .submenu-toggle::before {
    transform: translateY(2px) rotate(225deg);
}

body .header .submenu {
    position: absolute;
    top: calc(100% + 0.8rem);
    left: 50%;
    display: flex !important;
    min-width: 220px;
    max-height: none;
    margin: 0;
    padding: 0.8rem;
    gap: 0.2rem;
    border: 1px solid rgba(86, 61, 52, 0.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(55, 36, 30, 0.14);
    flex-direction: column !important;
    opacity: 0;
    overflow: visible;
    pointer-events: none;
    transform: translate(-50%, 0.8rem);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;
}

body .header .has-submenu:hover > .submenu,
body .header .has-submenu:focus-within > .submenu,
body .header .has-submenu.active > .submenu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
    visibility: visible;
}

body .header .submenu > li {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0;
    border: 0;
}

body .header .submenu a {
    display: block;
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 9px;
    color: var(--nav-ink) !important;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    text-shadow: none !important;
    white-space: nowrap;
}

body .header .submenu a:hover,
body .header .submenu a:focus-visible {
    background: #f8f1eb;
    color: var(--nav-primary) !important;
}

body .header .booking-btn {
    display: flex;
    margin: 0 !important;
    justify-content: flex-end;
}

body .header .booking-btn .btn-primary {
    display: inline-flex;
    min-width: 124px;
    min-height: 44px;
    padding: 1rem 1.8rem;
    border: 1px solid var(--nav-primary);
    border-radius: 999px;
    background: var(--nav-primary);
    box-shadow: 0 7px 18px rgba(173, 75, 64, 0.18);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.05em;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

body .header.transparent .booking-btn .btn-primary {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    color: #fff;
    backdrop-filter: blur(8px);
}

body .header .booking-mobile,
body .header .hamburger {
    display: none;
}

body .header a:focus-visible,
body .header button:focus-visible {
    outline: 3px solid rgba(173, 75, 64, 0.28);
    outline-offset: 3px;
}

@media (max-width: 1160px) {
    body .header .header-inner {
        display: flex !important;
        min-height: 88px;
        padding: 0 2rem !important;
        align-items: center;
        justify-content: space-between !important;
        overflow: visible;
    }

    body .header .logo,
    body .header .logo.logo-desktop-only {
        display: flex !important;
        width: 145px;
        margin: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body .header .logo > a,
    body .header .logo-container {
        height: 70px;
    }

    html body .header .logo .logo-container img {
        width: 140px !important;
        max-width: 140px !important;
        height: 68px !important;
    }

    body .header .booking-btn {
        display: none !important;
    }

    body .header .hamburger,
    body .header.transparent .hamburger {
        position: relative !important;
        top: auto;
        right: auto;
        display: flex !important;
        width: 46px;
        height: 46px;
        margin: 0 !important;
        padding: 0 !important;
        gap: 5px;
        border: 1px solid rgba(173, 75, 64, 0.16);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.88) !important;
        box-shadow: 0 5px 16px rgba(57, 37, 30, 0.12);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1200;
    }

    body .header .hamburger-line,
    body .header.transparent .hamburger-line,
    body .header.scrolled .hamburger-line {
        display: block;
        width: 23px;
        height: 2px;
        margin: 0;
        border-radius: 2px;
        background: var(--nav-primary);
        box-shadow: none;
        flex: 0 0 2px;
        transform: none;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    body .header .hamburger:not(.active) .hamburger-line,
    body .header.transparent .hamburger:not(.active) .hamburger-line,
    body .header.scrolled .hamburger:not(.active) .hamburger-line {
        background: var(--nav-primary) !important;
        box-shadow: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body .header .hamburger.active {
        position: fixed !important;
        top: 20px;
        right: 20px;
        border-color: rgba(173, 75, 64, 0.12);
        background: #fff !important;
    }

    body .header .hamburger.active .hamburger-line:nth-last-child(3) {
        opacity: 1 !important;
        transform: translateY(7px) rotate(45deg) !important;
    }

    body .header .hamburger.active .hamburger-line:nth-last-child(2) {
        opacity: 0 !important;
    }

    body .header .hamburger.active .hamburger-line:nth-last-child(1) {
        opacity: 1 !important;
        transform: translateY(-7px) rotate(-45deg) !important;
    }

    body .header .main-nav,
    body .header.transparent .main-nav {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0;
        left: auto;
        display: flex !important;
        width: min(88vw, 390px) !important;
        min-width: 0;
        max-width: 390px !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0;
        padding: 9.8rem 2.4rem 2.6rem !important;
        border-left: 1px solid rgba(86, 61, 52, 0.08);
        background: var(--nav-drawer) !important;
        box-shadow: -18px 0 50px rgba(44, 29, 24, 0.18) !important;
        flex-direction: column;
        justify-content: flex-start;
        opacity: 0;
        overflow-x: hidden;
        overflow-y: auto;
        pointer-events: none;
        transform: translateX(104%) !important;
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, visibility 0.32s ease;
        visibility: hidden;
        -webkit-overflow-scrolling: touch;
        z-index: 1100 !important;
    }

    body .header .main-nav.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0) !important;
        visibility: visible;
    }

    body .header .main-nav > ul {
        display: flex !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    body .header .main-nav > ul > li,
    body .header .main-nav > ul > li.has-submenu {
        display: grid;
        width: 100%;
        margin: 0 !important;
        padding: 0;
        grid-template-columns: minmax(0, 1fr) 44px;
        border-bottom: 1px solid rgba(86, 61, 52, 0.09);
        align-items: center;
    }

    body .header .main-nav > ul > li:not(.has-submenu) {
        display: block;
    }

    body .header .main-nav > ul > li > a {
        display: flex;
        width: 100%;
        min-height: 54px;
        padding: 1.35rem 1rem;
        border-radius: 9px;
        color: var(--nav-ink) !important;
        font-size: 1.7rem;
        font-weight: 500;
        line-height: 1.4;
        text-align: left;
        text-shadow: none !important;
        white-space: normal;
        align-items: center;
    }

    body .header .main-nav > ul > li > a::after {
        display: none;
    }

    body .header .main-nav > ul > li > a.active {
        background: rgba(173, 75, 64, 0.08);
        color: var(--nav-primary) !important;
        font-weight: 600;
    }

    body .header .submenu-toggle {
        position: static;
        display: grid;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        grid-column: 2;
        grid-row: 1;
        transform: none !important;
        place-items: center;
    }

    body .header .has-submenu.active > .submenu-toggle {
        transform: none !important;
    }

    body .header .submenu {
        position: static;
        display: flex !important;
        min-width: 0;
        max-height: 0;
        margin: 0;
        padding: 0 0 0 1rem;
        gap: 0.2rem;
        grid-column: 1 / -1;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        flex-direction: column !important;
        opacity: 1;
        overflow: hidden;
        pointer-events: none;
        transform: none;
        visibility: visible;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    body .header .has-submenu:hover > .submenu,
    body .header .has-submenu:focus-within > .submenu {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        pointer-events: none;
    }

    body .header .has-submenu.active > .submenu {
        left: auto;
        max-height: 140px;
        padding-top: 0.4rem;
        padding-bottom: 0.8rem;
        pointer-events: auto;
        transform: none !important;
    }

    body .header .submenu a {
        min-height: 42px;
        padding: 1rem 1.2rem;
        border-radius: 8px;
        font-size: 1.5rem;
    }

    body .header .booking-mobile,
    body .header .main-nav.active .booking-mobile {
        display: block;
        width: 100%;
        margin: auto 0 0;
        padding-top: 2.4rem;
        opacity: 1;
    }

    body .header .booking-mobile .btn-primary {
        display: flex;
        width: 100%;
        min-height: 50px;
        padding: 1.3rem 2rem;
        border-radius: 999px;
        background: var(--nav-primary);
        box-shadow: 0 8px 20px rgba(173, 75, 64, 0.2);
        color: #fff;
        font-size: 1.55rem;
        font-weight: 600;
        line-height: 1.2;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
    }

    body .header .booking-mobile .btn-primary i {
        display: none;
    }

    body.menu-open::before {
        position: fixed;
        inset: 0;
        display: block;
        width: auto;
        height: auto;
        background: rgba(35, 27, 24, 0.48);
        content: "";
        opacity: 1;
        visibility: visible;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 900;
    }
}

@media (max-width: 480px) {
    body .header .header-inner {
        min-height: 80px;
        padding-inline: 1.6rem !important;
    }

    body .header .logo,
    body .header .logo.logo-desktop-only {
        width: 132px;
    }

    body .header .logo > a,
    body .header .logo-container {
        height: 62px;
    }

    html body .header .logo .logo-container img {
        width: 128px !important;
        max-width: 128px !important;
        height: 60px !important;
    }

    body .header .main-nav,
    body .header.transparent .main-nav {
        width: min(91vw, 370px) !important;
        padding: 9rem 1.8rem 2rem !important;
    }

    body .header .hamburger.active {
        top: 17px;
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .header,
    body .header .main-nav,
    body .header .hamburger-line,
    body .header .submenu {
        transition: none !important;
    }
}
