/* Hamburger Menü Butonu */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 35px;
    height: 4px;
    background-color: #255938;
    margin: 6px 0;
    transition: all 0.3s ease;
}

/* Mobil menü overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 2000;
    /* Slide-in için başlangıçta sola kaydır */
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* Menü açıldığında arka planı karartmak için ayrı bir katman ekle */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.mobile-menu-overlay.active ~ .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 16px rgba(0,0,0,0.12);
    position: absolute;
    top: 0;
    left: 0;
    overflow-y: auto;
    /* İçeriği de soldan gelsin */
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

/* Mobil menü header */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #255938;
    color: white;
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: bold;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

/* Mobil menü items container */
.mobile-menu-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS için smooth scroll */
    padding-bottom: 20px; /* Alt kısımda biraz boşluk bırak */
}

/* Scrollbar stilini özelleştir */
.mobile-menu-items::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-menu-items::-webkit-scrollbar-thumb {
    background: #255938;
    border-radius: 2px;
}

.mobile-menu-items::-webkit-scrollbar-thumb:hover {
    background: #1a3d28;
}

/* Mobil Sosyal Medya ve Telefon Stilleri */
.mobile-social-contact {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.mobile-social-icons .social-icon {
    color: #255938;
    font-size: 20px;
    transition: color 0.3s ease;
}

.mobile-social-icons .social-icon:hover {
    color: #1a3d28;
}

.mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #255938;
    font-size: 16px;
}

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

/* Desktop görünümde mobil sosyal medya ve telefon bölümünü gizle */
@media screen and (min-width: 992px) {
    .mobile-social-contact {
        display: none;
    }
}

/* Her bir menü öğesi için container */
.mobile-menu-item-container {
    background-color: #f8f8f8;
    margin: 1px 0;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Ana menü linkleri */
.mobile-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-menu-link::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

.mobile-menu-item-container.active .mobile-menu-link::after {
    transform: rotate(180deg);
}

/* Alt menüsü olmayan linkler için ok işaretini kaldır */
.mobile-menu-item-container:not(:has(.mobile-dropdown-container)) .mobile-menu-link::after {
    display: none;
}

/* Dropdown container */
.mobile-dropdown-container {
    display: none;
    background-color: #fff;
    padding: 0;
    margin: 0;
    border-top: 1px solid #e0e0e0;
}

/* Dropdown linkleri */
.mobile-dropdown-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.mobile-dropdown-link:hover {
    background-color: #f0f0f0;
}

/* Aktif dropdown */
.mobile-menu-item-container.active .mobile-dropdown-container {
    display: block;
}

/* Mobil görünüm için medya sorgusu */
@media screen and (max-width: 991px) {
    .hamburger-menu {
        display: block !important;
    }

    /* display: block kaldırıldı, sadece opacity ve pointer-events ile kontrol ediliyor */

    .mobile-menu-overlay.active .mobile-menu-content {
        transform: translateX(0);
    }

    /* Hamburger menüyü gizle */
    .mobile-menu-overlay.active ~ .hamburger-menu,
    .mobile-menu-overlay.active + .hamburger-menu {
        display: none !important;
    }

    .menu-item {
        display: none;
    }

    .mobile-menu-items .menu-item {
        display: block;
        margin: 0;
        padding: 0;
        border-bottom: none;
    }

    .mobile-menu-items .kurumsal-dropdown,
    .mobile-menu-items .kent-rehberi-dropdown,
    .mobile-menu-items .galeri-dropdown {
        display: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-items .menu-item.active .kurumsal-dropdown,
    .mobile-menu-items .menu-item.active .kent-rehberi-dropdown,
    .mobile-menu-items .menu-item.active .galeri-dropdown {
        display: block;
    }

    /* Dropdown menüleri göster */
    .mobile-menu-item-container.active .mobile-dropdown-container {
        display: block;
    }

    .mobile-menu-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 90%;
        max-width: 400px;
        height: 100%;
        background-color: #fff;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .mobile-menu-overlay.active .mobile-menu-content {
        transform: translateX(0);
    }
}   