/* ═══════════════════════════════════════════════════════════════════
   KK Haber Cards — kk-haber-cards.css  v2.1
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Değişkenleri ───────────────────────────────────────────── */
.kkw {
    --kk-accent: #C8102E;
    --kk-text:   #111;
    --kk-muted:  #888;
    --kk-light:  #f5f3ef;
    --kk-border: #e4ddd3;
    --kk-white:  #fff;
    --kk-font:   'Poppins', sans-serif;
    font-family: var(--kk-font);
    -webkit-font-smoothing: antialiased;
}

/* ── Ortak Header ───────────────────────────────────────────────── */
.kkw-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.kkw-header-sol {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.kkw-logo-badge {
    height: 30px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    background: var(--kk-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.kkw-line {
    flex: 1;
    height: 1px;
    background: var(--kk-border);
}
.kkw-arrows {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.kkw-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--kk-border);
    background: var(--kk-white);
    cursor: pointer;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s, border-color .18s;
    user-select: none;
    padding: 0;
    line-height: 1;
}
.kkw-btn:hover {
    background: var(--kk-accent);
    border-color: var(--kk-accent);
    color: #fff;
}
.kkw-btn.kkw-dim {
    opacity: .3;
    pointer-events: none;
}
.kkw-all-link {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kk-accent);
    text-decoration: none;
    white-space: nowrap;
    padding-left: 10px;
    border-left: 2px solid var(--kk-accent);
    flex-shrink: 0;
}
.kkw-all-link:hover { opacity: .7; }

/* ── Ortak Track ────────────────────────────────────────────────── */
.kkw-track-wrap { overflow: hidden; }
.kkw-track {
    display: flex;
    gap: 16px;
    transition: transform .42s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* ── Ortak Görsel ───────────────────────────────────────────────── */
.kkw-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.kkw-img-placeholder {
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--kk-accent) 12%, #f0ece4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kkw-img-placeholder span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--kk-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
}
.kkw-excerpt {
    font-size: 13px;
    color: var(--kk-muted);
    line-height: 1.5;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   ORTAK KART STİLİ — Carousel S1 + Liste Card Grid paylaşır
   ═══════════════════════════════════════════════════════════════════ */
.kkw-s1-card {
    background: var(--kk-white);
    border: 1px solid var(--kk-border);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    transition: transform .22s, box-shadow .22s;
    overflow: hidden;
    flex-shrink: 0;
}
.kkw-s1-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0;
    background: var(--kk-accent);
    transition: height .2s;
    z-index: 3;
}
.kkw-s1-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,.09); }
.kkw-s1-card:hover::after { height: 3px; }
.kkw-s1-card:hover .kkw-img { transform: scale(1.07); }
.kkw-s1-card:hover .kkw-title { color: var(--kk-accent); }

/* Görsel kutusu — aspect-ratio ile tam orantılı göster, asla kesmez */
.kkw-img-wrap {
    position: relative;
    background: var(--kk-light);
    flex-shrink: 0;
    overflow: hidden;
    /* Varsayılan: 16/9 oranı — inline style ile override edilebilir */
    aspect-ratio: 16 / 9;
    width: 100%;
}
/* Eğer PHP'den sabit px height verilmişse aspect-ratio'yu sıfırla */
.kkw-img-wrap[style*="height"] {
    aspect-ratio: unset;
}

.kkw-cat-badge {
    position: absolute;
    bottom: 0; left: 0;
    background: var(--kk-accent);
    color: #fff;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    padding: 4px 10px;
    z-index: 2;
}

.kkw-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.kkw-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.kkw-source {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #aaa;
}
.kkw-time {
    font-size: 9.5px;
    color: #bbb;
}
.kkw-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kk-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    transition: color .18s;
}
.kkw-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0ece4;
}
.kkw-readtime { font-size: 10px; color: #ccc; }
.kkw-more {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--kk-accent);
    display: flex;
    align-items: center;
    gap: 5px;
}
.kkw-arrow-box {
    width: 16px;
    height: 16px;
    background: var(--kk-accent);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════
   STYLE 1 — SADE KART CAROUSEL
   ═══════════════════════════════════════════════════════════════════ */
.kkw-s1 { padding: 24px 0; border-top: 1px solid var(--kk-border); }
.kkw-s1:first-child { border-top: none; }

/* ═══════════════════════════════════════════════════════════════════
   STYLE 2 — YATAY KART
   ═══════════════════════════════════════════════════════════════════ */
.kkw-s2 { padding: 24px 0; border-top: 1px solid var(--kk-border); }
.kkw-s2-track { gap: 24px; }

.kkw-s2-badge {
    background: transparent;
    color: var(--kk-accent);
    border-left: 3px solid var(--kk-accent);
    padding-left: 12px;
    font-size: 12px;
}
.kkw-s2-card {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
    background: var(--kk-white);
    border: 1px solid var(--kk-border);
    overflow: hidden;
    transition: box-shadow .22s;
}
.kkw-s2-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.kkw-s2-card:hover .kkw-img { transform: scale(1.05); }
.kkw-s2-card:hover .kkw-s2-title { color: var(--kk-accent); }

.kkw-s2-img-wrap {
    width: 200px;
    min-width: 200px;
    /* aspect-ratio yerine sabit genişlik + height:auto — yatay kartta yükseklik kart içeriğine göre esner */
    overflow: hidden;
    flex-shrink: 0;
    background: var(--kk-light);
    align-self: stretch;
}
.kkw-s2-img-wrap .kkw-img {
    height: 100%;
    min-height: 150px;
}
.kkw-s2-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.kkw-s2-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kk-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s;
}
.kkw-s2-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0ece4;
    flex-wrap: wrap;
}
.kkw-s2-cat-pill {
    background: var(--kk-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: 3px 10px;
}
.kkw-s2-time { font-size: 11px; color: #bbb; margin-left: auto; }

/* ═══════════════════════════════════════════════════════════════════
   STYLE 3 — OVERLAY / SPOR
   ═══════════════════════════════════════════════════════════════════ */
.kkw-s3 { padding: 24px 0; border-top: 1px solid var(--kk-border); }
.kkw-s3-track { gap: 14px; }

.kkw-s3-badge { font-size: 12px; background: var(--kk-accent); }
.kkw-s3-btn {
    background: color-mix(in srgb, var(--kk-accent) 8%, #fff);
    border-color: var(--kk-accent);
    color: var(--kk-accent);
}
.kkw-s3-card {
    display: block;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    background: #111;
    /* aspect-ratio ile tam orantılı — sabit px verilmişse override */
    aspect-ratio: 4 / 3;
}
.kkw-s3-card[style*="height"] { aspect-ratio: unset; }

.kkw-s3-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease, opacity .35s;
}
.kkw-s3-card:hover .kkw-s3-img { transform: scale(1.08); opacity: .85; }
.kkw-s3-no-img {
    width: 100%; height: 100%;
    background: color-mix(in srgb, var(--kk-accent) 20%, #111);
}
.kkw-s3-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: padding .25s;
}
.kkw-s3-card:hover .kkw-s3-overlay { padding-bottom: 22px; }
.kkw-s3-cat {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255,255,255,.8);
    display: block;
}
.kkw-s3-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kkw-s3-meta {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: rgba(255,255,255,.65);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   LİSTE WİDGETI
   ═══════════════════════════════════════════════════════════════════ */
.kkw-list { padding: 24px 0; }
.kkw-list-count {
    font-size: 10px;
    color: #bbb;
    letter-spacing: .06em;
    flex-shrink: 0;
}

/* ── Kart Grid ──────────────────────────────────────────────────── */
.kkw-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PHP'den inline override edilir */
    gap: 16px;
    align-items: start;
}
/* Liste card item: kkw-s1-card stilini miras alır, sadece flex-shrink gerekmiyor */
.kkw-list-card-item {
    flex-shrink: unset;
}
/* Liste kartta görsel: aspect-ratio 16/9 — tam görünür, kesilmez */
.kkw-list-card-item .kkw-img-wrap {
    aspect-ratio: 16 / 9;
    height: auto !important; /* PHP'den gelen sabit height'ı geçersiz kıl, orantı korunsun */
    width: 100%;
}

/* ── Satır Listesi (modern / compact / minimal) ─────────────────── */
.kkw-list-rows { display: flex; flex-direction: column; }

/* Modern/compact çok sütunlu grid layout */
.kkw-list-rows-modern,
.kkw-list-rows-compact {
    display: grid;
    grid-template-columns: repeat(var(--kkl-cols, 1), 1fr);
    gap: 0;
}
.kkw-list-rows-modern  .kkw-list-row,
.kkw-list-rows-compact .kkw-list-row {
    border-right: 1px solid var(--kk-border);
}
.kkw-list-rows-modern  .kkw-list-row:nth-child(var(--kkl-cols, 1)n),
.kkw-list-rows-compact .kkw-list-row:nth-child(var(--kkl-cols, 1)n) {
    border-right: none;
}

.kkw-list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--kk-border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background .15s, padding-left .15s, padding-right .15s;
    position: relative;
}
.kkw-list-row:first-child { border-top: 1px solid var(--kk-border); }
.kkw-list-row:hover {
    background: var(--kk-light);
    padding-left: 8px;
    padding-right: 8px;
    margin: 0 -8px;
}

/* Modern: büyük görsel — aspect-ratio ile orantılı */
.kkw-list-rows-modern .kkw-list-img-wrap {
    width: 140px;
    min-width: 140px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--kk-light);
}
/* Compact: küçük görsel */
.kkw-list-rows-compact .kkw-list-img-wrap {
    width: 80px;
    min-width: 80px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--kk-light);
}
.kkw-list-img-wrap .kkw-img { height: 100%; }

.kkw-list-row-body { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kkw-list-row-top  { display: flex; align-items: center; gap: 8px; }
.kkw-list-cat {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--kk-white);
    background: var(--kk-accent);
    padding: 2px 8px;
    flex-shrink: 0;
}
.kkw-list-num {
    font-size: 22px;
    font-weight: 900;
    color: color-mix(in srgb, var(--kk-accent) 15%, #e0dbd4);
    line-height: 1;
    flex-shrink: 0;
    min-width: 36px;
}
.kkw-list-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kk-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.kkw-list-row:hover .kkw-list-title { color: var(--kk-accent); }
.kkw-list-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: var(--kk-muted);
}
.kkw-list-row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.kkw-list-author { font-size: 11px; color: #999; }
.kkw-list-dot    { color: #ccc; font-size: 10px; }
.kkw-list-chevron {
    font-size: 20px;
    color: #ccc;
    flex-shrink: 0;
    transition: color .15s, transform .15s;
}
.kkw-list-row:hover .kkw-list-chevron { color: var(--kk-accent); transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════════════════
   MOBİL
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .kkw-s1-card { flex: 0 0 calc(50% - 8px) !important; }
    .kkw-s3-card { flex: 0 0 calc(50% - 8px) !important; }
    .kkw-s2-card { flex: 0 0 calc(90%) !important; }
    .kkw-list-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kkw-list-rows-modern,
    .kkw-list-rows-compact { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
    .kkw-s1-card { flex: 0 0 100% !important; }
    .kkw-s3-card { flex: 0 0 100% !important; }
    .kkw-s2-card { flex: 0 0 100% !important; }
    .kkw-s2-img-wrap { width: 110px; min-width: 110px; }
    .kkw-s2-body  { padding: 14px; }
    .kkw-s2-title { font-size: 14px; }
    .kkw-list-grid { grid-template-columns: 1fr !important; }
    .kkw-logo-badge { font-size: 10px; padding: 0 10px; }
}

/* ═══════════════════════════════════════════════════════════════════
   SAYFALAMA
   ═══════════════════════════════════════════════════════════════════ */
.kkw-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

/* Numaralı */
.kkw-pag-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.kkw-pag-item a,
.kkw-pag-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--kk-border, #e4ddd3);
    background: #fff;
    color: #555;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s;
}
.kkw-pag-item a:hover {
    background: var(--kk-accent);
    border-color: var(--kk-accent);
    color: #fff;
}
.kkw-pag-active span,
.kkw-pag-item .current {
    background: var(--kk-accent) !important;
    border-color: var(--kk-accent) !important;
    color: #fff !important;
    pointer-events: none;
}
.kkw-pag-item .dots {
    border: none;
    background: transparent;
    color: #aaa;
}

/* Önceki / Sonraki */
.kkw-pag-prevnext {
    display: flex;
    align-items: center;
    gap: 16px;
}
.kkw-pag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid var(--kk-accent);
    background: #fff;
    color: var(--kk-accent);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.kkw-pag-btn:hover {
    background: var(--kk-accent);
    color: #fff;
}
.kkw-pag-info {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #999;
}
