/* =========================================
   1. Base & Reset
   ========================================= */
.gopetrel-menu-wrapper {
    width: 100%;
    font-family: inherit;
    position: relative;
    box-sizing: border-box;
}
.gopetrel-menu-wrapper * { box-sizing: border-box; }

/* Mobile Hiding Utility */
.mobile-only {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}
.desktop-only {
    display: block !important;
}

/* =========================================
   2. Desktop Nav (.gp-nav)
   ========================================= */
.gp-nav {
    display: flex;
    /* justify-content controlled by Elementor */
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
    width: 100%;
}
.gp-nav-item { height: 100%; display: flex; align-items: center; margin: 0; }
.gp-nav-link {
    text-decoration: none; font-size: 16px; font-weight: 700;
    padding: 0 25px; height: 100%; display: flex; align-items: center;
    position: relative; cursor: pointer; transition: color 0.3s ease;
}
.gp-nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 4px; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gp-nav-link:hover::after, .gp-nav-link.active::after { width: 100%; }

/* Mega Menu Dropdown */
.gp-mega-menu {
    position: fixed; left: 0; right: 0;
    visibility: hidden; opacity: 0; transform: translateY(-20px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.5s;
    z-index: 9999; box-shadow: 0 15px 35px rgba(0,0,0,0.1); text-align: left;
}
.gp-mega-menu.active { visibility: visible; opacity: 1; transform: translateY(0); }
.gp-mega-inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; position: relative; }

/* Desktop Close Button */
.gp-mega-close {
    -webkit-appearance: none; appearance: none; background: transparent; border: none; outline: none;
    box-shadow: none; padding: 0; margin: 0;
    position: absolute; top: -20px; right: 20px;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 10; transition: all 0.3s ease;
}
.gp-mega-close::before, .gp-mega-close::after {
    content: ''; position: absolute; transition: background-color 0.3s ease;
    background-color: #fff; width: 24px; height: 2px;
}
.gp-mega-close::before { transform: rotate(45deg); }
.gp-mega-close::after { transform: rotate(-45deg); }
.gp-template-wrap { width: 100%; }

/* =========================================
   3. Breakpoints (Logic)
   ========================================= */
@media (max-width: 768px) {
    .gopetrel-menu-wrapper.gp-bp-768 .desktop-only { display: none !important; }
    .gopetrel-menu-wrapper.gp-bp-768 .mobile-only { display: block !important; visibility: visible !important; height: auto !important; overflow: visible !important; }
    .gopetrel-menu-wrapper.gp-bp-768 .gp-mobile-header { display: flex !important; }
}
@media (max-width: 1024px) {
    .gopetrel-menu-wrapper.gp-bp-1024 .desktop-only { display: none !important; }
    .gopetrel-menu-wrapper.gp-bp-1024 .mobile-only { display: block !important; visibility: visible !important; height: auto !important; overflow: visible !important; }
    .gopetrel-menu-wrapper.gp-bp-1024 .gp-mobile-header { display: flex !important; }
}
@media (max-width: 1200px) {
    .gopetrel-menu-wrapper.gp-bp-1200 .desktop-only { display: none !important; }
    .gopetrel-menu-wrapper.gp-bp-1200 .mobile-only { display: block !important; visibility: visible !important; height: auto !important; overflow: visible !important; }
    .gopetrel-menu-wrapper.gp-bp-1200 .gp-mobile-header { display: flex !important; }
}

/* =========================================
   4. Mobile Styles
   ========================================= */
.gp-mobile-header { justify-content: flex-end; align-items: center; width: 100%; }
.gp-mobile-burger {
    -webkit-appearance: none; appearance: none; background: transparent; border: none; padding: 5px;
    width: 40px; height: 30px; position: relative; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; z-index: 100;
}
.gp-mobile-burger span {
    display: block; width: 100%; height: 3px; background-color: #333; border-radius: 2px; pointer-events: none;
}
.gp-mobile-drawer {
    position: fixed; top: 0; right: -120%; width: 85%; height: 100vh; background: #fff; z-index: 99999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto; display: flex; flex-direction: column;
}
.gp-mobile-drawer.active { right: 0 !important; }
.gp-drawer-head {
    padding: 20px; display: flex; justify-content: flex-end; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.gp-mobile-close {
    -webkit-appearance: none; appearance: none; background: transparent; border: none; padding: 0;
    width: 40px; height: 40px; position: relative; cursor: pointer;
}
.gp-mobile-close::before, .gp-mobile-close::after {
    content: ''; position: absolute; top: 19px; left: 5px; width: 30px; height: 2px; background: #333;
}
.gp-mobile-close::before { transform: rotate(45deg); }
.gp-mobile-close::after { transform: rotate(-45deg); }

.gp-mobile-list { list-style: none; margin: 0; padding: 0 20px 40px; overflow-y: auto; }
.gp-m-item { border-bottom: 1px solid #f4f4f4; }
.gp-m-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.gp-m-link { text-decoration: none; font-size: 16px; font-weight: 700; color: #333; flex: 1; }
.gp-m-toggle {
    -webkit-appearance: none; appearance: none; background: transparent; border: none; padding: 0;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.3s;
}
.gp-m-toggle::before {
    content: ''; width: 10px; height: 10px; border-right: 2px solid #ccc; border-bottom: 2px solid #ccc; transform: rotate(45deg);
}
.gp-m-item.expanded .gp-m-toggle { transform: rotate(180deg); }
.gp-m-content { padding-bottom: 20px; }
.gp-m-content .elementor-section { width: 100% !important; }
.gp-mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99990; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.gp-mobile-overlay.active { opacity: 1; visibility: visible; }