/* ============================================================
   NewsPortal — Premium Purple Theme
   Light / Dark mode (CSS variables + [data-theme])
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/georgian-400-normal.woff2') format('woff2');
  unicode-range: U+10A0-10FF, U+2D00-2D2F;
}
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/georgian-500-normal.woff2') format('woff2');
  unicode-range: U+10A0-10FF, U+2D00-2D2F;
}
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/georgian-700-normal.woff2') format('woff2');
  unicode-range: U+10A0-10FF, U+2D00-2D2F;
}
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/georgian-800-normal.woff2') format('woff2');
  unicode-range: U+10A0-10FF, U+2D00-2D2F;
}
@font-face {
  font-family: 'Noto Sans Georgian';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* ---------- Variables ---------- */
:root {
  --bg: #f6f4fc;
  --bg-soft: #efecf9;
  --surface: #ffffff;
  --surface-2: #f3f0fb;
  --text: #221a45;
  --muted: #6f6795;
  --border: #e6e1f4;
  --primary: #6d28d9;
  --primary-2: #8b5cf6;
  --grad: linear-gradient(120deg, #7c3aed 0%, #5b5bd6 55%, #4f46e5 100%);
  --grad-soft: linear-gradient(120deg, rgba(124,58,237,.12), rgba(79,70,229,.10));
  --on-grad: #ffffff;
  --accent: #f59e0b;
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 10px 34px rgba(76, 29, 149, .09);
  --shadow-lg: 0 24px 60px rgba(76, 29, 149, .16);
  --radius: 16px;
  --radius-sm: 11px;
  --header-h: 74px;
  --grad-overlay: linear-gradient(180deg, rgba(15,10,35,.05) 20%, rgba(15,10,35,.86) 100%);
}
[data-theme="dark"] {
  --bg: #0e0a1d;
  --bg-soft: #120d26;
  --surface: #191330;
  --surface-2: #211a3d;
  --text: #ece8fb;
  --muted: #9d94c2;
  --border: #2b224c;
  --primary: #8b5cf6;
  --primary-2: #a78bfa;
  --grad: linear-gradient(120deg, #7c3aed 0%, #6366f1 60%, #4f46e5 100%);
  --accent: #fbbf24;
  --shadow: 0 10px 34px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans Georgian', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px; line-height: 1.65;
  color: var(--text); background: var(--bg);
  transition: background .35s ease, color .35s ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
time { color: var(--muted); }
::selection { background: rgba(124, 58, 237, .25); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 22px; }
.ic { width: 1.05em; height: 1.05em; vertical-align: -.18em; flex: none; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 999; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Buttons / chips / badges ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: .93rem; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: var(--on-grad); box-shadow: 0 8px 22px rgba(109, 40, 217, .35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(109, 40, 217, .45); }
.btn-light { background: rgba(255,255,255,.92); color: #2a1a55; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--chip, #6d28d9) 16%, transparent);
  color: var(--chip, #6d28d9);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  border: 1px solid color-mix(in srgb, var(--chip, #6d28d9) 30%, transparent);
  transition: background .2s, color .2s, border-color .2s;
}
a.chip:hover { background: var(--chip, #6d28d9); color: #fff; border-color: var(--chip, #6d28d9); }
.chip-sm { padding: 3px 10px; font-size: .7rem; backdrop-filter: blur(6px); background: color-mix(in srgb, var(--chip, #6d28d9) 78%, #000 4%); color: #fff; border: 0; position: absolute; left: 12px; top: 12px; z-index: 2; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); transition: all .2s ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.icon-btn .ic { width: 19px; height: 19px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--grad);
  color: rgba(255,255,255,.95);
  font-size: .8rem;
}
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 14px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-date { opacity: .92; }
.topbar a { color: #fff; opacity: .88; display: inline-flex; align-items: center; gap: 5px; transition: opacity .2s; }
.topbar a:hover { opacity: 1; }
.topbar-soc .ic { width: 15px; height: 15px; }
.lang-switch { font-weight: 700; padding: 3px 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; }
.theme-toggle {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 30px; height: 30px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .3s ease, background .2s;
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.08); background: rgba(255,255,255,.28); }
.theme-toggle .ic { width: 15px; height: 15px; position: absolute; transition: transform .35s ease, opacity .25s ease; }
[data-theme="light"] .ic-moon { display: block; }
[data-theme="light"] .ic-sun { display: none; }
[data-theme="dark"] .ic-moon { display: none; }
[data-theme="dark"] .ic-sun { display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-main { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(109, 40, 217, .4);
}
.brand-mark .ic { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text i { font-style: normal; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: .88rem;
  color: var(--muted); transition: all .18s ease; white-space: nowrap;
}
.main-nav a:hover { color: var(--primary); background: var(--grad-soft); }
.nav-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--dot, var(--primary)); display: inline-block; margin-right: 6px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { display: none; }
@media (min-width: 1300px) { .header-cta { display: inline-flex; } }

.nav-burger { display: none; }
@media (max-width: 1023px) {
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
  }
  .main-nav {
    position: fixed; z-index: 95; inset: 0 auto 0 0; width: min(320px, 84vw);
    background: var(--surface); flex-direction: column; align-items: stretch;
    padding: 84px 18px 24px; gap: 4px; margin: 0;
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%); transition: transform .32s cubic-bezier(.22,1,.36,1);
    overflow-y: auto;
  }
  .main-nav a { padding: 13px 14px; font-size: 1rem; border-radius: 12px; }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open::after { }
}
.backdrop {
  position: fixed; inset: 0; z-index: 94;
  background: rgba(14, 8, 32, .55); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .3s ease;
}
body.nav-open .backdrop { opacity: 1; }

/* ---------- Ticker ---------- */
.ticker { border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.ticker-in { display: flex; align-items: center; gap: 14px; height: 44px; }
.ticker-badge {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); color: #fff; font-size: .72rem; font-weight: 800;
  padding: 5px 12px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase;
}
.ticker-viewport { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; gap: 34px; width: max-content; animation: ticker 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ticker-item i { width: 5px; height: 5px; border-radius: 99px; background: var(--primary-2); }
.ticker-item:hover { color: var(--primary); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(12, 7, 28, .78); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 16vh 20px 0; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.search-overlay.is-open { opacity: 1; pointer-events: auto; }
.search-box { width: min(620px, 100%); transform: translateY(-14px); transition: transform .3s ease; }
.search-overlay.is-open .search-box { transform: none; }
.search-box form {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 8px 10px 8px 20px; box-shadow: var(--shadow-lg);
}
.search-ic { color: var(--primary); width: 20px; height: 20px; }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.05rem; padding: 10px 0; }
.search-box .icon-btn { border: 0; background: var(--surface-2); }

/* ---------- Hero slider ---------- */
.hero { display: grid; grid-template-columns: 1fr 340px; gap: 22px; padding-top: 26px; padding-bottom: 10px; }
.hero-slider {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 480px; height: 66vh; max-height: 620px;
  box-shadow: var(--shadow-lg); background: var(--surface-2);
  isolation: isolate;
}
.hero-track { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 7s ease; }
.hero-slide.is-active .hero-img { transform: scale(1.12); }
.hero-overlay { position: absolute; inset: 0; background: var(--grad-overlay); }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(109,40,217,.28), transparent 55%); mix-blend-mode: multiply; }
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(20px, 4vw, 48px); max-width: 780px; color: #fff;
}
.hero-slide .hero-content > * { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.hero-slide.is-active .hero-content > * { opacity: 1; transform: none; }
.hero-slide.is-active .hero-content > :nth-child(1) { transition-delay: .15s; }
.hero-slide.is-active .hero-content > :nth-child(2) { transition-delay: .28s; }
.hero-slide.is-active .hero-content > :nth-child(3) { transition-delay: .4s; }
.hero-slide.is-active .hero-content > :nth-child(4) { transition-delay: .5s; }
.hero-slide.is-active .hero-content > :nth-child(5) { transition-delay: .6s; }
.hero-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero-tags .chip { color: #fff; border-color: rgba(255,255,255,.5); background: color-mix(in srgb, var(--chip, #6d28d9) 65%, transparent); backdrop-filter: blur(6px); }
.hero-flag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; opacity: .92; }
.hero-flag .ic { width: 14px; height: 14px; color: var(--accent); }
.hero-title { font-size: clamp(1.5rem, 3.4vw, 2.6rem); margin-bottom: 12px; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero-title a:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,.6); text-underline-offset: 6px; }
.hero-excerpt { color: rgba(255,255,255,.88); font-size: clamp(.95rem, 1.4vw, 1.08rem); max-width: 620px; margin-bottom: 18px; }
.hero-meta { display: flex; gap: 18px; font-size: .85rem; color: rgba(255,255,255,.8); margin-bottom: 22px; flex-wrap: wrap; }
.hero-meta .ic { margin-right: 4px; }
.hero-cta { align-self: flex-start; }

.hero-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s; opacity: 0;
}
.hero-slider:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: var(--primary); }
.hero-prev { left: 18px; } .hero-next { right: 18px; }
.hero-dots { position: absolute; z-index: 3; right: 22px; bottom: 18px; display: flex; gap: 7px; }
.hero-dot { width: 9px; height: 9px; border-radius: 99px; border: 0; background: rgba(255,255,255,.45); transition: all .3s; }
.hero-dot.is-active { width: 26px; background: #fff; }
.hero-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.15); }
.hero-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a78bfa, #fff); }
.hero-slider.is-playing .hero-progress span { animation: heroBar var(--hero-dur, 6.5s) linear forwards; }
@keyframes heroBar { from { width: 0; } to { width: 100%; } }

.hero-side { display: flex; }
.widget-side { flex: 1; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 20px; }
@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .hero-slider { height: 58vw; min-height: 340px; max-height: 480px; }
}

/* ---------- Widgets ---------- */
.home-body { display: grid; grid-template-columns: 1fr 340px; gap: 26px; padding-top: 26px; padding-bottom: 60px; }
@media (max-width: 1023px) { .home-body { grid-template-columns: 1fr; } }
.home-side { display: flex; flex-direction: column; gap: 22px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.widget-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 1.02rem; margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--border); position: relative;
}
.widget-title .ic { color: var(--primary); }
.widget-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--grad); }

.mini-list { display: flex; flex-direction: column; }
.mini-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.mini-item:last-child { border-bottom: 0; }
.mini-thumb { width: 84px; height: 62px; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-2); }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mini-item:hover .mini-thumb img { transform: scale(1.08); }
.mini-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-body b { font-size: .88rem; font-weight: 700; line-height: 1.4; transition: color .2s; }
.mini-item:hover .mini-body b { color: var(--primary); }
.mini-body time { font-size: .74rem; }

.cat-list li { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; transition: color .2s; }
.cat-list a:hover { color: var(--primary); }
.cat-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--dot, var(--primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, #6d28d9) 20%, transparent); }
.cat-list b { font-size: .8rem; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 2px 9px; }

.widget-cta { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.widget-cta::before { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.12); top: -80px; right: -60px; }
.widget-cta-ic { width: 34px; height: 34px; color: rgba(255,255,255,.9); margin-bottom: 6px; }
.widget-cta h3 { color: #fff; }
.widget-cta p { color: rgba(255,255,255,.85); font-size: .9rem; }
.footer-social { display: flex; gap: 9px; flex-wrap: wrap; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); color: #fff;
  transition: all .2s ease;
}
.footer-social a:hover { background: #fff; color: var(--primary); transform: translateY(-3px); }
.widget-cta .footer-social a { background: rgba(0,0,0,.14); }

/* ---------- Section head ---------- */
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 20px; position: relative; padding-bottom: 12px;
}
.section-head::after { content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; border-radius: 3px; background: var(--accent, var(--primary)); }
.section-head h2 { font-size: 1.45rem; margin: 0; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .87rem; color: var(--accent, var(--primary)); opacity: .9; }
.section-link:hover { opacity: 1; gap: 10px; }
.section-link { transition: gap .2s; }

.cat-section { margin-bottom: 44px; }
.section-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
@media (max-width: 767px) { .section-grid { grid-template-columns: 1fr; } }
.section-list { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-thumb { position: relative; display: block; overflow: hidden; background: var(--surface-2); }
.card-thumb img { width: 100%; object-fit: cover; aspect-ratio: 16 / 10; transition: transform .5s ease; }
.card:hover .card-thumb img { transform: scale(1.07); }
.thumb-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 999px;
  background: rgba(109, 40, 217, .85); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: transform .25s;
}
.thumb-play .ic { width: 22px; height: 22px; margin-left: 3px; }
.card:hover .thumb-play { transform: translate(-50%, -50%) scale(1.12); background: var(--primary); }
.card-body { padding: 17px 19px 19px; }
.card-body h3 { font-size: 1.06rem; margin: 0 0 8px; }
.card-body h3 a { transition: color .2s; }
.card-body h3 a:hover { color: var(--primary); }
.card-big .card-thumb img { aspect-ratio: 16 / 9.4; }
.card-big-title { font-size: 1.32rem !important; }
.card-excerpt { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.card-meta { display: flex; align-items: center; gap: 16px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.card-meta .ic { margin-right: 4px; color: var(--primary-2); }
.card-list { display: grid; grid-template-columns: 168px 1fr; }
.card-list .card-thumb img { width: 100%; height: 100%; aspect-ratio: auto; min-height: 118px; }
@media (max-width: 560px) { .card-list { grid-template-columns: 1fr; } .card-list .card-thumb img { aspect-ratio: 16/9; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }

/* Gallery preview on home */
.g-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1023px) { .g-preview { grid-template-columns: repeat(2, 1fr); } }
.g-card { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.g-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-card:hover img { transform: scale(1.09); }
.g-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(12,7,30,.85)); }
.g-title { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 10px; color: #fff; font-size: .82rem; font-weight: 700; }
.g-badge { position: absolute; z-index: 2; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.9); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.g-badge .ic { width: 16px; height: 16px; }

/* ---------- Article page ---------- */
.article-wrap { padding-top: 26px; padding-bottom: 60px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: .83rem; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs i { font-style: normal; opacity: .5; }
.read-progress { position: fixed; z-index: 95; top: 0; left: 0; right: 0; height: 3px; background: transparent; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--grad); }

.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 44px); }
.article-head .chip { margin-bottom: 16px; }
.article-head h1 { font-size: clamp(1.5rem, 3.2vw, 2.35rem); margin-bottom: 16px; }
.article-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .83rem; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.article-meta .ic { margin-right: 5px; color: var(--primary-2); }
.article-meta a:hover { color: var(--primary); }
.article-cover { margin: 24px 0; border-radius: 14px; overflow: hidden; }
.article-cover img { width: 100%; max-height: 560px; object-fit: cover; }
.article-lead { font-size: 1.12rem; font-weight: 600; color: var(--text); background: var(--grad-soft); border-left: 4px solid var(--primary); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.article-body { font-size: 1.03rem; line-height: 1.85; }
.article-body p { margin-bottom: 1.2em; }
.article-body h2 { font-size: 1.5rem; margin-top: 1.6em; }
.article-body h3 { font-size: 1.22rem; margin-top: 1.5em; }
.article-body img { border-radius: 12px; margin: 1.2em 0; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 1.2em; list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: .4em; }
.article-body blockquote { margin: 1.4em 0; padding: 16px 22px; border-left: 4px solid var(--primary); background: var(--grad-soft); border-radius: 0 12px 12px 0; font-weight: 600; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body figure { margin: 1.4em 0; }
.article-body iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; }

.video-embed { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; margin: 24px 0; box-shadow: var(--shadow-lg); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.share-row { display: flex; align-items: center; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.share-row > b { display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; font-size: .9rem; }
.share-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: transform .2s ease, filter .2s;
}
.share-btn:hover { transform: translateY(-3px); filter: brightness(1.1); }
.share-btn .ic { width: 18px; height: 18px; }
.share-fb { background: #1877f2; } .share-x { background: #14171a; }
.share-tg { background: #2aabee; }
.share-copy { background: var(--grad); position: relative; }
.share-copy::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap;
}
.share-copy.is-copied::after { opacity: 1; }

/* ---------- Comments ---------- */
.comments { margin-top: 34px; }
.comments-title { font-size: 1.3rem; padding-bottom: 12px; border-bottom: 2px solid var(--border); position: relative; }
.comments-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--grad); }
.comments-empty { color: var(--muted); font-style: italic; }
.comment { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--border); }
.comment-ava {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  background: var(--grad); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.comment-head b { font-size: .95rem; }
.comment-head time { font-size: .75rem; }
.comment-main p { margin: 0; color: color-mix(in srgb, var(--text) 88%, var(--muted)); font-size: .95rem; }
.comment-form { margin-top: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.comment-form h3 { font-size: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.comment-form input:not(.hp-field), .comment-form textarea {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg);
  outline: none; transition: border .2s, box-shadow .2s; resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.hp-field { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }

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

/* ---------- Category / search headers ---------- */
.cat-hero { margin-bottom: 28px; position: relative; padding: 26px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.cat-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--accent, #6d28d9) 14%, transparent), transparent 55%); pointer-events: none; }
.cat-hero-dot { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent, #6d28d9) 30%, transparent), transparent 70%); }
.cat-hero h1 { position: relative; margin-bottom: 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cat-hero p { position: relative; color: var(--muted); margin: 0; max-width: 640px; }
.cat-hero-count { position: relative; display: inline-block; margin-top: 12px; font-size: .8rem; font-weight: 700; color: var(--accent, var(--primary)); background: color-mix(in srgb, var(--accent, #6d28d9) 12%, transparent); padding: 4px 14px; border-radius: 999px; }
.search-inline { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 18px; max-width: 560px; }
.search-inline .ic { position: absolute; left: 16px; color: var(--primary); }
.search-inline input { flex: 1; padding: 12px 14px 12px 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); outline: none; }
.search-inline input:focus { border-color: var(--primary); }
.search-list { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Gallery page ---------- */
.gallery-tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.gtab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: all .2s ease;
}
.gtab:hover { border-color: var(--primary); color: var(--primary); }
.gtab.is-active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(109,40,217,.3); }
.gtab b { font-size: .78rem; background: rgba(0,0,0,.12); padding: 1px 9px; border-radius: 99px; }
.gtab:not(.is-active) b { background: var(--surface-2); color: var(--muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1023px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.g-item { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow); background: var(--surface-2); }
.g-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s ease; }
.g-item:hover img { transform: scale(1.08); }
.g-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 13px; color: #fff; font-size: .88rem; font-weight: 700; background: linear-gradient(180deg, transparent, rgba(10,6,26,.88)); opacity: 0; transition: opacity .3s; }
.g-item:hover figcaption { opacity: 1; }
.g-zoom, .g-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.7);
  width: 54px; height: 54px; border-radius: 999px; border: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all .3s ease;
}
.g-zoom { background: rgba(255,255,255,.92); color: var(--primary); }
.g-play { background: rgba(109,40,217,.92); color: #fff; }
.g-play .ic { margin-left: 3px; }
.g-item:hover .g-zoom, .g-item:hover .g-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.g-video { cursor: pointer; }

.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(8, 5, 20, .92); display: flex; align-items: center; justify-content: center; padding: 30px; opacity: 0; transition: opacity .25s; }
.lightbox.is-open { opacity: 1; }
.lb-stage { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.lb-stage img { max-width: 100%; max-height: 80vh; border-radius: 14px; margin: 0 auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-stage figcaption { color: rgba(255,255,255,.85); margin-top: 14px; font-size: .95rem; }
.lightbox .icon-btn { position: absolute; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

.vmodal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 20px; }
.vmodal-backdrop { position: absolute; inset: 0; background: rgba(8,5,20,.92); }
.vmodal-body { position: relative; width: min(960px, 100%); }
.vmodal-body .video-embed { margin: 0; }
.vmodal-body p { color: #fff; text-align: center; margin-top: 14px; font-weight: 600; }
.vmodal-close { position: absolute; top: -50px; right: 0; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }

/* ---------- Pagination / alerts / misc ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 36px 0 10px; flex-wrap: wrap; }
.pg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  font-weight: 700; font-size: .9rem; color: var(--muted); transition: all .2s;
}
.pg-btn:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn.is-active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(109,40,217,.3); }
.pg-dots { color: var(--muted); }

.alert { padding: 16px 20px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border); color: var(--muted); font-weight: 600; margin: 20px 0; }
.alert-ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.alert-warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); color: color-mix(in srgb, var(--warn) 65%, var(--text)); }

.error-page { text-align: center; padding: 70px 20px 90px; }
.error-code { font-size: clamp(5rem, 14vw, 9rem); font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.error-page h1 { font-size: 1.6rem; }
.error-page p { color: var(--muted); max-width: 480px; margin: 0 auto 26px; }

.page-wrap { padding-top: 26px; padding-bottom: 70px; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, #1b1038, #120b26); color: #cfc7ec; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; padding: 54px 22px 40px; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: #fff; font-size: .98rem; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; border-radius: 3px; background: var(--grad); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .9rem; color: #b3a9d6; transition: color .2s, padding-left .2s; display: inline-flex; align-items: center; }
.footer-col ul a:hover { color: #fff; padding-left: 5px; }
.footer-about p { font-size: .9rem; color: #b3a9d6; margin: 16px 0 18px; }
.brand-light .brand-text b { background: linear-gradient(120deg, #c4b5fd, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-light .brand-text i { color: #9d92c9; }
.footer-contact li { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: #b3a9d6; }
.footer-contact .ic { color: var(--primary-2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; }
.footer-bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: #8d81b8; flex-wrap: wrap; }

/* ---------- To top ---------- */
.to-top {
  position: fixed; z-index: 80; right: 22px; bottom: 22px;
  width: 46px; height: 46px; border-radius: 13px; border: 0;
  background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(109,40,217,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: all .3s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { transform: translateY(-3px); }
.ic-rot { transform: rotate(90deg); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  .topbar-left .topbar-date { display: none; }
  :root { --header-h: 64px; }
  .brand-text b { font-size: 1.1rem; }
  .brand-text i { display: none; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .hero-content { padding: 18px; }
  .hero-dots { right: 14px; }
  .article { padding: 20px 16px; }
  .section-grid { gap: 14px; }
}
