/* ========================================= */
/* GENEL AYARLAR VE RESETLEME                */
/* ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


/* ========================================= */
/* HEADER (MASAÜSTÜ)                         */
/* ========================================= */
.main-header {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative; 
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 200px;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

/* Navigasyon ve kullanıcı butonlarını masaüstünde yan yana getiren sarmalayıcı */
.nav-wrapper {
    display: flex;
    align-items: center; /* Dikeyde ortalamayı bu kural sağlıyor */
    gap: 13vh; /* Navigasyon ile butonlar arasına boşluk koyar */
}

.main-nav a:hover {
    color: #007bff;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-icons {
    display: flex;
    gap: 15px;
    font-size: 20px;
    color: #555;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #ddd;
}

.mobile-nav-toggle {
    display: none; /* Masaüstünde gizli */
}

/* ========================================= */
/* HERO SECTION (ANASAYFA SLIDER)            */
/* ========================================= */
.hero-section {
    position: relative;
    height: 90vh; /* Yüksekliği ekranın %100'ü yap (eski: 60vh) */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
    z-index: -2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    background-color: #fff;
    border-radius: 50px;
    padding: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.search-form input {
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 16px;
    padding: 0 15px;
}

.search-category-select {
    border: none;
    outline: none;
    background-color: transparent;
    padding: 10px 20px;
    border-right: 1px solid #ddd;
    color: #555;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    /* Tarayıcı varsayılan okunu gizlemek için (isteğe bağlı) */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0; /* Küçülmesini engelle */
}

/* ========================================= */
/* FOOTER                                    */
/* ========================================= */
.main-footer {
    background-color: #f8f9fa;
    padding-top: 40px;
}

.footer-features {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-box {
    background: linear-gradient(135deg, #00A6F3, #0D7EFF);
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.feature-box h3 {
    margin-bottom: 10px;
}

/* Footer'daki logo ve linklerin genel kapsayıcısı - DÜZENLENDİ */
.footer-links {
    display: flex;
    justify-content: flex-start; /* Elemanları sola yaslar (space-between yerine) */
    align-items: flex-start;
    padding: 40px 0;
    border-top: 1px solid #e0e0e0;
    gap: 80px; /* Elemanlar arasına boşluk koyar */
}

/* Footer logo bölümü - DÜZENLENDİ */
.footer-logo {
    /* Artık esnek genişliğe ihtiyacımız yok */
}

.footer-logo img {
    width: 180px;
}

/* Link kolonları - DÜZENLENDİ */
.link-column {
    /* Artık esnek genişliğe ihtiyacımız yok, padding yeterli */
    padding: 0 20px;
}

.link-column h4 {
    margin-bottom: 15px;
    color: #333;
}

.link-column a, .link-column p {
    display: block;
    margin-bottom: 10px;
    color: #666;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #888;
}

/* ========================================= */
/* RESPONSIVE TASARIM (MOBİL)                */
/* ========================================= */
@media (max-width: 768px) {

    /* --- Header (Mobil) --- */
    .main-header .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .mobile-nav-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 1.8rem;
        color: #333;
        cursor: pointer;
    }

    .nav-wrapper {
        display: none; /* Başlangıçta menü gizli */
        position: absolute;
        top: 70px; /* Header'ın yüksekliğine göre ayarla */
        left: 0;
        right: 0;
        width: 100%;
        background-color: #fff;
        padding: 20px 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .nav-wrapper.active {
        display: block; /* JS ile menüyü görünür yap */
    }

    .main-nav ul, .user-actions {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .user-actions {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
        width: 100%;
    }


    /* --- Anasayfa Arama Bölümü (Mobil) --- */
    /* --- Anasayfa Arama Bölümü (Mobil) - DÜZELTİLMİŞ --- */
    .hero-content h1 {
        font-size: 32px;
    }

    .search-form {
        flex-direction: column;
        align-items: center;
        gap: 15px; /* Boşluk ayarlandı */
        background-color: transparent;
        padding: 0;
        width: 100%;
    }

    /* Mobil için select ve input'a özel stiller */
    .search-category-select,
    .search-form input {
        width: 90%; /* Genişlik ayarlandı */
        border-radius: 50px; /* Kenarları yuvarlat */
        padding: 15px;
        text-align: center;
        background-color: #fff;
        color: #333;
        font-size: 16px;
        border: 1px solid #ddd;
    }

    .search-category-select {
        border-right: 1px solid #ddd; /* Dikey ayracı koru */
    }

    /* Mobil için input'un bazı stillerini ezelim */
    .search-form input {
        text-align: left;
        padding-left: 20px;
    }

    .search-button {
        width: 60px;
        height: 60px;
        border-radius: 50%;
    }


    /* --- Footer (Mobil) --- */
    .footer-features {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column; /* Kolonları alt alta dizer */
        align-items: center;   /* Logo ve link kolonlarını yatayda ortalar */
        text-align: center;    /* Kolonların içindeki metinleri ortalar */
        gap: 30px;
    }

    .footer-logo {
        align-self: center;
    }
}

.hidden {
    display: none !important;
}

.tooltip-trigger {
    position: relative;
    cursor: help;
    display: inline-block; /* Bu satır eklendi */
    line-height: 1; /* Dikey hizalamayı garantiler */
}
/* Tooltip'in ana kutusu */
.tooltip-trigger::after {
    content: attr(data-tooltip); /* HTML'deki data-tooltip içeriğini alır */
    position: absolute;
    bottom: 130%; /* İkonun üzerinde konumlanır */
    left: 50%;
    transform: translateX(-50%);

    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 13px;
    white-space: nowrap; /* Metnin alt satıra kaymasını engeller */

    /* Başlangıçta gizli */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Tooltip'in ok işareti */
.tooltip-trigger::before {
    content: '';
    position: absolute;
    bottom: 100%; /* Kutunun hemen altında konumlanır */
    left: 50%;
    transform: translateX(-50%);

    border: 6px solid transparent;
    border-top-color: #333; /* CSS ile üçgen oluşturma tekniği */

    /* Başlangıçta gizli */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Fare üzerine gelince tooltip'i göster */
.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before {
    visibility: visible;
    opacity: 1;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
}


/* ========================================= */
/* MODAL STİLLERİ                            */
/* ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}
.modal-body p {
    margin-bottom: 20px;
    color: #666;
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}
.setting-row:last-of-type {
    border-bottom: none;
}
.modal-footer {
    margin-top: 20px;
}

/* Toggle Switch Stilleri */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 28px;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
input:checked + .slider {
    background-color: #007bff;
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* İlan Kartı - Konumlandırma için */
.ilan-kart {
    position: relative; /* Durum etiketinin konumlanacağı referans noktası */
}

/* İlan Durum Etiketi Stilleri */
.ilan-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 2;
}

.status-yayinda {
    background-color: #28a745; /* Yeşil */
}

.status-kaldirildi {
    background-color: #dc3545; /* Kırmızı */
}

.status-onayda {
    background-color: #ffc107; /* Turuncu */
}

/* ========================================= */
/* BİLDİRİM ROZETİ (BADGE) STİLLERİ          */
/* ========================================= */

/* Header'daki ikon için sarmalayıcı */
.notification-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header'daki kırmızı bildirim rozeti */
.notification-badge {
    position: absolute;
    top: 0; /* Rozetin üstünü, sarmalayıcının üstüne hizala */
    right: 0; /* Rozetin sağını, sarmalayıcının sağına hizala */

    /* Bu transform, rozeti kendi boyutunun yarısı kadar yukarı ve sağa kaydırarak tam köşeye oturtur */
    transform: translate(50%, -30%);

    background-color: #dc3545;
    color: white;
    width: 20px; /* Boyutu daha dengeli hale getirelim */
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white; /* Beyaz kenarlığı daha belirgin yapalım */
}

/* Kenar çubuğundaki bildirim rozeti */
.sidebar-badge {
    background-color: #dc3545; /* Arkaplan kırmızı yapıldı */
    color: white; /* Yazı rengi beyaz yapıldı */
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    display: flex; /* İçeriği ortalamak için */
    justify-content: center; /* Yatayda ortala */
    align-items: center; /* Dikeyde ortala */
    font-size: 12px;
    font-weight: bold;
}


/* Kenar çubuğu linklerini düzenleme */
.mesaj-sidebar nav a {
    justify-content: space-between;
    align-items: center;
}

/* ========================================= */
/* KULLANICI DROPDOWN MENÜ STİLLERİ          */
/* ========================================= */
.user-dropdown {
    position: relative; /* Menünün konumlanacağı referans noktası */
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 20px;
    transition: background-color 0.2s;
}
.dropdown-toggle:hover {
    background-color: #f0f2f5;
}
.dropdown-toggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.dropdown-toggle i {
    font-size: 12px;
    color: #666;
}

.dropdown-menu {
    position: absolute;
    top: 120%; /* Butonun biraz altına */
    right: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    width: max-content; /* Genişliği içeriğe göre ayarla */
    z-index: 1001;
    overflow: hidden;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}
.dropdown-menu a:hover {
    background-color: #f0f2f5;
}


/* =========================================
   REKLAM ALANLARI STİLLERİ
   ========================================= */

.reklam-container-yatay {
    width: 100%;
    max-width: 1100px; /* Site içeriğiyle uyumlu genişlik */
    margin: 40px auto; /* Üstten ve alttan boşluk */
    text-align: center;
    padding: 10px;
    background-color: transparent;
}

.reklam-etiketi {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-align: center;
}

/* Google Onayı Gelene Kadar Göreceğin Yer Tutucu Tasarımı */
.reklam-placeholder {
    width: 100%;
    height: 120px; /* Yatay banner yüksekliği */
    background-color: #f0f2f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #777;
    font-family: sans-serif;
}

.reklam-placeholder i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ea4335; /* Google kırmızısı */
}

/* Mobilde reklamların taşmasını önlemek için */
@media (max-width: 768px) {
    .reklam-container-yatay {
        margin: 20px auto;
        padding: 0 15px;
    }

    .reklam-placeholder {
        height: 100px; /* Mobilde biraz daha küçük */
    }
}

/* =========================================
   DİKEY REKLAM ALANLARI VE WRAPPER DÜZELTMESİ
   ========================================= */

.site-main-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    /* Max-width'i kaldırdık veya çok arttırdık ki geniş ekranlarda reklamlar sığsın */
    max-width: 100%;
    padding-top: 20px;
    box-sizing: border-box;
}

/* Orta İçerik Alanı */
.page-content {
    flex: 1; /* Esnek genişlik */
    width: 100%;
    max-width: 1200px; /* İçeriğin aşırı yayılmasını önle */
    min-width: 0; /* KRİTİK: Flex item'ın içerik taşsa bile küçülmesine izin ver */
}

/* Yan Reklam Sütunları */
.side-ad-container {
    width: 160px;
    flex: 0 0 160px; /* Genişliği sabitle */
    position: sticky;
    top: 20px; /* Header yüksekliğine göre ayarla */
    height: fit-content;
    z-index: 90;
    margin-bottom: 20px;
}

/* --- KRİTİK DÜZELTME: İç Sayfaların Konteynerları --- */
/* İlan listesi gibi sayfaların içindeki .container, wrapper içindeyken %100 olmalı */
.site-main-wrapper .page-content .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important; /* Gerekirse iç padding verilebilir */
}

/* Dikey Reklam Görseli (Eksikse Ekle) */
.dikey-reklam-placeholder {
    width: 160px;
    height: 600px;
    background-color: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 14px;
    text-align: center;
}

.reklam-etiketi-dikey {
    font-size: 10px;
    color: #bbb;
    margin-bottom: 5px;
    text-align: center;
    display: block;
}

/* --- MOBİL UYUMLULUK --- */
/* Ekran daraldığında (Örn: Laptop) yan reklamları gizle */
@media (max-width: 1400px) {
    .side-ad-container {
        display: none !important;
    }

    .site-main-wrapper {
        display: block; /* Flex'i iptal et */
    }

    .page-content {
        max-width: 1200px;
        margin: 0 auto;
    }

    /* İç konteynerları eski haline döndür */
    .site-main-wrapper .page-content .container {
        width: 1100px !important; /* Orijinal container genişliğin neyse */
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 15px !important;
    }
}

/* =========================================
   ANASAYFA ÖZEL AYARLARI (REKLAMSIZ)
   ========================================= */

/* Anasayfa modunda içerik tam genişlik olmalı */
.page-content.homepage-mode {
    max-width: 100% !important;
    width: 100% !important;
    flex: none;
}

/* Anasayfada wrapper boşluklarını ve padding'i sıfırla */
.page-content.homepage-mode .site-main-wrapper {
    gap: 0;
    padding-top: 0 !important; /* Üstteki boşluğu kaldırır */
    margin-top: 0 !important;
}

/* Anasayfa Wrapper Ayarı */
.site-main-wrapper.homepage-wrapper {
    display: block !important; /* Flex yapısını iptal et, normal akışa dön */
    padding-top: 0 !important; /* Üstteki boşluğu kaldır */
    width: 100% !important;
    max-width: 100% !important;
    gap: 0 !important;
}

/* Anasayfada içerik alanını zorla tam genişlik yap */
.site-main-wrapper.homepage-wrapper .page-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-main-wrapper.homepage-wrapper .page-content .container {
    width: 90% !important;        /* Kenarlardan %5 boşluk bırak */
    max-width: 1200px !important; /* Maksimum genişliği sınırla */
    margin: 0 auto !important;    /* Ortala */
    padding: 0 !important;
}

/* =========================================
   SAYFA YÜKLENİYOR (LOADER) STİLLERİ
   ========================================= */

/* Loader Ana Kapsayıcı (Tüm Ekranı Kaplar) */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Arkaplan rengi (beyaz) */
    z-index: 9999; /* En üstte durması için */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

/* Loader Gizlendiğinde */
.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Dönme Animasyonu (Spinner) */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Gri halka */
    border-top: 5px solid #007bff; /* Mavi dönen kısım */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* "Yükleniyor..." Yazısı */
.loader-text {
    color: #555;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Dönme Efekti Keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
   404 HATA SAYFASI STİLLERİ
   ========================================= */

.error-page-container {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-icon-wrapper i {
    font-size: 80px;
    color: #dc3545; /* Kırmızı uyarı rengi */
    margin-bottom: 20px;
    opacity: 0.8;
}

.error-code {
    font-size: 72px;
    font-weight: 800;
    color: #333;
    margin: 0;
    line-height: 1;
}

.error-title {
    font-size: 24px;
    font-weight: 600;
    color: #555;
    margin: 10px 0 20px 0;
}

.error-text {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-home:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}