/*========================================================================
    Global Styles (Desktop/Tablet)
========================================================================*/

/* Main Navigation */
.main-nav {
    position: relative;
    top: 0;
    width: 100%;
    z-index: 999;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e5e5e5;
    background-color: #fff;
}

.main-nav.sticky {
    position: fixed;
    top: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Ensure mega-menu positions correctly relative to sticky header */
    z-index: 999;
}

/* Container for mobile header */
.nav-container {
    max-width: 1140px;
    width: 100%;
    justify-content: center;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    /* Reduced height to match TreeVallei */
}

/* Navigation Menu & Links */
.nav-menu {
    display: flex;
    list-style: none;
}


.nav-item {
    position: static;
    /* Reduced padding to create more compact navigation */
    padding-bottom: 5px;
}

.nav-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #000;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-item.active .nav-link {
    color: #000;
    font-weight: 600;
}

.nav-item.active .nav-link::after {
    width: 0;
}

.nav-item.active .nav-link:hover::after {
    width: 80%;
}

/* Mega Menu - Desktop */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 100%;
    max-width: 1140px;
    min-width: 800px;
    background: #fff;
    display: flex;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    border-top: 3px solid #e18e96;
    padding: 20px 0;
    justify-content: center;
    border-bottom: 1px solid #e5e5e5;
}

.nav-item:hover .mega-menu,
.nav-item.active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    display: flex;
    /* Ensure it's displayed when active */
}

.mega-menu-container {
    display: flex;
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
    max-width: 1140px;
}

.mega-menu-column {
    flex: 1;
    padding: 20px;
    position: relative;
}

.menu-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    margin-top: 10px;
}

.mega-menu-column:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #e0e0e0;
}

.mega-menu-title {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}


/* Mobile mega menu list styles handled in responsive.css */

/* Mega Menu Column Styles */
.mega-menu-column h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column ul li {
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.mega-menu-column ul li a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 6px 0;
    transition: all 0.2s ease;
    position: relative;
}

.mega-menu-column ul li a:before {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #e18e96;
    transition: width 0.3s ease;
}

.mega-menu-column ul li a:hover {
    color: #000;
    padding-left: 8px;
}

.mega-menu-column ul li a:hover:before {
    width: 15px;
}

.mega-menu-link {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.mega-menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: width 0.3s ease;
}

/* Mobile Site Title - Hidden by default */
.mobile-site-title {
    display: none;
    font-family: 'ConneqtRegular', sans-serif;
    text-decoration: none !important;
    font-weight: bold;
    color: #474344;
    font-size: 18px;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    margin: 0 auto;
    width: fit-content;
    line-height: 1;
}

/* Mobile menu button styles moved to mobile section */

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}


/* Mobile menu styles moved to responsive.css */

/* Mobile menu button - hidden by default, shown in responsive.css */
.mobile-menu-btn {
    display: none;
}

/* ==============================================
   THESE ARE THE QUERY FOR MENU STYLE
   ============================================== */

/* Desktop nav-menu styles */
@media (min-width: 791px) {
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background: transparent;
        width: auto;
        height: auto;
        overflow: visible;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }
}



/* Desktop mega menu subtitle styles */
@media (min-width: 791px) {
    .mega-menu-subtitle {
        margin: 8px 0 4px 0;
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Desktop mega menu list styles */
@media (min-width: 791px) {
    .mega-menu-list {
        margin: 0;
        padding: 0;
        display: block;
        /* Always visible on desktop */
    }

    .mega-menu-item {
        margin: 2px 0;
        list-style: none;
    }
}



/* Mobile menu styles */
@media (max-width: 790px) {
    .mobile-menu-btn {
        display: block;
        z-index: 10;
        background: transparent;
        border: none;
        font-size: 20px;
        cursor: pointer;
        padding: 10px 15px;
        border-radius: 4px;
        color: #333;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:hover {
        background: #d17780;
        transform: translateY(-2px);
    }

    /* Default mobile menu (LTR) - slides from left */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        display: flex;
        flex-direction: column;
        background-color: #ffffff;
        width: 320px;
        height: 100vh;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
        padding: 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    /* RTL mobile menu - slides from right */
    [dir="rtl"] .nav-menu,
    .nav-menu.from-right {
        left: auto;
        right: -100%;
        transition: right 0.3s ease;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.15);
    }

    [dir="rtl"] .nav-menu.active,
    .nav-menu.from-right.active {
        right: 0;
        left: auto;
    }

}

/* ===== STICKY HEADER MEGA-MENU FIX ===== */
/* When header is sticky, ensure nav-container is positioned correctly */
.main-nav.sticky .nav-container {
  position: relative; /* This is crucial for absolute positioned mega-menu */
}

.main-nav.sticky .mega-menu {
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(0) !important;
  z-index: 1001 !important;
  margin-top: 0 !important;
}

/* Ensure mega-menu shows on hover when header is sticky */
.main-nav.sticky .nav-item:hover .mega-menu,
.main-nav.sticky .nav-item.active .mega-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
  display: flex !important;
}

/* Fix mega-menu container positioning for sticky header */
.main-nav.sticky .mega-menu-container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
}

/* Override any conflicting styles when sticky */
.main-nav.sticky .nav-item {
  position: static !important;
}

.main-nav.sticky .nav-container {
  position: relative;
}