
/* ============================================================
   ARCHIVE — Magazine Layout
   archive.php — all category / tag / taxonomy archive pages
   Added: May 2026
============================================================ */

/* ── Archive outer wrap ──────────────────────────────────── */
.kcd-archive-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 0 3rem;
    background: #FAFAF7;
}

/* ── Archive header bar ──────────────────────────────────── */
.kcd-archive-header {
    background: var(--color-teal, #1C6B5A);
    color: #fff;
    padding: 16px 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.kcd-archive-header__inner {
    display: flex;
    flex-direction: column;
}
.kcd-archive-header__eyebrow {
    display: block;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .7;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    margin-bottom: 4px;
}
.kcd-archive-header__title {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
/* Fix 2: description below title with proper breathing room */
.kcd-archive-header__desc {
    font-size: 13px;
    opacity: .85;
    margin: 10px 0 0;
    line-height: 1.6;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    max-width: 680px;
}
/* Fix 3: Post Free CTA image below the header text */
.kcd-archive-header__cta {
    display: inline-block;
    margin-top: 14px;
    line-height: 0;
}
.kcd-archive-header__cta-img {
    height: 38px;
    width: auto;
    border-radius: 4px;
    display: block;
}

/* ── Shared: category tag pill ───────────────────────────── */
.kcd-tag {
    display: inline-block;
    background: var(--color-saffron, #E8651A);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 3px;
    margin-bottom: 8px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    line-height: 1.4;
}
.kcd-tag--sm {
    font-size: 9px;
    padding: 2px 7px;
    margin-bottom: 5px;
}

/* ── Shared: meta date & author ──────────────────────────── */
.kcd-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.kcd-meta__date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: #6b7280;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}
.kcd-meta__date svg { flex-shrink: 0; }
.kcd-meta__date--sm { font-size: 11px; }
.kcd-meta__author {
    font-size: 11.5px;
    color: #6b7280;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}

/* ── Shared: thumbnail placeholder ──────────────────────── */
.kcd-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #E6F3F3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}
.kcd-thumb-placeholder .dashicons {
    font-size: 28px;
    color: #1C6B5A;
    opacity: .5;
    width: 28px;
    height: 28px;
}

/* ── TIER 1: Hero zone ───────────────────────────────────── */
.kcd-hero-zone {
    display: grid;
    grid-template-columns: 1fr 220px;
    background: #fff;
    border-bottom: 3px solid var(--color-saffron, #E8651A);
}

/* Hero main — large featured post */
.kcd-hero-main {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0,0,0,.08);
}
/* Fix 6: image fills available width; height is auto so nothing gets cropped */
.kcd-hero-main__media {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
    background: #E6F3F3;
    max-height: 340px;
}
.kcd-hero-main__media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .3s ease;
}
.kcd-hero-main:hover .kcd-hero-main__media img {
    transform: scale(1.02);
}
.kcd-hero-main__media .kcd-thumb-placeholder {
    min-height: 220px;
}
.kcd-hero-main__body {
    padding: 18px 22px 20px;
    flex: 1;
}
.kcd-hero-main__title {
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
    color: #1a1a2e;
}
.kcd-hero-main__title a {
    color: inherit;
    text-decoration: none;
}
.kcd-hero-main__title a:hover { color: var(--color-teal, #1C6B5A); }
.kcd-hero-main__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    margin: 0 0 14px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}

/* Hero sidebar — 2 secondary posts stacked */
.kcd-hero-sidebar {
    display: flex;
    flex-direction: column;
}
.kcd-sidebar-story {
    flex: 1;
    padding: 14px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(0,0,0,.07);
    transition: background .15s;
}
.kcd-sidebar-story:last-child { border-bottom: none; }
.kcd-sidebar-story:hover { background: #FDF3E7; }
.kcd-sidebar-story__thumb {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 10px;
    aspect-ratio: 4 / 3;
    background: #E6F3F3;
    flex-shrink: 0;
}
.kcd-sidebar-story__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.kcd-sidebar-story:hover .kcd-sidebar-story__thumb img {
    transform: scale(1.03);
}
.kcd-sidebar-story__thumb .kcd-thumb-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
}
.kcd-sidebar-story__body { flex: 1; }
.kcd-sidebar-story__title {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    color: #1a1a2e;
}
.kcd-sidebar-story__title a {
    color: inherit;
    text-decoration: none;
}
.kcd-sidebar-story__title a:hover { color: var(--color-teal, #1C6B5A); }

/* ── Section bar divider ─────────────────────────────────── */
.kcd-section-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px 10px;
    background: #FAFAF7;
}
.kcd-section-bar--tight { padding-top: 20px; }
.kcd-section-bar__label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-teal, #1C6B5A);
    white-space: nowrap;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}
.kcd-section-bar__line {
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,.1);
}
.kcd-section-bar__count {
    font-size: 11px;
    color: #9ca3af;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}

/* ── TIER 2: Card grid (posts 4-6) ──────────────────────── */
.kcd-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(0,0,0,.07);
    margin: 0 0 1px;
}
.kcd-story-card {
    background: #fff;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    transition: background .15s;
}
.kcd-story-card:hover { background: #FDF3E7; }
.kcd-story-card__thumb {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    background: #E6F3F3;
    flex-shrink: 0;
}
.kcd-story-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.kcd-story-card:hover .kcd-story-card__thumb img {
    transform: scale(1.03);
}
.kcd-story-card__thumb .kcd-thumb-placeholder {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
}
.kcd-story-card__body { flex: 1; display: flex; flex-direction: column; }
.kcd-story-card__title {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    color: #1a1a2e;
}
.kcd-story-card__title a {
    color: inherit;
    text-decoration: none;
}
.kcd-story-card__title a:hover { color: var(--color-teal, #1C6B5A); }
.kcd-story-card__excerpt {
    font-size: 12px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 8px;
    flex: 1;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── TIER 3: List rows (posts 7+) ────────────────────────── */
.kcd-list-section {
    background: #fff;
    margin-top: 1px;
}
.kcd-list-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 24px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: background .15s;
    text-decoration: none;
}
.kcd-list-row:hover { background: #FDF3E7; }
.kcd-list-row__num {
    font-size: 22px;
    font-weight: 700;
    color: rgba(0,0,0,.12);
    min-width: 30px;
    line-height: 1.1;
    flex-shrink: 0;
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    padding-top: 2px;
}
.kcd-list-row__body { flex: 1; min-width: 0; }
.kcd-list-row__title {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 5px;
    color: #1a1a2e;
}
.kcd-list-row__title a {
    color: inherit;
    text-decoration: none;
}
.kcd-list-row__title a:hover { color: var(--color-teal, #1C6B5A); }
/* Fix 7: excerpt below title in list rows */
.kcd-list-row__excerpt {
    font-size: 12.5px;
    line-height: 1.55;
    color: #6b7280;
    margin: 0;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kcd-list-row__thumb {
    width: 72px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #E6F3F3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kcd-list-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kcd-list-row__thumb .kcd-thumb-placeholder {
    width: 72px;
    height: 56px;
    min-height: unset;
}

/* ── Pagination ──────────────────────────────────────────── */
.kcd-pagination {
    padding: 24px;
    background: #FAFAF7;
}
.kcd-pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.kcd-pagination .page-numbers li { margin: 0; }
.kcd-pagination .page-numbers a,
.kcd-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,.12);
    color: #374151;
    background: #fff;
    transition: background .15s, color .15s, border-color .15s;
}
.kcd-pagination .page-numbers a:hover {
    background: var(--color-teal, #1C6B5A);
    color: #fff;
    border-color: var(--color-teal, #1C6B5A);
}
.kcd-pagination .page-numbers .current {
    background: var(--color-saffron, #E8651A);
    color: #fff;
    border-color: var(--color-saffron, #E8651A);
}
.kcd-pagination .page-numbers .dots {
    border: none;
    background: transparent;
    color: #9ca3af;
}

/* ── Empty state ─────────────────────────────────────────── */
.kcd-archive-empty {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    color: #6b7280;
}
.kcd-archive-empty p { margin-bottom: 16px; font-size: 15px; }
.kcd-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--color-teal, #1C6B5A);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s;
    font-family: var(--font-body, 'DM Sans', sans-serif);
}
.kcd-btn:hover { background: #154f42; color: #fff; }


/* ── Responsive: tablet ≤ 900px ─────────────────────────── */
@media (max-width: 900px) {
    .kcd-hero-zone {
        grid-template-columns: 1fr 180px;
    }
    .kcd-hero-main__title { font-size: 20px; }
    .kcd-card-grid { grid-template-columns: repeat(2, 1fr); }
    .kcd-card-grid .kcd-story-card:last-child {
        grid-column: 1 / -1;
    }
}

/* ── Responsive: mobile ≤ 640px ─────────────────────────── */
@media (max-width: 640px) {
    .kcd-archive-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
    }
    .kcd-archive-header__title { font-size: 17px; }

    /* Hero stacks vertically on mobile */
    .kcd-hero-zone {
        grid-template-columns: 1fr;
        border-bottom-width: 2px;
    }
    .kcd-hero-main { border-right: none; border-bottom: 1px solid rgba(0,0,0,.08); }
    .kcd-hero-main__title { font-size: 18px; }
    .kcd-hero-main__body { padding: 14px 16px 16px; }

    /* Sidebar 2 stories go side-by-side on mobile */
    .kcd-hero-sidebar {
        flex-direction: row;
        border-bottom: 1px solid rgba(0,0,0,.08);
    }
    .kcd-sidebar-story {
        flex: 1;
        border-bottom: none;
        border-right: 1px solid rgba(0,0,0,.07);
    }
    .kcd-sidebar-story:last-child { border-right: none; }
    .kcd-sidebar-story__thumb { aspect-ratio: 3 / 2; }

    /* Cards: single column on mobile */
    .kcd-card-grid { grid-template-columns: 1fr; }
    .kcd-card-grid .kcd-story-card:last-child { grid-column: auto; }
    .kcd-story-card__thumb { aspect-ratio: 16 / 7; }

    /* List rows: tighter padding */
    .kcd-list-row { padding: 11px 16px; gap: 10px; }
    .kcd-list-row__num { font-size: 18px; min-width: 24px; }
    .kcd-list-row__title { font-size: 13.5px; }
    .kcd-list-row__thumb { width: 58px; height: 46px; }

    .kcd-section-bar { padding: 14px 16px 8px; }
    .kcd-pagination { padding: 16px; }
}
