/* Enhanced Navigation Styles */

/* Navigation Typography Override */
.enhanced-header .nav-links {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.enhanced-header .nav-link {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: white !important;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.enhanced-header .nav-link:hover {
    color: #10b981 !important;
}

.enhanced-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #10b981;
    transition: width 0.3s ease;
}

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

.enhanced-header .logo-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white !important;
    text-decoration: none !important;
}

.enhanced-header .logo-link {
    text-decoration: none !important;
}

.enhanced-header .logo-link:hover {
    text-decoration: none !important;
}

.enhanced-header .container {
    padding: 20px 0;
}

.enhanced-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 0 40px;
    width: 100%;
}

.enhanced-header .main-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.enhanced-header .main-nav .nav-link {
    padding: 8px 0;
    position: relative;
}

.enhanced-header .mobile-menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: none;
}

/* Dropdown Menu Core Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-content {
    position: absolute;
    top: 30px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.nav-dropdown:hover .nav-dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown-link {
    color: var(--color-white);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: none;
    transition: background-color 0.3s, color 0.3s;
}

.nav-dropdown-link:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
}

.nav-dropdown-link:last-child {
    border-bottom: none;
}

/* Dropdown Indicator */
.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    position: relative;
}


.dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.3s;
}

.nav-dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Services Grid in Dropdown */
.services-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 15px;
    max-height: 80vh;
    overflow-y: auto;
}

.service-category-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.service-category-heading {
    color: var(--color-green);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    padding: 0 5px;
}

/* Enhanced Header */
.enhanced-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6) !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    background-image: none !important;
    border-bottom: none;
    z-index: 999999999 !important;
    padding: 0;
    pointer-events: auto !important;
    isolation: isolate;
}

/* Override any possible background styles */
header.enhanced-header {
    background: rgba(0, 0, 0, 0.6) !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    background-image: none !important;
    border-bottom: none !important;
}

/* Header styling for homepage with video background */
.video-hero .enhanced-header {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}


.header-scrolled {
    background: rgba(0, 0, 0, 0.6) !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    background-image: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transform: translateY(0);
    border-bottom: none !important;
}

/* Override scrolled header background for non-homepage */
header.enhanced-header.header-scrolled {
    background: rgba(0, 0, 0, 0.6) !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    background-image: none !important;
    border-bottom: none !important;
}

/* Only homepage should have black scrolled header */
.video-hero .enhanced-header.header-scrolled,
.video-hero .header-scrolled {
    background-color: rgba(0, 0, 0, 0.98) !important;
}

/* Mobile Navigation Improvements */
.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 99;
}

.mobile-nav.active {
    height: calc(100vh - 70px);
    overflow-y: auto;
}

/* Only homepage should have black mobile nav */
.video-hero .mobile-nav {
    background-color: rgba(0, 0, 0, 0.95);
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    margin-left: 20px;
}

.hamburger, 
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    margin-left: 20px;
}

@media (max-width: 991px) {
    .mobile-menu-button,
    .hamburger,
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-nav-link {
    padding: 15px 0;
    border-bottom: none;
    font-size: 16px;
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-nav-link:hover {
    color: var(--color-green);
}

.mobile-nav-dropdown {
    padding: 15px 0;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    color: var(--color-white);
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-dropdown-toggle:hover {
    color: var(--color-green);
}

.mobile-dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.3s;
}

.mobile-dropdown-toggle.active::after {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    display: none;
    padding-left: 20px;
}

.mobile-dropdown-content.active {
    display: block;
}

.mobile-dropdown-link {
    display: block;
    padding: 10px 0;
    color: var(--color-gray-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.mobile-dropdown-link:hover {
    color: var(--color-green);
}

/* Search Bar */
.nav-search {
    position: relative;
    margin-left: 20px;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    padding: 8px 30px 8px 10px;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-green);
    outline: none;
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray-light);
    cursor: pointer;
    padding: 0;
}

.search-button:hover {
    color: var(--color-green);
}

/* Services Megamenu */
.services-megamenu,
.mega-menu,
.dropdown-menu {
    display: block;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    border: none;
    padding: 30px 0;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.services-trigger:hover + .services-megamenu,
.services-megamenu:hover,
.nav-dropdown:hover .dropdown,
.nav-dropdown:hover .mega-menu,
.nav-dropdown:hover .services-megamenu,
.dropdown:hover,
.services-megamenu.hover-active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.megamenu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.megamenu-column h4 {
    color: var(--color-green);
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.megamenu-links {
    list-style: none;
}

.megamenu-link {
    margin-bottom: 10px;
}

.megamenu-link a {
    color: var(--color-gray-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
}

.megamenu-link a:hover {
    color: var(--color-green);
}

/* Sticky Back-to-Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--color-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: rgba(16, 185, 129, 0.8);
}

/* Fixed side navigation for service pages */
.service-side-nav {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 90;
    display: none;
}

@media (min-width: 1400px) {
    .service-side-nav {
        display: block;
    }
}

.side-nav-dots {
    list-style: none;
}

.side-nav-dot {
    margin: 15px 0;
}

.side-nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dot-indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}

.side-nav-link:hover .dot-indicator,
.side-nav-link.active .dot-indicator {
    background-color: var(--color-green);
    transform: scale(1.2);
}

.dot-label {
    position: absolute;
    right: 25px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.side-nav-link:hover .dot-label {
    opacity: 1;
    transform: translateX(0);
}