/* ==========================================================================
   Newsroom Theme — Design System
   A modern, magazine-style light theme built from scratch for oky.ge
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
    --brand: #e2043e;
    --brand-600: #c00336;
    --brand-700: #9c022c;
    --brand-soft: #fdeef2;

    --ink: #0f172a;
    --ink-2: #475569;
    --muted: #94a3b8;
    --line: #e5e7eb;

    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f8fafc;

    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, .06);
    --shadow: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);

    --font: 'Noto Sans Georgian', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --container: 1200px;
    --header-h: 64px;
    --nav-h: 46px;

    --ease: cubic-bezier(.4, 0, .2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
    vertical-align: middle;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color .18s var(--ease);
}

a:hover {
    color: var(--brand-700);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    line-height: 1.25;
    font-weight: 700;
    color: var(--ink);
}

p {
    margin: 0 0 1em;
}

ul, ol {
    margin: 0 0 1em;
    padding-left: 1.25em;
}

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

input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

.container-narrow {
    max-width: 860px;
}

.site-content {
    min-height: 55vh;
    padding: 24px 0 48px;
}

/* Icons */
.svg-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    vertical-align: -4px;
}

.svg-sm { width: 15px; height: 15px; vertical-align: -2px; }
.svg-md { width: 18px; height: 18px; vertical-align: -3px; }
.svg-lg { width: 24px; height: 24px; }
.svg-xl { width: 56px; height: 56px; }

.rotate-180 { transform: rotate(180deg); }

.text-brand { color: var(--brand); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--brand); }

.d-none { display: none !important; }

/* Responsive utility classes (Bootstrap-compatible) */
@media (min-width: 576px) {
    .d-sm-inline-flex { display: inline-flex !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
}

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    transition: all .18s var(--ease);
    user-select: none;
}

.btn-sm { padding: 7px 14px; font-size: .875rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--brand-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink-2);
}

.btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.btn-link {
    background: none;
    border: 0;
    color: var(--brand);
    padding: 4px 8px;
}

.btn-icon {
    padding: 6px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.btn-icon:hover { color: var(--brand); border-color: var(--brand); }
.btn-edit:hover { color: #16a34a; border-color: #16a34a; }
.btn-delete:hover { color: var(--brand); border-color: var(--brand); }

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s var(--ease);
}

.is-scrolled .site-header {
    box-shadow: var(--shadow-sm);
}

.site-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--header-h);
    padding: 8px 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 4px 10px 4px 4px;
    margin-left: -4px;
    border-radius: var(--radius-sm);
    transition: background-color .25s var(--ease);
}

.site-brand:hover {
    background: var(--brand-soft);
}

.site-brand .site-logo {
    display: block;
    max-height: 36px;
    width: auto;
    object-fit: contain;
    padding: 4px 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-xs);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header .site-brand:hover .site-logo {
    transform: scale(1.04);
    box-shadow: var(--shadow-sm);
}

.site-search {
    flex: 1 1 auto;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.search-wrap { position: relative; }

.search-control {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.search-control:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(226, 4, 62, .1);
    background: var(--surface);
}

.search-control-lg {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    outline: none;
    color: var(--ink);
    font-size: .95rem;
}

.search-input::placeholder { color: var(--muted); }

.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    margin: 3px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    transition: background .18s var(--ease);
}

.search-btn:hover { background: var(--brand-600); }
.search-control-lg .search-btn { border-radius: var(--radius-sm); }

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

.nav-toggle,
.drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    transition: all .18s var(--ease);
}

.nav-toggle:hover,
.drawer-close:hover {
    color: var(--brand);
    border-color: var(--brand);
}

/* Category nav */
.site-nav {
    background: var(--surface);
    border-top: 1px solid var(--line);
    position: relative;
}

.site-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-nav-list::-webkit-scrollbar { display: none; }

.site-nav-list .nav-item { flex: 0 0 auto; }

.site-nav-list .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-2);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.site-nav-list .nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.site-nav-list .nav-link.active { color: var(--brand); }

/* --------------------------------------------------------------------------
   5. Mobile Drawer
   -------------------------------------------------------------------------- */
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    width: min(320px, 86vw);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform .3s var(--ease);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

body.drawer-open .drawer { transform: translateX(0); }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.drawer-search {
    padding: 14px 16px 4px;
    position: relative;
}

.drawer-nav { padding: 8px 16px 20px; }

.drawer-label {
    margin: 10px 0 8px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.drawer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 8px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-weight: 500;
}

.drawer-link:hover { background: var(--brand-soft); color: var(--brand); }
.drawer-link.active { color: var(--brand); }

.drawer-link .category-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.drawer-foot {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
}

body.drawer-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* --------------------------------------------------------------------------
   6. Hero Slider
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--ink);
    aspect-ratio: 16 / 9;
    max-height: 460px;
}

.hero-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s var(--ease), visibility .7s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, .82) 0%, rgba(2, 6, 23, .35) 45%, rgba(2, 6, 23, 0) 70%);
}

.hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 4px 12px;
    background: var(--brand);
    border-radius: var(--radius-pill);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hero-kicker .badge-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
}

.hero-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: clamp(1.15rem, 2.4vw, 1.7rem);
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 12px rgba(2, 6, 23, .4);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: .85rem;
    color: rgba(255, 255, 255, .85);
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .2s var(--ease), background .2s var(--ease);
}

.hero:hover .hero-arrow { opacity: 1; }

.hero-arrow:hover { background: var(--brand); }

.hero-prev { left: 16px; }
.hero-next { right: 16px; }

.hero-dots {
    position: absolute;
    right: 24px;
    bottom: 22px;
    z-index: 5;
    display: flex;
    gap: 6px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .45);
    transition: all .25s var(--ease);
}

.hero-dot.is-active {
    width: 24px;
    background: var(--brand);
}

/* --------------------------------------------------------------------------
   7. Section Headings
   -------------------------------------------------------------------------- */
.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
    font-size: 1.25rem;
    font-weight: 800;
}

.section-heading::before {
    content: '';
    width: 5px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: var(--brand);
}

.section-heading span { line-height: 1; }

/* --------------------------------------------------------------------------
   8. News Grid & Cards
   -------------------------------------------------------------------------- */
.home-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    align-items: start;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 20px;
}

.card-post {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.card-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card-post-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}

.card-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.card-post:hover .card-post-img { transform: scale(1.05); }

.card-post-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.badge-logo {
    width: 15px;
    height: 15px;
    object-fit: contain;
    border-radius: 3px;
    background: #fff;
}

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

.card-post-title {
    margin: 0 0 10px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.4;
}

.card-post-title a {
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-post-title a:hover { color: var(--brand); }

.card-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: auto;
    font-size: .8rem;
    color: var(--muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.card-post-sm .card-post-title { font-size: .92rem; }

/* --------------------------------------------------------------------------
   9. Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 800;
}

.widget-title::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: var(--radius-pill);
    background: var(--brand);
}

.widget-empty { margin: 0; color: var(--muted); font-size: .9rem; }

.widget-trend-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: trend;
}

.widget-trend-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--line);
}

.widget-trend-list li:last-child { border-bottom: 0; }

.trend-rank {
    flex: 0 0 auto;
    min-width: 22px;
    font-size: .8rem;
    font-weight: 800;
    color: var(--brand);
}

.widget-trend-list a {
    color: var(--ink-2);
    font-size: .9rem;
    line-height: 1.4;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-trend-list a:hover { color: var(--brand); }

.widget-search { position: relative; }

.mini-post {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.mini-post:first-of-type { padding-top: 0; }
.mini-post:last-child { border-bottom: 0; padding-bottom: 0; }

.mini-post-media {
    flex: 0 0 82px;
    width: 82px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}

.mini-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--ease);
}

.mini-post:hover .mini-post-img { transform: scale(1.08); }

.mini-post-body { min-width: 0; }

.mini-post-title {
    margin: 0 0 6px;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.4;
}

.mini-post-title a {
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-post-title a:hover { color: var(--brand); }

.mini-post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .74rem;
    color: var(--muted);
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
    margin: 0 4px;
}

/* Widget categories (left sidebar fallback) */
.widget-cat-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.widget-cat-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-weight: 500;
    font-size: .92rem;
}

.widget-cat-list li a:hover { background: var(--brand-soft); color: var(--brand); }
.widget-cat-list li a.active { color: var(--brand); font-weight: 700; }

.widget-cat-list .category-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   10. Page hero (category / archive)
   -------------------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(120deg, var(--ink) 0%, #1e293b 100%);
    border-radius: var(--radius);
    margin-bottom: 24px;
    padding: 26px 28px;
    color: #fff;
}

.page-hero-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800;
}

.page-hero-desc {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .75);
    font-size: .92rem;
}

/* --------------------------------------------------------------------------
   11. Content with sidebar layout
   -------------------------------------------------------------------------- */
.content-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.content-side {
    position: sticky;
    top: calc(var(--header-h) + var(--nav-h) + 20px);
}

/* --------------------------------------------------------------------------
   12. Single Article
   -------------------------------------------------------------------------- */
.post-article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 40px);
    box-shadow: var(--shadow-xs);
}

.post-head { margin-bottom: 20px; }

.post-title {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 3.5vw, 2.1rem);
    font-weight: 800;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
    font-size: .85rem;
    color: var(--muted);
}

.post-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--ink-2);
}

.feed-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 5px;
    background: var(--surface-2);
}

.share-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.share-label {
    margin-right: 4px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-2);
    transition: all .18s var(--ease);
}

.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.share-fb:hover { background: #1877f2; }
.share-tw:hover { background: #000; }
.share-wa:hover { background: #25d366; }
.share-tg:hover { background: #229ed9; }
.share-vk:hover { background: #4c75a3; }
.share-copy:hover { background: var(--ink); }

/* Instant answer social variants */
.share-facebook:hover { background: #1877f2; }
.share-twitter:hover { background: #000; }
.share-instagram:hover { background: #e4405f; }
.share-youtube:hover { background: #ff0000; }
.share-github:hover { background: #24292e; }
.share-website:hover { background: var(--brand); }

.post-featured {
    margin: 0 0 24px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}

.post-featured-img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

/* Article content typography */
.post-content {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--ink);
    overflow-wrap: break-word;
}

.post-content h2 {
    font-size: 1.45rem;
    margin: 1.6em 0 .6em;
}

.post-content h3 {
    font-size: 1.2rem;
    margin: 1.4em 0 .5em;
}

.post-content p { margin-bottom: 1.1em; }

.post-content img {
    border-radius: var(--radius-sm);
    margin: 1.2em 0;
}

.post-content a { text-decoration: underline; text-underline-offset: 3px; }

.post-content blockquote {
    margin: 1.4em 0;
    padding: 14px 20px;
    border-left: 4px solid var(--brand);
    background: var(--brand-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink-2);
}

.post-content ul, .post-content ol { margin: 1em 0 1em 1.4em; }
.post-content iframe { max-width: 100%; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.post-content th, .post-content td {
    padding: 10px 12px;
    border: 1px solid var(--line);
    text-align: left;
}

.post-source-box {
    display: flex;
    justify-content: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

/* Breadcrumbs (framework-generated markup) */
.breadcrumbs { margin: 22px 0 0; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 10px 14px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: .82rem;
}

.breadcrumb-item { display: inline-flex; align-items: center; }

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin: 0 6px;
    color: var(--muted);
}

.breadcrumb-item a { color: var(--ink-2); }
.breadcrumb-item a:hover { color: var(--brand); }
.breadcrumb-item.active { color: var(--muted); }

/* Related posts */
.related-posts { margin-top: 30px; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* Comments */
.comments-area { margin-top: 30px; }
.comments-block { margin-top: 8px; }

/* --------------------------------------------------------------------------
   13. Pagination (framework-generated markup)
   -------------------------------------------------------------------------- */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-size: .9rem;
    font-weight: 600;
    transition: all .18s var(--ease);
}

.page-item .page-link:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: .45;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   14. Alerts & Flash (framework-generated markup)
   -------------------------------------------------------------------------- */
.alert {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: .92rem;
}

.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-primary { background: var(--brand-soft); border-color: #fda4af; color: var(--brand-700); }

.alert .close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: none;
    font-size: 1.1rem;
    color: inherit;
    opacity: .6;
}

/* --------------------------------------------------------------------------
   15. Forms
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    outline: none;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(226, 4, 62, .1);
}

textarea.form-control { resize: vertical; }

.form-text { display: block; margin-top: 6px; font-size: .82rem; color: var(--muted); }

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Parsley validation states */
input.is-invalid, select.is-invalid, textarea.is-invalid {
    border-color: var(--brand);
}

/* --------------------------------------------------------------------------
   16. Static pages & Empty state
   -------------------------------------------------------------------------- */
.static-page {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 36px);
}

.page-head { margin-bottom: 18px; }

.page-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 800;
}

.page-content {
    font-size: 1rem;
    line-height: 1.8;
}

.page-content img { border-radius: var(--radius-sm); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state h4 { margin: 6px 0 0; }
.empty-state p { max-width: 380px; margin: 0 0 10px; }

/* 404 */
.error-page {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 16px;
}

.error-code {
    font-size: clamp(4rem, 14vw, 7.5rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(120deg, var(--brand), #ff7a9e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-title { margin: 8px 0 6px; }
.error-text { color: var(--ink-2); margin-bottom: 2px; }
.error-sub { color: var(--muted); margin-bottom: 22px; }

/* --------------------------------------------------------------------------
   17. Search pages
   -------------------------------------------------------------------------- */
.search-hero {
    background: linear-gradient(135deg, var(--ink) 0%, #1e293b 100%);
    padding: 36px 0 24px;
}

.search-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 720px;
    margin: 0 auto;
}

.search-logo { flex: 0 0 auto; }

.search-logo .site-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .25));
    background: #fff;
    border-radius: 8px;
    padding: 4px 6px;
    max-height: 44px;
}

.search-hero .search-control { flex: 1; }

.engine-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 20px auto 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 720px;
}

.engine-tabs::-webkit-scrollbar { display: none; }

.engine-tab {
    display: block;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .85);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all .18s var(--ease);
}

.engine-tab:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.engine-tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.engine-tabs-center {
    justify-content: center;
    margin: 24px auto 0;
}

.engine-tabs-center .engine-tab {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.engine-tabs-center .engine-tab:hover { border-color: var(--brand); color: var(--brand); }

.engine-tabs-center .engine-tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.search-results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-top: 26px;
    align-items: start;
}

.search-results-side {
    position: sticky;
    top: 24px;
}

.result-favicon {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 4px;
    border-radius: 3px;
}

/* Search landing */
.search-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 0 64px;
}

.search-logo-lg .site-logo {
    max-height: 60px;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: var(--shadow-sm);
}

.search-landing .search-wrap {
    width: 100%;
    max-width: 620px;
    margin-top: 28px;
    position: relative;
}

/* Instant answer card */
.answer-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.answer-body { padding: 20px; }

.answer-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.answer-heading { margin: 0 0 8px; font-size: 1.1rem; }

.answer-abstract { color: var(--ink-2); font-size: .92rem; }

.answer-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

.infobox {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    max-height: 300px;
    overflow: hidden;
    position: relative;
}

.infobox.is-expanded { max-height: none; }

.infobox-item {
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: .88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.infobox-label { font-weight: 700; color: var(--ink); }
.infobox-value { color: var(--ink-2); }

.answer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 12px 0 0;
}

.answer-foot { border-top: 1px solid var(--line); }

.answer-foot .btn-link {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 8px;
}

.infobox-toggle.upside-down .svg-icon { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: 40px;
    background: #0d1526;
    color: #cbd5e1;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0 32px;
}

.footer-brand .site-logo {
    max-height: 40px;
    background: #fff;
    border-radius: 8px;
    padding: 3px 5px;
}

.footer-tagline {
    margin: 14px 0 0;
    max-width: 260px;
    color: #94a3b8;
    font-size: .9rem;
}

.footer-heading {
    margin: 0 0 14px;
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: #94a3b8;
    font-size: .9rem;
    transition: color .18s var(--ease);
}

.footer-links a:hover { color: #fff; }
.footer-links a.is-active { color: var(--brand); font-weight: 700; }

.footer-locales .locale-icon {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -1px;
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-copy {
    margin: 0;
    font-size: .84rem;
    color: #64748b;
}

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

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover { background: var(--brand-600); }

/* --------------------------------------------------------------------------
   19. Ad blocks & misc
   -------------------------------------------------------------------------- */
.adblock {
    text-align: center;
    margin: 16px 0;
    min-height: 1px;
}

.adblock-loop {
    grid-column: 1 / -1;
}

.ad-block {
    text-align: center;
    margin: 8px 0;
}

/* Skeleton placeholders */
.placeholder-block { padding: 24px 0; }

.placeholder {
    border-radius: 6px;
    background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 50%, #eef0f3 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.placeholder-heading { height: 18px; width: 60%; margin-bottom: 12px; }
.placeholder-sentence { height: 12px; width: 100%; margin-bottom: 10px; }
.placeholder-sentence-last { width: 70%; }
.placeholder-paragraph { height: 14px; width: 100%; margin-bottom: 18px; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip bubble */
.tooltip-bubble {
    position: fixed;
    z-index: 300;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--ink);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s var(--ease), visibility .18s;
}

.tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ink);
}

.tooltip-bubble.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Search suggestions */
.suggest-box {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
}

.suggest-box.is-visible { display: block; }

.suggest-item {
    display: block;
    padding: 10px 16px;
    font-size: .9rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.suggest-item:last-child { border-bottom: 0; }

.suggest-item:hover { background: var(--brand-soft); color: var(--brand); }

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .home-hero-row,
    .content-with-sidebar,
    .search-results-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-side,
    .search-results-side {
        position: static;
    }

    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .site-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
    .site-search { display: none; }

    .site-header-top {
        min-height: 56px;
        justify-content: space-between;
    }

    .site-header-actions { margin-left: auto; }

    .news-grid { grid-template-columns: minmax(0, 1fr); }

    .related-grid { grid-template-columns: minmax(0, 1fr); }

    .hero {
        aspect-ratio: 4 / 3;
        max-height: none;
    }

    .hero-caption { padding: 20px 16px 16px; }
    .hero-dots { right: 16px; bottom: 14px; }

    .hero-arrow { display: none; }

    .site-footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 24px; }

    .post-article { padding: 18px 16px; }

    .search-hero-inner {
        flex-direction: column;
        gap: 14px;
    }

    .search-hero .search-control { width: 100%; }

    .search-results-main.is-image { grid-column: auto; }
}

@media (max-width: 400px) {
    .container { padding: 0 12px; }
    .post-meta { gap: 8px 12px; }
}

/* Print */
@media print {
    .site-header, .site-footer, .content-side, .hero, .share-row, .back-to-top, .adblock, .ad-block {
        display: none !important;
    }

    .site-content { padding: 0; }
    .post-article { border: 0; box-shadow: none; }
}
