/* ============================================================
   Otra Rusia — стили одностраничника
   Подход: mobile-first, CSS variables, Grid + Flexbox
   Палитра и шрифты — в духе localrome.ru
   Breakpoints: 768px (tablet), 1024px (desktop)
   ============================================================ */

:root {
  /* Палитра — тёплый крем + вино + тёмно-коричневый текст */
  --c-bg: #f9f4f0;
  --c-bg-alt: #f4eee8;
  --c-text: #321902;
  --c-text-soft: #4c4844;
  --c-text-muted: #877d70;
  --c-accent: #a73439;
  --c-accent-dark: #81171b;
  --c-accent-darker: #702528;
  --c-border: #e8ddcf;
  --c-white: #ffffff;

  /* Типографика — оба шрифта serif: Philosopher для заголовков, Lora для текста */
  --ff-display: 'Philosopher', Georgia, 'Times New Roman', serif;
  --ff-body: 'Lora', Georgia, 'Times New Roman', serif;

  /* Отступы / радиусы */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --section-py: 72px;
  --container-px: 20px;
  --maxw: 1240px;

  /* Тени / переходы */
  --shadow-sm: 0 2px 10px rgba(50, 25, 2, 0.06);
  --shadow-md: 0 14px 36px rgba(50, 25, 2, 0.12);
  --t-fast: 0.2s ease;
}

/* ============== Reset & base ============== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--ff-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.005em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; font-weight: 700; }
p { margin: 0 0 1em; }

@media (min-width: 768px) {
  :root { --section-py: 96px; --container-px: 32px; }
  h1 { font-size: 3.2rem; }
  h2 { font-size: 2.6rem; }
}
@media (min-width: 1024px) {
  :root { --section-py: 120px; }
  h1 { font-size: 4.2rem; }
  h2 { font-size: 3rem; }
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--container-px); }

/* Italic подзаголовок-«надпись» в духе Ciao! */
.eyebrow {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--c-accent);
  margin: 0 0 0.4em;
  line-height: 1;
}
@media (min-width: 768px) {
  .eyebrow { font-size: 1.7rem; }
}

.section-head { text-align: center; margin: 0 auto 48px; max-width: 760px; }
@media (min-width: 768px) { .section-head { margin-bottom: 64px; } }

/* ============== Buttons ============== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 100px;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary { background: var(--c-accent); color: var(--c-white); }
.btn--primary:hover { background: var(--c-accent-dark); }
.btn--ghost { background: transparent; color: var(--c-text); border-color: var(--c-text); }
.btn--ghost:hover { background: var(--c-text); color: var(--c-bg); }

/* ============== Header ============== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249, 244, 240, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__mark {
  font-family: var(--ff-display);
  font-weight: 700;
  background: var(--c-accent);
  color: var(--c-white);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.logo__text { font-family: var(--ff-display); font-size: 1.4rem; font-weight: 700; }

.nav { display: none; }
.nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.nav__list a {
  font-family: var(--ff-body);
  font-size: 0.88rem;
  color: var(--c-text);
  transition: color var(--t-fast);
  white-space: nowrap;
}
.nav__list a:hover { color: var(--c-accent); }
.nav__sep {
  width: 1px;
  height: 16px;
  background: var(--c-border);
}

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.lang-switch__select {
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-family: var(--ff-body);
  color: var(--c-text);
  cursor: pointer;
}

.burger {
  background: transparent; border: 0;
  width: 32px; height: 32px;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  padding: 0;
}
.burger span {
  display: block; height: 2px; background: var(--c-text); border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav.is-open {
  display: block;
  position: absolute;
  top: 72px; left: 0; right: 0;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding: 16px var(--container-px) 24px;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}
.nav.is-open .nav__list {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.nav.is-open .nav__sep { display: none; }

@media (min-width: 1180px) {
  .nav { display: block; }
  .burger { display: none; }
}

/* ============== Hero (фото + overlay) ============== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  color: var(--c-white);
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero__media {
  position: absolute; inset: 0;
  background-image: url('../images/optimized/sections/hero-russia.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(50, 25, 2, 0.35) 0%, rgba(50, 25, 2, 0.55) 100%);
  z-index: 1;
}
.hero__inner { position: relative; z-index: 2; text-align: center; }
.hero__eyebrow {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--c-bg);
  margin: 0 0 0.4em;
  opacity: 0.95;
}
.hero__title {
  max-width: 920px;
  margin: 0 auto 0.5em;
  color: var(--c-white);
}
.hero__subtitle {
  max-width: 640px; margin: 0 auto 2em;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (min-width: 768px) {
  .hero__eyebrow { font-size: 2.2rem; }
  .hero__subtitle { font-size: 1.2rem; }
}

/* ============== Featured ============== */
.featured { padding: var(--section-py) 0; background: var(--c-bg); }
.featured__inner {
  display: grid;
  gap: 32px;
  align-items: center;
}
.featured__media {
  aspect-ratio: 4 / 3;
  background-image: url('../images/optimized/sections/featured-spb.webp');
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-md);
}
.featured__content .eyebrow { margin-bottom: 0.5em; }
.featured__content p { font-size: 1.05rem; color: var(--c-text-soft); margin-bottom: 1.8em; }
@media (min-width: 768px) {
  .featured__inner { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* ============== Destinations grid ============== */
.destinations { padding: var(--section-py) 0; background: var(--c-bg-alt); }
.destinations__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) {
  .destinations__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  /* На десктопе чередуем: каждая 1-я карточка триплета — во всю ширину (landscape) */
  .destinations__grid .dest-card:nth-child(3n+1) {
    grid-column: 1 / -1;
    aspect-ratio: 21 / 9;
  }
}

.dest-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  color: var(--c-white);
  background-image: var(--bg);
  background-size: cover; background-position: center;
  padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.dest-card--moscow { --bg: url('../images/optimized/cards/moscow.webp'); }
.dest-card--spb { --bg: url('../images/optimized/cards/spb.webp'); }
.dest-card--kazan { --bg: url('../images/optimized/cards/kazan.webp'); }
.dest-card--sochi { --bg: url('../images/optimized/cards/sochi.webp'); }
.dest-card--kaliningrad { --bg: url('../images/optimized/cards/kaliningrad.webp'); }
.dest-card--golden-ring { --bg: url('../images/optimized/cards/golden-ring.webp'); }
.dest-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(50, 25, 2, 0.78) 0%, rgba(50, 25, 2, 0.15) 55%, transparent 100%);
}
.dest-card > * { position: relative; z-index: 1; }
.dest-card:hover { transform: translateY(-4px); }
.dest-card h3 {
  font-family: var(--ff-display);
  font-size: 1.7rem;
  margin-bottom: 0.3em;
  color: var(--c-white);
}
.dest-card p { margin: 0; font-size: 0.92rem; opacity: 0.92; font-family: var(--ff-body); }

/* ============== Flex route ============== */
.flex-route { padding: var(--section-py) 0; background: var(--c-bg); }
.flex-route__inner {
  display: grid; gap: 32px; align-items: center;
}
.flex-route__media {
  aspect-ratio: 4 / 3;
  background-image: url('../images/optimized/sections/route-planning.webp');
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-md);
  order: -1;
}
.flex-route__content p { font-size: 1.05rem; color: var(--c-text-soft); margin-bottom: 1.8em; }
@media (min-width: 768px) {
  .flex-route__inner { grid-template-columns: 1fr 1fr; gap: 64px; }
  .flex-route__media { order: 0; }
}

/* ============== Services ============== */
.services { padding: var(--section-py) 0; background: var(--c-bg-alt); }
.services__grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .services__grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.service-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 40px 28px;
  text-align: center;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service-card__icon { font-size: 2.5rem; margin-bottom: 0.5em; }
.service-card h3 { font-size: 1.3rem; }
.service-card p { color: var(--c-text-soft); margin: 0; font-size: 0.98rem; }

/* ============== About ============== */
.about { padding: var(--section-py) 0; background: var(--c-bg); }
.about__inner {
  display: grid; gap: 40px; align-items: center;
}
.about__photo {
  aspect-ratio: 3 / 4;
  background-image: url('../images/optimized/sections/about-detail.webp');
  background-size: cover; background-position: center;
  max-width: 420px; width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.about__content .eyebrow { color: var(--c-accent); }
.about__content p { font-size: 1.05rem; color: var(--c-text-soft); }
@media (min-width: 768px) {
  .about__inner { grid-template-columns: 1fr 1.4fr; gap: 64px; }
  .about__photo { max-width: none; }
}

/* ============== Stats ============== */
.stats { padding: calc(var(--section-py) - 16px) 0; background: var(--c-accent); color: var(--c-white); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}
@media (min-width: 768px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }

.stat__num {
  font-family: var(--ff-display);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1;
  margin-bottom: 8px;
}
.stat__label { font-size: 0.92rem; color: rgba(255,255,255,0.85); font-family: var(--ff-body); }

@media (min-width: 768px) { .stat__num { font-size: 4rem; } }

/* ============== Advantages ============== */
.advantages { padding: var(--section-py) 0; background: var(--c-bg); }
.advantages__grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .advantages__grid { grid-template-columns: repeat(3, 1fr); } }

.adv-card {
  text-align: center;
  padding: 0 16px;
}
.adv-card h3 { margin-bottom: 0.5em; font-size: 1.5rem; }
.adv-card p { color: var(--c-text-soft); }

/* ============== Gallery ============== */
.gallery { padding: var(--section-py) 0 calc(var(--section-py) - 24px); background: var(--c-bg-alt); }
.gallery__scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px var(--container-px) 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.gallery__scroller img {
  flex: 0 0 auto;
  width: 300px;
  height: 220px;
  object-fit: cover;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .gallery__scroller img { width: 380px; height: 280px; }
}

/* ============== Reviews ============== */
.reviews { padding: var(--section-py) 0; background: var(--c-bg); }
.reviews__grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .reviews__grid { grid-template-columns: repeat(3, 1fr); } }

.review {
  background: var(--c-bg-alt);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  margin: 0;
  position: relative;
}
.review::before {
  content: "“";
  position: absolute;
  top: -18px; left: 18px;
  font-family: var(--ff-display);
  font-size: 5rem;
  color: var(--c-accent);
  line-height: 1;
}
.review p {
  font-family: var(--ff-body);
  font-size: 1.02rem;
  font-style: italic;
  color: var(--c-text-soft);
  margin: 0 0 1.2em;
}
.review footer { font-family: var(--ff-display); font-size: 0.95rem; color: var(--c-text); }

/* ============== FAQ ============== */
.faq { padding: var(--section-py) 0; background: var(--c-bg-alt); }
.faq__inner { max-width: 820px; }
.faq__list { display: flex; flex-direction: column; }

.faq-item {
  border-bottom: 1px solid var(--c-border);
  padding: 0;
}
.faq-item:first-child { border-top: 1px solid var(--c-border); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 56px 22px 4px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-text);
  position: relative;
  transition: color var(--t-fast);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  color: var(--c-accent);
  font-weight: 400;
  transition: transform var(--t-fast);
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--c-accent); }
.faq-item p {
  padding: 0 4px 22px;
  margin: 0;
  color: var(--c-text-soft);
  font-size: 1rem;
}

/* ============== Contacts CTA ============== */
.contacts {
  padding: var(--section-py) 0;
  background: var(--c-accent-darker);
  color: var(--c-bg);
  text-align: center;
}
.contacts h2 { color: var(--c-bg); }
.contacts p { color: rgba(249, 244, 240, 0.85); max-width: 560px; margin: 0 auto 2em; font-size: 1.05rem; }
.contacts .btn--ghost { color: var(--c-bg); border-color: var(--c-bg); }
.contacts .btn--ghost:hover { background: var(--c-bg); color: var(--c-accent-darker); }
.contacts__buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ============== Footer ============== */
.site-footer {
  background: var(--c-text);
  color: var(--c-bg);
  padding: 48px 0 32px;
}
.site-footer__inner {
  display: grid;
  gap: 24px;
  align-items: center;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; color: var(--c-bg); }
.site-footer__brand .logo__mark { background: var(--c-bg); color: var(--c-text); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.92rem; }
.site-footer__nav a { color: rgba(249, 244, 240, 0.7); transition: color var(--t-fast); }
.site-footer__nav a:hover { color: var(--c-bg); }
.site-footer__social { display: flex; gap: 14px; align-items: center; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--c-bg);
  background: rgba(249, 244, 240, 0.08);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.site-footer__social a:hover {
  background: var(--c-accent);
  color: var(--c-white);
  transform: translateY(-2px);
}
.site-footer__social svg {
  width: 20px; height: 20px;
  display: block;
}
.site-footer__legal-nav {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 0.82rem;
}
.site-footer__legal-nav a {
  color: rgba(249, 244, 240, 0.6);
  border-bottom: 1px dotted rgba(249, 244, 240, 0.25);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.site-footer__legal-nav a:hover { color: var(--c-bg); border-color: var(--c-accent); }

.site-footer__legal { margin: 0; font-size: 0.82rem; color: rgba(249, 244, 240, 0.5); }

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand nav social"
      "legal-nav legal-nav legal-nav"
      "legal legal legal";
  }
  .site-footer__brand { grid-area: brand; }
  .site-footer__nav { grid-area: nav; justify-content: center; }
  .site-footer__social { grid-area: social; }
  .site-footer__legal-nav { grid-area: legal-nav; justify-content: center; padding-top: 20px; border-top: 1px solid rgba(249,244,240,0.1); }
  .site-footer__legal { grid-area: legal; text-align: center; padding-top: 8px; }
}

/* ============== Legal pages ============== */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.legal-page main {
  flex: 1;
  padding: 48px 0 var(--section-py);
}
.legal-hero {
  background: var(--c-bg-alt);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--c-border);
}
.legal-hero .container { max-width: 900px; }
.legal-hero h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3em;
}
.legal-hero p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 0.95rem;
}
@media (min-width: 768px) {
  .legal-hero h1 { font-size: 2.4rem; }
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.legal-content h2 {
  font-size: 1.4rem;
  margin: 2em 0 0.6em;
  color: var(--c-accent);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 1.1rem;
  margin: 1.4em 0 0.4em;
}
.legal-content p { font-size: 1rem; color: var(--c-text-soft); }
.legal-content ul, .legal-content ol {
  padding-left: 1.4em;
  color: var(--c-text-soft);
  margin: 0 0 1em;
}
.legal-content li { margin-bottom: 0.4em; }
.legal-content a { color: var(--c-accent); border-bottom: 1px solid currentColor; }
.legal-content a:hover { color: var(--c-accent-dark); }
.legal-content .placeholder {
  background: rgba(167, 52, 57, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--ff-body);
  color: var(--c-accent-dark);
  font-style: italic;
}
.legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem;
  color: var(--c-text-soft);
  margin-bottom: 16px;
  transition: color var(--t-fast);
}
.legal-back:hover { color: var(--c-accent); }
.legal-back::before { content: "←"; }
