/* ==========================================================================
   Modern Mobile Menu - Complete Redesign
   ========================================================================== */

/* Mobile Menu Overlay - Professional Design */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ebebeb;
    z-index: 99999; /* Higher than everything else */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Subtle Background Pattern */
.menu-bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.3;
}

.shape-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    animation: float 30s infinite ease-in-out;
}

.shape-circle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-circle:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-circle:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* Menu Content Container */
.mobile-menu-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 2;
}

/* Menu Items Container */
.mobile-menu-items {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Individual Menu Item - Subtle Animation */
.mobile-menu-item {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.mobile-menu-overlay.active .mobile-menu-item {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-menu-item:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-menu-item:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-menu-item:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-menu-item:nth-child(4) { transition-delay: 0.4s; }

/* Menu Links Styling - Professional */
.mobile-menu-link {
    display: block;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    color: #000000;
    font-size: 1.1rem;
    font-weight: 400;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: #111111;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::before {
    width: 100%;
}

.mobile-menu-link:hover {
    color: #000000;
    border-bottom-color: rgba(0, 0, 0, 0.2);
}

/* Special styling for Services (with submenu) */
.mobile-menu-item.has-submenu .mobile-menu-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-item.has-submenu .mobile-menu-link::after {
    content: '›';
    font-size: 1.2rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.mobile-menu-item.has-submenu .mobile-menu-link:hover::after {
    opacity: 1;
    transform: translateX(3px);
}

/* Contact Button Special Style - Professional */
.mobile-menu-item.menu-contact .mobile-menu-link {
    background: transparent;
    border-bottom: 2px solid #111111;
    color: #000000;
    font-weight: 500;
    text-align: center;
    margin-top: 1rem;
    padding-bottom: 0.8rem;
}

.mobile-menu-item.menu-contact .mobile-menu-link:hover {
    color: #000000;
    border-bottom-color: #000000;
}

.mobile-menu-item.menu-contact .mobile-menu-link::before {
    background: #6BFFE5;
    height: 2px;
    bottom: -1px;
}

/* Submenu Panel - Professional */
.mobile-submenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ebebeb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 100000; /* Higher than the main overlay */
}

.mobile-submenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Back Button - Professional */
.mobile-submenu-back {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100001; /* Ensure it's above everything */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-submenu-back:hover {
    background: #52DDC4;
    transform: translateX(-2px);
    box-shadow: 0 3px 12px rgba(82, 221, 196, 0.3);
}

.mobile-submenu-back svg {
    width: 24px;
    height: 24px;
    stroke: #0A0F1C;
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.mobile-submenu-back:hover svg {
    stroke: #0A0F1C;
}

/* Submenu Items */
.mobile-submenu-items {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-submenu-item {
    opacity: 0;
    transform: translateX(30px);
}

.mobile-submenu.active .mobile-submenu-item {
    opacity: 1;
    transform: translateX(0);
}

.mobile-submenu.active .mobile-submenu-item:nth-child(1) { transition: all 0.3s ease 0.1s; }
.mobile-submenu.active .mobile-submenu-item:nth-child(2) { transition: all 0.3s ease 0.2s; }
.mobile-submenu.active .mobile-submenu-item:nth-child(3) { transition: all 0.3s ease 0.3s; }
.mobile-submenu.active .mobile-submenu-item:nth-child(4) { transition: all 0.3s ease 0.4s; }

.mobile-submenu-link {
    display: block;
    padding: 0.9rem 1.3rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    color: #000000;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    text-align: left;
    transition: all 0.2s ease;
}

.mobile-submenu-link:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.2);
    color: #000000;
    transform: translateX(3px);
}

/* Close Button - Professional */
.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.mobile-menu-close::before,
.mobile-menu-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 1.5px;
    background: rgba(0, 0, 0, 0.9);
    transition: background 0.2s ease;
}

.mobile-menu-close::before {
    transform: rotate(45deg);
}

.mobile-menu-close::after {
    transform: rotate(-45deg);
}

.mobile-menu-close:hover::before,
.mobile-menu-close:hover::after {
    background: #000000;
}

/* Social Links at Bottom - Professional */
.mobile-menu-social {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.mobile-social-link {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-social-link:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.mobile-social-link svg {
    width: 18px;
    height: 18px;
    fill: rgba(0, 0, 0, 0.8);
    transition: fill 0.2s ease;
}

.mobile-social-link:hover svg {
    fill: #000000;
}

/* Hide on desktop */
@media (min-width: 901px) {
    .mobile-menu-overlay {
        display: none;
    }
}

/* Compact Minimal Hamburger Menu Button */
@media (max-width: 900px) {
    .menu-toggle {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        z-index: 10002 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(10, 15, 28, 0.1) !important;
        border-radius: 8px !important;
        padding: 0 !important;
        width: 44px !important;
        height: 44px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        flex-shrink: 0 !important;
    }
    
    /* Subtle hover effect */
    .menu-toggle:hover {
        background: #f8f8f8 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
    }
    
    /* Three hamburger lines - compact and clean */
    .menu-toggle span {
        display: block !important;
        width: 20px !important;
        height: 2px !important;
        background: #0A0F1C !important;
        border-radius: 1px !important;
        transition: all 0.25s ease !important;
        pointer-events: none !important;
        transform-origin: center !important;
    }
    
    /* Slightly shorter middle line for visual balance */
    .menu-toggle span:nth-child(2) {
        width: 16px !important;
    }
    
    /* Hover state - subtle line width changes */
    .menu-toggle:hover span:nth-child(1),
    .menu-toggle:hover span:nth-child(3) {
        width: 20px !important;
    }
    
    .menu-toggle:hover span:nth-child(2) {
        width: 20px !important;
    }
    
    /* Active/Open state - perfect X formation */
    .menu-toggle.active {
        background: #ebebeb !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    }
    
    .menu-toggle.active span {
        background: #000000 !important;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(3px) rotate(45deg) !important;
        width: 20px !important;
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
        transform: scale(0) !important;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-3px) rotate(-45deg) !important;
        width: 20px !important;
    }
}

/* Ensure hamburger is always visible on mobile */
@media (max-width: 900px) {
    .menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Keep header visible but behind menu when open */
body.menu-open .site-header {
    z-index: 9998 !important; /* Keep below menu overlay but visible */
}

/* Keep hamburger button always on top when menu is open */
body.menu-open .menu-toggle {
    z-index: 100002 !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
}

/* Optional: fade out logo when menu is open for cleaner look */
body.menu-open .site-branding {
    opacity: 0.3 !important;
    transition: opacity 0.3s ease !important;
}
