/**
 * Navigation Widget Stylesheet
 *
 * @package NationalRajasthan
 */

/* ==========================================================================
   1. Shared Layout Wrapper
   ========================================================================== */
.nr-navigation {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #ececec;
    box-sizing: border-box;
    position: relative;
    z-index: 98;
}

.nr-navigation__container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    height: 54px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* ==========================================================================
   2. Desktop Navigation
   ========================================================================== */
.nr-navigation__desktop {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nr-navigation__desktop-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.nr-navigation__desktop-toggle:hover {
    color: #ffffff;
    background-color: #c8102e;
}

.nr-navigation__desktop-menu-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.nr-navigation__menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 24px;
}

/* Nav Items */
.nr-navigation__item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nr-navigation__link {
    color: #2b2d42;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 0 4px;
    transition: color 0.2s ease;
    box-sizing: border-box;
}

.nr-navigation__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #c8102e;
    transform: scaleX(0);
    transform-origin: bottom left;
    transition: transform var(--nr-nav-duration, 200ms) ease;
}

.nr-navigation__item:hover > .nr-navigation__link,
.nr-navigation__item--active > .nr-navigation__link {
    color: #c8102e;
}

.nr-navigation__item:hover > .nr-navigation__link::after,
.nr-navigation__item--active > .nr-navigation__link::after {
    transform: scaleX(1);
}

.nr-navigation__arrow {
    font-size: 9px;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.nr-navigation__item:hover > .nr-navigation__link .nr-navigation__arrow {
    transform: rotate(180deg);
}

/* Submenu dropdown container */
.nr-navigation__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background-color: #ffffff;
    border: 1px solid #e1e1e1;
    min-width: 220px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Hover triggers dropdown */
.nr-navigation__item:hover > .nr-navigation__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nr-navigation__submenu .nr-navigation__item {
    width: 100%;
    height: auto;
    display: block;
}

.nr-navigation__submenu .nr-navigation__link {
    width: 100%;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    color: #333333;
}

.nr-navigation__submenu .nr-navigation__link::after {
    display: none; /* No underlines on dropdown submenus */
}

.nr-navigation__submenu .nr-navigation__link:hover {
    background-color: #f8f9fa;
    color: #c8102e;
}

.nr-navigation__submenu .nr-navigation__arrow {
    transform: rotate(-90deg);
}

.nr-navigation__submenu .nr-navigation__item:hover > .nr-navigation__link .nr-navigation__arrow {
    transform: rotate(-90deg) scaleX(-1);
}

/* Sub-submenu flyouts (Level 2+) */
.nr-navigation__submenu .nr-navigation__submenu {
    top: -8px;
    left: 100%;
}

/* Left flyout class to avoid boundary collision */
.nr-navigation__submenu--open-left {
    left: auto !important;
    right: 100% !important;
}

/* ==========================================================================
   3. Mobile Navigation Bar
   ========================================================================== */
.nr-navigation__mobile {
    display: none; /* Hidden on desktop */
    width: 100%;
}

.nr-navigation__mobile-bar {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nr-navigation__mobile-brand {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.2px;
}

.nr-navigation__mobile-hamburger {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nr-navigation__mobile-hamburger:hover {
    color: #ffffff;
    background-color: #c8102e;
}

.nr-navigation__mobile-hamburger-placeholder,
.nr-navigation__mobile-search-placeholder {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.nr-navigation__mobile-search-trigger {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nr-navigation__mobile-search-trigger svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* ==========================================================================
   4. Mobile Slide-out Drawer
   ========================================================================== */
.nr-navigation__drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--nr-nav-duration, 200ms) ease;
}

.nr-navigation__drawer-backdrop.nr-navigation__drawer-backdrop--active {
    opacity: 1;
    visibility: visible;
}

.nr-navigation__drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background-color: #ffffff;
    z-index: 100000;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: left var(--nr-nav-duration, 200ms) cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.nr-navigation__drawer.nr-navigation__drawer--active {
    left: 0;
}

.nr-navigation__drawer-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nr-navigation__drawer-logo {
    display: inline-flex;
    align-items: center;
}

.nr-navigation__drawer-logo a {
    display: block;
    text-decoration: none;
}

.nr-navigation__drawer-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

.nr-navigation__drawer-brand {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
}

.nr-navigation__drawer-close {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: #555555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nr-navigation__drawer-close svg {
    width: 28px;
    height: 28px;
    display: block;
}

.nr-navigation__drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Mobile Accordion Menu */
.nr-navigation__mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nr-navigation__mobile-item {
    border-bottom: 1px solid #f9f9f9;
}

.nr-navigation__mobile-link-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nr-navigation__mobile-link {
    flex-grow: 1;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #2b2d42;
    text-decoration: none;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.nr-navigation__mobile-link:hover,
.nr-navigation__mobile-item--active > .nr-navigation__mobile-link-wrapper > .nr-navigation__mobile-link {
    color: #c8102e;
}

.nr-navigation__mobile-toggle {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: #555555;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.nr-navigation__mobile-toggle:hover {
    color: #c8102e;
    background-color: #fcfcfc;
}

.nr-navigation__mobile-toggle svg {
    transition: transform 0.2s ease;
}

.nr-navigation__mobile-toggle--active svg {
    transform: rotate(45deg); /* Turns "+" into "x" or rotates open */
}

/* Accordion slide submenus */
.nr-navigation__mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.nr-navigation__mobile-submenu .nr-navigation__mobile-link {
    padding-left: 35px;
    font-weight: 600;
    font-size: 13px;
}

.nr-navigation__mobile-submenu .nr-navigation__mobile-submenu .nr-navigation__mobile-link {
    padding-left: 50px;
}

.nr-navigation__mobile-submenu .nr-navigation__mobile-submenu .nr-navigation__mobile-submenu .nr-navigation__mobile-link {
    padding-left: 65px;
}

/* ==========================================================================
   5. Sticky Navigation Trigger
   ========================================================================== */
.nr-navigation--sticky-active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: nrSlideDown 0.3s ease;
}

@keyframes nrSlideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ==========================================================================
   6. Responsive Breakpoint Enforcements
   ========================================================================== */
@media (max-width: 1024px) {
    .nr-navigation--breakpoint-1024 .nr-navigation__desktop {
        display: none;
    }
    .nr-navigation--breakpoint-1024 .nr-navigation__mobile {
        display: flex;
    }
}

@media (max-width: 991px) {
    .nr-navigation--breakpoint-991 .nr-navigation__desktop {
        display: none;
    }
    .nr-navigation--breakpoint-991 .nr-navigation__mobile {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nr-navigation--breakpoint-768 .nr-navigation__desktop {
        display: none;
    }
    .nr-navigation--breakpoint-768 .nr-navigation__mobile {
        display: flex;
    }
}

/* ==========================================================================
   7. Premium Full-screen Search Overlay
   ========================================================================== */
.nr-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.nr-search-overlay--active {
    opacity: 1;
    visibility: visible;
}

.nr-search-overlay__close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #d1d1d1;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
}

.nr-search-overlay__close:hover {
    border-color: #c8102e;
    color: #c8102e;
    transform: rotate(90deg);
}

.nr-search-overlay__close svg {
    display: block;
    width: 32px;
    height: 32px;
}

.nr-search-overlay__content {
    width: 100%;
    max-width: 680px;
    padding: 0 20px;
    box-sizing: border-box;
}

.nr-search-overlay__form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e1e1e1;
    padding-bottom: 10px;
    position: relative;
    transition: border-color 0.3s ease;
}

.nr-search-overlay__form:focus-within {
    border-color: #c8102e;
}

.nr-search-overlay__form label {
    flex-grow: 1;
}

.nr-search-overlay__field {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 0;
    outline: none;
    font-family: inherit;
}

.nr-search-overlay__field::placeholder {
    color: #999999;
}

.nr-search-overlay__submit {
    border: none;
    background: transparent;
    color: #555555;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.nr-search-overlay__submit:hover {
    color: #c8102e;
}

