/* Elementor Header Specific Styles */
header.elementor-location-header {
    background: #fff;
    box-shadow: 0 2px 10px rgb(0 0 0 / .1);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    height: 120px; /* Updated for 100px logo */
}

div[data-elementor-type="wp-page"].elementor:not(.elementor-22512) {
    margin-top: 100px !important; /* Updated to match header height */
}

.elementor-22512 {
    margin-top: 70px !important; 
}

/* Container adjustments for Elementor structure */
.elementor-location-header .e-con-inner {
    height: 120px; /* Already updated */
    display: flex;
    align-items: center;
    justify-content: center !important;
    margin-top: 0; /* Removed margin since we have more height */
}

.elementor-location-header .header-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ensure the body has top padding to account for fixed header */
body {
    padding-top: 50px !important; 
}

/* For Elementor editor mode */
body.elementor-editor-active {
    padding-top: 0 !important;
}

/* Logo */
.logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    z-index: 1002;
    position: relative;
}

/* Logo Image Styles */
.logo img {
    height: 80px; /* Your requested height */
    width: auto;
    max-width: 250px; /* Increased for better proportions */
    display: block;
    object-fit: contain;
}

/* Optional: Add hover effect */
.logo:hover img {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Desktop Menu */
.desktop-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.desktop-menu > li {
    position: relative;
}

.desktop-menu a {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.desktop-menu a:hover {
    color: #06c;
}

.desktop-menu .has-children > a::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* Desktop Submenu - First Level */
.desktop-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 250px;
    box-shadow: 0 5px 20px rgb(0 0 0 / .1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    z-index: 1003;
}

.desktop-menu li:hover > .desktop-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-submenu a {
    padding: 10px 20px;
    display: block;
    color: #333;
    transition: background 0.3s ease;
}

.desktop-submenu a:hover {
    background: #f8f8f8;
    color: #06c;
}

/* Nested Submenu - Second Level (appears to the right) */
.desktop-submenu li {
    position: relative;
}

.desktop-submenu li.has-children > a::after {
    content: '▶';
    font-size: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.desktop-submenu .desktop-submenu {
    position: absolute;
    top: -10px;
    left: 100%;
    margin-left: 0;
    min-width: 250px;
    background: #fff;
    box-shadow: 0 5px 20px rgb(0 0 0 / .1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.desktop-submenu li:hover > .desktop-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Prevent nested submenu from going off-screen */
@media (min-width: 769px) {
    .desktop-submenu .desktop-submenu {
        left: 100%;
    }
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1002;
    position: relative;
/*     padding-right: 50px; */
}

.burger-line {
    width: 25px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(255 255 255 / .98);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 140px 20px 40px; /* Updated top padding to clear taller header */
    max-width: 400px;
    margin: 0 auto;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid rgb(0 0 0 / .1);
    overflow: hidden;
}

.mobile-menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    transition: all 0.3s ease;
}

.mobile-menu-item > a:active {
    background: rgb(0 102 204 / .1);
}

/* Mobile Arrow */
.mobile-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-arrow.active {
    transform: rotate(180deg);
}

.mobile-arrow svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

/* Mobile Submenu */
.mobile-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgb(0 0 0 / .02);
    margin: 0;
    padding: 0;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu a {
    display: block;
    padding: 15px 15px 15px 30px;
    text-decoration: none;
    color: #666;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-submenu a:active {
    background: rgb(0 102 204 / .1);
    color: #06c;
}

/* Nested mobile submenu styling */
.mobile-submenu .mobile-submenu {
    background: rgb(0 0 0 / .04);
}

.mobile-submenu .mobile-submenu a {
    padding-left: 50px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Adjust header height for mobile */
    header.elementor-location-header {
        height: 90px; /* Smaller on mobile */
    }
    
    .elementor-location-header .e-con-inner {
        height: 90px;
    }
    
    .elementor-location-header .e-con {
        min-height: 90px;
        height: 90px;
    }
    
    body {
        padding-top: 30px !important;
    }
    
    div[data-elementor-type="wp-page"].elementor:not(.elementor-22512) {
        margin-top: 90px !important;
    }
    
    .elementor-22512 {
        margin-top: 50px !important; 
    }
    
    /* Smaller logo on mobile */
    .logo img {
        height: 70px;
        max-width: 200px;
    }
    
    .desktop-menu {
        display: none;
    }
    
    .burger-menu {
        display: flex;
    }
    
    /* Adjust padding for mobile */
    .elementor-location-header .header-container {
        padding: 0 15px;
        margin-top: -15px;
    }
    
    /* Adjust mobile menu padding */
    .mobile-menu-content {
        padding: 110px 20px 40px;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-overlay.active .mobile-menu-item {
    animation: slideDown 0.5s ease forwards;
}

.mobile-menu-overlay.active .mobile-menu-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-menu-item:nth-child(2) {
    animation-delay: 0.15s;
}

.mobile-menu-overlay.active .mobile-menu-item:nth-child(3) {
    animation-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-menu-item:nth-child(4) {
    animation-delay: 0.25s;
}

/* Override Elementor default styles if needed */
.elementor-location-header .elementor-element {
    margin: 0;
}

.elementor-location-header .elementor-widget-html {
    margin: 0;
}

/* Ensure HTML widgets don't add extra spacing */
.elementor-widget-container {
    padding: 0;
}

/* Fix for Elementor container heights */
.elementor-location-header .e-con {
    min-height: 120px; /* Updated to match header height */
    height: 120px; /* Updated to match header height */
}

/* Ensure z-index is higher than other Elementor elements */
.elementor-location-header {
    z-index: 100 !important;
}

.mobile-menu-overlay {
    z-index: 99 !important;
}