/* ============================================================
   Filtreleme Panel — Modern Tasarım
   ============================================================ */

/* --- Panel kapsayıcı --- */
.filter-section {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Masaüstü: sticky + sabit yükseklik */
@media (min-width: 992px) {
    .filter-section {
        position: sticky;
        top: 20px;
        height: calc(100vh - 40px);
    }

    .filter-toggle-btn {
        display: none !important;
    }

    .projects-container {
        padding-left: 30px;
    }
}

/* Mobil: tam ekran drawer */
@media (max-width: 991px) {
    .filter-section {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        /* Navbarın z-index değerinden (9999999999999) yüksek olmalı */
        z-index: 99999999999999;
        transform: translateX(-100%);
        transition: transform 260ms ease;
        border-radius: 0;
    }

    .filter-section.active {
        transform: translateX(0);
    }

    .filter-close-btn {
        position: absolute;
        top: 14px;
        right: 14px;
        z-index: 10;
    }
}

/* --- Başlık --- */
.filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    background: #fff;
}

.filter-header-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(45deg, #ff8c00, #ff4500);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.filter-header-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    flex: 1;
}

.filter-active-badge {
    background: linear-gradient(45deg, #ff8c00, #ff4500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 9px;
    flex-shrink: 0;
}

/* --- Kaydırılabilir içerik --- */
.filter-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.filter-body::-webkit-scrollbar {
    width: 4px;
}

.filter-body::-webkit-scrollbar-track {
    background: transparent;
}

.filter-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

/* --- Grup başlıkları --- */
.filter-group {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f2f2f2;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    margin-bottom: 12px;
}

.filter-group-title i {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #fff3e0, #ffe0cc);
    color: #ff6600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* --- Form elemanları --- */
.filter-form .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.filter-form .form-select,
.filter-form .form-control {
    border-radius: 10px;
    border: 1.5px solid #e8e8e8;
    padding: 9px 14px;
    font-size: 0.88rem;
    color: #333;
    background-color: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-form .form-select:focus,
.filter-form .form-control:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
    background-color: #fff;
    outline: none;
}

.filter-form .input-group-text {
    border-radius: 0 10px 10px 0;
    border: 1.5px solid #e8e8e8;
    border-left: none;
    background-color: #f5f5f5;
    color: #888;
    font-weight: 600;
    font-size: 0.88rem;
}

.filter-form .input-group .form-control {
    border-radius: 10px 0 0 10px;
}

/* --- Checkbox grid --- */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
}

.filter-check-item {
    background: #fafafa;
    border: 1.5px solid #efefef;
    border-radius: 8px;
    padding: 7px 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
    cursor: pointer;
}

.filter-check-item:hover {
    border-color: #ff8c00;
    background: #fff8f2;
}

.filter-check-item:has(.form-check-input:checked) {
    border-color: #ff8c00;
    background: linear-gradient(135deg, #fff8f2, #fff3e8);
}

.filter-form .form-check-input {
    cursor: pointer;
}

.filter-form .form-check-input:checked {
    background-color: #ff6600;
    border-color: #ff6600;
}

.filter-form .form-check-label {
    cursor: pointer;
    padding-left: 4px;
    font-size: 0.84rem;
    color: #444;
    line-height: 1.3;
}

/* --- Sabit alt butonlar --- */
.filter-footer {
    flex-shrink: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-apply-btn {
    background: linear-gradient(45deg, #ff8c00, #ff4500);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 11px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.02em;
}

.filter-apply-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 100, 0, 0.3);
    color: #fff;
}

.filter-apply-btn:active {
    transform: translateY(0);
}

.filter-clear-btn {
    background: transparent;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    color: #888;
    padding: 9px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-clear-btn:hover {
    border-color: #bbb;
    color: #555;
    background: #f7f7f7;
}

/* --- Mobil filtre açma butonu --- */
.filter-toggle-btn {
    position: fixed;
    bottom: 50px;
    right: 0;
    z-index: 1049;
    border-radius: 20px 0 0 0;
    width: 100px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(45deg, #ff8c00, #ff4500);
    border: none;
    box-shadow: -3px -3px 12px rgba(0, 0, 0, 0.15);
}

/* --- Animasyonlar --- */
.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slide-up 0.3s forwards;
}

@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fade-in 0.3s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* --- İlçe placeholder --- */
.ilce-placeholder {
    color: #777;
    font-style: italic;
}
