:root {
  /* Палитра V1 «Тёплый журнал» из DESIGN.md */
  --primary: #3D6B4A;
  --secondary: #C4614A;
  --accent: #B85C3A;
  --neutral: #2B2A26;
  --bg: #FAF7F2;
  --surface: #F5F0E8;
  --footer: #23402C;

  /* Прозрачность hero-плашки: крутите от 0.3 (почти стекло) до 0.8 (плотная) */
  --hero-alpha: 0.55;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-card: 16px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 96px;
  --container: 1200px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--neutral); line-height: 1.6; }
img { display: block; max-width: 100%; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--space-xl) 0; }
.section-surface { background: var(--surface); }

h1, h2, h3 { font-family: var(--font-display); color: var(--neutral); }
h1 { font-size: 4rem; font-weight: 700; line-height: 1.05; margin: 12px 0 16px; }
h2 { font-size: 2.5rem; font-weight: 600; margin-top: 8px; }
h3 { font-size: 1.3rem; font-weight: 600; margin: 12px 0 6px; }

.label {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary);
}
.link { color: var(--secondary); font-weight: 600; text-decoration: none; }
.link i { font-size: 0.8em; transition: transform 0.2s; }
.link:hover i { transform: translateX(4px); }

.btn { display: inline-block; padding: 12px 26px; border-radius: 9999px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #33583e; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid rgba(43,42,38,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--neutral); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--primary); }

/* Hero с полупрозрачной плашкой */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: flex-end;       /* плашка прижата к низу */
  padding: 0 0 72px;           /* отступ только снизу */
  background: linear-gradient(rgba(43,42,38,.05), rgba(43,42,38,.20)),
            url("../assets/img/divnogorye-hero.jpg") center / cover no-repeat;
}

.hero-card {
  max-width: 520px;            /* было 620px → уже */
  padding: 28px 32px;          /* было 40px → компактнее */
  border-radius: var(--radius-lg);
  background: rgba(250, 247, 242, 0.45);   /* было 0.55 → прозрачнее */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}

.hero-card h1 {
  font-size: 3.2rem;           /* было 4rem → меньше */
  margin: 8px 0 10px;
}

.hero-card p {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; }

/* Карточки мест */
.section-head { margin-bottom: 48px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
/* Карточки мест — «журнальный» вид + ровные ссылки */
.card {
  display: flex;
  flex-direction: column;
  background: #fff;                              /* белая подложка */
  border-radius: 16px;                           /* скругления */
  overflow: hidden;                              /* фото обрезается по углам */
  border: 1px solid rgba(43, 42, 38, .07);       /* тонкая рамка */
  box-shadow: 0 2px 10px rgba(43, 42, 38, .04);  /* лёгкая тень */
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(43, 42, 38, .10);
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover img { transform: scale(1.04); }      /* лёгкий зум фото при наведении */
.card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;                                       /* тело тянется на всю высоту */
  padding: 24px;
}
.card-body h3 { margin: 2px 0; }
.card-body p { font-size: .95rem; }
.card-body .link { margin-top: auto; padding-top: 10px; }  /* «Читать» прижата к низу */


/* Маршрут, Структура из V2, палитра V1 */
.route { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.route::before { content: ""; position: absolute; top: 14px; left: 0; right: 0; height: 2px; background: rgba(196, 97, 74, .35); }
.stop-day {
  display: block;          /* было: inline-block */
  width: max-content;      /* плашка по ширине текста */
  background: var(--secondary);
  color: #fff;
  border-radius: 9999px;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
/* День 2 и День 3 — по центру своих колонок */
.stop:nth-child(2) .stop-day,
.stop:nth-child(3) .stop-day {
  margin-left: auto;
  margin-right: auto;
}
/* Плашку последней остановки — к правому краю */
.stop:last-child .stop-day {
  margin-left: auto;
}
.stop img { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius); }
.stop { transition: transform .25s; }
.stop:hover { transform: translateY(-4px); }

/* Как добраться */
.get-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.ways { display: flex; gap: 26px; margin: 20px 0; flex-wrap: wrap; }
.way { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.way i { color: var(--primary); font-size: 1.15rem; }
.tip {
  display: flex; gap: 16px; margin-top: 24px; padding: 20px 24px;
  background: var(--surface); border-left: 4px solid var(--primary); border-radius: var(--radius-md);
}
.tip i { color: var(--primary); font-size: 1.4rem; margin-top: 4px; }
.tip a { color: var(--secondary); font-weight: 600; }
.get-photo { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius-lg); }

/* Подвал */
.site-footer { background: var(--footer); color: #ede8df; padding: 56px 0 32px; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.logo-light { color: #fff; }
.nav-light a { color: rgba(255,255,255,.85); }
.nav-light a:hover { color: #fff; }
.copy { font-size: 0.85rem; color: rgba(255,255,255,.6); }

/* Адаптив */
@media (max-width: 960px) {
  h1 { font-size: 3rem; }
  .cards, .route { grid-template-columns: repeat(2, 1fr); }
  .get-grid { grid-template-columns: 1fr; }
  .get-photo { height: 320px; }
}
@media (max-width: 600px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }
  .logo { font-size: 1.05rem; }
  .cards, .route { grid-template-columns: 1fr; }
  .hero-card { padding: 28px; }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Галерея ===== */
.gallery { background: var(--neutral); }
.gallery .section-head h2 { color: var(--bg); }
.gallery .label { color: #e8b4a0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}
.g-tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  cursor: pointer;
}
.g-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.g-tile:hover img { transform: scale(1.05); }
.g-tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-size: .85rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(43, 42, 38, .78));
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
.g-tile:hover figcaption { opacity: 1; transform: none; }
.t-big  { grid-column: span 2; grid-row: span 2; }
.t-wide { grid-column: span 2; }
.gallery-note { margin-top: 24px; color: rgba(250, 247, 242, .6); font-size: .85rem; }
.gallery-note i { color: #e8b4a0; }

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  background: rgba(43, 42, 38, .94);
  opacity: 0;
  visibility: hidden;                              /* полностью выключен из страницы */
  transition: opacity .3s ease, visibility 0s linear .3s;  /* visibility переключится ПОСЛЕ растворения */
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease;
}
.lb-figure figcaption { color: rgba(250, 247, 242, .85); margin-top: 12px; font-size: .95rem; }
.lb-btn {
  width: 48px; height: 48px; border-radius: 9999px;
  background: rgba(250, 247, 242, .12); color: #faf7f2;
  border: 1px solid rgba(250, 247, 242, .25);
  font-size: 1.1rem; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: var(--secondary); border-color: var(--secondary); }
.lb-close { position: absolute; top: 24px; right: 24px; }

/* Адаптив галереи */
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .route::before { display: none; }   /* ← добавить эту строку */
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .t-big, .t-wide { grid-column: span 1; grid-row: span 1; }
}
/* ===== Бургер-меню ===== */
.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid rgba(43, 42, 38, .15);
  border-radius: 12px;
  color: var(--primary);
  font-size: 1.15rem;
  cursor: pointer;
}
.nav-cta { display: none; }   /* на десктопе скрыта */

@media (max-width: 760px) {
  .header-cta { display: none; }          /* прячем десктопную кнопку */
  .burger { display: inline-flex; }       /* показываем бургер */

  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid rgba(43, 42, 38, .1);
    box-shadow: 0 18px 30px rgba(43, 42, 38, .12);
    padding: 6px 24px 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .site-header.menu-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .nav a {
    padding: 10px 4px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(43, 42, 38, .08);
  }
  .nav a:last-of-type { border-bottom: none; }
  .nav-cta {
    display: block;
    margin-top: 10px;
    padding: 10px 18px;
    font-size: .95rem;
    background: var(--primary);
    color: #fff;
    border-radius: 9999px;
    text-align: center;
    border-bottom: none;
  }
}
/* ===== Страницы мест ===== */
.place-hero { padding: 64px 0 0; }
.place-hero h1 { font-size: 3.4rem; margin: 8px 0 16px; }
.place-lead { font-size: 1.2rem; color: rgba(43, 42, 38, .75); max-width: 640px; }
.place-cover { width: 100%; height: 440px; object-fit: cover; border-radius: var(--radius-lg); margin-top: 32px; }
.place-body { padding: 64px 0 96px; }
.place-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.place-text p { margin-bottom: 16px; }
.place-text h2 { font-size: 1.8rem; margin: 32px 0 12px; }
.place-list { list-style: none; margin: 8px 0 0; }
.place-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(43, 42, 38, .08); }
.place-list li i { color: var(--secondary); margin-top: 5px; }
.place-aside {
  background: var(--surface);
  border: 1px solid rgba(43, 42, 38, .07);
  border-radius: var(--radius-card);
  padding: 28px;
  position: sticky; top: 96px;
}
.place-aside h2 { font-size: 1.2rem; margin-bottom: 16px; }
.fact { display: flex; gap: 12px; margin-bottom: 14px; font-size: .95rem; }
.fact i { color: var(--primary); margin-top: 4px; width: 18px; text-align: center; }
.place-aside .tip { margin-top: 20px; background: #fff; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.photo-strip figure { margin: 0; }
.photo-strip img { width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius-card); }
.photo-strip figcaption { font-size: .85rem; color: rgba(43, 42, 38, .65); margin-top: 8px; }
.pager {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 64px; padding-top: 32px;
  border-top: 1px solid rgba(43, 42, 38, .12);
}
.pager a { font-weight: 600; color: var(--secondary); text-decoration: none; }
.pager a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .place-hero h1 { font-size: 2.6rem; }
  .place-cover { height: 300px; }
  .place-grid { grid-template-columns: 1fr; }
  .place-aside { position: static; }
  .photo-strip { grid-template-columns: 1fr; }
}