
/* ===============================================================
   Buildbrand Hospitality Framework™
   Theme: Mohar Cottage
   File: navigation.css

   Description:
   Primary navigation styles.

   Author: Sunil Chauhan
   Website: https://buildbrand.site
   =============================================================== */


/* ===============================================================
   NAVIGATION
   =============================================================== */

.site-navigation {
    width: 100%;
}


/* ===============================================================
   MENU
   =============================================================== */

.site-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);

    margin: 0;
    padding: 0;

    list-style: none;
}


/* ===============================================================
   MENU ITEMS
   =============================================================== */

.site-menu > .menu-item {
    position: relative;
}


/* ===============================================================
   LINKS
   =============================================================== */

.site-menu > .menu-item > a {
    display: inline-flex;
    align-items: center;

    padding: 0.5rem 0;

    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-medium);

    text-decoration: none;

    transition: color var(--transition-normal);
}


/* ===============================================================
   HOVER
   =============================================================== */

.site-menu > .menu-item > a:hover {
    color: var(--color-primary);
}


/* ===============================================================
   ACTIVE PAGE
   =============================================================== */

.site-menu > .current-menu-item > a,
.site-menu > .current-menu-ancestor > a {
    color: var(--color-primary);
}


/* ===============================================================
   UNDERLINE ANIMATION
   =============================================================== */

.site-menu > .menu-item > a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -0.35rem;

    width: 100%;
    height: 2px;

    background: var(--color-primary);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform var(--transition-normal);
}


.site-menu > .menu-item > a:hover::after,
.site-menu > .current-menu-item > a::after,
.site-menu > .current-menu-ancestor > a::after {
    transform: scaleX(1);
}


/* ===============================================================
   MOBILE NAVIGATION
   =============================================================== */

@media (max-width: 991px) {

    /* -----------------------------------------------------------
       Navigation panel
       The hamburger/open-state styles in header.css control
       when this panel becomes visible.
       ----------------------------------------------------------- */

    .site-header__navigation {
        display: none;

        width: 100%;
        max-width: 100%;

        box-sizing: border-box;
    }


    /* -----------------------------------------------------------
       Menu layout
       Use one consistent vertical stack.
       ----------------------------------------------------------- */

    .site-header__navigation .site-menu {
        display: flex;
        flex-direction: column;

        align-items: stretch;
        justify-content: flex-start;

        gap: 0;

        width: 100%;
        min-width: 0;

        margin: 0;
        padding: 0;

        list-style: none;
        box-sizing: border-box;
    }


    /* -----------------------------------------------------------
       Top-level menu items
       Remove additional margins and padding that can create
       inconsistent spacing between links.
       ----------------------------------------------------------- */

    .site-header__navigation .site-menu > .menu-item {
        position: relative;

        display: block;

        width: 100%;
        min-width: 0;

        margin: 0;
        padding: 0;

        box-sizing: border-box;
    }


    /* -----------------------------------------------------------
       Top-level links
       Equal minimum height and consistent vertical rhythm.
       ----------------------------------------------------------- */

    .site-header__navigation .site-menu > .menu-item > a {
        display: flex;
        align-items: center;

        width: 100%;
        min-height: 80px;

        margin: 0;
        padding: 1.25rem 0;

        line-height: 1.4;

        box-sizing: border-box;
    }


    /* -----------------------------------------------------------
       Stay submenu
       Keep Stay as a normal clickable link to the Rooms page.
       Hide its nested room list on mobile.
       ----------------------------------------------------------- */

    .site-header__navigation
    .site-menu > .menu-item-room-dropdown > .sub-menu {
        display: none !important;
    }


    /* -----------------------------------------------------------
       Underline
       Avoid the desktop hover underline animation in the
       mobile navigation.
       ----------------------------------------------------------- */

    .site-header__navigation
    .site-menu > .menu-item > a::after {
        display: none;
    }

}


/* ===============================================================
   REDUCED MOTION
   =============================================================== */

@media (prefers-reduced-motion: reduce) {

    .site-menu > .menu-item > a,
    .site-menu > .menu-item > a::after {
        transition: none;
    }

}



@media (max-width: 991px) {

    .site-header__navigation .site-menu > .menu-item {
        position: relative;
        margin: 0;
        padding: 0;
    }

    .site-header__navigation .site-menu > .menu-item > a {
        display: flex;
        align-items: center;
        min-height: 72px;
        padding: 1rem 0;
        margin: 0;
        line-height: 1.4;
        box-sizing: border-box;
    }

    /* Hide the mobile submenu and its separate toggle. */
    .site-header__navigation
    .menu-item-room-dropdown > .sub-menu {
        display: none !important;
    }

    .site-header__navigation
    .menu-item-room-dropdown > .dropdown-toggle,
    .site-header__navigation
    .menu-item-room-dropdown > .submenu-toggle,
    .site-header__navigation
    .menu-item-room-dropdown > button {
        display: none !important;
    }
}
