/* ===========================================
   MODERN MOBILE MENU - Tuana Halı Yıkama
   =========================================== */

/* Animated Hamburger Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background: #0891B2;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    transform-origin: center;
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.mobile-drawer.is-open {
    right: 0;
}

/* Drawer Header */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fffe;
    flex-shrink: 0;
}

.mobile-drawer-logo img {
    height: 40px;
    width: auto;
}

.mobile-drawer-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-drawer-close:active {
    background: #e5e7eb;
    transform: scale(0.95);
}

/* Drawer Navigation */
.mobile-drawer-nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 0;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list > li {
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu-list > li > a,
.mobile-menu-parent > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: rgba(8, 145, 178, 0.1);
}

.mobile-menu-list > li > a i,
.mobile-menu-parent > a i {
    width: 20px;
    text-align: center;
    color: #0891B2;
    font-size: 16px;
}

.mobile-menu-list > li > a:active,
.mobile-menu-parent > a:active {
    background: #f0fdfa;
}

/* Parent with children */
.mobile-has-children {
    position: relative;
}

.mobile-menu-parent {
    display: flex;
    align-items: center;
}

.mobile-menu-parent > a {
    flex: 1;
}

.mobile-submenu-toggle {
    width: 50px;
    height: 52px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 12px;
    border-left: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-submenu-toggle:active {
    background: #f0fdfa;
}

.mobile-submenu-toggle i {
    transition: transform 0.3s ease;
}

.mobile-has-children.is-expanded .mobile-submenu-toggle i {
    transform: rotate(180deg);
}

/* Sub Menu */
.mobile-sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fffe;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-has-children.is-expanded .mobile-sub-menu {
    max-height: 1000px;
}

.mobile-sub-menu li {
    border-top: 1px solid #e5e7eb;
}

.mobile-sub-menu a {
    display: block;
    padding: 12px 20px 12px 52px;
    color: #374151;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: rgba(8, 145, 178, 0.1);
}

.mobile-sub-menu a:active {
    background: #e0f7fa;
}

.mobile-sub-menu a::before {
    content: '›';
    margin-right: 8px;
    color: #0891B2;
    font-weight: bold;
}

/* Drawer Footer (Phone CTA) */
.mobile-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f8fffe;
    flex-shrink: 0;
}

.mobile-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0891b2, #10b981);
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-call-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.mobile-call-btn i {
    font-size: 18px;
}

/* Body scroll lock when drawer is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide desktop nav on mobile */
    .main-navigation {
        display: none !important;
    }
}

/* Hide mobile drawer elements on desktop */
@media (min-width: 769px) {
    .mobile-drawer,
    .mobile-menu-overlay,
    .mobile-menu-toggle {
        display: none !important;
    }
}
