/*!
 * KenoKivabe — Theme (2026 redesign)
 * Custom design system. Replaces legacy plugins.min.css / style.min.css.
 */

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */
:root {
    --color-bg: #f7f8fb;
    --color-surface: #ffffff;
    --color-surface-alt: #f1f4fa;
    --color-border: #e6e9f0;
    --color-text: #1c2333;
    --color-text-muted: #626a80;
    --color-text-faint: #8890a3;

    --color-brand: #3457ff;
    --color-brand-dark: #223bcc;
    --color-brand-light: #eef1ff;
    --color-accent: #12b76a;
    --color-accent-light: #e8f9f0;

    --color-header-bg: #10152b;
    --color-header-text: #f5f6fb;

    --font-body: 'Inter', 'Gordita', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Inter', 'Gordita', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(16, 21, 43, 0.06);
    --shadow-md: 0 8px 24px rgba(16, 21, 43, 0.08);
    --shadow-lg: 0 20px 48px rgba(16, 21, 43, 0.14);

    --container-w: 1200px;
    --header-h: 76px;

    --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ------------------------------------------------------------------ */
/* Reset & base                                                        */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 .5em;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: var(--container-w);
    margin-inline: auto;
    padding-inline: 20px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

::selection { background: var(--color-brand-light); color: var(--color-brand-dark); }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 15px;
    border: 1px solid transparent;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--color-brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(52, 87, 255, 0.28);
}
.btn-primary:hover { background: var(--color-brand-dark); }
.btn-outline {
    background: #5da1a9;
    border-color: var(--color-border);
    color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-brand); color: var(--color-brand); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-header-bg);
    color: var(--color-header-text);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand small {
    display: block;
    font-weight: 500;
    font-size: 11.5px;
    color: rgba(245, 246, 251, 0.6);
    letter-spacing: .01em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    display: inline-block;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 14.5px;
    color: rgba(245, 246, 251, 0.82);
    transition: background var(--transition), color var(--transition);
}
.main-nav a:hover, .main-nav a.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 860px) {
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 0 0;
        background: var(--color-header-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 28px;
        gap: 2px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition), transform var(--transition);
        overflow-y: auto;
    }
    .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .main-nav a { padding: 14px 16px; font-size: 16px; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn-outline { display: none; }
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
    position: relative;
    background: radial-gradient(circle at 15% 20%, #1b2452 0%, #0d1130 55%, #0a0d24 100%);
    color: #fff;
    overflow: hidden;
    padding: 72px 0 96px;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .35;
    pointer-events: none;
}
.hero::before {
    width: 420px; height: 420px;
    background: var(--color-brand);
    top: -160px; right: -120px;
}
.hero::after {
    width: 320px; height: 320px;
    background: var(--color-accent);
    bottom: -140px; left: -100px;
    opacity: .25;
}
.hero .container { position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.9);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 4px rgba(18,183,106,.2); }

.hero h1 {
    font-size: clamp(30px, 4.4vw, 52px);
    max-width: 820px;
    margin-bottom: 18px;
    color: #fff;
}
.hero h1 .accent { color: #8fa2ff; }

.hero p.lead {
    font-size: 18px;
    max-width: 620px;
    color: rgba(255,255,255,0.72);
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 44px;
}
.hero-stats .stat b {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}
.hero-stats .stat span {
    font-size: 13.5px;
    color: rgba(255,255,255,0.6);
}

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 520px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.16);
    padding: 6px;
    border-radius: var(--radius-pill);
}
.hero-search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: #fff;
    padding: 10px 14px;
    font-size: 14.5px;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.45); }
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand);
    color: #fff;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background var(--transition);
}
.hero-search button:hover { background: var(--color-brand-dark); }

/* ------------------------------------------------------------------ */
/* Section headings                                                    */
/* ------------------------------------------------------------------ */
.section { padding: 64px 0; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
}
.section-head .eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-brand);
    margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin: 0; }
.section-head p { color: var(--color-text-muted); margin: 8px 0 0; max-width: 560px; }

/* ------------------------------------------------------------------ */
/* Blog grid & cards                                                   */
/* ------------------------------------------------------------------ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; gap: 22px; } }

.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    height: 100%;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.post-card .thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-surface-alt);
}
.post-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms ease;
}
.post-card:hover .thumb img { transform: scale(1.06); }

.post-card .body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card .title {
    font-size: 18.5px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card .title a { transition: color var(--transition); }
.post-card .title a:hover { color: var(--color-brand); }

.post-card .excerpt {
    color: var(--color-text-muted);
    font-size: 14.5px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .meta-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.author-chip { display: flex; align-items: center; gap: 8px; min-width: 0; }
.author-chip img {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-surface-alt);
}
.author-chip .name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.author-chip .date {
    font-size: 12px;
    color: var(--color-text-faint);
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--color-brand-light);
    color: var(--color-brand);
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.post-card:hover .read-more { background: var(--color-brand); color: #fff; transform: translateX(2px); }

/* Loader for infinite scroll */
.grid-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 0 6px;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
}
.grid-loader.is-visible { display: flex; }
.spinner {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2.5px solid var(--color-border);
    border-top-color: var(--color-brand);
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-muted);
}
.empty-state .icon { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--color-text-faint); }

/* Ad wrapper */
.ad-slot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 4px 0 8px;
}
.ad-slot ins { max-width: 100%; }

/* ------------------------------------------------------------------ */
/* Newsletter / CTA band                                               */
/* ------------------------------------------------------------------ */
.cta-band {
    background: linear-gradient(120deg, #1b2452, #0d1130);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.cta-band h3 { color: #fff; margin-bottom: 6px; font-size: 24px; }
.cta-band p { color: rgba(255,255,255,0.68); margin: 0; max-width: 460px; }
.cta-band .btn-primary { flex-shrink: 0; }

/* ------------------------------------------------------------------ */
/* Blog detail page                                                    */
/* ------------------------------------------------------------------ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--color-text-faint);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-text-muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--color-brand); }

.article-header { margin-bottom: 28px; }
.article-header h1 {
    font-size: clamp(26px, 3.6vw, 40px);
    margin-bottom: 18px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
}
.article-meta .author { display: flex; align-items: center; gap: 12px; }
.article-meta .author img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.article-meta .author .name { font-weight: 700; font-size: 15px; }
.article-meta .author .date { font-size: 13px; color: var(--color-text-faint); display: flex; align-items: center; gap: 5px; }

.article-cover {
    margin: 28px 0 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.article-cover img { width: 100%; }

.blog-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--color-text);
    margin-top: 32px;
}
.blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4 { margin-top: 1.6em; }
.blog-content h2 { font-size: 26px; }
.blog-content h3 { font-size: 21px; }
.blog-content p { margin-bottom: 1.3em; color: var(--color-text); }
.blog-content img {
    border-radius: var(--radius-md);
    margin: 1.6em auto;
    box-shadow: var(--shadow-sm);
}
.blog-content a { color: var(--color-brand); text-decoration: underline; text-underline-offset: 3px; }
.blog-content ul, .blog-content ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.blog-content li { margin-bottom: .5em; }
.blog-content blockquote {
    margin: 1.8em 0;
    padding: 18px 22px;
    border-left: 4px solid var(--color-brand);
    background: var(--color-brand-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--color-text);
}
.blog-content pre, .blog-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: .92em;
}
.blog-content code {
    background: var(--color-surface-alt);
    padding: .15em .4em;
    border-radius: 5px;
}
.blog-content pre {
    background: #10152b;
    color: #e7e9f5;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
}
.blog-content pre code { background: none; padding: 0; }
.blog-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; display: block; overflow-x: auto; }
.blog-content th, .blog-content td { border: 1px solid var(--color-border); padding: 10px 14px; text-align: left; }
.blog-content th { background: var(--color-surface-alt); }

.share-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
}
.share-box .label { font-weight: 700; font-size: 14.5px; color: var(--color-text-muted); }
.share-box .social { display: flex; gap: 10px; }
.share-box .social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.share-box .social a:hover { transform: translateY(-3px); }
.share-box .social a.fb:hover { background: #1877f2; color: #fff; }
.share-box .social a.li:hover { background: #0a66c2; color: #fff; }
.share-box .social a.tw:hover { background: #000; color: #fff; }

/* ------------------------------------------------------------------ */
/* Sidebar                                                             */
/* ------------------------------------------------------------------ */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.widget-title {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 16px;
    color: var(--color-text);
}
.search-form { display: flex; gap: 8px; }
.search-form input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    background: var(--color-surface-alt);
}
.search-form input:focus { border-color: var(--color-brand); background: #fff; }
.search-form button {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--color-brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-post { display: flex; gap: 12px; }
.related-post + .related-post { margin-top: 16px; }
.related-post .thumb { width: 66px; height: 66px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--color-surface-alt); }
.related-post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-post .title { font-size: 13.5px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-post .title a:hover { color: var(--color-brand); }
.related-post .date { font-size: 11.5px; color: var(--color-text-faint); display: flex; align-items: center; gap: 4px; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
    background: var(--color-header-bg);
    color: rgba(245, 246, 251, 0.72);
    margin-top: 40px;
}
.footer-top {
    padding: 56px 0 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; max-width: 340px; color: rgba(245,246,251,0.6); }

.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.footer-social a:hover { background: var(--color-brand); }

.footer-col h4 {
    color: #fff;
    font-size: 14.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { font-size: 14.5px; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: rgba(245,246,251,0.5);
}
.footer-bottom a { color: rgba(245,246,251,0.7); }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------------------------ */
/* Back to top                                                         */
/* ------------------------------------------------------------------ */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    z-index: 90;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-brand-dark); }

/* ------------------------------------------------------------------ */
/* Fallback / 404                                                      */
/* ------------------------------------------------------------------ */
.state-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 90px 20px;
}
.state-page .code {
    font-size: 88px;
    font-weight: 800;
    color: var(--color-brand-light);
    -webkit-text-stroke: 2px var(--color-brand);
    line-height: 1;
    margin-bottom: 12px;
}
.state-page h1 { font-size: 26px; margin-bottom: 10px; }
.state-page p { color: var(--color-text-muted); max-width: 440px; margin-bottom: 26px; }

/* ------------------------------------------------------------------ */
/* Utility spacing                                                     */
/* ------------------------------------------------------------------ */
.mt-0 { margin-top: 0 !important; }
@media (max-width: 980px) {
    .section { padding: 48px 0; }
}
