/* static/css/footer.css */
/* Cross-browser: Chrome 90+, Firefox 90+, Safari 15+, Edge 90+, iOS 15+ */

/* NOTE: html, body, main global kuralları base_core.css'e taşındı.
 * Burada tekrar tanımlamak cascade çakışmalarına yol açıyordu.
 * base_core.css: html/body background, flex layout, scrollbar
 * base_core.css: main background, flex: 1, z-index
 */

/* --- Genel Footer Yapısı (YÜKSEKLİK AZALTILDI) --- */
.site-footer {
    background-color: #0f172a;
    background-image: none;
    color: #94a3b8;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    margin-top: 0 !important; /* Olası boşlukları sıfırla */
    position: relative;
    z-index: 10;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* ... Dosyanın geri kalanı (Linkler, Marka vb.) aynen kalacak ... */

/* --- Marka Alanı --- */
.footer-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.footer-brand-logo {
    width: min(100%, 140px);
    height: auto;
    max-width: 100%;
    flex: 0 0 auto;
    background-color: transparent;
}

.footer-brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}
.footer-brand-title span {
    color: #f59e0b;
}

.footer-tagline {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 1rem;
    display: block;
    text-decoration: none;
}
.footer-tagline:hover {
    color: #cbd5e1;
}

@media (max-width: 576px) {
    .footer-brand-logo {
        width: min(100%, 136px);
    }
}

/* --- İletişim Bilgileri --- */
.footer-contact-item {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.35rem;
    color: #cbd5e1;
    font-size: 0.85rem;
}
/* İkon ile metin optik olarak aynı hizada değildi. Kutular zaten ortalıydı;
   kayma glifin içindeydi: Bootstrap Icons ::before'a vertical-align: -.125em
   uyguluyor ve ikon 1rem, satır 0.85rem olduğu için bu kayma her satırda
   farklı düşüyordu. İkon sabit kare kutuya alınıp glifi kendi içinde
   ortalanıyor — kutu artık satır yüksekliği kadar değil, tam 1em. */
.footer-contact-item i {
    color: #f59e0b;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    line-height: 1;
}

.footer-contact-item i::before {
    vertical-align: 0;
    line-height: 1;
}

/* E-posta satırında metin doğrudan bir <a>. Global dokunma hedefi kuralı
   (a, button, … { min-height: 44px }) bu blok seviyeli bağlantıyı 44px'e
   çıkarıyor, metin kutunun tepesinde kalıyor ve satırı ortalayan flex ikonu
   ~11px aşağıya düşürüyordu. Telefon satırlarında metin <span> içinde, <a>
   satır içi olduğu için kural işlemiyor — fark buradan geliyordu.
   44px hedefi WCAG gereği korunur; yalnız bağlantı kendi metnini ortalar. */
.footer-contact-item > a {
    display: inline-flex;
    align-items: center;
}

/* --- Başlıklar --- */
.footer-heading {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
    position: relative;
    display: inline-block;
}

/* --- Linkler (Sıkılaştırılmış) --- */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-nav li {
    margin-bottom: 0.35rem;
}
.footer-nav a {
    color: #94a3b8;
    text-decoration: none;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}
.footer-nav a:hover {
    color: #f59e0b;
    -webkit-transform: translateX(4px);
    transform: translateX(4px);
}
.footer-nav a::before {
    content: "›";
    margin-right: 6px;
    font-weight: bold;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.footer-nav a:hover::before {
    opacity: 1;
    color: #f59e0b;
}

.footer-ai-icon {
    font-size: 0.875rem;
}

.footer-kvkk-badge {
    font-size: 0.6875rem;
}

.footer-cookie-settings-link {
    cursor: pointer;
}

/* --- Vurgulu Mavi Link (Yardım Merkezi) --- */
.footer-nav a.highlight-link {
    color: #3b82f6 !important;
    font-weight: 600;
}
.footer-nav a.highlight-link:hover {
    color: #60a5fa !important;
}
.footer-nav a.highlight-link::before {
    color: #3b82f6;
    opacity: 1;
}

/* --- 360 Bilgi Kartı --- */
.footer-knowledge-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    gap: 15px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 1.25rem;
    -webkit-tap-highlight-color: transparent;
}
.footer-knowledge-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.knowledge-icon-box {
    background: rgba(59, 130, 246, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1.2rem;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.footer-knowledge-card:hover .knowledge-icon-box {
    background: #3b82f6;
    color: #fff;
}
.knowledge-content h6 {
    color: #fff;
    margin: 0 0 4px 0;
    font-weight: 600;
}
.knowledge-content p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* --- Sosyal Medya --- */
.social-links {
    display: flex;
    gap: 10px;
}
.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    color: #cbd5e1;
    text-decoration: none;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    -webkit-tap-highlight-color: transparent;
}
.social-btn:hover {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
    -webkit-transform: rotate(15deg);
    transform: rotate(15deg);
}
.social-btn:active {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
}
/* Disable hover rotate on touch */
@media (hover: none) and (pointer: coarse) {
    .social-btn:hover {
        -webkit-transform: none;
        transform: none;
    }
}

/* --- Alt Bant --- */
.footer-bottom {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}
.footer-legal-links {
    display: -webkit-flex;
    display: flex;
    gap: 1.5rem;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center;
}
.footer-legal-links a,
.footer-legal-links button {
    color: #64748b;
    text-decoration: none;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.footer-legal-links button {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.footer-legal-links a:hover,
.footer-legal-links button:hover {
    color: #cbd5e1;
}

@media (min-width: 768px) {
    .footer-bottom {
        -webkit-flex-direction: row;
        flex-direction: row;
        -webkit-justify-content: space-between;
        justify-content: space-between;
    }
}

/* --- 5-Column Mobile Stacking --- */
@media (max-width: 575.98px) {
    .footer-legal-links {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
    .footer-legal-links a,
    .footer-legal-links button {
        padding: 4px 0;
    }
}

/* --- Disable hover transforms on touch --- */
@media (hover: none) and (pointer: coarse) {
    .footer-nav a:hover {
        -webkit-transform: none;
        transform: none;
    }
    .footer-knowledge-card:hover {
        -webkit-transform: none;
        transform: none;
        box-shadow: none;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .footer-nav a,
    .social-btn,
    .footer-knowledge-card,
    .footer-legal-links a,
    .footer-legal-links button {
        -webkit-transition: none !important;
        transition: none !important;
    }
}

/* --- Payment Methods Strip (Bilgi sütununun altında, sosyal ikon hizası) --- */
.footer-col-info {
    display: flex;
    flex-direction: column;
}

.footer-payments {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto; /* sütunun en altına it = sosyal ikon hizası */
    padding-top: 10px;
}

.footer-payments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-payments-list li {
    margin: 0;
    line-height: 0;
}

.footer-payments-list img {
    height: 24px;
    width: auto;
    display: block;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.footer-payments-list img:hover {
    transform: translateY(-1px);
}

@media (max-width: 991px) {
    .footer-payments {
        justify-content: flex-start;
        margin-top: 16px;
    }
    .footer-payments-list {
        justify-content: flex-start;
    }
}

/* --- Print --- */
@media print {
    .site-footer {
        background: #fff !important;
        color: #000 !important;
    }
    .social-links,
    .footer-knowledge-card,
    .footer-payments {
        display: none !important;
    }
    .footer-nav a,
    .footer-legal-links a,
    .footer-legal-links button {
        color: #000 !important;
    }
}

/* --- Native mobile footer layout and touch targets --- */
@media (max-width: 991px) and (any-pointer: coarse), (max-width: 991px) and (hover: none) {
    .footer-brand-link {
        display: inline-flex !important;
        align-items: center;
        min-height: 44px;
        min-width: 0 !important;
        width: fit-content;
        max-width: 100%;
        padding: 4px 0;
    }

    /* Mobilde marka bloğunun süs kısmı gizlenir: logo, tanıtım cümlesi ve
       sosyal medya ikonları. İki telefon ve e-posta KALIR — destek numarasını
       gizlemek footer'ı kısaltmaktan çok daha pahalıya patlar. (Adres aşağıda
       .footer-contact-address ile ayrıca gizleniyor.)
       Logo kuralı yukarıda !important taşıdığı için burada da gerekiyor.
       Masaüstünde hiçbiri etkilenmez; bu blok yalnız dokunmatik ≤991px. */
    .site-footer .footer-brand-link,
    .site-footer .footer-tagline,
    .site-footer .social-links {
        display: none !important;
    }

    .site-footer .row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .site-footer [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 14px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .site-footer [class*="col-"]:first-child {
        border-bottom: 2px solid rgba(255, 255, 255, 0.15) !important;
        padding-bottom: 20px !important;
        margin-bottom: 6px !important;
    }

    .site-footer [class*="col-"]:last-child {
        border-bottom: none !important;
    }

    /* "Çözümler" bölümü mobilde gizlenir. İçindeki 4 link, "Platform"daki 4
       linkle aynı sayfalara gidiyor (maps/dashboard, tenders, suppliers,
       consultants/list) — yani tam kopya, gizlemek hiçbir sayfaya erişimi
       kapatmıyor. Linkler HTML'de kaldığı için tarayıcılar da görmeye devam
       eder. Masaüstünde bölüm aynen durur; bu kural yalnız bu mobil blokta. */
    .footer-col-solutions {
        display: none;
    }

    /* --- Mobil footer sadeleştirme ---
       Mobilde footer bir site haritası değil; gezinme üst çubuk ve alt menüde
       (Gündem / Mesajlar / Menü) zaten karşılanıyor. Aşağıdakiler yalnızca bu
       dokunmatik ≤991px bloğunda gizlenir, HTML'den silinmez: masaüstünde ve
       tarayıcı/arama motoru tarafında hepsi aynen durur.

       "Bilgi" sütunu: Bilgi Merkezi ve Kentsel Dönüşüm Rehberi ikinci seviye
       içerik; Lila AI zaten uygulama içinden erişiliyor. Sütunla birlikte
       içindeki ödeme logoları ve "Gizlilik ve güvenlik odaklı" rozeti de
       gider — ikisi de dekoratif, ödeme logoları abonelik ekranında duruyor. */
    .footer-col-info {
        display: none !important;
    }

    /* Adres mobilde aksiyonu olmayan bir satır. İki telefon ve e-posta KALIR. */
    .footer-contact-address {
        display: none !important;
    }

    /* "Makale Arama" Yardım Merkezi'nin içinde zaten var. */
    .footer-nav-secondary {
        display: none !important;
    }

    /* Platform sütunu SADECE giriş yapmış kullanıcıda gizlenir. Ziyaretçi için
       bu 5 link ürünün keşif yolu (site-footer--app sınıfı _footer.html'de
       yalnız user.is_authenticated iken basılır). */
    .site-footer--app .footer-col-platform {
        display: none !important;
    }

    /* Son görünür sütun "Destek"; :last-child kuralı gizli sütuna denk geldiği
       için ayırıcı çizgi orada kalıyordu. */
    .site-footer .row > [class*="col-"]:nth-last-child(2) {
        border-bottom: none !important;
    }

    /* Footer'ın alt menü rezervini (96px) kapatan negatif margin
       mobile_enhancements.css'e taşındı: rezervi veren body padding'i ile aynı
       dosyada durur. base.html'i extend etmeyen sayfalarda (ana sayfa vb.)
       padding yoktur; burada kalsaydı footer body'yi 96px taşırıp iç içe
       scroll üretiyordu. */


    .footer-heading {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        margin-bottom: 10px !important;
        color: #ffffff !important;
    }

    .footer-nav {
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .footer-nav li {
        margin-bottom: 0 !important;
    }

    /* Mobilde metin kademesi: başlık 1.15rem → link ve iletişim satırı
       0.95rem → telif 0.85rem. Linkler eskiden 1.05rem'di (gövde metninden
       büyük, footer ikincil içerik); iletişim satırları ise masaüstü
       değerinde (0.85rem) unutulmuş, hemen altındaki linklerden %24 küçük
       görünüyordu. İkisi de yasal linklerle aynı 0.95rem'e alındı. */
    .footer-nav li a {
        display: block !important;
        padding: 12px 0 !important;
        font-size: 0.95rem !important;
        color: rgba(255, 255, 255, 0.75) !important;
        text-decoration: none !important;
    }

    /* Satış / Destek telefonları ve e-posta: linklerle aynı boy, dokunma
       hedefi 44px (satır 20px'ti). margin sıfırlandı, aralığı padding verir.
       !important şart: anasayfa_motion.html ve kurumsal.css masaüstü için
       ".site-footer .footer-contact-item{font-size:12.8px}" yazıyor, medya
       sorgusu yok; bloğun diğer kuralları da aynı sebeple !important. */
    .footer-contact-item {
        font-size: 0.95rem !important;
        padding: 12px 0;
        margin-bottom: 0;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        padding-top: 20px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

    /* Yasal linkler tek sütunda, her biri tam genişlik hap olarak diziliyordu:
       7 satır, 416px — footer'ın en büyük parçası. Sarmalı satıra alınınca
       ~160px'e iniyor ve tek bir link bile gizlenmiyor.
       Hap zemini/yuvarlaklığı kaldırıldı; buton gibi görünüyorlardı ama link.
       Yerine linkin evrensel işareti olan alt çizgi kullanılıyor.
       Dokunma hedefi min-height ile 44px'te tutuluyor. */
    .footer-legal-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 2px 18px !important;
        justify-content: center !important;
        margin-top: 16px !important;
    }

    .footer-legal-links a,
    .footer-legal-links button {
        align-items: center;
        background: transparent !important;
        border-radius: 0 !important;
        display: inline-flex !important;
        font-size: 0.95rem !important;
        min-height: 44px;
        padding: 0 !important;
        text-decoration: underline;
        text-underline-offset: 3px;
        width: auto !important;
        /* Bu satır #64748b ile 3,5:1 kontrasttaydı (AA eşiği 4,5). Aynı dosyada
           zaten kullanılan açık tona geçildi — yeni renk tanımlanmadı. */
        color: #94a3b8 !important;
    }
}
