/* =====================================================================
   CIBOR — Blog / Nieuws: список (архів) — шапка й контейнер
   ---------------------------------------------------------------------
   Розмітку дає плагін cibor-blog-importer (templates/archive.php,
   assets/blog.css). Там контейнер вузький (1280px, 20px відступи), а
   шапка прозора і накладається на текст. Тут — той самий вигляд, що на
   сторінці Referenties (css/references-custom.css): синя шапка
   60/80/50, контейнер 260/80/50, h1 56px з жовтим "D" зліва, вступ у
   правій колонці. Картки — в стилі референцій (4:3, жовта риска).
   Підключається на is_home() та архіві news (functions.php), після
   blog.css плагіна. Кольори бренду: --blue #065AA7, --geel #EDCC19.
   ===================================================================== */

/* ── Шапка: синя, як на .page ───────────────────────────────────────── */
.blog .header-top,
.post-type-archive-news .header-top {
    background-color: var(--blue) !important;
    padding: 60px 80px 50px 80px;
}
.blog .header-top.header-croll-down,
.blog .header-top.header-croll-up,
.post-type-archive-news .header-top.header-croll-down,
.post-type-archive-news .header-top.header-croll-up {
    background-color: transparent !important;
}

/* ── Контейнер: на всю ширину з відступами, як article на Referenties ── */
.blog .cibor-blog-wrap,
.post-type-archive-news .cibor-blog-wrap {
    max-width: none;
    margin: 0;
    padding: 260px 80px 50px 80px;
}

/* ── Заголовок + вступ у дві колонки ────────────────────────────────── */
.cibor-blog-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 80px;
    align-items: start;
    margin: 0 0 60px;
}
.cibor-blog-head h1 {
    position: relative;
    isolation: isolate;
    margin: 0;
    font-size: 56px;
    line-height: 1.3;
    font-weight: 700;
    color: #000000;
    text-wrap: balance;
}
/* жовте "D" зліва від заголовка (той самий svg, що на Referenties) */
.cibor-blog-head h1::before {
    content: "";
    position: absolute;
    left: -115px;
    top: -10px;
    z-index: -1;
    width: 140px;
    height: 90px;
    background: url(/wp-content/themes/blankslate/img/icon-left-tittle.svg) center / contain no-repeat;
}
/* плагін домальовує жовту риску під h1 — тут вона не потрібна */
.cibor-blog-head h1::after { display: none; }
.cibor-blog-intro {
    margin: 0;
    padding-top: 6px;
    font-size: 16px;
    line-height: 26px;
    color: #000000;
}

/* ── Сітка карток: 3 колонки, як референції ─────────────────────────── */
.blog .cibor-blog-grid,
.post-type-archive-news .cibor-blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* ── Картка ─────────────────────────────────────────────────────────── */
.cibor-card {
    border-radius: 2px;
    border: 1px solid #d9dde3;
    background: #ffffff;
    box-shadow: none;
    transition: transform .3s cubic-bezier(.16, .84, .44, 1), box-shadow .3s ease, border-color .3s ease;
}
.cibor-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .12);
}
.cibor-card__media {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 3;
    background-color: #2a2a2a;
}
.cibor-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 50%);
    transition: background .3s ease;
}
.cibor-card:hover .cibor-card__media::after {
    background: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .05) 60%);
}
.cibor-card__body {
    gap: 12px;
    padding: 22px 22px 24px;
}
/* дата — синій бейдж, як на картках референцій */
.cibor-card__date {
    align-self: flex-start;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 3px;
    background: var(--blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.cibor-card__title {
    padding-left: 16px;
    border-left: 4px solid var(--geel);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    color: #000000;
    transition: color .25s ease;
}
.cibor-card:hover .cibor-card__title { color: var(--blue); }
.cibor-card__excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
}
.cibor-card__more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--blue);
}

/* ── Пагінація: пігулки ─────────────────────────────────────────────── */
.cibor-blog-pagination { margin-top: 48px; gap: 10px; }
.cibor-blog-pagination .page-numbers {
    min-width: 44px;
    height: 44px;
    border-radius: 40px;
    border: 1px solid #d9dde3;
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.cibor-blog-pagination .page-numbers.current,
.cibor-blog-pagination a.page-numbers:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

/* ── Адаптив (ті самі точки, що в references-custom.css) ────────────── */
@media (max-width: 1100px) {
    .blog .header-top,
    .post-type-archive-news .header-top {
        padding: 30px 30px 30px 30px;
    }
    .blog .cibor-blog-wrap,
    .post-type-archive-news .cibor-blog-wrap {
        padding: 180px 30px 50px 30px;
    }
    .cibor-blog-head {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 44px;
    }
    .cibor-blog-head h1 { font-size: 40px; }
    .cibor-blog-head h1::before {
        width: 54px;
        height: 68px;
        left: -70px;
        top: 0;
    }
    .cibor-blog-intro { padding-top: 0; }
}
@media (max-width: 900px) {
    .blog .cibor-blog-grid,
    .post-type-archive-news .cibor-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .blog .cibor-blog-wrap,
    .post-type-archive-news .cibor-blog-wrap {
        padding: 160px 30px 50px 30px;
    }
    .cibor-blog-head h1 { font-size: clamp(1.8rem, 0.6vw + 3.4vw, 6.3rem); }
    .cibor-blog-head h1::before {
        width: 64px;
        height: 58px;
        left: -50px;
    }
}
@media (max-width: 600px) {
    .blog .cibor-blog-grid,
    .post-type-archive-news .cibor-blog-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .cibor-card { transition: none; }
}
