/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --white:      #FFFFFF;
  --bg:         #F8F5F0;
  --bg-card:    #FFFFFF;
  --bg-subtle:  #F2EDE6;
  --bg-muted:   #EDE7DE;
  --border:     #DDD5C8;
  --border-dark:#C8BEB2;
  --ink:        #1E1A16;
  --ink-mid:    #5C5248;
  --ink-soft:   #8C8178;
  --accent:     #B5956A;
  --accent-dark:#8E7249;
  --accent-pale:#F5EDE0;
  --red:        #C45B4A;
  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Jost', system-ui, sans-serif;
  --radius:     6px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.12);
  --transition: 0.22s ease;
}

/* ─── RESET ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── GEO BLOCKER ───────────────────────────────────────── */
.geo-blocker {
  position: fixed; inset: 0; z-index: 9999;
  backdrop-filter: blur(18px) saturate(0.6);
  -webkit-backdrop-filter: blur(18px) saturate(0.6);
  background: rgba(248,245,240,.55);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .35s ease;
}
.geo-blocker.hidden { display: none; }
.geo-blocker__inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}
.geo-blocker__icon {
  color: var(--accent);
  margin-bottom: 20px;
}
.geo-blocker__inner h2 {
  font-family: var(--ff-display);
  font-size: 2rem; font-weight: 600;
  color: var(--ink); margin-bottom: 12px;
}
.geo-blocker__inner p {
  color: var(--ink-mid); font-size: .95rem;
  line-height: 1.7; margin-bottom: 28px;
}
.geo-blocker__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--white);
  font-family: var(--ff-body); font-size: .875rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 13px 32px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition);
}
.geo-blocker__btn:hover { background: var(--accent-dark); }

/* ─── HEADER ────────────────────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex; align-items: center; gap: 24px;
}
.header__logo {
  font-family: var(--ff-display);
  font-size: 2rem; font-weight: 700;
  color: var(--ink); letter-spacing: -0.03em;
  flex-shrink: 0;
}
.header__tagline {
  font-size: .8rem; font-weight: 300;
  color: var(--ink-soft); letter-spacing: .04em;
  padding-left: 24px; border-left: 1px solid var(--border);
}

/* ─── MAIN ──────────────────────────────────────────────── */
.main {
  flex: 1;
  max-width: 1280px; margin: 0 auto;
  width: 100%; padding: 48px 40px;
}

/* ─── SECTION LABEL ─────────────────────────────────────── */
.section-label {
  font-size: .7rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ─── FEATURED NEWS ─────────────────────────────────────── */
.news-featured {
  display: grid; grid-template-columns: 1fr 480px;
  gap: 0; border-radius: 12px; overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); margin-bottom: 48px;
  transition: box-shadow var(--transition);
  min-height: 360px;
}
.news-featured:hover { box-shadow: var(--shadow-lg); }
.news-featured__content {
  padding: 48px 52px;
  display: flex; flex-direction: column; justify-content: center;
}
.news-featured__meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.news-featured__date {
  font-size: .78rem; font-weight: 400; color: var(--ink-soft);
  letter-spacing: .04em;
}
.news-featured__badge {
  font-size: .68rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-dark);
  background: var(--accent-pale); padding: 3px 10px;
  border-radius: 20px;
}
.news-featured__title {
  font-family: var(--ff-display);
  font-size: 2.4rem; font-weight: 600; line-height: 1.2;
  color: var(--ink); margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.news-featured__summary {
  font-size: .95rem; font-weight: 300; line-height: 1.75;
  color: var(--ink-mid); max-width: 520px;
}
.news-featured__image-wrap {
  overflow: hidden; background: var(--bg-muted);
}
.news-featured__image-wrap--placeholder {
  display: flex; align-items: center; justify-content: center;
}
.news-featured__image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.news-featured:hover .news-featured__image { transform: scale(1.03); }

/* ─── NEWS GRID ─────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.news-card__image-wrap {
  height: 200px; overflow: hidden; background: var(--bg-muted);
}
.news-card__image-wrap--placeholder {
  display: flex; align-items: center; justify-content: center;
}
.news-card__image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card__image { transform: scale(1.05); }
.news-card__body { padding: 24px; }
.news-card__date {
  font-size: .72rem; font-weight: 400; letter-spacing: .04em;
  color: var(--ink-soft); display: block; margin-bottom: 8px;
}
.news-card__title {
  font-family: var(--ff-display);
  font-size: 1.3rem; font-weight: 600; line-height: 1.3;
  color: var(--ink); margin-bottom: 10px;
}
.news-card__summary {
  font-size: .875rem; font-weight: 300; line-height: 1.65;
  color: var(--ink-mid);
}

/* Placeholders */
.news-placeholder, .news-placeholder-sm {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: var(--border-dark);
}

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 40px;
  color: var(--ink-soft); font-size: .9rem;
}

/* ─── FOOTER ────────────────────────────────────────────── */
.footer {
  background: var(--white); border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 20px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer__brand {
  font-family: var(--ff-display);
  font-size: 1.2rem; font-weight: 600; color: var(--ink);
}
.footer__copy {
  font-size: .75rem; color: var(--ink-soft); font-weight: 300;
}

/* ─── VISITORS PAGE ─────────────────────────────────────── */
.visitors-main { padding-top: 48px; }
.visitors-stats {
  display: flex; gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 28px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-card__num {
  font-family: var(--ff-display);
  font-size: 2rem; font-weight: 600; color: var(--ink);
}
.stat-card__label {
  font-size: .72rem; font-weight: 400; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ─── TABLE ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
}
.visitors-table {
  width: 100%; border-collapse: collapse;
  font-size: .82rem; white-space: nowrap;
}
.visitors-table thead tr {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.visitors-table th {
  font-size: .68rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 12px 16px; text-align: left;
}
.visitors-table tbody tr {
  border-bottom: 1px solid var(--bg-subtle);
  transition: background var(--transition);
}
.visitors-table tbody tr:last-child { border-bottom: none; }
.visitors-table tbody tr:hover { background: var(--accent-pale); }
.visitors-table td {
  padding: 12px 16px; color: var(--ink-mid);
  vertical-align: middle;
}
.td-num { color: var(--ink-soft); font-size: .75rem; }
.td-date { font-size: .78rem; color: var(--ink-soft); }
.td-mono { font-family: monospace; font-size: .78rem; }
.td-address { max-width: 240px; }
.text-truncate {
  display: block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

.map-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem; font-weight: 500; padding: 4px 10px;
  border-radius: var(--radius); cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: 1px solid transparent;
}
.map-link--yandex {
  color: var(--red); background: rgba(196,91,74,.07);
  border-color: rgba(196,91,74,.2);
}
.map-link--yandex:hover { background: rgba(196,91,74,.15); }
.map-link--osm {
  color: var(--accent-dark); background: var(--accent-pale);
  border-color: var(--accent);
}
.map-link--osm:hover { background: var(--bg-muted); }

/* ─── MAP MODAL ─────────────────────────────────────────── */
.map-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.map-modal.hidden { display: none; }
.map-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
}
.map-modal__inner {
  position: relative; z-index: 1;
  background: var(--white); border-radius: 12px;
  overflow: hidden; width: 90%; max-width: 840px;
  box-shadow: var(--shadow-lg);
}
.map-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: .875rem; font-weight: 500; color: var(--ink);
}
.map-modal__close {
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-size: 1rem; padding: 4px 8px;
  border-radius: 4px; transition: background var(--transition);
}
.map-modal__close:hover { background: var(--bg-subtle); }

/* flag badge */
.flag {
  display: inline-block; background: var(--bg-muted);
  padding: 1px 5px; border-radius: 3px;
  font-size: .7rem; font-weight: 500; color: var(--ink-soft);
  margin-right: 2px;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  .news-featured {
    grid-template-columns: 1fr;
  }
  .news-featured__image-wrap {
    height: 240px; order: -1;
  }
  .news-featured__content { padding: 32px; }
  .news-featured__title { font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .header__inner, .main, .footer__inner { padding-left: 20px; padding-right: 20px; }
  .news-featured__content { padding: 24px; }
  .news-grid { grid-template-columns: 1fr; }
}
