/* ================================================================
   CAMPUSCENTS — style.css  (v3 — layout-fixed)
   Fonts   : Fraunces (display) + DM Sans (body)
   Palette : Slate Navy #1B2A41 / Sage Green #2D8C6B / Warm Amber #E8A020
================================================================ */

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* KEY FIX: both html AND body locked — prevents any horizontal scroll */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video, svg { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; outline: none; }

/* ── CUSTOM PROPERTIES ─────────────────────────────────────── */
:root {
  --navy:    #1B2A41;
  --navy-2:  #243448;
  --green:   #2D8C6B;
  --green-l: #E6F4EF;
  --amber:   #E8A020;
  --amber-l: #FEF3DC;

  --bg:      #F8F7F4;
  --bg-card: #FFFFFF;
  --bg-soft: #F1F0EC;
  --border:  #E4E2DC;
  --text:    #1B2029;
  --text-2:  #4A5162;
  --text-3:  #8A8FA0;

  --sh-sm:  0 1px 3px rgba(27,42,65,.07);
  --sh-md:  0 4px 16px rgba(27,42,65,.09);
  --sh-lg:  0 10px 40px rgba(27,42,65,.13);

  --r:    10px;
  --r-lg: 18px;
  --r-xl: 26px;

  --display: 'Fraunces', Georgia, serif;
  --body:    'DM Sans', system-ui, sans-serif;

  --hdr-h: 62px;
  --max:   1240px;
  --gap:   20px;
  --ease:  .2s ease;
}

[data-theme="dark"] {
  --bg:      #111822;
  --bg-card: #1A2333;
  --bg-soft: #162030;
  --border:  #253045;
  --text:    #EEF0F5;
  --text-2:  #9AAABB;
  --text-3:  #5D6E80;
  --sh-sm:   0 1px 3px rgba(0,0,0,.35);
  --sh-md:   0 4px 16px rgba(0,0,0,.40);
  --sh-lg:   0 10px 40px rgba(0,0,0,.55);
  --green-l: #0F2820;
  --amber-l: #231A07;
}

/* ── BASE ──────────────────────────────────────────────────── */
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  transition: background var(--ease), color var(--ease);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

.section { padding: 52px 0; }
@media (min-width: 768px)  { .section { padding: 72px 0; } }

/* ── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1rem, 2vw, 1.2rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--green);
  margin-bottom: 10px;
}
.eyebrow::before {
  content: ''; display: inline-block;
  width: 16px; height: 2px; background: var(--green); border-radius: 2px; flex-shrink: 0;
}
.eyebrow.light { color: rgba(255,255,255,.8); }
.eyebrow.light::before { background: rgba(255,255,255,.6); }

.section-hd { margin-bottom: 32px; }
.section-hd h2 { margin-top: 6px; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-family: var(--body); font-weight: 600; font-size: .875rem;
  white-space: nowrap; cursor: pointer;
  transition: all var(--ease);
  border: 2px solid transparent;
}
.btn-primary  { background: var(--navy); color: #fff; }
.btn-primary:hover  { background: var(--navy-2); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27,42,65,.28); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
[data-theme="dark"] .btn-secondary { color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-secondary:hover { background: var(--text); color: var(--bg); }
.btn-white { background: #fff; color: var(--navy); font-weight: 700; }
.btn-white:hover { background: var(--amber-l); transform: translateY(-1px); }
.btn-ghost { color: var(--text-2); padding: 8px 14px; border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--bg-soft); }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-telegram { background: #29A9E1; color: #fff; border-color: transparent; font-weight: 700; }
.btn-telegram:hover { background: #1a8cb8; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(41,169,225,.35); }

.icon-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r); color: var(--text-2); font-size: 1rem;
  transition: all var(--ease);
}
.icon-btn:hover { background: var(--bg-soft); color: var(--green); }

/* ── FOCUS & MOTION ─────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ================================================================
   HEADER
================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  transition: background var(--ease), border-color var(--ease), box-shadow .3s;
  /* Prevents header from ever spilling width */
  width: 100%; left: 0;
}
.site-header.scrolled { box-shadow: var(--sh-md); }

.header-wrap {
  display: flex; align-items: center;
  height: var(--hdr-h);
  gap: 8px;
  /* Clamp so controls never push past viewport */
  min-width: 0;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--navy); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .9rem;
}
.logo-wordmark {
  font-family: var(--body); font-size: 1.1rem; font-weight: 400;
  color: var(--text); letter-spacing: -.01em; white-space: nowrap;
}
.logo-wordmark strong { font-weight: 700; color: var(--green); }

/* Desktop nav */
.desk-nav { display: none; align-items: center; gap: 2px; margin-left: 20px; flex-shrink: 0; }
@media (min-width: 1024px) { .desk-nav { display: flex; } }

.nav-a {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--r);
  font-size: .86rem; font-weight: 500; color: var(--text-2);
  transition: all var(--ease); background: none; border: none;
  font-family: var(--body); cursor: pointer; white-space: nowrap;
}
.nav-a:hover, .nav-a.active { color: var(--text); background: var(--bg-soft); }
.nav-a i { transition: transform var(--ease); font-size: .62rem; }

.nav-drop-wrap { position: relative; }
.nav-drop-wrap:hover .nav-a i,
.nav-drop-wrap:focus-within .nav-a i { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 210px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 6px;
  opacity: 0; pointer-events: none;
  transform: translateY(6px); transition: all var(--ease); z-index: 200;
}
.nav-drop-wrap:hover .nav-dropdown,
.nav-drop-wrap:focus-within .nav-dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: var(--r);
  font-size: .84rem; color: var(--text-2); transition: all var(--ease);
}
.nav-dropdown a:hover { background: var(--green-l); color: var(--green); }
.nav-dropdown a i { width: 16px; text-align: center; font-size: .82rem; opacity: .75; flex-shrink: 0; }

/* Header controls */
.hdr-controls {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; flex-shrink: 0;
}

.lang-toggle { display: flex; align-items: center; gap: 3px; }
.lang-btn {
  padding: 4px 7px; border-radius: 6px;
  font-size: .73rem; font-weight: 700; color: var(--text-3);
  transition: all var(--ease);
}
.lang-btn.active { color: var(--green); background: var(--green-l); }
.lang-btn:hover  { color: var(--green); }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  width: 38px; height: 38px; flex-shrink: 0;
  align-items: center; justify-content: center; border-radius: var(--r);
}
.hamburger:hover { background: var(--bg-soft); }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all var(--ease);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .hamburger { display: none; } }

/* ── SEARCH DRAWER ──────────────────────────────────────────── */
.search-drawer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden; max-height: 0;
  transition: max-height .3s ease;
}
.search-drawer.open { max-height: 200px; }
.search-drawer .container { padding-top: 14px; padding-bottom: 14px; }

.search-field { position: relative; display: flex; align-items: center; }
.search-field > .sf-icon {
  position: absolute; left: 13px;
  color: var(--text-3); font-size: .88rem; pointer-events: none;
}
.search-field input {
  width: 100%; padding: 11px 44px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg-card); color: var(--text); font-size: .9rem;
  transition: border-color var(--ease);
  -webkit-appearance: none; /* remove iOS inner shadow */
}
.search-field input:focus { border-color: var(--green); }
/* kill browser search decoration on mobile */
.search-field input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-field #search-close {
  position: absolute; right: 10px;
  color: var(--text-3); font-size: .95rem; padding: 6px;
}
.search-field #search-close:hover { color: var(--text); }

.search-results {
  margin-top: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); display: none;
}
.search-results.has-results { display: block; }
.sr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--ease);
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg-soft); }
.sr-item img { width: 48px; height: 36px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.sr-item strong { display: block; font-size: .83rem; color: var(--text); }
.sr-item span   { font-size: .71rem; color: var(--text-3); }
.sr-empty { padding: 16px; text-align: center; color: var(--text-3); font-size: .85rem; }

/* ── MOBILE DRAWER ──────────────────────────────────────────── */
.mobile-drawer {
  position: fixed;
  /* Sits flush under header, never taller than screen */
  top: var(--hdr-h); left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  z-index: 850;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  /* Prevent content inside from creating horizontal scroll */
  width: 100%;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer nav { padding: 20px 20px 32px; flex: 1; display: flex; flex-direction: column; }
.mobile-drawer ul  { flex: 1; }
.mobile-drawer li a {
  display: block; padding: 15px 0;
  font-size: 1.1rem; font-family: var(--display); font-weight: 600;
  color: var(--text); border-bottom: 1px solid var(--border);
  transition: color var(--ease);
}
.mobile-drawer li a:hover { color: var(--green); }
.mobile-socials {
  display: flex; gap: 10px; padding-top: 24px; margin-top: auto; flex-wrap: wrap;
}
.mobile-socials a {
  width: 42px; height: 42px; border: 1px solid var(--border); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 1rem; transition: all var(--ease);
}
.mobile-socials a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 840; opacity: 0; pointer-events: none;
  transition: opacity var(--ease);
}
.drawer-overlay.show { opacity: 1; pointer-events: all; }

/* ================================================================
   AD SLOTS
================================================================ */
.ad-bar { background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 8px 0; }
.ad-placeholder-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; color: var(--text-3); font-size: .7rem; letter-spacing: .04em;
  border: 1.5px dashed var(--border); border-radius: var(--r); padding: 10px 14px;
  max-width: 728px; margin: 0 auto;
}
.ad-placeholder-bar i { font-size: 1.1rem; color: var(--border); flex-shrink: 0; }

.ad-section { padding: 16px 0; }
.ad-placeholder-wide {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 80px; color: var(--text-3); font-size: .73rem;
  border: 1.5px dashed var(--border); border-radius: var(--r);
  padding: 14px; background: var(--bg-soft); text-align: center;
}
.ad-placeholder-wide i { font-size: 1.3rem; color: var(--border); flex-shrink: 0; }

.ad-inline { padding: 20px 0; }
.ad-placeholder-inline {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 70px; color: var(--text-3); font-size: .73rem;
  border: 1.5px dashed var(--border); border-radius: var(--r);
  padding: 12px; background: var(--bg-soft); text-align: center;
}
.ad-placeholder-inline i { font-size: 1.1rem; color: var(--border); flex-shrink: 0; }

.ad-widget { padding: 0 !important; border: none !important; background: transparent !important; }
.ad-placeholder-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 250px; width: 100%; color: var(--text-3); font-size: .71rem;
  border: 1.5px dashed var(--border); border-radius: var(--r);
  padding: 14px; background: var(--bg-soft); text-align: center;
}
.ad-placeholder-box i { font-size: 1.5rem; color: var(--border); }
.ad-placeholder-tall { min-height: 300px; }

/* ================================================================
   COOKIE BANNER
================================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--navy); color: #fff; z-index: 2000;
  transform: translateY(100%); transition: transform .35s ease; padding: 14px 0;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-inner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.cookie-inner p { font-size: .82rem; flex: 1; min-width: 180px; color: rgba(255,255,255,.85); line-height: 1.5; }
.cookie-inner a { color: var(--amber); text-decoration: underline; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }

/* ================================================================
   HERO
================================================================ */
.hero {
  position: relative;
  padding: 56px 0 64px;
  /* Clip the blob decoration — nothing escapes this box */
  overflow: hidden;
}
@media (min-width: 768px) { .hero { padding: 84px 0 96px; } }

.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1fr; } }

.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber-l); color: #9A5E0A;
  padding: 6px 14px; border-radius: 100px;
  font-size: .73rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 16px;
  max-width: 100%; /* never overflows on small phones */
}
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
  animation: pulse 2s infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
[data-theme="dark"] .hero-pill { background: rgba(232,160,32,.15); color: var(--amber); }

.hero h1 { margin-bottom: 16px; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--green); }

.hero-lead {
  font-size: 1rem; color: var(--text-2);
  max-width: 100%; margin-bottom: 26px; line-height: 1.75;
}
@media (min-width: 640px) { .hero-lead { font-size: 1.05rem; } }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
/* On very small phones, buttons go full width */
@media (max-width: 360px) { .hero-ctas .btn { width: 100%; justify-content: center; } }

.hero-trust { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.trust-item strong {
  display: block; font-family: var(--display);
  font-size: 1.35rem; font-weight: 700; color: var(--text); line-height: 1;
}
.trust-item span { font-size: .73rem; color: var(--text-3); }
.trust-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }

/* ── Hero card stack ─────────────────────────────────────────── */
.hero-cards {
  position: relative;
  height: 300px;
  width: 100%;
  /* Extra guard: cards rotate and could overflow without this */
  overflow: hidden;
  border-radius: var(--r-xl);
}
@media (min-width: 480px) { .hero-cards { height: 330px; } }

.hc {
  position: absolute;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg);
}
.hc:nth-child(1) { width: 82%; top: 0; left: 9%; z-index: 3; }
.hc:nth-child(2) { width: 74%; top: 20px; left: 0; z-index: 2; transform: rotate(-3deg); }
.hc:nth-child(3) { width: 74%; top: 20px; right: 0; z-index: 1; transform: rotate(3deg); }
.hc img { width: 100%; height: 148px; object-fit: cover; }
.hc-body { padding: 12px 14px; }
.hc-body strong {
  display: block; font-size: .82rem; font-family: var(--display); font-weight: 700;
  color: var(--text); line-height: 1.3;
  /* clip text so it never pushes card width */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hc-body span { font-size: .68rem; color: var(--text-3); margin-top: 3px; display: block; }

/* ── Hero blob (decorative, fully clipped by hero overflow:hidden) ── */
.hero-blob {
  position: absolute; top: -140px; right: -140px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-l) 0%, transparent 70%);
  pointer-events: none; z-index: 0; opacity: .55;
}
.hero > .container { position: relative; z-index: 1; }

/* ================================================================
   ARTICLE CARDS
================================================================ */
.article-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--ease), box-shadow var(--ease); cursor: pointer;
  /* Fix: card must never exceed its grid cell */
  min-width: 0;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }

.card-img-wrap {
  position: relative; aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0;
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease;
}
.article-card:hover .card-img-wrap img { transform: scale(1.04); }

.card-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 100px;
  font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; white-space: nowrap;
}

.card-body {
  padding: 16px; flex: 1; display: flex; flex-direction: column;
  min-width: 0; /* critical for flex children with text overflow */
}
.card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .69rem; color: var(--text-3); margin-bottom: 8px;
}
.card-meta i { font-size: .62rem; }
.card-title {
  font-size: .95rem; font-weight: 700; font-family: var(--display);
  line-height: 1.35; color: var(--text); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-excerpt {
  font-size: .82rem; color: var(--text-2); line-height: 1.65; flex: 1; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  gap: 8px; flex-wrap: wrap;
}
.card-author {
  display: flex; align-items: center; gap: 7px;
  font-size: .74rem; color: var(--text-2); min-width: 0;
}
.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: #fff;
}
.read-btn {
  font-size: .74rem; font-weight: 600; color: var(--green);
  display: flex; align-items: center; gap: 4px;
  transition: gap var(--ease); background: none; border: none;
  font-family: var(--body); cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.read-btn:hover { gap: 8px; }
.read-btn i { font-size: .68rem; }

/* ── Featured grid ───────────────────────────────────────────── */
.featured-grid { display: grid; gap: var(--gap); }
@media (min-width: 640px)  { .featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  /* First card goes full-width and becomes horizontal */
  .featured-grid .article-card:first-child { grid-column: 1 / -1; flex-direction: row; }
  .featured-grid .article-card:first-child .card-img-wrap {
    width: 42%; flex-shrink: 0; aspect-ratio: auto; min-height: 260px;
  }
  .featured-grid .article-card:first-child .card-title { font-size: 1.2rem; }
  .featured-grid .article-card:first-child .card-body { padding: 24px; }
}

/* ── Article grid ────────────────────────────────────────────── */
.article-grid { display: grid; gap: var(--gap); }
@media (min-width: 600px)  { .article-grid { grid-template-columns: repeat(2, 1fr); } }

/* ================================================================
   STARS
================================================================ */
.stars { display: flex; align-items: center; gap: 2px; }
.star  { font-size: .78rem; color: var(--border); cursor: pointer; transition: color var(--ease); }
.star.on { color: #F6AD55; }
.stars.interactive:hover .star { color: #F6AD55; }
.stars.interactive .star:hover ~ .star { color: var(--border); }
.rcount { font-size: .66rem; color: var(--text-3); margin-left: 4px; white-space: nowrap; }

/* ================================================================
   CONTENT + SIDEBAR LAYOUT
================================================================ */
.layout-wrap { display: grid; gap: 36px; align-items: start; }
@media (min-width: 1080px) { .layout-wrap { grid-template-columns: 1fr 296px; } }

/* ================================================================
   CATEGORIES GRID
================================================================ */
.cats-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) { .cats-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 768px) { .cats-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 12px;
  text-align: center; cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  min-width: 0;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.cat-ico {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff; transition: transform var(--ease);
}
.cat-card:hover .cat-ico { transform: scale(1.1); }
.cat-name {
  font-family: var(--display); font-size: .79rem; font-weight: 700;
  color: var(--text); line-height: 1.3;
  /* clip long labels on small screens */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cat-cnt { font-size: .67rem; color: var(--text-3); }

/* ================================================================
   TOP 10
================================================================ */
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-btn {
  padding: 7px 18px; border-radius: 100px;
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  border: 1.5px solid var(--border); transition: all var(--ease); font-family: var(--body);
}
.tab-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-btn:hover:not(.active) { border-color: var(--green); color: var(--green); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.top-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: padding var(--ease);
  min-width: 0;
}
.top-item:hover { padding-left: 5px; }
.top-item:last-child { border-bottom: none; }
.top-num {
  font-family: var(--display); font-size: 1.2rem; font-weight: 800;
  color: var(--border); min-width: 28px; text-align: center; flex-shrink: 0;
}
.top-item:nth-child(1) .top-num { color: #F6AD55; }
.top-item:nth-child(2) .top-num { color: var(--text-3); }
.top-item:nth-child(3) .top-num { color: #E17055; }
.top-img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--r); flex-shrink: 0; }
.top-info { flex: 1; min-width: 0; }
.top-title {
  font-family: var(--display); font-size: .84rem; font-weight: 700;
  color: var(--text); line-height: 1.3; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.top-meta { display: flex; align-items: center; gap: 8px; font-size: .69rem; color: var(--text-3); flex-wrap: wrap; }

/* ================================================================
   SIDEBAR
================================================================ */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px;
}
.widget-title {
  font-family: var(--body); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--border);
}
.widget .search-field input { padding: 10px 40px; font-size: .85rem; }

.widget-cat-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: .82rem; cursor: pointer; transition: color var(--ease); min-width: 0;
}
.widget-cat-list li:last-child { border-bottom: none; }
.widget-cat-list li:hover { color: var(--green); }
.wc-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wc-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-label i  { font-size: .78rem; opacity: .75; flex-shrink: 0; }
.wc-count {
  font-size: .67rem; color: var(--text-3);
  background: var(--bg-soft); padding: 2px 7px; border-radius: 100px; flex-shrink: 0;
}

.widget-posts { display: flex; flex-direction: column; gap: 11px; }
.wp-item {
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; transition: opacity var(--ease); min-width: 0;
}
.wp-item:hover { opacity: .72; }
.wp-item img { width: 54px; height: 40px; object-fit: cover; border-radius: var(--r); flex-shrink: 0; }
.wp-title {
  font-size: .78rem; font-weight: 600; color: var(--text); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wp-meta { font-size: .67rem; color: var(--text-3); margin-top: 3px; }

/* ================================================================
   NEWSLETTER
================================================================ */
.newsletter-section { background: var(--navy); padding: 64px 0; }
.nl-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .nl-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }

.nl-left h2 { color: #fff; margin: 10px 0 12px; font-size: clamp(1.35rem, 3vw, 1.9rem); }
.nl-left p  { color: rgba(255,255,255,.7); font-size: .93rem; line-height: 1.7; }

.nl-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nl-form input {
  flex: 1; min-width: 0;
  padding: 12px 16px; border: 1.5px solid rgba(255,255,255,.2); border-radius: var(--r);
  background: rgba(255,255,255,.08); color: #fff; font-size: .88rem;
  -webkit-appearance: none;
}
.nl-form input::placeholder { color: rgba(255,255,255,.42); }
.nl-form input:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.13); outline: none; }
.nl-fine { font-size: .71rem; color: rgba(255,255,255,.4); margin-bottom: 16px; }

.nl-avatars {
  display: flex; align-items: center; gap: 6px;
  font-size: .77rem; color: rgba(255,255,255,.55); flex-wrap: wrap;
}
.nl-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; border: 2px solid var(--navy);
  margin-left: -5px; flex-shrink: 0;
}
.nl-avatar:first-child { margin-left: 0; }

/* ================================================================
   TELEGRAM
================================================================ */
.tg-section { background: var(--bg-soft); }
.tg-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .tg-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }

.tg-text h2 { margin: 10px 0 12px; font-size: clamp(1.35rem, 3vw, 1.9rem); }
.tg-text > p { color: var(--text-2); font-size: .93rem; line-height: 1.7; margin-bottom: 18px; }
.tg-perks { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.tg-perks li { display: flex; align-items: flex-start; gap: 10px; font-size: .87rem; color: var(--text-2); }
.tg-perks li i { color: var(--green); margin-top: 3px; flex-shrink: 0; }

/* Telegram card */
.tg-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg);
  max-width: 340px;
  /* On mobile it can go full width */
  width: 100%;
}
.tg-card-hd {
  background: #29A9E1; padding: 13px 16px;
  display: flex; align-items: center; gap: 10px;
}
.tg-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .95rem;
}
.tg-card-hd div strong { display: block; font-size: .86rem; color: #fff; font-weight: 600; }
.tg-card-hd div span  { font-size: .69rem; color: rgba(255,255,255,.7); }
.tg-messages { padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.tg-msg { display: flex; gap: 8px; align-items: flex-start; }
.tg-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 700;
}
.tg-bubble {
  background: var(--bg-soft); border-radius: 0 10px 10px 10px;
  padding: 7px 11px; font-size: .73rem; color: var(--text-2); line-height: 1.5;
  min-width: 0; word-break: break-word;
}
.tg-bubble b { display: block; font-size: .71rem; margin-bottom: 2px; color: var(--green); }

/* ================================================================
   SOCIAL ICONS
================================================================ */
.social-row { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.soc {
  width: 34px; height: 34px; border-radius: var(--r); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .86rem; color: #fff; transition: transform var(--ease), box-shadow var(--ease);
}
.soc:hover { transform: translateY(-2px); }
.soc-tg { background: #29A9E1; }
.soc-pi { background: #E60023; }
.soc-fb { background: #1877F2; }
.soc-em { background: var(--green); }

/* ================================================================
   FOOTER
================================================================ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 56px 0 0; }
.footer-grid { display: grid; gap: 36px; margin-bottom: 44px; }
@media (min-width: 600px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr 1.4fr; } }

.site-footer .logo-wordmark { color: rgba(255,255,255,.9); }
.site-footer .logo-icon { background: rgba(255,255,255,.12); color: #fff; }
.footer-brand p { font-size: .82rem; color: rgba(255,255,255,.52); margin-top: 10px; line-height: 1.7; }

.footer-col h4 {
  font-family: var(--body); font-size: .69rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.42); margin-bottom: 14px;
}
.footer-col ul  { display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { font-size: .82rem; color: rgba(255,255,255,.62); transition: color var(--ease); }
.footer-col li a:hover { color: #fff; }

.footer-nl p { font-size: .82rem; color: rgba(255,255,255,.52); margin-bottom: 11px; line-height: 1.6; }
.ft-nl-form { display: flex; flex-direction: column; gap: 8px; }
.ft-nl-form input {
  padding: 10px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--r);
  background: rgba(255,255,255,.07); color: #fff; font-size: .82rem; -webkit-appearance: none;
}
.ft-nl-form input::placeholder { color: rgba(255,255,255,.32); }
.ft-nl-form input:focus { border-color: rgba(255,255,255,.38); outline: none; }
.site-footer .btn-primary { background: var(--green); border-color: transparent; }
.site-footer .btn-primary:hover { background: #25795c; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  display: flex; flex-direction: column; gap: 5px; text-align: center;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-bottom p { font-size: .75rem; color: rgba(255,255,255,.33); }
.ft-disc { font-style: italic; }

/* ================================================================
   ARTICLE MODAL
================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 1500;
  display: flex; align-items: flex-start; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--ease);
  overflow-y: auto; overflow-x: hidden;
  padding: 16px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg-card); border-radius: var(--r-xl);
  width: 100%; max-width: 740px;
  position: relative; overflow: hidden; box-shadow: var(--sh-lg);
  transform: translateY(18px); transition: transform .26s ease; margin: auto;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close-btn {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.35); color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; font-size: .88rem; transition: background var(--ease);
}
.modal-close-btn:hover { background: rgba(0,0,0,.62); }

.modal-hero { width: 100%; height: 230px; object-fit: cover; }
@media (min-width: 640px) { .modal-hero { height: 260px; } }

.modal-content { padding: 22px; }
@media (min-width: 640px) { .modal-content { padding: 32px; } }

.modal-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 100px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 12px;
}
.modal-title { font-size: clamp(1.1rem, 3vw, 1.65rem); margin-bottom: 12px; letter-spacing: -.02em; }
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: .74rem; color: var(--text-3);
  margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.modal-excerpt  { font-size: .92rem; color: var(--text-2); line-height: 1.8; margin-bottom: 18px; }
.modal-body-text { font-size: .86rem; color: var(--text-2); line-height: 1.8; margin-bottom: 20px; }
.modal-rate-label { font-family: var(--display); font-size: .88rem; font-weight: 700; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ================================================================
   TOAST
================================================================ */
.toast {
  position: fixed; bottom: 20px; right: 16px;
  background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: var(--r);
  font-size: .82rem; font-weight: 500; box-shadow: var(--sh-lg);
  z-index: 3000; transform: translateY(70px); opacity: 0;
  transition: all .3s ease;
  display: flex; align-items: center; gap: 9px;
  max-width: min(300px, calc(100vw - 32px)); /* never overflows screen */
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: var(--green); flex-shrink: 0; }

/* ================================================================
   SCROLL REVEAL
================================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .42s ease, transform .42s ease; }
.reveal.vis { opacity: 1; transform: translateY(0); }

/* ================================================================
   LEGAL PAGES
================================================================ */
.legal-wrap { max-width: 740px; margin: 0 auto; padding: 52px 20px 72px; }
.legal-wrap h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 6px; letter-spacing: -.02em; }
.legal-date   { font-size: .77rem; color: var(--text-3); margin-bottom: 30px; }
.legal-wrap h2 { font-size: 1.02rem; margin: 24px 0 8px; }
.legal-wrap p, .legal-wrap li { font-size: .88rem; color: var(--text-2); line-height: 1.8; }
.legal-wrap ul { padding-left: 18px; margin-bottom: 12px; list-style: disc; }
.legal-wrap a  { color: var(--green); }

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