/* ===== Шрифты (Fontsource CDN) ===== */
@import url('https://cdn.jsdelivr.net/npm/@fontsource/literata@5/400.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/literata@5/700.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5/400.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5/600.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5/700.css');

/* ===== Токены темы ===== */
:root {
  --bg: #faf6ee;
  --surface: #fffdf8;
  --ink: #2e2a24;
  --ink-soft: #6f675c;
  --line: #ece2d0;

  --teal: #147d74;
  --teal-deep: #0e5f5c;
  --teal-soft: #e3f1ee;

  --terra: #cf6a4c;
  --terra-soft: #fbeae2;

  --river: #3d7fb8;
  --river-soft: #e8f1fa;
  --lake: #147d74;
  --lake-soft: #e2f2ef;
  --canal: #c08a2e;
  --canal-soft: #faf0da;

  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
::selection { background: rgba(20, 125, 116, 0.2); }
a:focus-visible, button:focus-visible, .category:focus-visible {
  outline: 3px solid rgba(20, 125, 116, 0.4);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===== Шапка ===== */
.site-header {
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--teal-deep);
  text-decoration: none;
  transition: color 0.3s;
}
.logo:hover { color: var(--terra); }
.lang-switch {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--teal-deep);
}

/* ===== Контейнер ===== */
.page { max-width: 1180px; margin: 0 auto; padding: 2rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 4.5rem 2rem 6.5rem;
  background: linear-gradient(135deg, #0e5f5c 0%, #147d74 55%, #1f8a70 100%);
  color: #ffffff;
  border-radius: 24px;
  margin-bottom: 3rem;
  box-shadow: 0 14px 40px rgba(14, 95, 92, 0.25);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.14), transparent 55%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0,28 C240,56 480,0 720,14 C960,28 1200,56 1440,28 L1440,56 L0,56 Z' fill='%23faf6ee'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: 100% 100%;
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.85; margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem; opacity: 0.92;
  max-width: 620px; margin: 0 auto;
  position: relative; z-index: 1;
}

/* ===== Каталог ===== */
.catalog { margin-bottom: 3rem; scroll-margin-top: 90px; }
.catalog h2 {
  font-family: var(--serif);
  font-size: 1.9rem; margin-bottom: 0.5rem;
  color: var(--ink); font-weight: 700;
}
.catalog h2 + p { color: var(--ink-soft); margin-bottom: 1.75rem; }

/* ===== Grid ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

/* ===== Карточки ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem; border-radius: 18px;
  text-decoration: none; color: inherit;
  box-shadow: 0 3px 10px rgba(46,42,36,0.05);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(46,42,36,0.12);
  border-color: #e0d2ba;
}
.card[data-type="river"] { --accent: var(--river); }
.card[data-type="lake"]  { --accent: var(--lake); }
.card[data-type="canal"] { --accent: var(--canal); }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; background: var(--teal-soft);
  margin-bottom: 0.5rem; transition: transform 0.25s;
}
.card[data-type="river"] .card-icon { background: var(--river-soft); }
.card[data-type="lake"]  .card-icon { background: var(--lake-soft); }
.card[data-type="canal"] .card-icon { background: var(--canal-soft); }
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card-name {
  font-family: var(--serif);
  font-size: 1.25rem; font-weight: 700;
  color: var(--ink); transition: color 0.25s;
}
.card:hover .card-name { color: var(--accent, var(--teal-deep)); }
.card-type {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent, var(--teal));
}
.card-location {
  font-size: 0.9rem; color: var(--ink-soft);
  margin-top: auto; padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

/* ===== Категории-фильтры ===== */
.categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.category {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2rem 1.5rem; border-radius: 18px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(46,42,36,0.05);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.category:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(46,42,36,0.1); border-color: #e0d2ba; }
.category.active {
  background: linear-gradient(135deg, #0e5f5c 0%, #147d74 60%, #1f8a70 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(14,95,92,0.35);
}
.category.active h3, .category.active p { color: #ffffff; }
.category.active p { opacity: 0.9; }
.category-icon { font-size: 2.6rem; margin-bottom: 0.9rem; display: block; }
.category h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 0.4rem; color: var(--ink); }
.category p { color: var(--ink-soft); font-size: 0.95rem; }
.show-all {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #d97757 0%, #cf6a4c 100%);
  color: #ffffff; border: none;
  padding: 1rem 2rem; border-radius: 14px;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.show-all:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(207,106,76,0.4); }

/* ===== Страница водоёма ===== */
.back-link { display: inline-block; margin-bottom: 1.75rem; color: var(--teal-deep); text-decoration: none; font-weight: 600; transition: color 0.3s; }
.back-link:hover { color: var(--terra); }
.water-body {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2.75rem; border-radius: 24px;
  box-shadow: 0 8px 30px rgba(46,42,36,0.06);
}
.type-badge {
  display: inline-block;
  background: var(--teal-soft);
  border: 1px solid rgba(20,125,116,0.18);
  padding: 0.45rem 1.1rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em;
  margin-bottom: 1.1rem; color: var(--teal-deep);
}
.water-body .name {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem; color: var(--ink);
  font-weight: 700; line-height: 1.15;
}
.location { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 2.25rem; }

.water-body section { margin-bottom: 2.75rem; }
.water-body section:last-child { margin-bottom: 0; }
.water-body h2 {
  font-family: var(--serif);
  font-size: 1.55rem; margin-bottom: 1rem; padding-bottom: 0.6rem;
  color: var(--ink); font-weight: 700;
  border-bottom: 2px dashed var(--line);
  display: flex; align-items: center; gap: 0.5rem;
}
.water-body p { font-size: 1.05rem; line-height: 1.85; color: #45403a; margin-bottom: 1rem; }

/* ===== Факты ===== */
.facts ul { list-style: none; padding: 0; }
.facts ul:first-of-type::before {
  content: "На русском";
  display: block; width: fit-content;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-deep); background: var(--teal-soft);
  padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.facts ul + ul { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 2px dashed var(--line); }
.facts ul + ul::before {
  content: "In English";
  display: block; width: fit-content;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--terra); background: var(--terra-soft);
  padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.facts li { padding: 0.6rem 0 0.6rem 1.85rem; position: relative; font-size: 1.05rem; line-height: 1.7; color: #45403a; }
.facts li::before { content: "•"; position: absolute; left: 0.35rem; color: var(--teal); font-weight: bold; font-size: 1.5rem; line-height: 1.35; }
.facts ul + ul li::before { color: var(--terra); }

/* ===== Лучшее время ===== */
.best-time { background: var(--terra-soft); border-left: 4px solid var(--terra); border-radius: 0 18px 18px 0; padding: 1.5rem 1.75rem; }
.best-time h2 { border-bottom: none; padding-bottom: 0; margin-bottom: 0.5rem; }
.best-time p { margin-bottom: 0; }

/* ===== Ключевые цифры ===== */
.stats dl {
  display: grid; grid-template-columns: auto 1fr auto 1fr;
  gap: 1.15rem 1.75rem;
  background: var(--bg); border: 1px solid var(--line);
  padding: 1.5rem 1.75rem; border-radius: 18px;
}
.stats dt { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); align-self: center; white-space: nowrap; }
.stats dd { margin: 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--teal-deep); }

/* ===== Тип водоёма ===== */
.type p {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 700;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border: 1px solid rgba(20,125,116,0.18);
  padding: 0.9rem 1rem; border-radius: 14px;
  text-align: center; margin-bottom: 0;
}

/* ===== Футер + счётчик ===== */
.site-footer {
  text-align: center; padding: 2rem;
  color: var(--ink-soft); font-size: 0.9rem;
  font-family: var(--serif); font-style: italic;
  margin-top: 3rem; border-top: 1px solid var(--line);
}
.site-footer p { margin-bottom: 0.25rem; }
.visit-counter { font-size: 0.9rem; }
.visit-counter span { font-weight: 700; color: var(--teal-deep); }

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .page { padding: 1.25rem; }
  .hero { padding: 3rem 1.25rem 5rem; border-radius: 18px; }
  .hero p { font-size: 1.05rem; }
  .water-body { padding: 1.5rem; border-radius: 18px; }
  .water-body h2 { font-size: 1.3rem; }
  .stats dl { grid-template-columns: auto 1fr; }
  .grid { grid-template-columns: 1fr; }
}

/* ===== Юридическая оговорка ===== */
.privacy-note {
  font-size: 0.82rem;
  max-width: 520px;
  margin: 0.5rem auto 1rem;
  color: var(--ink-soft, #6f675c);
  opacity: 0.8;
  line-height: 1.55;
  font-family: var(--sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
  font-style: normal;
}