/* Son Haberler Bileşeni — stiller (inc/latest-news/latest-news.php tarafından yüklenir) */
/* MASAÜSTÜ VE GENEL STİLLER (AYNEN KORUNDU) */
.latest-news-component {
    padding-bottom: 50px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    margin-bottom: 30px;
}

.lnc-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e74c3c;
    position: relative;
}

.lnc-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.lnc-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    border: 0px solid #e9ecef;
    color: #495057;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 4px; /* Hafif ovalleştirme eklendi */
}

.lnc-filter-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lnc-filter-btn.lnc-filter-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.lnc-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.95);
    padding: 15px 25px;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    border-radius: 30px;
}

.lnc-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #e74c3c;
    border-radius: 50%;
    animation: lnc-spin 1s linear infinite;
}

@keyframes lnc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lnc-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.lnc-left-column, .lnc-right-column {
    flex: 1;
}

.lnc-left-column,
.lnc-left-news {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.lnc-left-news:empty {
    display: none;
}

/* X gönderileri: iki sütunlu ızgara, sütunu doldurur; tweet kartının kendisi dışında ek çerçeve yok */
.lnc-x-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    align-items: start;
}
/* x-posts.js etkinleştirir: 8px'lik satır birimleri + kart başına hesaplanan span = boşluksuz masonry */
.lnc-x-block.is-masonry {
    grid-auto-rows: 8px;
    row-gap: 0;
}
.lnc-x-block.is-masonry > * {
    margin-bottom: 16px;
}
.lnc-x-block .lnc-x-head {
    grid-column: 1 / -1;
}
.lnc-x-block .lnc-big-post.lnc-x-post {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    min-width: 0;
}
.lnc-x-block .lnc-big-post.lnc-x-post:hover {
    transform: none;
    box-shadow: none;
}
.lnc-x-block .lnc-big-post.lnc-x-post .ynp-x-embed,
.lnc-x-block .lnc-big-post.lnc-x-post .twitter-tweet {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
@media (max-width: 640px) {
    .lnc-x-block {
        grid-template-columns: 1fr;
    }
}
/* Yüklenirken ve X engellendiğinde görünen yer tutucu: tweet kartına benzer iskelet */
.lnc-x-block .lnc-big-post.lnc-x-post blockquote.twitter-tweet {
    box-sizing: border-box;
    min-height: 140px;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid #cfd9de;
    border-radius: 12px;
    background: #fff;
    color: #0f1419;
    font-size: 14px;
    line-height: 1.5;
}
.lnc-x-block .lnc-big-post.lnc-x-post blockquote.twitter-tweet p {
    margin: 0 0 8px;
}
.lnc-x-block .lnc-big-post.lnc-x-post blockquote.twitter-tweet a {
    color: #1d9bf0;
    font-style: normal;
    text-decoration: none;
}
.lnc-x-block .lnc-x-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f1419;
}
.lnc-x-block .lnc-x-head svg {
    width: 20px;
    height: 20px;
    fill: #0f1419;
    display: block;
}
.lnc-x-block .lnc-x-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    flex: 1;
}
.lnc-x-block .lnc-x-head a {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #0f1419;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}
.lnc-x-block .lnc-x-head a:hover {
    background: #272c30;
    color: #fff;
}
body.newsx-dark-mode .lnc-x-block .lnc-x-head,
body.dark-mode .lnc-x-block .lnc-x-head {
    border-bottom-color: #eff3f4;
}
body.newsx-dark-mode .lnc-x-block .lnc-x-head svg,
body.dark-mode .lnc-x-block .lnc-x-head svg {
    fill: #eff3f4;
}
body.newsx-dark-mode .lnc-x-block .lnc-x-head a,
body.dark-mode .lnc-x-block .lnc-x-head a {
    background: #eff3f4;
    color: #0f1419;
}

.lnc-big-post {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lnc-big-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.lnc-big-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.lnc-big-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lnc-big-image:hover img {
    transform: scale(1.05);
}

.lnc-big-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,1.0));
    padding: 30px 20px 20px;
    color: white;
}

.lnc-big-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.lnc-big-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lnc-big-title a:hover {
    color: #ff6b6b;
}

.lnc-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 40px;
}

.lnc-big-content {
    padding: 20px;
}

.lnc-big-excerpt {
    color: #000;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
    font-family: Oxygen, sans-serif;
}

.lnc-big-meta {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-wrap: wrap;
}

.lnc-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 3px;
}

.lnc-right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
}

.lnc-small-post {
    display: flex;
    gap: 12px;
    padding: 0px;
    background: #fff;
    border: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.lnc-small-post:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.lnc-small-image {
    width: 200px;
    height: 130px;
    flex-shrink: 0;
    overflow: hidden;
}

.lnc-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lnc-small-image:hover img {
    transform: scale(1.1);
}

.lnc-small-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.lnc-small-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
}

.lnc-small-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.lnc-small-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lnc-small-title a:hover {
    color: #e74c3c;
}

.lnc-small-meta {
    color: #999;
    font-size: 11px;
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.lnc-small-category {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white !important;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 3px;
}

.lnc-small-excerpt {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-top: auto;
    font-family: Oxygen, sans-serif;
}

/* -----------------------------------------------------------
   MOBİL GELİŞTİRMELER (İSTEKLERİNİZ BURADA UYGULANDI) 
   ----------------------------------------------------------- */

@media (max-width: 1024px) {
    .lnc-grid { gap: 25px; }
    .lnc-big-image { height: 250px; }
    .lnc-small-image { width: 80px; height: 80px; }
    .lnc-filter-btn { padding: 6px 12px; font-size: 13px; }
}

@media (max-width: 768px) {
    .lnc-grid {
        flex-direction: column;
        gap: 30px;
    }
    
    /* İstek 3: Kategori filtrelerini ekrana sığdır ve kaydırılabilir yap */
    .lnc-category-filters {
        gap: 0px !important;
        display: flex !important; /* Eskiden none idi, şimdi açtık */
        flex-wrap: nowrap !important; /* Alt satıra geçmeyi engelle */
        overflow-x: auto; /* Yatay kaydırma */
        justify-content: flex-start !important; /* Sola yasla ki kaydırılsın */
        padding-bottom: 10px; /* Kaydırma çubuğu için boşluk */
        width: 100%;
        -webkit-overflow-scrolling: touch; /* iOS yumuşak kaydırma */
        scrollbar-width: none; /* Firefox scrollbar gizle */
    }
    
    .lnc-category-filters::-webkit-scrollbar {
        display: none; /* Chrome/Safari scrollbar gizle */
    }

    .lnc-filter-btn {
        flex: 0 0 auto; /* Butonların sıkışmasını engelle */
        white-space: nowrap; /* Metni tek satırda tut */
        padding: 8px 15px;
        font-size: 12px;
        margin-right: 5px;
    }
    
    .lnc-filter-text {
        display: block !important; /* Metinleri her zaman göster */
    }
    
    .lnc-big-image { height: 220px; }
    .lnc-small-image { width: 100px; height: 100px; }
}

@media (max-width: 480px) {
    .lnc-small-post {
        flex-direction: column;
        /* text-align: center; BURAYI KALDIRIYORUZ/EZİYORUZ */
        text-align: left !important; /* İçeriği sola hizala */
    }
    
    .lnc-small-image {
        width: 100%;
        height: 160px;
        align-self: center;
    }
    
    .lnc-big-content { padding: 15px; }
    .lnc-big-title { font-size: 16px; }
    .lnc-big-overlay { padding: 20px 15px 15px; }
    
    /* İstek 1 ve 2: Mobilde excerpt uzunluğu ve hizalama */
    .lnc-big-excerpt, 
    .lnc-small-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Sadece 2 satır göster (Kısaltma işlemi) */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left !important; /* Her zaman sola hizalı */
        font-size: 13px; /* Biraz daha kompakt */
        line-height: 1.4;
        max-height: 38px; /* Taşmaları önlemek için güvenlik */
        margin-top: 5px;
    }

    /* Başlıkların da hizalanması */
    .lnc-small-title {
        text-align: left !important;
    }
    
    /* Meta bilgilerin hizalanması */
    .lnc-small-meta {
        justify-content: flex-start; /* Sola yasla */
    }
}

/* DARK MODE (AYNEN KORUNDU) */
body.newsx-dark-mode .latest-news-component,
body.dark-mode .latest-news-component,
.newsx-dark-mode .latest-news-component {
    background: #222222;
    color: #e0e0e0;
}

body.newsx-dark-mode .lnc-filter-btn,
body.dark-mode .lnc-filter-btn,
.newsx-dark-mode .lnc-filter-btn {
    background: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.newsx-dark-mode .lnc-filter-btn:hover,
body.dark-mode .lnc-filter-btn:hover,
.newsx-dark-mode .lnc-filter-btn:hover {
    background: #444;
    border-color: #555;
}

body.newsx-dark-mode .lnc-filter-btn.lnc-filter-active,
body.dark-mode .lnc-filter-btn.lnc-filter-active,
.newsx-dark-mode .lnc-filter-btn.lnc-filter-active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-color: #ff6b6b;
}

body.newsx-dark-mode .lnc-loading,
body.dark-mode .lnc-loading,
.newsx-dark-mode .lnc-loading {
    background: rgba(34,34,34,0.95);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

body.newsx-dark-mode .lnc-loading-spinner,
body.dark-mode .lnc-loading-spinner,
.newsx-dark-mode .lnc-loading-spinner {
    border-color: #444;
    border-top-color: #ff6b6b;
}

body.newsx-dark-mode .lnc-big-post,
body.dark-mode .lnc-big-post,
.newsx-dark-mode .lnc-big-post {
    background: #2a2a2a;
    border-color: #333;
}

body.newsx-dark-mode .lnc-big-post:hover,
body.dark-mode .lnc-big-post:hover,
.newsx-dark-mode .lnc-big-post:hover {
    background: #333;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

body.newsx-dark-mode .lnc-small-post,
body.dark-mode .lnc-small-post,
.newsx-dark-mode .lnc-small-post {
    background: #2a2a2a;
    border-color: #333;
}

body.newsx-dark-mode .lnc-small-post:hover,
body.dark-mode .lnc-small-post:hover,
.newsx-dark-mode .lnc-small-post:hover {
    background: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body.newsx-dark-mode .lnc-big-title a,
body.dark-mode .lnc-big-title a,
.newsx-dark-mode .lnc-big-title a {
    color: white;
}

body.newsx-dark-mode .lnc-big-title a:hover,
body.dark-mode .lnc-big-title a:hover,
.newsx-dark-mode .lnc-big-title a:hover {
    color: #ff6b6b;
}

body.newsx-dark-mode .lnc-small-title a,
body.dark-mode .lnc-small-title a,
.newsx-dark-mode .lnc-small-title a {
    color: #f0f0f0;
}

body.newsx-dark-mode .lnc-small-title a:hover,
body.dark-mode .lnc-small-title a:hover,
.newsx-dark-mode .lnc-small-title a:hover {
    color: #ff6b6b;
}

body.newsx-dark-mode .lnc-big-excerpt,
body.dark-mode .lnc-big-excerpt,
.newsx-dark-mode .lnc-big-excerpt,
body.newsx-dark-mode .lnc-small-excerpt,
body.dark-mode .lnc-small-excerpt,
.newsx-dark-mode .lnc-small-excerpt {
    color: #fff;
}

body.newsx-dark-mode .lnc-big-meta,
body.dark-mode .lnc-big-meta,
.newsx-dark-mode .lnc-big-meta,
body.newsx-dark-mode .lnc-small-meta,
body.dark-mode .lnc-small-meta,
.newsx-dark-mode .lnc-small-meta {
    color: #888;
}

body.newsx-dark-mode .lnc-header,
body.dark-mode .lnc-header,
.newsx-dark-mode .lnc-header {
    border-bottom-color: #ff6b6b;
}

body.newsx-dark-mode .lnc-no-image,
body.dark-mode .lnc-no-image,
.newsx-dark-mode .lnc-no-image {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: #888;
}

body.newsx-dark-mode .lnc-small-no-image,
body.dark-mode .lnc-small-no-image,
.newsx-dark-mode .lnc-small-no-image {
    background: linear-gradient(135deg, #444 0%, #666 100%);
}

/* X gönderileri — site koyu modunda yer tutucu blockquote */
body.newsx-dark-mode .lnc-x-block .lnc-big-post.lnc-x-post blockquote.twitter-tweet,
body.dark-mode .lnc-x-block .lnc-big-post.lnc-x-post blockquote.twitter-tweet {
    background: #15202b;
    border-color: #38444d;
    color: #e7e9ea;
}
