/**
 * Kenya News Aggregator v3.0 — Frontend Styles
 * Premium newspaper-style layout inspired by theonlinekenyan.com
 *
 * Color Palette:
 *  Primary:    #0A1E3D (dark navy)
 *  Accent:     #c62828 (deep red)
 *  Background: #f4f5f7
 *  Card:       #ffffff
 *  Text:       #1a202c
 *  Muted:      #64748b
 *  Border:     #e2e8f0
 */

/* ================================================================
   GRID / ARCHIVE LAYOUT
   ================================================================ */

.kna-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 16px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a202c;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Header ─── */
.kna-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 0 0 20px 0;
    border-bottom: 3px solid #0A1E3D;
    margin-bottom: 20px;
    position: relative;
}
.kna-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #c62828;
}
.kna-title {
    font-size: 28px;
    font-weight: 800;
    color: #0A1E3D;
    letter-spacing: -0.5px;
    margin: 0;
}
.kna-subtitle {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* ─── Category Tabs ─── */
.kna-tabs {
    display: flex;
    gap: 2px;
    padding: 0 0 0 0;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 2px solid #e2e8f0;
}
.kna-tabs::-webkit-scrollbar { display: none; }

.kna-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.kna-tab:hover {
    color: #0A1E3D;
    background: #f8fafc;
}
.kna-tab-active {
    color: #0A1E3D !important;
    background: #ffffff !important;
    border-bottom-color: #c62828 !important;
    font-weight: 700 !important;
}
.kna-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(10,30,61,0.08);
    color: inherit;
}
.kna-tab-active .kna-tab-count {
    background: #c62828;
    color: #fff;
}

/* ─── Grid ─── */
.kna-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.kna-grid-2-col, .kna-grid-3-col, .kna-grid-4-col {
    grid-template-columns: 1fr;
}
@media (min-width: 540px) {
    .kna-grid-2-col, .kna-grid-3-col, .kna-grid-4-col { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .kna-grid-3-col, .kna-grid-4-col { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .kna-grid-4-col { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Featured Card ─── */
.kna-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.kna-card-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}
@media (min-width: 768px) {
    .kna-card-featured { grid-template-columns: 1.4fr 1fr; }
    .kna-card-featured .kna-card-img { aspect-ratio: auto; min-height: 380px; }
}
.kna-card-featured .kna-card-img { aspect-ratio: 16 / 9; }
.kna-card-featured .kna-card-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.kna-card-featured .kna-card-title { font-size: 22px; line-height: 1.35; margin-bottom: 14px; }
@media (min-width: 768px) { .kna-card-featured .kna-card-title { font-size: 28px; } }
.kna-card-featured .kna-card-excerpt { font-size: 15px; line-height: 1.65; -webkit-line-clamp: 3; }

/* ─── Card ─── */
.kna-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: kna-fadeIn 0.4s ease forwards;
    opacity: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.kna-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
    border-color: transparent;
}
.kna-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* ─── Card Image ─── */
.kna-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(145deg, #edf2f7 0%, #e2e8f0 100%);
}
.kna-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.kna-card:hover .kna-card-img img { transform: scale(1.06); }
.kna-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 50%, #e2e8f0 100%);
    background-size: 200% 100%;
    animation: kna-shimmer 3s ease infinite;
}
.kna-card-placeholder svg { color: #a0aec0; }
@keyframes kna-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Badges ─── */
.kna-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 2;
    backdrop-filter: blur(4px);
}
.kna-time-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ─── Card Body ─── */
.kna-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.kna-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a202c;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.kna-card-link:hover .kna-card-title { color: #0A1E3D; }
.kna-card-excerpt {
    font-size: 13.5px;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kna-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
}
.kna-source {
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}
.kna-date::before { content: "\2022"; margin-right: 8px; color: #cbd5e1; }

/* ─── Card Animation ─── */
@keyframes kna-fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.kna-card-featured { animation-delay: 0s; }
.kna-card:nth-child(2) { animation-delay: 0.05s; }
.kna-card:nth-child(3) { animation-delay: 0.1s; }
.kna-card:nth-child(4) { animation-delay: 0.15s; }
.kna-card:nth-child(5) { animation-delay: 0.2s; }
.kna-card:nth-child(6) { animation-delay: 0.25s; }
.kna-card:nth-child(7) { animation-delay: 0.3s; }
.kna-card:nth-child(8) { animation-delay: 0.35s; }
.kna-card:nth-child(9) { animation-delay: 0.4s; }
.kna-card:nth-child(10) { animation-delay: 0.45s; }

/* ─── Load More ─── */
.kna-load-more-wrap { text-align: center; padding: 40px 0 20px; }
.kna-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 44px;
    border: 2px solid #0A1E3D;
    background: transparent;
    color: #0A1E3D;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}
.kna-load-more:hover {
    background: #0A1E3D;
    color: #fff;
    box-shadow: 0 4px 16px rgba(10,30,61,0.25);
    transform: translateY(-2px);
}
.kna-load-more:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.kna-post-count { display: block; margin-top: 14px; font-size: 13px; color: #94a3b8; }
.kna-card-hidden { display: none !important; }

/* ─── Empty State ─── */
.kna-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}
.kna-empty h3 { margin: 16px 0 8px; font-size: 20px; color: #475569; }
.kna-empty p { font-size: 14px; color: #94a3b8; }

/* ================================================================
   SINGLE POST TEMPLATE — Premium Newspaper Layout
   ================================================================ */

/* ─── Override Theme Layout ─── */
.kna-sp {
    background: #f4f5f7 !important;
    min-height: 100vh;
    padding: 0 16px 60px;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a202c;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force hide theme sidebars on our CPT */
body.single-kenya_news #secondary,
body.single-kenya_news .sidebar,
body.single-kenya_news .site-sidebar,
body.single-kenya_news #sidebar,
body.single-kenya_news aside:not(.kna-sp-sidebar),
body.single-kenya_news .widget-area {
    display: none !important;
}

body.single-kenya_news #content,
body.single-kenya_news .site-content,
body.single-kenya_news .content-area,
body.single-kenya_news main:not(.kna-sp) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.single-kenya_news .entry-content,
body.single-kenya_news .post-content,
body.single-kenya_news article:not(.kna-sp-main) {
    padding: 0 !important;
    margin: 0 !important;
}

.kna-sp-inner {
    max-width: 1220px;
    margin: 0 auto;
}

/* ─── Hero Image ─── */
.kna-sp-hero {
    position: relative;
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-bottom: 36px;
    height: 440px;
    overflow: hidden;
}
@media (min-width: 768px) {
    .kna-sp-hero {
        width: calc(100% + 64px);
        margin-left: -32px;
        height: 540px;
        border-radius: 0 0 20px 20px;
    }
}
.kna-sp-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kna-sp-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    pointer-events: none;
}
.kna-sp-hero-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* ─── Layout (Main + Sidebar) ─── */
.kna-sp-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}
.kna-sp-main {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 36px;
    margin-bottom: 44px;
}
@media (min-width: 1024px) {
    .kna-sp-main {
        max-width: calc(100% - 360px);
    }
}

/* ─── Category Pill (no hero) ─── */
.kna-sp-cat-pill {
    display: inline-block;
    padding: 5px 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 5px;
    margin-bottom: 16px;
}

/* ─── Title ─── */
.kna-sp-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.22;
    color: #0A1E3D;
    margin: 0 0 18px 0;
    letter-spacing: -0.5px;
}
@media (min-width: 768px) {
    .kna-sp-title { font-size: 38px; }
}

/* ─── Meta Row ─── */
.kna-sp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.kna-sp-meta-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.kna-sp-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}
.kna-sp-meta-item svg {
    flex-shrink: 0;
    color: #94a3b8;
}
.kna-sp-meta-source {
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 5px;
}
.kna-sp-meta-source svg { color: #0A1E3D; }

/* ─── Share Button ─── */
.kna-sp-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.kna-sp-share-btn:hover {
    background: #f1f5f9;
    color: #212529;
    border-color: #cbd5e1;
}

/* ─── Attribution Bar ─── */
.kna-sp-attribution {
    margin-bottom: 28px;
}
.kna-sp-attribution-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
}
.kna-sp-attribution-inner svg { flex-shrink: 0; color: #94a3b8; }
.kna-sp-attribution-inner strong { color: #334155; }

/* ─── Article Excerpt ─── */
.kna-sp-article {
    margin-bottom: 36px;
}
.kna-sp-excerpt-text {
    font-size: 17px;
    line-height: 1.85;
    color: #334155;
}
.kna-sp-excerpt-text p {
    margin: 0 0 20px 0;
}
.kna-sp-excerpt-text p:last-child {
    margin-bottom: 0;
}

/* ─── No excerpt fallback ─── */
.kna-sp-no-excerpt {
    padding: 24px;
    background: #f8fafc;
    border: 1px dashed #d1d9e6;
    border-radius: 10px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ─── CTA Section ─── */
.kna-sp-cta-section {
    text-align: center;
    padding: 8px 0 28px;
}
.kna-sp-cta-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    color: #94a3b8;
}
.kna-sp-cta-divider::before,
.kna-sp-cta-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}
.kna-sp-cta-divider span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    white-space: nowrap;
}
.kna-sp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 44px;
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(198,40,40,0.3);
    letter-spacing: 0.2px;
}
.kna-sp-cta-btn:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
    color: #fff;
    box-shadow: 0 8px 28px rgba(198,40,40,0.4);
    transform: translateY(-3px);
    text-decoration: none;
}
.kna-sp-cta-btn svg { transition: transform 0.2s; }
.kna-sp-cta-btn:hover svg { transform: translateX(4px); }
.kna-sp-cta-note {
    margin-top: 14px;
    font-size: 12px;
    color: #94a3b8;
}

/* ─── Back Link ─── */
.kna-sp-back {
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}
.kna-sp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.kna-sp-back-link:hover {
    color: #0A1E3D;
    text-decoration: none;
}
.kna-sp-back-link svg { transition: transform 0.2s; }
.kna-sp-back-link:hover svg { transform: translateX(-4px); }

/* ================================================================
   SIDEBAR
   ================================================================ */
.kna-sp-sidebar {
    display: none;
    width: 320px;
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .kna-sp-sidebar { display: block; }
}

/* ─── Widget ─── */
.kna-sp-widget {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 22px;
    margin-bottom: 24px;
    border: 1px solid #e8ecf1;
}
.kna-sp-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #0A1E3D;
    margin: 0 0 18px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #0A1E3D;
    position: relative;
}
.kna-sp-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #c62828;
}
.kna-sp-widget-title svg {
    color: #0A1E3D;
    flex-shrink: 0;
}

/* ─── Latest News List ─── */
.kna-sp-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.kna-sp-latest-item {
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.kna-sp-latest-item:last-child { border-bottom: none; }
.kna-sp-latest-item a {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    align-items: center;
}
.kna-sp-latest-item:hover { background: #f8fafc; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.kna-sp-latest-item a:hover .kna-sp-latest-title { color: #c62828; }
.kna-sp-latest-thumb {
    width: 68px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}
.kna-sp-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.kna-sp-latest-item:hover .kna-sp-latest-thumb img { transform: scale(1.05); }
.kna-sp-latest-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
}
.kna-sp-latest-noimg svg { color: #cbd5e1; }
.kna-sp-latest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.kna-sp-latest-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.kna-sp-latest-time {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* ─── Categories List ─── */
.kna-sp-cats-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kna-sp-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.kna-sp-cat-item:hover {
    background: #f1f5f9;
    color: #0A1E3D;
    transform: translateX(4px);
}
.kna-sp-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.kna-sp-cat-item:hover .kna-sp-cat-dot { transform: scale(1.3); }
.kna-sp-cat-name { flex: 1; }
.kna-sp-cat-count {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 9px;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}

/* ================================================================
   RELATED POSTS
   ================================================================ */
.kna-sp-related {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 32px;
    border: 1px solid #e8ecf1;
}
.kna-sp-related-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #0A1E3D;
    margin: 0 0 28px 0;
    padding-bottom: 18px;
    border-bottom: 2px solid #0A1E3D;
    position: relative;
}
.kna-sp-related-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #c62828;
}
.kna-sp-related-title svg { color: #0A1E3D; }
.kna-sp-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 640px) {
    .kna-sp-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .kna-sp-related-grid { grid-template-columns: repeat(4, 1fr); }
}
.kna-sp-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
}
.kna-sp-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: transparent;
}
.kna-sp-related-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #edf2f7;
}
.kna-sp-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.kna-sp-related-card:hover .kna-sp-related-img img { transform: scale(1.06); }
.kna-sp-related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.kna-sp-related-placeholder svg { color: #cbd5e1; }
.kna-sp-related-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.kna-sp-related-body {
    padding: 16px 18px 18px;
}
.kna-sp-related-body h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a202c;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.kna-sp-related-card:hover .kna-sp-related-body h4 { color: #c62828; }
.kna-sp-related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}
.kna-sp-related-meta span::before {
    content: "\2022";
    margin-right: 8px;
    color: #e2e8f0;
}
.kna-sp-related-meta span:first-child::before { display: none; }

/* ================================================================
   SHARE POPUP
   ================================================================ */
.kna-share-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}
.kna-share-popup-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    gap: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.kna-share-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: #f8fafc;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
}
.kna-share-item:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}
.kna-share-item[data-platform="twitter"]:hover { color: #1da1f2; background: #e8f5fd; }
.kna-share-item[data-platform="facebook"]:hover { color: #1877f2; background: #e7f0fe; }
.kna-share-item[data-platform="whatsapp"]:hover { color: #25d366; background: #e6f9ee; }
.kna-share-item[data-platform="telegram"]:hover { color: #0088cc; background: #e4f2fb; }
.kna-share-item[data-platform="copy"]:hover { color: #212529; }

/* Share overlay */
.kna-share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9999;
    backdrop-filter: blur(3px);
}

/* Toast */
.kna-share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0A1E3D;
    color: #fff;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 99999;
    pointer-events: none;
}
.kna-share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================================================
   ARCHIVE PAGINATION
   ================================================================ */
.kna-load-more-wrap .page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.kna-load-more-wrap .page-numbers li { display: inline-block; }
.kna-load-more-wrap .page-numbers a,
.kna-load-more-wrap .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.kna-load-more-wrap .page-numbers a {
    background: #fff;
    color: #495057;
    border: 1px solid #e2e8f0;
}
.kna-load-more-wrap .page-numbers a:hover { background: #f1f5f9; border-color: #cbd5e1; color: #0A1E3D; }
.kna-load-more-wrap .page-numbers .current { background: #0A1E3D; color: #fff; border: 1px solid #0A1E3D; }
.kna-load-more-wrap .page-numbers .prev,
.kna-load-more-wrap .page-numbers .next { background: transparent; border: 2px solid #0A1E3D; color: #0A1E3D; padding: 0 20px; }
.kna-load-more-wrap .page-numbers .prev:hover,
.kna-load-more-wrap .page-numbers .next:hover { background: #0A1E3D; color: #fff; }
.kna-load-more-wrap .page-numbers .dots { background: transparent; border: none; color: #94a3b8; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1023px) {
    .kna-sp-layout { flex-direction: column; }
    .kna-sp-main { max-width: 100%; }
}

@media (max-width: 768px) {
    .kna-sp { padding: 0 12px 40px; }
    .kna-sp-hero { width: calc(100% + 24px); margin-left: -12px; height: 260px; }
    .kna-sp-hero-badge { top: 12px; left: 12px; font-size: 10px; padding: 4px 12px; }
    .kna-sp-main { padding: 22px; border-radius: 12px; }
    .kna-sp-title { font-size: 24px; line-height: 1.3; }
    .kna-sp-meta-left { gap: 10px; }
    .kna-sp-meta-item { font-size: 12px; gap: 4px; }
    .kna-sp-meta-item svg { width: 12px; height: 12px; }
    .kna-sp-excerpt-text { font-size: 15px; line-height: 1.75; }
    .kna-sp-cta-btn { padding: 16px 28px; font-size: 14px; }
    .kna-sp-related { padding: 22px; }
    .kna-sp-related-title { font-size: 18px; }
    .kna-sp-related-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .kna-sp-related-body { padding: 12px 14px 14px; }
    .kna-sp-related-body h4 { font-size: 13px; }

    .kna-wrapper { padding: 16px; }
    .kna-header { flex-direction: column; gap: 4px; padding-bottom: 16px; }
    .kna-title { font-size: 22px; }
    .kna-tab { padding: 8px 14px; font-size: 12px; }
    .kna-card-body { padding: 14px 16px 16px; }
    .kna-card-title { font-size: 15px; }
    .kna-card-featured .kna-card-title { font-size: 20px; }
    .kna-card-excerpt { font-size: 13px; }
    .kna-badge { font-size: 9px; padding: 3px 8px; }
    .kna-card-featured .kna-card-body { padding: 20px; }
    .kna-card-featured .kna-card-img { min-height: 220px; }
    .kna-grid { gap: 16px; }
}

@media (max-width: 480px) {
    .kna-sp { padding: 0 8px 30px; }
    .kna-sp-hero { width: calc(100% + 16px); margin-left: -8px; height: 200px; }
    .kna-sp-main { padding: 18px; }
    .kna-sp-title { font-size: 21px; }
    .kna-sp-meta-left { flex-direction: column; align-items: flex-start; gap: 6px; }
    .kna-sp-related-grid { grid-template-columns: 1fr; }
    .kna-share-popup-content { flex-wrap: wrap; }
    .kna-wrapper { padding: 10px; }
    .kna-header { padding-bottom: 12px; }
    .kna-title { font-size: 20px; }
    .kna-card-body { padding: 12px 14px 14px; }
    .kna-card-title { font-size: 14px; }
}
