/* /assets/css/content-page.css (V22.0 - FULL FIX) */

/* Sayfa Üst Boşluğu */
.page-wrapper {
    padding-top: 30px;
    padding-bottom: 60px;
}

/* --- 1. SAYFA GRID --- */
.page-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    align-items: flex-start;
    width: 100%; max-width: 1440px; margin: 0 auto;
}

/* --- 2. SIDEBAR --- */
.sidebar {
    display: flex; flex-direction: column; gap: 30px; 
    position: sticky; top: 100px; z-index: 80;
    width: 100%; min-width: 0; box-sizing: border-box;
}

/* Başlık Renk Düzeltmesi */
.widget-group h3, .sidebar .widget-title, .sidebar .module-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--text-main) !important; /* Renk Zorlama */
    border-bottom: 2px solid var(--circuit-color);
    padding-bottom: 10px; margin-bottom: 15px; padding-left: 5px; 
    font-weight: 700; width: 100%; box-sizing: border-box;
}

/* Sidebar Linkleri */
.widget-group ul li a {
    display: block; padding: 12px 15px; margin-bottom: 10px;
    background: var(--surface-color); border-radius: 10px;
    text-decoration: none; 
    color: var(--text-sub) !important; /* Link Rengi */
    font-weight: 500; transition: 0.2s;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    border: 1px solid transparent;
}
.widget-group ul li a:hover {
    color: var(--circuit-color) !important;
    transform: translateX(5px);
}

/* --- 3. MAKALE & VIDEO KARTLARI --- */
.article-list-stacked, .video-list-stacked { display: flex; flex-direction: column; gap: 25px; }

.article-block-stacked, .video-card-stacked {
    background: var(--surface-color);
    border-radius: 20px; padding: 25px !important;
    display: flex; gap: 25px; text-decoration: none;
    transition: transform 0.3s; position: relative; z-index: 1;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    border: 1px solid transparent;
}
.article-block-stacked:hover, .video-card-stacked:hover {
    transform: translateY(-5px); border-color: var(--circuit-color);
}

.article-image-stacked, .video-card-thumbnail {
    width: 240px; height: 160px; flex-shrink: 0;
    border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.1);
}
.article-image-stacked img, .video-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.article-block-stacked:hover img, .video-card-stacked:hover img { transform: scale(1.1); }

/* İçerik Metinleri (RENK DÜZELTMESİ) */
.article-content-stacked, .video-card-content {
    display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0;
}
.article-title-stacked, .video-card-title {
    font-family: 'Orbitron', sans-serif; font-size: 1.3rem;
    color: var(--text-main) !important; /* Başlık Rengi */
    margin-top: 0; margin-bottom: 10px; line-height: 1.3;
}
.article-block-stacked:hover .article-title-stacked { color: var(--circuit-color) !important; }

.article-meta-stacked {
    color: var(--text-sub) !important; /* Meta Gri */
    font-size: 0.9rem; display: flex; gap: 15px; margin-top: 10px;
}
.article-meta-stacked i { color: var(--circuit-color); margin-right: 5px; }

/* --- 4. DETAY SAYFASI --- */
.content-body {
    background: var(--surface-color); padding: 40px !important; border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    margin-bottom: 40px; border: 1px solid transparent;
    color: var(--text-desc); /* Genel Metin Rengi */
}
.content-title {
    font-family: 'Orbitron', sans-serif; font-size: 2rem; 
    color: var(--text-main) !important; /* H1 Rengi */
    margin-bottom: 20px; line-height: 1.3;
}
.article-content { 
    font-size: 1.1rem; line-height: 1.8; 
    color: var(--text-desc) !important; /* Paragraf Rengi */
}
.article-content p { margin-bottom: 1.5rem; }
.article-content img {
    border-radius: 15px; margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); max-width: 100%;
}
/* ===================================================================
   SMART CONTRAST PATCH (AKILLI KONTRAST YAMASI) - V16.0
   Amaç: Gündüz modunda;
   1. Beyaz zemin üzerindeki yazıları LACİVERT yap.
   2. Koyu zemin (Banner, Buton) üzerindeki yazıları BEYAZ koru.
   =================================================================== */

/* --- GRUP 1: BEYAZ KORUMA TİMİ (Bunlar KESİN BEYAZ kalmalı) --- */
/* Gündüz modunda olsa bile arka planı koyu olan alanlar */

body:not(.theme-dark) .welcome-banner h1,
body:not(.theme-dark) .welcome-banner p,
body:not(.theme-dark) .welcome-banner strong,
body:not(.theme-dark) .btn-primary,
body:not(.theme-dark) .caption-btn,
body:not(.theme-dark) .news-label,
body:not(.theme-dark) .badge-count,
body:not(.theme-dark) .media-text,
body:not(.theme-dark) .mini-thumb {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* --- GRUP 2: LACİVERT TİMİ (Bunlar KESİN LACİVERT olmalı) --- */
/* Arka planı beyaz olan kartların başlıkları */

body:not(.theme-dark) .live-card h3,
body:not(.theme-dark) .live-card h4,
body:not(.theme-dark) .module-widget-wrapper .widget-title,
body:not(.theme-dark) .sidebar .widget-title,
body:not(.theme-dark) .content-title,
body:not(.theme-dark) .card-title,
body:not(.theme-dark) .article-title-stacked,
body:not(.theme-dark) .tender-title-stacked,
body:not(.theme-dark) .panel-username {
    color: #000080 !important; /* Lacivert */
    text-shadow: none !important; /* Gündüz neon parlamasını kapat */
}

/* --- GRUP 3: OKUNABİLİRLİK TİMİ (Açıklama Metinleri) --- */
/* Beyaz zeminde kaybolan gri/beyaz detay yazıları */

body:not(.theme-dark) .live-card p,
body:not(.theme-dark) .article-content,
body:not(.theme-dark) .article-content p,
body:not(.theme-dark) .article-meta-stacked,
body:not(.theme-dark) .tender-meta-grid,
body:not(.theme-dark) .widget-item span,
body:not(.theme-dark) .menu-link {
    color: #445566 !important; /* Koyu Gri (Okunur) */
}

/* Hover durumunda İkon ve Linkler (Canlılık kalsın) */
body:not(.theme-dark) a:hover,
body:not(.theme-dark) .widget-item:hover span,
body:not(.theme-dark) .menu-link:hover {
    color: var(--circuit-color) !important; /* Mavi */
}

/* --- GRUP 4: WIDGET İÇİ DÜZELTMELER --- */
/* Widget scroller içindeki linkler beyaz kalmış olabilir */
body:not(.theme-dark) .widget-scroller .widget-item {
    color: #445566 !important;
}
body:not(.theme-dark) .widget-scroller .widget-item i {
    color: var(--circuit-color) !important; /* İkonlar mavi kalsın */
}
/* ===================================================================
   WIDGET HEIGHT LIMITER (SAYFA UZAMA KORUMASI)
   Tüm widget kutularını standart bir yüksekliğe sabitler.
   =================================================================== */

/* 1. Sidebar ve Grid İçindeki Widgetlar İçin Yükseklik Sınırı */
.module-widget-wrapper,
.sidebar .module-widget-wrapper,
.live-card {
    /* 5-6 Öğe sığacak standart yükseklik */
    height: 380px !important; 
    max-height: 380px !important;
    min-height: 380px !important;
    
    /* İçerik taşarsa gizle (Animasyon içeride döner) */
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

/* 2. İçerik Alanının Esnekliği */
.module-widget,
.card-content-layer {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* 3. Scroller Yüksekliği */
.widget-scroller-wrapper {
    height: 100% !important;
    position: relative;
}

/* 4. Kullanıcı Kartı (User Widget) İstisnası */
/* Sağ paneldeki kullanıcı kartı bozulmasın diye serbest bırakıyoruz */
.user-widget {
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
}

/* 5. İhale Listesi (List View) İçin Sınır */
/* Ana sayfadaki uzun listeleri de kontrol altına alıyoruz */
.tender-list-view-enhanced {
    max-height: 800px; /* Çok uzarsa scroll çıksın */
    overflow-y: auto;
    padding-right: 5px; /* Scroll çubuğu için boşluk */
}
/* Scroll çubuğunu güzelleştir */
.tender-list-view-enhanced::-webkit-scrollbar { width: 5px; }
.tender-list-view-enhanced::-webkit-scrollbar-thumb { background: var(--circuit-color); border-radius: 10px; }
/* --- 5. RESPONSIVE --- */
@media (max-width: 1024px) {
    .page-grid { grid-template-columns: 1fr; padding: 0 20px; }
    .sidebar { display: none; }
    .article-block-stacked { flex-direction: column; }
    .article-image-stacked { width: 100%; height: 200px; }
}