/* =========================================================
   ANASAYFA – BLOG  (anasayfa-blog.php ile eşleşir) — önek: kb
   Beyaz / açık zemin, cyan sol yüzlü kartlar, neon çizgiler,
   mimari ızgara, pusula ve küpler. Video galerinin altına
   yuvarlak kenarla biner.
   ========================================================= */
.kb {
    --kb-ink: #0b2a4a;
    --kb-text: #3b4d5e;
    --kb-mute: #667b8c;
    --kb-line: rgba(11, 42, 74, .14);
    --kb-neon: #00d9ff;
    --kb-cyan: #25c3fd;
    --kb-ice: #7ae7ff;
    --kb-blue: #0a7fe0;
    --kb-ease: cubic-bezier(.16, 1, .3, 1);
    position: relative;
    z-index: 4;
    margin-top: -36px;
    padding-block: clamp(84px, 9vw, 140px) clamp(96px, 10vw, 150px);   /* alttaki footer biner */
    border-radius: 36px 36px 0 0;
    overflow: hidden;
    color: var(--kb-ink);
    font-family: 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(45% 30% at 92% 6%, rgba(0, 190, 255, .10), transparent 70%),
        radial-gradient(40% 30% at 4% 96%, rgba(0, 190, 255, .08), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f3f8fc 100%);
    box-shadow: 0 -26px 50px -30px rgba(0, 0, 0, .5);
}
.kb *, .kb *::before, .kb *::after { box-sizing: border-box; }
.kb h2, .kb h3, .kb p, .kb ul { margin: 0; padding: 0; }

.kb::after { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 2px; z-index: 4; background: linear-gradient(90deg, rgba(0, 217, 255, 0), var(--kb-neon) 50%, rgba(0, 217, 255, 0)); filter: drop-shadow(0 0 6px rgba(0, 217, 255, .85)); }
.kb::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image: linear-gradient(rgba(11, 42, 74, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 42, 74, .055) 1px, transparent 1px);
    background-size: 96px 96px;
    animation: kbGrid 50s linear infinite;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
}
@keyframes kbGrid { to { background-position: 96px 96px, 96px 96px; } }

.kb-wrap { position: relative; z-index: 2; width: min(1240px, 100% - clamp(40px, 8vw, 120px)); margin-inline: auto; }

/* ---------- ARKA PLAN HAREKETİ ---------- */
.kb-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.kb-bg > * { position: absolute; }
.kb-beam { left: -30%; width: 160%; top: var(--t); height: 1px; background: var(--kb-line); transform: rotate(-14deg); opacity: .7; }
.kb-beam::after { content: ""; position: absolute; top: 0; height: 100%; width: 22%; background: linear-gradient(90deg, transparent, var(--kb-neon), transparent); filter: drop-shadow(0 0 6px var(--kb-neon)); animation: kbBeam 9s linear infinite; animation-delay: var(--dl); }
@keyframes kbBeam { from { left: -25%; } to { left: 110%; } }
.kb-compass { right: -8%; top: 8%; width: clamp(280px, 30vw, 460px); color: var(--kb-ink); opacity: .08; animation: kbSpin 120s linear infinite; }
@keyframes kbSpin { to { transform: rotate(360deg); } }
.kb-cube { width: var(--s); left: var(--x); top: var(--y); color: #1a8fe0; opacity: .3; animation: kbCube 11s ease-in-out infinite alternate; animation-delay: var(--dl); }
@keyframes kbCube { from { transform: translateY(0) rotate(0); } to { transform: translateY(-28px) rotate(14deg); } }

/* ---------- BAŞLIK ---------- */
.kb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; margin-bottom: clamp(36px, 4vw, 56px); }
.kb-tag { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--kb-blue); }
.kb-tag::before { content: ""; width: 34px; height: 2px; background: var(--kb-cyan); box-shadow: 0 0 8px var(--kb-cyan); }
.kb-h { text-wrap: balance; max-width: 18ch; font-size: clamp(30px, 3.8vw, 54px); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; color: var(--kb-ink); }
.kb-lead { margin-top: 20px; max-width: 48ch; font-size: 17px; font-weight: 300; line-height: 1.7; color: var(--kb-text); }

.kb-btn { display: inline-flex; align-items: center; padding: 15px 28px 15px 22px; border-radius: 4px; border-left: 6px solid var(--kb-cyan); background: linear-gradient(90deg, #00cfff 0%, #0077c8 100%); box-shadow: 0 4px 16px rgba(0, 207, 255, .4); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .3s ease, box-shadow .3s ease; }
.kb-btn span::after { content: "→"; margin-left: 12px; display: inline-block; transition: transform .35s var(--kb-ease); }
.kb-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 207, 255, .6); }
.kb-btn:hover span::after { transform: translateX(5px); }
.kb-btn:focus-visible { outline: 2px solid var(--kb-blue); outline-offset: 3px; }

/* ---------- GİRİŞ ANİMASYONU ---------- */
.kb-js [data-kb] { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--kb-ease), transform .9s var(--kb-ease); transition-delay: var(--d, 0ms); }
.kb-js [data-kb].kb-in { opacity: 1; transform: none; }

/* ---------- YAZI KARTLARI ---------- */
.kb-grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 28px; }
.kb-card--big { grid-row: 1 / span 2; }

.kb-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1.5px solid rgba(11, 42, 74, .12); border-left: 6px solid var(--kb-cyan); border-radius: 6px;
    box-shadow: 0 22px 44px -28px rgba(11, 42, 74, .45);
    transition: transform .45s var(--kb-ease), box-shadow .45s var(--kb-ease);
}
.kb-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4; background: var(--kb-neon); box-shadow: 0 0 12px var(--kb-neon); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--kb-ease); }
.kb-card:hover { transform: translateY(-6px); box-shadow: 0 32px 56px -24px rgba(0, 150, 255, .5); }
.kb-card:hover::after { transform: scaleX(1); }
.kb-link { position: absolute; inset: 0; z-index: 5; }
.kb-link:focus-visible { outline: 2px solid var(--kb-blue); outline-offset: -4px; }

/* görsel */
.kb-img {
    position: relative; overflow: hidden; flex: none; aspect-ratio: 16 / 10;
    background:
        linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(135deg, #0c3b6e 0%, #0a5fb8 55%, #0a86d8 100%);      /* resim yoksa yedek zemin */
}
.kb-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--kb-ease), filter .5s ease; filter: saturate(.95); }
.kb-card:hover .kb-img img { transform: scale(1.07); filter: saturate(1.08); }
.kb-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 8, 14, 0) 55%, rgba(3, 8, 14, .45) 100%); pointer-events: none; }
.kb-brk { position: absolute; right: 14px; top: 14px; z-index: 3; width: 34px; height: 34px; border-top: 2px solid var(--kb-ice); border-right: 2px solid var(--kb-ice); opacity: 0; transform: translate(8px, -8px); transition: opacity .4s ease, transform .5s var(--kb-ease); }
.kb-card:hover .kb-brk { opacity: 1; transform: none; }

/* tarih rozeti */
.kb-date {
    position: absolute; left: 16px; top: 16px; z-index: 3; display: flex; flex-direction: column; align-items: center; line-height: 1;
    min-width: 62px; padding: 9px 12px 8px; border-radius: 4px; border-left: 4px solid var(--kb-cyan);
    background: rgba(255, 255, 255, .94); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45);
}
.kb-date b { font-size: 24px; font-weight: 300; color: var(--kb-ink); }
.kb-date i { margin-top: 4px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kb-blue); white-space: nowrap; }

/* metin */
.kb-body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 24px 26px 26px; }
.kb-cat { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--kb-blue); }
.kb-cat span { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--kb-mute); }
.kb-cat span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 12px; border-radius: 50%; background: var(--kb-cyan); vertical-align: middle; }
.kb-title { font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--kb-ink); text-wrap: balance; transition: color .3s ease; }
.kb-card:hover .kb-title { color: var(--kb-blue); }
.kb-ex { font-size: 15px; font-weight: 300; line-height: 1.7; color: var(--kb-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kb-more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--kb-blue); }
.kb-more::after { content: "→"; margin-left: 10px; display: inline-block; transition: transform .35s var(--kb-ease); }
.kb-card:hover .kb-more::after { transform: translateX(6px); }

/* büyük kart */
.kb-card--big .kb-img { flex: 1; min-height: 280px; aspect-ratio: auto; }
.kb-card--big .kb-body { flex: none; padding: 28px 30px 30px; }
.kb-card--big .kb-title { font-size: clamp(22px, 2.3vw, 31px); font-weight: 500; }
.kb-card--big .kb-ex { -webkit-line-clamp: 3; font-size: 16px; }

/* yan kartlar: görsel solda, metin sağda */
.kb-card:not(.kb-card--big) { flex-direction: row; }
.kb-card:not(.kb-card--big) .kb-img { flex: 0 0 42%; aspect-ratio: auto; min-height: 100%; }
.kb-card:not(.kb-card--big) .kb-body { padding: 22px 24px; gap: 10px; }
.kb-card:not(.kb-card--big) .kb-date { left: 12px; top: 12px; min-width: 54px; padding: 7px 9px 6px; }
.kb-card:not(.kb-card--big) .kb-date b { font-size: 20px; }
.kb-card:not(.kb-card--big) .kb-ex { -webkit-line-clamp: 2; font-size: 14.5px; }

/* ---------- TABLET ---------- */
@media (max-width: 1000px) {
    .kb-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 22px; }
    .kb-card--big { grid-row: auto; }
    .kb-card--big .kb-img { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}

/* ---------- MOBİL ---------- */
@media (max-width: 700px) {
    .kb { margin-top: -28px; border-radius: 28px 28px 0 0; }
    .kb-head { align-items: flex-start; }
    .kb-lead { font-size: 16px; }
    .kb-card:not(.kb-card--big) { flex-direction: column; }
    .kb-card:not(.kb-card--big) .kb-img { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
    .kb-body, .kb-card--big .kb-body { padding: 20px 20px 22px; }
    .kb-cube { display: none; }
}

/* ---------- HAREKET AZALTMA ---------- */
@media (prefers-reduced-motion: reduce) {
    .kb::before, .kb-beam::after, .kb-compass, .kb-cube { animation: none; }
    .kb [data-kb] { opacity: 1; transform: none; transition: none; }
    .kb-card, .kb-img img, .kb-card::after, .kb-brk, .kb-btn { transition: none; }
}