/* ==========================================================================
   Baikal Surf v2 — оформление (boutique editorial)
   Палитра: тёплый айвори, глубокий байкальский синий, графит, дерево, зелёный.
   ========================================================================== */

:root {
  --ivory: #f7f2e8;
  --ivory-deep: #efe7d8;
  --paper: #fffdf8;
  --baikal: #10283a;
  --baikal-soft: #1c405a;
  --baikal-tint: #e3ecf1;
  --graphite: #23282c;
  --graphite-soft: #4a5157;
  --wood: #b98a52;
  --wood-deep: #9a7040;
  --green: #4b6b57;
  --line: rgba(16, 40, 58, 0.12);
  --shadow: 0 18px 50px rgba(16, 40, 58, 0.12);
  --radius: 14px;
  --radius-lg: 22px;
  --serif: Georgia, "Times New Roman", "PT Serif", serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --max: 1200px;
  --space: clamp(3.5rem, 7vw, 6.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--baikal);
  margin: 0 0 .5em;
  letter-spacing: .005em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.bs-container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; width: 100%; }

.bs-eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wood-deep);
  margin-bottom: 1rem;
}

.bs-lead { font-size: 1.15rem; color: var(--graphite-soft); max-width: 62ch; }

.bs-section { padding: var(--space) 0; }
.bs-section--paper { background: var(--paper); }
.bs-section--tint { background: var(--baikal-tint); }
.bs-section--dark { background: var(--baikal); color: var(--ivory); }
.bs-section--dark h2, .bs-section--dark h3 { color: var(--ivory); }
.bs-section-head { max-width: 68ch; margin-bottom: 2.5rem; }

/* ---- Buttons ---- */
.bs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.bs-btn--accent { background: var(--wood); color: #fff; box-shadow: 0 8px 22px rgba(154, 112, 64, .28); }
.bs-btn--accent:hover { background: var(--wood-deep); transform: translateY(-1px); }
.bs-btn--solid { background: var(--baikal); color: var(--ivory); }
.bs-btn--solid:hover { background: var(--baikal-soft); transform: translateY(-1px); }
.bs-btn--ghost { background: transparent; border-color: currentColor; color: var(--baikal); }
.bs-btn--ghost:hover { background: rgba(16, 40, 58, .06); }
.bs-btn--light { background: rgba(247, 242, 232, .92); color: var(--baikal); }
.bs-btn--light:hover { background: #fff; }

/* ---- Header ---- */
.bs-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 232, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bs-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.bs-brand { display: flex; align-items: center; gap: .7rem; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--baikal); }
.bs-brand img { height: 40px; width: auto; border-radius: 6px; }
.bs-nav { margin-left: auto; display: flex; gap: 1.8rem; align-items: center; }
.bs-nav a { font-size: .95rem; color: var(--graphite); }
.bs-nav a:hover { color: var(--baikal); }
.bs-nav .bs-btn { padding: .6rem 1.3rem; font-size: .92rem; }
.bs-burger { display: none; margin-left: auto; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--baikal); }

/* ---- Hero ---- */
.bs-hero { position: relative; color: var(--ivory); overflow: hidden; background: var(--baikal); }
.bs-hero__media { position: absolute; inset: 0; z-index: 0; }
.bs-hero__media img, .bs-hero__media video {
  width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
}
.bs-hero__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(16,40,58,.82), rgba(16,40,58,.32) 60%, rgba(16,40,58,.15)); }
.bs-hero__inner { position: relative; z-index: 2; padding: clamp(4rem, 12vw, 8rem) 0; min-height: min(78vh, 640px); display: flex; flex-direction: column; justify-content: flex-end; }
.bs-hero__panel { max-width: 44rem; }
.bs-hero .bs-eyebrow { color: #e9cfa6; }
.bs-hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.bs-hero p { font-size: 1.15rem; color: rgba(247,242,232,.92); max-width: 46ch; }
.bs-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.bs-hero__sound {
  background: rgba(247,242,232,.14);
  color: var(--ivory);
  border: 1px solid rgba(247,242,232,.4);
  border-radius: 999px;
  padding: .6rem 1.1rem;
  font-size: .9rem;
  cursor: pointer;
}
.bs-hero__sound:hover { background: rgba(247,242,232,.24); }
.bs-hero__sound[hidden] { display: none; }

/* ---- Generic grids ---- */
.bs-grid { display: grid; gap: 1.5rem; }
.bs-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bs-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bs-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---- About ---- */
.bs-about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.bs-about__photo img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.bs-about__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
.bs-about__facts div { border-top: 2px solid var(--wood); padding-top: .8rem; }
.bs-about__facts strong { display: block; font-family: var(--serif); font-size: 1.05rem; color: var(--baikal); margin-bottom: .25rem; }
.bs-about__facts span { font-size: .92rem; color: var(--graphite-soft); }

/* ---- Houses ---- */
.bs-house { background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.bs-house img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bs-house__body { padding: 1.6rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.bs-house__body p { color: var(--graphite-soft); }
.bs-house-shared { margin-top: 1.5rem; }
.bs-house-shared__inner { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.4rem, 3vw, 2.2rem); }
.bs-house-shared__row { font-size: 1rem; color: var(--graphite); margin-bottom: .6rem; }
.bs-house-shared__row b { color: var(--baikal); }
.bs-house-shared__features { list-style: none; margin: 1rem 0 1.4rem; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem 1.25rem; }
.bs-house-shared__features li { padding-left: 1.2rem; position: relative; font-size: .95rem; color: var(--graphite-soft); }
.bs-house-shared__features li::before { content: ""; position: absolute; left: 0; top: .55em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--green); }
@media (max-width: 767px) {
  .bs-house-shared__features { grid-template-columns: 1fr; }
}

/* ---- Amenities ---- */
.bs-amenities__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.bs-amenity { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.bs-amenity h3 { font-size: 1.1rem; margin-bottom: .7rem; }
.bs-amenity ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .95rem; color: var(--graphite-soft); }
.bs-amenity li { padding-left: 1.1rem; position: relative; }
.bs-amenity li::before { content: ""; position: absolute; left: 0; top: .6em; width: .35rem; height: .35rem; border-radius: 50%; background: var(--wood); }
.bs-amenities__chip { display: inline-block; margin-top: .75rem; padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--green); background: rgba(75, 107, 87, .10); border: 1px solid rgba(75, 107, 87, .22); }

/* ---- Services ---- */
.bs-service { background: var(--baikal); color: var(--ivory); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.bs-service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bs-service__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.bs-service h3 { color: #fff; }
.bs-service p { color: rgba(247,242,232,.85); font-size: .95rem; }
.bs-service .bs-btn { margin-top: auto; align-self: flex-start; margin-top: 1.2rem; }

/* ---- Activities ---- */
.bs-season { margin-top: 2.5rem; }
.bs-season__title { font-family: var(--serif); font-size: 1.5rem; color: var(--baikal); margin-bottom: 1.2rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.bs-activity { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(16,40,58,.08); }
.bs-activity img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.bs-activity div { padding: 1.1rem 1.2rem 1.3rem; }
.bs-activity h4 { font-size: 1.05rem; margin-bottom: .35rem; }
.bs-activity p { font-size: .92rem; color: var(--graphite-soft); margin: 0; }

/* ---- Gallery mosaic ---- */
.bs-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: .8rem; }
.bs-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); cursor: pointer; transition: transform .25s ease, filter .25s ease; }
.bs-gallery img:hover { transform: scale(1.02); filter: brightness(1.05); }
.bs-gallery img:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.bs-gallery img:nth-child(6) { grid-column: span 2; }

/* ---- Reviews ---- */
.bs-reviews__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: start; }
.bs-reviews__card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; min-height: 180px; }
.bs-reviews__card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.bs-reviews__empty { color: var(--graphite-soft); font-size: .95rem; }
.bs-reviews__widget iframe { display: block; border-radius: 10px; max-width: 100%; }
.bs-reviews__fallback { margin: .75rem 0 0; font-size: .9rem; }
.bs-reviews__fallback a { color: var(--baikal-soft); text-decoration: underline; text-underline-offset: .18em; }

/* ---- Contacts ---- */
.bs-contacts-stage { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); min-height: 560px; }
.bs-map { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; overflow: hidden; box-shadow: none; }
.bs-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 100%; border: 0; display: block; }
.bs-contacts-overlay { position: relative; z-index: 2; max-width: 430px; margin: 1.5rem; padding: 1.6rem; background: rgba(247,242,232,.96); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.bs-contacts-overlay .bs-section-head { margin-bottom: 1rem; }
.bs-contacts__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.bs-contacts__list li { display: flex; gap: .5rem; font-size: .97rem; }
.bs-contacts__list b { min-width: 7.5rem; color: var(--baikal); font-weight: 600; }
.bs-contacts__list a { color: var(--baikal-soft); text-decoration: underline; text-underline-offset: .18em; }
.bs-route { margin-top: 1.2rem; }
.bs-route h3 { font-size: 1.05rem; }

/* ---- Write / contact chooser ---- */
.bs-write { position: relative; display: inline-block; }
.bs-write__menu { position: absolute; left: 0; top: calc(100% + .6rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem; min-width: 15rem; display: none; z-index: 20; }
.bs-write__menu[data-open="true"] { display: block; }
.bs-write__menu a { display: block; padding: .6rem .8rem; border-radius: 8px; font-size: .95rem; color: var(--graphite); }
.bs-write__menu a:hover { background: var(--baikal-tint); }

/* ---- Promo ---- */
.bs-promo { display: none; }
.bs-promo[data-visible="true"] { display: block; }
.bs-promo__inner { background: linear-gradient(120deg, var(--baikal), var(--baikal-soft)); color: var(--ivory); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.6rem); display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: center; }
.bs-promo h3 { color: #fff; }
.bs-promo img { border-radius: var(--radius); max-height: 240px; object-fit: cover; width: 100%; }

/* ---- FAQ ---- */
.bs-faq { max-width: 52rem; }
.bs-faq__item { border-bottom: 1px solid var(--line); }
.bs-faq__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 1.2rem 2rem 1.2rem 0; font-family: var(--serif); font-size: 1.12rem; color: var(--baikal); position: relative; }
.bs-faq__q::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--wood); transition: transform .2s ease; }
.bs-faq__item[data-open="true"] .bs-faq__q::after { content: "–"; }
.bs-faq__a { display: none; padding: 0 0 1.3rem; color: var(--graphite-soft); }
.bs-faq__item[data-open="true"] .bs-faq__a { display: block; }

/* ---- Final CTA ---- */
.bs-final { text-align: center; }
.bs-final h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.bs-final p { max-width: 46ch; margin: 0 auto 1.6rem; color: rgba(247,242,232,.9); }

/* ---- Footer ---- */
.bs-footer { background: var(--baikal); color: rgba(247,242,232,.82); padding: 2.6rem 0; font-size: .92rem; }
.bs-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.bs-footer a { color: var(--ivory); text-decoration: underline; text-underline-offset: .18em; }

/* ---- Booking widget anchors ---- */
.bs-booking-host { background: var(--paper); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow); min-height: 60px; }
.bs-booking-load-error { padding: 1.2rem; color: var(--graphite-soft); }

/* ---- Mobile fixed booking CTA ---- */
.bs-mobile-cta { display: none; }

/* ---- Lightbox ---- */
.bs-lightbox { position: fixed; inset: 0; background: rgba(16,40,58,.94); z-index: 200; display: none; align-items: center; justify-content: center; padding: 2rem; }
.bs-lightbox[data-open="true"] { display: flex; }
.bs-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.bs-lightbox__close { position: absolute; top: 1.2rem; right: 1.4rem; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }

/* ==========================================================================
   Responsive — tablet and mobile
   ========================================================================== */
@media (max-width: 1023px) {
  .bs-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .bs-amenities__grid { grid-template-columns: repeat(2, 1fr); }
  .bs-about { grid-template-columns: 1fr; }
  .bs-about__photo { order: -1; }
  .bs-about__facts { grid-template-columns: 1fr 1fr; }
  .bs-gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; }
  .bs-promo__inner { grid-template-columns: 1fr; }
  .bs-contacts-overlay { max-width: 380px; padding: 1.3rem; margin: 1rem; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .bs-nav { display: none; }
  .bs-nav[data-open="true"] {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); padding: 1rem 1.25rem 1.4rem; gap: 1rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .bs-burger { display: block; }
  .bs-grid--2, .bs-grid--3, .bs-grid--4 { grid-template-columns: 1fr; }
  .bs-amenities__grid { grid-template-columns: 1fr; }
  .bs-about__facts { grid-template-columns: 1fr; }
  .bs-reviews__grid { grid-template-columns: 1fr; }
  .bs-reviews__widget iframe { height: 480px !important; }
  .bs-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .bs-gallery img:nth-child(1) { grid-column: span 2; }
  .bs-gallery img:nth-child(6) { grid-column: span 2; }
  .bs-hero__inner { min-height: 62vh; }
  .bs-contacts-stage { min-height: 480px; }
  .bs-contacts-overlay { max-width: none; margin: .8rem; padding: 1rem; }
  .bs-contacts-overlay .bs-section-head { margin-bottom: .75rem; }
  .bs-contacts__list li { flex-direction: column; gap: .15rem; }
  .bs-contacts__list b { min-width: auto; }
  .bs-mobile-cta {
    display: flex; position: fixed; left: .8rem; right: .8rem; bottom: .8rem; z-index: 90;
  }
  .bs-mobile-cta .bs-btn { width: 100%; box-shadow: 0 12px 30px rgba(16,40,58,.3); }
  .bs-footer { padding-bottom: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bs-gallery img:hover { transform: none; }
}

/* Скрытие десктопного видео на мобильных гарантирует, что плеер не создаётся
   и медиа не запрашивается (дополнительно к условию в site-interactions.js). */
@media (max-width: 767px) {
  .bs-hero__video { display: none !important; }
}
