/* --- TEMEL AYARLAR VE ERİŞİLEBİLİRLİK --- */
:root {
    --finike-orange: #E65C00;
    --finike-dark: #212529;
    --finike-light: #F8F9FA;
    --focus-color: #0d6efd;
}

html {
    font-size: 16px;
    /* KRİTİK ÇÖZÜM 1: Dikey scrollbar'ı her zaman göster. Sayfa genişliğini sabitler, sağa sola titremeyi bitirir. */
    overflow-y: scroll;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--finike-dark);
    background-color: #FDFDFD;
    /* KRİTİK ÇÖZÜM 2: Yatay taşmaları engelle ve eski margin kalıntısını (60px) sıfırla */
    overflow-x: hidden;
    margin-bottom: 0 !important;
}

/* Klavye Odak (Focus) Çerçeveleri */
*:focus-visible, a:focus, button:focus, input:focus, select:focus {
    outline: 3px solid var(--finike-orange) !important;
    outline-offset: 2px !important;
    z-index: 10;
}

/* Ana İçeriğe Atla */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--finike-dark);
    color: white;
    padding: 8px;
    z-index: 9999;
    transition: top 0.2s;
}

    .skip-link:focus {
        top: 0;
    }

/* --- YAPI TAŞLARI (Header, Nav) --- */
.top-bar {
    background-color: var(--finike-light);
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.main-header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-link {
    font-weight: 500;
    color: var(--finike-dark) !important;
    padding: 1rem 1.2rem !important;
    transition: color 0.3s;
}

    .nav-link:hover, .nav-link.active {
        color: var(--finike-orange) !important;
    }

/* --- EFEKTLER VE YARDIMCI SINIFLAR --- */
.hover-lift {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

    .hover-lift:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
    }

.hover-orange:hover {
    color: var(--finike-orange) !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- SLIDER (KRİTİK ÇÖZÜM 3: Kesin ve kilitli yükseklik) --- */
.carousel-inner {
    height: 65vh;
    min-height: 400px;
    background-color: var(--finike-dark);
    overflow: hidden;
}

.carousel-item {
    height: 100%;
    width: 100%;
}

    .carousel-item img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

/* WCAG 2.5.8 — Carousel gösterge noktalarını minimum 24×24px dokunma hedefine büyüt */
.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    border: none;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}
.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

/* --- KAYAN YAZI (TICKER) KESİN ÇÖZÜM --- */
.ticker-wrap {
    width: 100%;
    height: 24px; /* Kutu yüksekliğini beton gibi sabitliyoruz */
    position: relative;
    overflow: hidden;
    display: block; /* Flex'i tamamen devreden çıkardık */
}

.ticker-text {
    position: absolute; /* Belge akışından tamamen kopardık! Diğer kutuları itemez. */
    top: 0;
    left: 100%; /* Ekranın sağından başlat */
    white-space: nowrap;
    animation: ticker-anim 25s linear infinite;
    transform: translateZ(0); /* Ekran kartı (GPU) hızlandırması */
    will-change: transform;
}

    .ticker-text:hover {
        animation-play-state: paused;
    }

/* Yüzdelik hesaplamalarla titremeyi sıfırlayan animasyon */
@keyframes ticker-anim {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
        left: 0;
    }
}

/* 1. Mouse tıklamalarında focus çerçevesini gizle, klavye Tab'ında göster (WCAG 2.4.7 / 2.4.11) */
.navbar-premium a:focus:not(:focus-visible),
.navbar-premium button:focus:not(:focus-visible),
.navbar-premium select:focus:not(:focus-visible),
.btn-header-action:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* 2. Dropdown Menüsünün Kendisindeki Çerçeveyi Kaldır */
#mainNavbar .dropdown-menu {
    border: none;
}

/* Mouse tıklamalarında focus çerçevesini gizle (klavye Tab'ında korur) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
.quick-access-card:focus:not(:focus-visible),
.news-thumbnail-rect:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Klavye (Tab tuşu) kullanıldığında focus çerçevesini her zaman göster */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 3px solid #fd7e14 !important;
    outline-offset: 2px;
}

/* =========================================================
   🚀 HABERLER İÇİN YENİ TEMİZ MOBİL TASARIM (Önceki Çakışan Kodlar Silindi)
   ========================================================= */

/* Masaüstü (Büyük Ekran) Varsayılan Durum */
.desktop-news-section {
    display: block;
}

.mobile-news-section {
    display: none;
}

/* Mobil Ekran (991px ve Altı) */
@media (max-width: 991px) {

    /* Eski masaüstü slider yapısını gizle, yeni mobil listeyi göster */
    .desktop-news-section {
        display: none !important;
    }

    .mobile-news-section {
        display: block !important;
    }

    /* YENİ MOBİL HABER LİSTESİ TASARIMI */
    .mobile-news-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .mobile-news-item {
        display: flex;
        align-items: center;
        background-color: #ffffff;
        border: 1px solid #f0f0f0;
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03);
        transition: transform 0.2s ease;
    }

        .mobile-news-item:active {
            transform: scale(0.98); /* Tıklama efekti */
        }

    .mobile-news-img {
        width: 90px;
        height: 90px;
        min-width: 90px; /* Resmin ezilmesini engeller */
        object-fit: cover;
        border-radius: 8px;
    }

    .mobile-news-content {
        padding-left: 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mobile-news-date {
        font-size: 0.7rem;
        font-weight: 700;
        color: #856404;
        background-color: #fff3cd;
        padding: 3px 8px;
        border-radius: 6px;
        align-self: flex-start;
        margin-bottom: 6px;
    }

    .mobile-news-title {
        font-size: 0.95rem;
        font-weight: 700;
        color: #212529;
        line-height: 1.3;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
