/* =====================================================================
   Ana sayfa haber kartları (2026-10-12, KULLANICI İSTEĞİ: "haber
   kartlarını daha profesyonel yap"). index.php → .section3 içinde.
   Görsel (news.image_url) varsa üstte; yoksa marka renklerinde kapak.
   Başlık 2 satır, özet 3 satır kısaltılır; RTL (Arapça) destekli.
   ===================================================================== */
.kg-news-grid {
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.kg-news-grid.kg-news-n1 { max-width: 460px; grid-template-columns: 1fr; }
.kg-news-grid.kg-news-n2 { max-width: 860px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.kg-news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: linear-gradient(180deg, #171a21 0%, #12141a 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    font-family: 'Poppins', 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.kg-news-card:hover,
.kg-news-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(227, 6, 19, 0.55);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(227, 6, 19, 0.25);
    outline: none;
}

/* ---- kapak */
.kg-news-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b0d11;
}
.kg-news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}
.kg-news-card:hover .kg-news-media img { transform: scale(1.06); }
.kg-news-media::after {   /* alttan hafif karartma: etiket okunur kalsın */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.kg-news-cover {   /* görsel yoksa */
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(227, 6, 19, 0.38) 0%, rgba(227, 6, 19, 0) 55%),
        radial-gradient(120% 90% at 100% 100%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, #1b1f27 0%, #0d0f13 100%);
}
.kg-news-cover img {
    width: 34%;
    max-width: 120px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
    transition: transform .6s ease;
}
.kg-news-card:hover .kg-news-cover img { transform: scale(1.08); }
.kg-news-tag {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(227, 6, 19, 0.92);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(227, 6, 19, 0.35);
}

/* ---- metin */
.kg-news-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
    gap: 10px;
}
.kg-news-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #9aa3b2;
    font-size: 12.5px;
    font-weight: 500;
}
.kg-news-date i { color: #e30613; font-size: 12px; }
.kg-news-title {
    margin: 0;
    color: #fff;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.kg-news-excerpt {
    margin: 0;
    color: #b7bdc8;
    font-size: 14.5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.kg-news-more {
    margin-top: auto;
    padding-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff4d57;
    font-size: 14px;
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.kg-news-more i { transition: transform .25s ease; }
.kg-news-card:hover .kg-news-more i { transform: translateX(4px); }
[dir="rtl"] .kg-news-card { font-family: 'Segoe UI', Tahoma, 'Noto Naskh Arabic', system-ui, sans-serif; }
[dir="rtl"] .kg-news-more i { transform: scaleX(-1); }
[dir="rtl"] .kg-news-card:hover .kg-news-more i { transform: scaleX(-1) translateX(4px); }

/* ---- duyarlı */
@media (max-width: 1024px) {
    .kg-news-grid,
    .kg-news-grid.kg-news-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
    .kg-news-grid.kg-news-n1 { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 680px) {
    .kg-news-grid,
    .kg-news-grid.kg-news-n2 { grid-template-columns: 1fr; max-width: 480px; gap: 20px; padding: 0 16px; }
    .kg-news-title { font-size: 17.5px; }
    .kg-news-body { padding: 16px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .kg-news-card, .kg-news-media img, .kg-news-cover img, .kg-news-more i { transition: none; }
    .kg-news-card:hover { transform: none; }
}
