/* AAG Custom Header Menu Styles */
/* Modern rounded design matching the actual HTML structure */

/* .aag-header-wrapper {
    background: rgba(51, 51, 51, 0.57);
    border-radius: 25px;
    padding: 10px 30px;
    margin: 0;
    max-width: 1250px;
    position: relative;
    z-index: 3000;
    min-height: 60px;
    transition: min-height 0.3s ease;
    overflow: visible;
} */

.aag-header-wrapper {
    background: rgba(0, 31, 46, 0.25);
    border-radius: 25px;
    padding: 10px 30px;
    margin: 0;
    width: 1000px;
    min-width: 900px;
    position: fixed; /* Changed to fixed for sticky behavior */
    top: 25px; /* Distance from top of viewport */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Perfect centering */
    z-index: 3000;
    min-height: 60px;
    transition: min-height 0.3s ease, background 0.3s ease;
    overflow: visible;
    backdrop-filter: blur(10px);
}


.aag-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

/* Logo Styles */
.aag-logo {
    flex-shrink: 0;
}

.aag-logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

/* Desktop Navigation Styles */
.aag-desktop-nav {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
}

.aag-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: space-around;
    width: 100%;
}

.aag-menu > .aag-menu-item {
    width: 100%;
    text-align: center;
}

.aag-menu > .aag-menu-item .aag-submenu .aag-menu-item {
    text-align: left;
}

.aag-menu > .aag-menu-item .aag-submenu .aag-menu-item .aag-menu-link {
    font-weight: 500!important;
}

.aag-menu > .aag-menu-item .aag-submenu .aag-dropdown-arrow {
    display: none !important;
}
.aag-menu li > ul {
    margin-left: 0 !important;
}

.aag-menu-item {
    position: relative;
}

.aag-menu-item a:focus {
    outline: none !important;
    color: #fff !important;
}

.aag-menu .aag-menu-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 0;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: block;
    white-space: nowrap;
}

.aag-menu-link:hover,
.aag-menu-item.current-menu-item .aag-menu-link {
    /* background: rgba(255, 255, 255, 0.1); */
    color: #ffffff;
    /* transform: translateY(-2px); */
    text-decoration: none;
}

/* Dropdown Arrow */
.aag-dropdown-arrow {
    background: url("/wp-content/uploads/2025/08/aag-select-arrow.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 10px;
    height: 10px;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.aag-has-dropdown.active .aag-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Styles */
.aag-submenu {
    position: absolute;
    top: 50%;
    left: 0;
    background: none;
    min-width: 200px;
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 10px;
    padding: 10px 0;
    list-style: none;
}

/* .aag-submenu::nth */

.aag-submenu .aag-submenu {
    position: relative !important;
    list-style: outside !important;
    color: #fff;
    padding-left: 40px !important;
    margin-top: 0;
    padding-top: 0;
}

/* Show submenu when parent has active class (click-based) */
.aag-has-dropdown.active .aag-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Force header wrapper to expand when any dropdown is active */
.aag-header-wrapper.expanded {
    transition: min-height 0.3s ease;
}

/* Reset height when not hovering over header */
.aag-header-wrapper {
    min-height: 60px; /* Normal header height */
    transition: min-height 0.3s ease;
}

.aag-submenu .aag-menu-item {
    width: 100%;
}

.aag-submenu .aag-menu-link {
    padding: 6px 0;
    margin: 0;
}

/* .aag-submenu .aag-menu-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: none;
} */

/* Mobile Menu Button */
.aag-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
}

.aag-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hamburger Lines */
.aag-hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger Animation */
.aag-mobile-toggle.active .aag-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* Mobile Menu */
.aag-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2c3e50;
    border-radius: 25px;
    margin-top: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1002;
}

.aag-mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.aag-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aag-mobile-menu-list li {
    width: 100%;
}

.aag-mobile-menu-list a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    padding: 15px 20px;
    border-radius: 15px;
    display: block;
    transition: all 0.3s ease;
}

.aag-mobile-menu-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Mobile Overlay */
.aag-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.aag-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .aag-header-wrapper {
        border-radius: 25px;
        padding: 15px 20px;
        margin: 10px;
    }

    .aag-desktop-nav {
        display: none;
    }

    .aag-mobile-toggle {
        display: flex;
    }

    .aag-mobile-menu.active {
        display: block;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .aag-menu {
        gap: 20px;
    }
    
    .aag-menu-link {
        padding: 10px 15px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .aag-header-wrapper {
        border-radius: 20px;
        padding: 12px 15px;
    }
    
    .aag-logo-img {
        height: 35px;
    }
}