/* Mobile Menu - Soldan Sağa Açılan Menü */

/* Hamburger Butonu */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: #33333300;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #555;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger butonunu menü açıkken gizle (sadece sağdaki X butonu görünsün) */
/* JavaScript ile kontrol ediliyor, burada sadece fallback */

/* Mobil Menü Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobil Menü Panel (Soldan Sağa) */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-panel.active {
    left: 0;
}

/* Mobil Menü Header */
.mobile-menu-header {
    padding: 20px;
    background: #333;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-header .logo {
    max-width: 200px;
}

.mobile-menu-header .logo img {
    max-width: 100%;
    height: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

/* Mobil Menü İçerik */
.mobile-menu-content {
    padding: 0px 0;

}

.mobile-menu-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-content > ul > li {
    border-bottom: 1px solid #eee;
}

.mobile-menu-content > ul > li > a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-content > ul > li > a:hover {
    background: #f5f5f5;
    color: #007bff;
    padding-left: 25px;
}

/* Alt Menü (Dropdown) - Desktop stillerini override et */
.mobile-menu-content .sub-menu {
    display: none !important;
    position: static !important;
    background: #f9f9f9 !important;
    padding-left: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease, padding 0.3s ease !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    box-shadow: none !important;
    border: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
}

/* style.css'deki .sub-menu:before pseudo-element'ini gizle (desktop ok işareti) */
.mobile-menu-content .sub-menu::before {
    display: none !important;
    content: none !important;
    position: static !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-menu-content .sub-menu.active {
    display: block !important;
    max-height: 1000px !important;
    padding: 10px 0 !important;
    -webkit-transform: scaleY(1) !important;
    -ms-transform: scaleY(1) !important;
    transform: scaleY(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* style.css'deki hover kuralını override et - .active class'ı olan alt menüleri koru */
.mobile-menu-content .menu-item-has-children:hover .sub-menu.active {
    display: block !important;
    -webkit-transform: scaleY(1) !important;
    -ms-transform: scaleY(1) !important;
    transform: scaleY(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-menu-content .sub-menu li {
    border-bottom: 1px solid #e5e5e5 !important;
    margin: 0 !important;
    position: relative !important;
    float: none !important;
    width: 100% !important;
    display: block !important;
    padding: 0 !important; /* style.css'deki padding: 10px 0px; override et */
    text-transform: none !important; /* style.css'deki text-transform override et */
}

.mobile-menu-content .sub-menu li:last-child {
    border-bottom: none !important;
}

.mobile-menu-content .sub-menu a {
    display: block !important;
    padding: 12px 20px 12px 40px !important;
    color: #666 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    float: none !important;
    width: 100% !important;
    text-transform: none !important; /* style.css'deki text-transform: capitalize override et */
}

.mobile-menu-content .sub-menu a:hover {
    background: #f0f0f0 !important;
    color: #007bff !important;
    padding-left: 45px !important;
}

.mobile-menu-content .sub-menu a::after {
    display: none !important;
    content: none !important;
}

/* Menü Item with Children (Alt menü var) - Desktop stillerini override et */
.mobile-menu-content .menu-item-has-children {
    position: relative !important;
    float: none !important;
}

/* Desktop hover stillerini devre dışı bırak - sadece .active class'ı ile açılsın */
.mobile-menu-content .menu-item-has-children:hover .sub-menu:not(.active) {
    display: none !important;
}

.mobile-menu-content .menu-item-has-children > a {
    position: relative !important;
    padding-right: 50px !important;
    float: none !important;
}

.mobile-menu-content .menu-item-has-children > a::after {
    content: '+' !important;
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    color: #999 !important;
    transition: all 0.3s ease !important;
    line-height: 1 !important;
    display: block !important;
}

.mobile-menu-content .menu-item-has-children.active > a::after {
    content: '−' !important;
    transform: translateY(-50%) !important;
    color: #007bff !important;
}

.mobile-menu-content .menu-item-has-children.active > a {
    color: #007bff !important;
    background: #f5f5f5 !important;
}

/* Responsive - Mobil görünüm */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-menu {
        display: none;
    }
    
    /* Desktop menüyü gizle */
    .main-menu-container .navbar-menu {
        display: none !important;
    }
}

/* Desktop görünüm */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-menu-panel {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .navbar-menu {
        display: block;
    }
}

/* Scrollbar Styling (Mobil menü için) */
.mobile-menu-panel::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-menu-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.mobile-menu-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

