/* ═══════════════════════════════════════════════════════════
   WEB KOI BLOG — Styles for single.php & archive.php
   Uses CSS variables from theme.css
   ═══════════════════════════════════════════════════════════ */

/* ── SINGLE POST — HERO ──────────────────────────────────── */
.wk-blog-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: var(--wk-navy);
    color: #fff;
    overflow: hidden;
    padding: 140px 20px 60px;
}
.wk-blog-hero--has-image {
    min-height: 65vh;
}
.wk-blog-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.wk-blog-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(28, 28, 28, 0.92) 0%,
        rgba(28, 28, 28, 0.6) 40%,
        rgba(28, 28, 28, 0.3) 100%
    );
}
.wk-blog-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    width: 100%;
    animation: wk-fadeUp 0.8s 0.2s both cubic-bezier(0.22, 1, 0.36, 1);
}
.wk-blog-hero__cat {
    display: inline-block;
    background: var(--wk-gold);
    color: var(--wk-navy);
    padding: 5px 16px;
    border-radius: 6px;
    font-family: var(--wk-font-b);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    margin-bottom: 16px;
    transition: background 0.2s;
}
.wk-blog-hero__cat:hover {
    background: var(--wk-gold-l);
}
.wk-blog-hero__title {
    font-family: var(--wk-font-h);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #fff;
}
.wk-blog-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    opacity: 0.7;
    font-family: var(--wk-font-b);
}
.wk-blog-hero__sep {
    opacity: 0.4;
}

/* ── SINGLE POST — ARTICLE ───────────────────────────────── */
.wk-blog-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 20px 60px;
}
.wk-blog-article__inner {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── SHARE SIDEBAR (desktop) ─────────────────────────────── */
.wk-blog-share-sidebar {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wk-blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--wk-border);
    background: var(--wk-white);
    color: var(--wk-olive);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--wk-font-b);
}
.wk-blog-share-btn:hover {
    border-color: var(--wk-gold);
    color: var(--wk-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.wk-blog-share-btn--wa:hover {
    border-color: #25D366;
    color: #25D366;
    background: rgba(37, 211, 102, 0.06);
}
.wk-blog-share-btn--fb:hover {
    border-color: #1877F2;
    color: #1877F2;
    background: rgba(24, 119, 242, 0.06);
}
.wk-blog-share-btn--copy.copied {
    border-color: var(--wk-gold);
    color: var(--wk-gold);
    background: rgba(191, 145, 59, 0.06);
}

/* ── BLOG CONTENT TYPOGRAPHY ─────────────────────────────── */
.wk-blog-content {
    max-width: 720px;
    font-family: var(--wk-font-b);
    font-size: 16px;
    line-height: 1.8;
    color: var(--wk-text);
}
.wk-blog-content > *:first-child {
    margin-top: 0;
}
.wk-blog-content p {
    margin: 0 0 1.5em;
    color: var(--wk-olive);
}
.wk-blog-content h2 {
    font-family: var(--wk-font-h);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    color: var(--wk-navy);
    margin: 2em 0 0.6em;
    line-height: 1.25;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wk-gold-l);
}
.wk-blog-content h3 {
    font-family: var(--wk-font-h);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--wk-navy);
    margin: 1.6em 0 0.5em;
    line-height: 1.3;
}
.wk-blog-content h4 {
    font-family: var(--wk-font-h);
    font-size: 1.1rem;
    color: var(--wk-navy);
    margin: 1.4em 0 0.4em;
}
.wk-blog-content strong,
.wk-blog-content b {
    color: var(--wk-navy);
    font-weight: 700;
}
.wk-blog-content a {
    color: var(--wk-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.wk-blog-content a:hover {
    color: var(--wk-navy);
}
.wk-blog-content ul,
.wk-blog-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.5em;
    color: var(--wk-olive);
}
.wk-blog-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}
.wk-blog-content ul li::marker {
    color: var(--wk-gold);
}
.wk-blog-content ol li::marker {
    color: var(--wk-gold);
    font-weight: 700;
}
.wk-blog-content blockquote {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: var(--wk-cream);
    border-left: 4px solid var(--wk-gold);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--wk-olive);
}
.wk-blog-content blockquote p {
    margin: 0;
}
.wk-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.wk-blog-content pre,
.wk-blog-content code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
}
.wk-blog-content code {
    background: var(--wk-cream);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--wk-gold);
}
.wk-blog-content pre {
    background: var(--wk-navy);
    color: var(--wk-cream);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5em 0;
}
.wk-blog-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.wk-blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}
.wk-blog-content th,
.wk-blog-content td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--wk-border);
}
.wk-blog-content th {
    background: var(--wk-cream);
    font-weight: 700;
    color: var(--wk-navy);
}
.wk-blog-content hr {
    border: none;
    height: 1px;
    background: var(--wk-border);
    margin: 2em 0;
}

/* ── TAGS ────────────────────────────────────────────────── */
.wk-blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--wk-border);
}
.wk-blog-tag {
    display: inline-block;
    background: var(--wk-cream);
    color: var(--wk-olive);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s;
    border: 1px solid var(--wk-border);
}
.wk-blog-tag:hover {
    background: var(--wk-gold-bg);
    border-color: var(--wk-gold);
    color: var(--wk-gold);
}

/* ── MOBILE SHARE BAR ────────────────────────────────────── */
.wk-blog-share-mobile {
    display: none;
    margin-top: 32px;
    padding: 20px 0;
    border-top: 1px solid var(--wk-border);
    border-bottom: 1px solid var(--wk-border);
}
.wk-blog-share-mobile__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wk-olive);
    margin-bottom: 12px;
    display: block;
}
.wk-blog-share-mobile__btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wk-blog-share-mobile .wk-blog-share-btn {
    width: auto;
    height: auto;
    padding: 8px 16px;
}

/* ── BACK LINK ───────────────────────────────────────────── */
.wk-blog-back {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--wk-border);
}
.wk-blog-back__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wk-gold);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--wk-font-b);
    transition: color 0.2s, transform 0.2s;
}
.wk-blog-back__link:hover {
    color: var(--wk-navy);
    transform: translateX(-4px);
}

/* ── RELATED POSTS ───────────────────────────────────────── */
.wk-blog-related {
    background: var(--wk-cream);
    padding: 80px 20px;
}
.wk-blog-related__inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   BLOG CARDS — Shared by single.php and archive.php
   ═══════════════════════════════════════════════════════════ */
.wk-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.wk-blog-grid--archive {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.wk-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--wk-white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--wk-border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
.wk-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}
.wk-blog-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--wk-cream);
}
.wk-blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.wk-blog-card:hover .wk-blog-card__img {
    transform: scale(1.05);
}
.wk-blog-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wk-navy) 0%, var(--wk-navy-l) 100%);
}
.wk-blog-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--wk-gold);
    color: var(--wk-navy);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}
.wk-blog-card__body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.wk-blog-card__title {
    font-family: var(--wk-font-h);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wk-navy);
    margin: 0 0 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wk-blog-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--wk-olive);
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wk-blog-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--wk-border);
}
.wk-blog-card__date {
    font-size: 12px;
    color: var(--wk-olive);
    opacity: 0.7;
}
.wk-blog-card__more {
    font-size: 13px;
    font-weight: 700;
    color: var(--wk-gold);
    transition: transform 0.2s;
}
.wk-blog-card:hover .wk-blog-card__more {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════
   ARCHIVE — HERO
   ═══════════════════════════════════════════════════════════ */
.wk-blog-archive-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40vh;
    padding: 140px 20px 60px;
    background: linear-gradient(170deg, #1C1C1C 0%, #2d2d2d 50%, #1C1C1C 100%);
    color: #fff;
    overflow: hidden;
}
.wk-blog-archive-hero__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(191, 145, 59, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 70%, rgba(191, 145, 59, 0.05) 0%, transparent 50%);
}
.wk-blog-archive-hero__content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    animation: wk-fadeUp 0.8s 0.2s both cubic-bezier(0.22, 1, 0.36, 1);
}
.wk-blog-archive-hero__title {
    font-family: var(--wk-font-h);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}
.wk-blog-archive-hero__sub {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    opacity: 0.65;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
}

/* ── CATEGORY FILTERS ────────────────────────────────────── */
.wk-blog-filters {
    background: var(--wk-white);
    border-bottom: 1px solid var(--wk-border);
    padding: 0 20px;
    position: sticky;
    top: 80px;
    z-index: 100;
}
.wk-blog-filters__inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 14px 0;
}
.wk-blog-filters__inner::-webkit-scrollbar {
    display: none;
}
.wk-blog-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wk-olive);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.wk-blog-filter:hover {
    background: var(--wk-cream);
    color: var(--wk-navy);
}
.wk-blog-filter--active {
    background: var(--wk-navy);
    color: #fff;
    border-color: var(--wk-navy);
}
.wk-blog-filter--active:hover {
    background: var(--wk-navy-l);
    color: #fff;
}
.wk-blog-filter__count {
    font-size: 11px;
    opacity: 0.6;
}

/* ── ARCHIVE SECTION ─────────────────────────────────────── */
.wk-blog-archive {
    background: var(--wk-cream);
    padding: 60px 20px 80px;
}
.wk-blog-archive__inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* ── PAGINATION ──────────────────────────────────────────── */
.wk-blog-pagination {
    margin-top: 48px;
    text-align: center;
}
.wk-blog-pagination__inner {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.wk-blog-pagination__inner .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wk-olive);
    text-decoration: none;
    background: var(--wk-white);
    border: 1px solid var(--wk-border);
    transition: all 0.2s;
}
.wk-blog-pagination__inner .page-numbers:hover {
    border-color: var(--wk-gold);
    color: var(--wk-gold);
    transform: translateY(-1px);
}
.wk-blog-pagination__inner .page-numbers.current {
    background: var(--wk-navy);
    color: #fff;
    border-color: var(--wk-navy);
}
.wk-blog-pagination__inner .page-numbers.prev,
.wk-blog-pagination__inner .page-numbers.next {
    font-size: 13px;
    padding: 0 16px;
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.wk-blog-empty {
    text-align: center;
    padding: 80px 20px;
}
.wk-blog-empty h2 {
    font-family: var(--wk-font-h);
    color: var(--wk-navy);
    font-size: 1.5rem;
    margin: 0 0 12px;
}
.wk-blog-empty p {
    color: var(--wk-olive);
    font-size: 15px;
    margin: 0 0 24px;
}
.wk-blog-empty__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wk-gold);
    color: var(--wk-navy);
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s;
}
.wk-blog-empty__link:hover {
    background: var(--wk-gold-l);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(191, 145, 59, 0.35);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    /* Single hero */
    .wk-blog-hero {
        min-height: 45vh;
        padding: 120px 16px 48px;
    }

    /* Article layout: remove sidebar */
    .wk-blog-article__inner {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Hide desktop share sidebar */
    .wk-blog-share-sidebar {
        display: none;
    }

    /* Show mobile share bar */
    .wk-blog-share-mobile {
        display: block;
    }

    /* Related grid */
    .wk-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Archive grid */
    .wk-blog-grid--archive {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .wk-blog-related {
        padding: 60px 16px;
    }
}

@media (max-width: 640px) {
    /* Single hero */
    .wk-blog-hero {
        min-height: 40vh;
        padding: 120px 16px 40px;
    }
    .wk-blog-hero__title {
        font-size: 1.5rem;
    }

    /* Content typography */
    .wk-blog-content {
        font-size: 15px;
    }

    /* Cards grid: single column */
    .wk-blog-grid,
    .wk-blog-grid--archive {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Archive hero */
    .wk-blog-archive-hero {
        min-height: 35vh;
        padding: 120px 16px 40px;
    }

    /* Pagination */
    .wk-blog-pagination__inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Card title size */
    .wk-blog-card__title {
        font-size: 1rem;
    }

    /* Filters scroll */
    .wk-blog-filters {
        top: 68px;
    }
}
