/* Modern Header Styles - Two Tier Design */

/* CRITICAL: Ensure all header navigation elements are always clickable */
.modern-header,
.modern-header *,
.top-bar,
.top-bar *,
.header-nav,
.header-nav *,
.nav-menu,
.nav-menu *,
.nav-item,
.nav-item *,
.nav-link,
.dropdown-menu,
.dropdown-menu *,
.dropdown-item,
.dropdown-item *,
.mobile-nav,
.mobile-nav *,
.mobile-nav-list,
.mobile-nav-list *,
.mobile-nav-item,
.mobile-nav-item *,
.mobile-nav-link,
.mobile-dropdown,
.mobile-dropdown *,
.mobile-dropdown-item,
.mobile-dropdown-item * {
    pointer-events: auto !important;
}

/* Ensure links have highest priority */
.nav-link,
.dropdown-item,
.mobile-nav-link,
.mobile-dropdown-item,
.cta-button,
.social-icon,
.top-bar-contact {
    cursor: pointer !important;
    position: relative !important;
    z-index: 999999 !important;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: #0a2e5c;
    padding: 4px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999999 !important;
    pointer-events: auto !important;
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-bar-contact:hover {
    color: #00d4ff;
}

.top-bar-contact svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative !important;
    z-index: 9999999 !important;
    pointer-events: auto !important;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative !important;
    z-index: 9999999 !important;
    pointer-events: auto !important;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer !important;
    position: relative !important;
    z-index: 9999999 !important;
    pointer-events: auto !important;
}

.social-icon:hover {
    background: #ff6b35 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.social-icon svg {
    width: 16px;
    height: 16px;
    fill: #ffffff !important;
    pointer-events: none !important;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff6b35;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #e55a2b;
    color: white;
}

.cta-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ========== MAIN HEADER ========== */

/* SlideDown Animation */
@-webkit-keyframes slideDown {
    from {
        -webkit-transform: translateY(-100%);
        transform: translateY(-100%);
    }

    to {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        -webkit-transform: translateY(-100%);
        transform: translateY(-100%);
    }

    to {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

.modern-header {
    -webkit-animation: slideDown .7s ease-in-out;
    animation: slideDown .7s ease-in-out;
    background-color: #034ea2ba;
    border-bottom: .125rem solid #fff;
    position: fixed;
    -webkit-transform-origin: top;
    transform-origin: top;
    width: 100%;
    z-index: 9999998 !important;
    top: 36px;
    /* Height of top bar */
    left: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.modern-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modern-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo:hover img {
    transform: scale(1.05);
}

.header-nav {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1002;
    pointer-events: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
    position: relative;
    z-index: 1002;
}

.nav-item {
    position: relative;
    pointer-events: auto;
    z-index: 1002;
}

.nav-link,
header .nav-link,
.new-landspect-header .nav-link {
    text-decoration: none;
    color: #ffffff !important;
    opacity: 0.85;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    pointer-events: auto;
    z-index: 1002;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active,
header .nav-link:hover,
header .nav-link.active {
    color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #ffffff !important;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: auto;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease;
    pointer-events: none;
    margin-left: 2px;
}

.dropdown:hover .dropdown-toggle::after {
    transform: translateY(2px) rotate(225deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 300px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 15px;
    pointer-events: none;
    z-index: 1003;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item,
.dropdown-item:visited,
.dropdown-item:active {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333333 !important;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    pointer-events: auto;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item:hover:visited {
    background-color: #f8f9fa;
    color: #ff6b35 !important;
}

.dropdown-item img {
    width: 30px;
    height: 30px;
    margin-right: 12px;
    object-fit: contain;
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
}

.dropdown-item-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: #111111 !important;
    transition: color 0.3s ease;
}

.dropdown-item:hover .dropdown-item-title {
    color: #ff6b35 !important;
}

.dropdown-item-desc {
    font-size: 12px;
    color: #666666 !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    width: 25px;
    height: 20px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #333333;
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    z-index: 9999999 !important;
    display: block;
    /* Change from display: none to block but hidden with transform */
    position: fixed;
    top: 116px;
    /* 36px + 80px */
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Faster, smoother transition */
    visibility: hidden;
    /* Hide when not active to prevent interaction */
    will-change: transform;
    /* Hint to browser for hardware acceleration */
}

@media (max-width: 768px) {
    .mobile-nav {
    z-index: 9999999 !important;
        top: 70px;
        max-height: calc(100vh - 70px);
    }
}

.mobile-nav.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 5px;
}

.mobile-nav-item {
    margin-bottom: 15px;
}

html body .modern-header .mobile-nav .mobile-nav-link,
html body .modern-header .mobile-nav .mobile-nav-link:visited,
html body .modern-header .mobile-nav .mobile-nav-link:active,
html body .modern-header .mobile-nav .mobile-nav-link:focus,
html body .modern-header .mobile-nav .mobile-nav-link:hover,
html body .modern-header .mobile-nav .mobile-nav-link.active {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
}

html body .modern-header .mobile-nav .mobile-nav-link:hover,
html body .modern-header .mobile-nav .mobile-nav-link.active,
html body .modern-header .mobile-nav .mobile-nav-link:focus,
html body .modern-header .mobile-nav .mobile-nav-link:active {
    background-color: #f8f9fa !important;
}

.mobile-dropdown {
    margin-top: 5px;
    padding-left: 5px;
}

html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item,
html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:visited,
html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:active,
html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:focus,
html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:hover {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    border-radius: 6px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-bottom: 1px;
}

html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:hover,
html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:active,
html body .modern-header .mobile-nav .mobile-dropdown .mobile-dropdown-item:focus {
    background-color: #f8f9fa !important;
}

.mobile-dropdown-item img {
    width: 25px;
    height: 25px;
    margin-right: 10px;
    object-fit: contain;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-nav {
    z-index: 9999999 !important;
        display: block;
    }

    .header-container {
        height: 70px;
    }

    .header-logo img {
        height: 40px;
    }

    .mobile-nav {
    z-index: 9999999 !important;
        top: 70px;
        max-height: calc(100vh - 70px);
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }

    .header-logo img {
        height: 60px;
    }
}

/* Add body padding to account for fixed two-tier header */
body {
    padding-top: 100px;
    /* 36px (top bar) + 80px (header) */
}

/* Top bar responsive */
@media (max-width: 768px) {
    .top-bar {
        display: none;
        /* Hide top bar on mobile */
    }

    .modern-header {
        top: 0;
    }

    body {
        padding-top: 70px;
    }
}

@media (max-width: 992px) {
    .top-bar-left {
        gap: 15px;
    }

    .top-bar-contact {
        font-size: 12px;
    }

    .cta-button {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }
}

/* Hero Banner Container Responsive */
@media (min-width: 320px) {
    .oga-hero-banner-ev .oga-ev-banner-container {
        margin: 0.4375rem auto 0;
        max-width: calc(100% - 2.75rem);
        padding: 0;
    }
}

@media (min-width: 992px) {
    .oga-hero-banner-ev-container .oga-hero-banner-ev-text-area.slick-initialized .slick-dots {
        bottom: 2.375rem !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .oga-hero-banner-ev-container .oga-hero-banner-ev-text-area.slick-initialized .slick-dots li {
        display: inline-block !important;
    }
}

a:active,
a:visited {
    color: #ffffff;
    text-decoration: none;
}

/* Ensure hash navigation targets are offset below the fixed header */
html {
    scroll-behavior: smooth;
}

*[id] {
    scroll-margin-top: 130px;
}
