/* ============================================================
   Гостевой дом «Кают-компания» — общий stylesheet
   Спокойная «загородная» палитра: хвоя, крем, дерево.
   ============================================================ */

:root {
  --green-900: #22392e;
  --green-700: #33544a;
  --green-500: #4f7466;
  --cream: #faf7f0;
  --paper: #ffffff;
  --sand: #efe8da;
  --wood: #8a6d4b;
  --wood-dark: #6d5439;
  --ink: #2c2a26;
  --muted: #6b675f;
  --line: #e3dccf;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(34, 57, 46, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--green-900);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--green-700); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 48px 0; }
.section--tint { background: var(--sand); }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--green-900);
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}

.logo span {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: normal;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0 14px;
}

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover { color: var(--green-700); border-bottom-color: var(--wood); }
.main-nav a.active { color: var(--green-700); border-bottom-color: var(--green-700); }

.header-phone {
  font-weight: 600;
  color: var(--green-900);
  text-decoration: none;
  white-space: nowrap;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--green-900);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--green-900) center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 35, 28, 0.15) 0%, rgba(20, 35, 28, 0.72) 100%);
}

.hero-inner {
  position: relative;
  padding: 64px 0 48px;
}

.hero h1 { color: #fff; font-size: 2.4rem; max-width: 640px; }
.hero p { max-width: 560px; font-size: 1.1rem; margin-bottom: 1.4em; }

.hero--small { min-height: 300px; }
.hero--small h1 { font-size: 2rem; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--wood);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: var(--wood-dark); }

.btn--ghost {
  background: transparent;
  border: 2px solid var(--green-700);
  color: var(--green-700);
}

.btn--ghost:hover { background: var(--green-700); color: #fff; }

/* ---------- Плитки направлений ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tile {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.tile:hover { transform: translateY(-4px); }

.tile img { width: 100%; height: 170px; object-fit: cover; }

.tile-body { padding: 16px 18px 20px; }
.tile-body h3 { margin-bottom: 0.3em; }
.tile-body p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.tile .tile-price {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--wood-dark);
}

/* ---------- Текстовые блоки ---------- */

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.lead { font-size: 1.1rem; color: var(--green-900); }

.facts {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}

.facts li {
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wood);
}

.price-box {
  background: var(--paper);
  border-left: 4px solid var(--wood);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5em;
}

.price-box .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-900);
}

.price-box .note { color: var(--muted); font-size: 0.92rem; margin: 4px 0 0; }

/* ---------- Галерея ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.gallery img:hover { opacity: 0.9; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 25, 20, 0.88);
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  cursor: default;
}

/* ---------- Контакты ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.contact-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}

.contact-card p { margin-bottom: 0.7em; }

.contact-card .big-phone {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-900);
  text-decoration: none;
}

.map-frame {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Футер ---------- */

.site-footer {
  background: var(--green-900);
  color: #d9e2dc;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 40px 20px 28px;
}

.site-footer a { color: #e9f0eb; }

.footer-brand {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.4em;
}

.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 20px 20px;
  font-size: 0.85rem;
  color: #a9b8ae;
}

/* ---------- Поминальная страница: сдержанный акцент ---------- */

.page-quiet .hero { min-height: 260px; }
.page-quiet .hero::before {
  background: linear-gradient(180deg, rgba(30, 33, 31, 0.35) 0%, rgba(30, 33, 31, 0.8) 100%);
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .cols, .contacts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-phone { display: none; }

  .burger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px;
    gap: 2px;
  }

  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .main-nav a.active { border-bottom: 1px solid var(--line); color: var(--green-700); font-weight: 600; }

  .hero h1 { font-size: 1.8rem; }
  .hero { min-height: 340px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .gallery img { height: 140px; }
  h1 { font-size: 1.6rem; }
}

.gallery--menu { grid-template-columns: repeat(auto-fit, minmax(320px, 420px)); justify-content: center; }
.gallery--menu img { height: auto; object-fit: contain; background: #f4f6f2; }
