body {
    margin: 0;
    background: #F5F6F2;
    font-family: 'Onest', system-ui, sans-serif;
    color: #0E2A26;
}

html{
  scroll-behavior: smooth;
}

.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 16px 20px 0;
}
  .nav {
    position: relative;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #E1E6E0;
    border-radius: 999px;
    padding: 8px 8px 8px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 24px rgba(14, 42, 38, .06);
    backdrop-filter: blur(10px);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 17px;
  }

  .links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
  }
  .links a {
    text-decoration: none;
    color: inherit;
    padding: 10px 16px;
    border-radius: 999px;
  }
  .links a:hover { background: #EEF1EC; }
  .links .cta {
    background: #0F4C45;
    color: #fff;
    padding: 12px 22px;
    font-weight: 600;
    margin-left: 4px;
  }
  .links .cta:hover { background: #17635A; }

  .orn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    pointer-events: none;
  }
  .orn svg {
    height: 46px;
    width: auto;
    display: block;
  }
  @media (max-width: 1150px) {
    .orn { display: none; }
  }
  .demo {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 20px;
    line-height: 1.6;
    color: #46605B;
  }
  .demo div {
    background: #fff;
    border: 1px solid #E1E6E0;
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 20px;
  }
.general{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:20px;
  max-width:640px;
  padding: 44px 54px 44px 20px;
  border-radius:28px;
  background:linear-gradient(135deg,rgba(255,255,255,.72),rgba(255,255,255,.48));
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 24px 60px rgba(14,57,52,.25), inset 0 1px 0 rgba(255,255,255,.9);
}
.general a {
    display: inline-block;
    transition: transform 0.2s ease, background-color 0.2s ease; 
}
.general a:hover {
    transform: translateY(-4px);
}
.general .btn-main:hover{
    background: #fcdd88 !important;
}
.image1{
  position:relative;
  flex-shrink:0;
  width:450px;
  height:650px;
  border-radius:28px;
  border: 7px solid white;
  background:url('vlad.jpg') center bottom / cover no-repeat;
}
.tours {
  padding: 56px;
}
.divider-title {
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  margin: 0 auto 40px;
  box-sizing: border-box;
  text-align: center;
  font-family: 'Cormorant', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 56px;
  color: #0e3934;
}

.divider-title::before,
.divider-title::after {
  content: "";
  flex: 1 1 0;
  height: 3px;
  background: #0e3934;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 47px 120px;
  max-width: 1520px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease;
  cursor: pointer;
  text-decoration: none !important;
}

.gallery-item h3{
  text-decoration: none !important;
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  z-index: 0;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(14,57,52,.85), rgba(14,57,52,0) 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover::before{
  opacity: 1;
}
.gallery-caption {
  text-decoration: none !important;
  position: relative;
  z-index: 2;
  padding: 28px;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.gallery-item:hover {
  transform: translateY(-6px);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-caption h3 {
  text-decoration: none !important;
  margin: 0 0 6px;
  font-family: 'Cormorant', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
}

.gallery-caption p {
  text-decoration: none !important;
  margin: 0;
  font-size: 15px;
  color: rgba(255,255,255,.85);
}

@media (hover: none) {
  .gallery-item::before { opacity: 1; }
  .gallery-caption { opacity: 1; transform: none; }
}

.about {
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.about__inner {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1400px;
  box-sizing: border-box;
  background: #0F4C45;
  color: #fff;
  border-radius: 40px;
  padding: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}

.about__photo {
  flex: 1 1 280px;
  min-width: 0;
}
.about__photo img {
  display: block;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  border: 5px solid #17635A;
}

.about__text {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__text h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 700;
  text-wrap: balance;
}
.about__text p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: #CFE3DD;
  max-width: 1040px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.chips span {
  background: rgba(255, 255, 255, .12);
  padding: 10px 16px;
  border-radius: 999px;
}
.steps {
  display: flex;
  justify-content: center;
}

.steps__inner {
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  padding: 88px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.steps h2 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 700;
}

.steps__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 150px;
  max-width: 1500px;
}

.step {
  flex: 1 1 260px;
  min-width: 0;
  box-sizing: border-box;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #E1E6E0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step__num {
  font-size: 14px;
  font-weight: 700;
  color: #0F4C45;
}

.step h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.02em;
  font-weight: 700;
}

.step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #46605B;
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.steps__grid .reveal:nth-child(2) { transition-delay: .12s; }
.steps__grid .reveal:nth-child(3) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* ===== Адаптивность ===== */

/* отступы у секций от краёв экрана */
#about { padding: 0 20px; }

/* планшеты */
@media (max-width: 900px) {
  #tours { padding: 0 20px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* телефоны */
@media (max-width: 700px) {

  /* шапка: оставляем телефон и кнопку, ссылки прячем */
  .nav { border-radius: 28px; padding: 8px 8px 8px 16px; }
  .links a:not(.cta) { display: none; }
  .links .cta { padding: 10px 18px; margin-left: 0; }
  .brand { font-size: 14px; }

  /* первый экран: всё в одну колонку */
  #A {
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 0 !important;
    padding: 24px 16px !important;
    gap: 24px !important;
  }
  .general { width: 100%; box-sizing: border-box; padding: 24px; gap: 16px; }
  .general h1 { font-size: clamp(34px, 10vw, 52px) !important; }
  .general p { font-size: 16px !important; }
  .general a { flex: 1 1 100%; text-align: center; box-sizing: border-box; }
  .image1 { width: 100%; max-width: 100%; height: 360px; box-sizing: border-box; }

  /* заголовки секций */
  .divider-title {
    font-size: clamp(30px, 9vw, 56px);
    gap: 14px;
    margin-bottom: 28px;
  }
  .divider-title::before,
  .divider-title::after { height: 2px; }

  /* галерея: одна колонка */
  .gallery-grid { grid-template-columns: 1fr; gap: 20px; }

  /* «Обо мне» и шаги */
  .about__inner { padding: 28px; border-radius: 28px; gap: 28px; }
  .steps__inner { padding-top: 56px; }
  .steps__grid { gap: 16px; }
}
.contact-dialog {
  border: none;
  padding: 0;                       /* отступы внутри, чтобы клик по фону отличался от клика по окну */
  border-radius: 28px;
  width: min(420px, calc(100% - 32px));
  background: #fff;
  color: #0E2A26;
  font-family: 'Onest', system-ui, sans-serif;
  box-shadow: 0 30px 80px rgba(14, 42, 38, .35);
}
.contact-dialog::backdrop {
  background: rgba(14, 42, 38, .55);
  backdrop-filter: blur(4px);
}
.contact-dialog__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
}
.contact-dialog h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.contact-dialog p  { margin: 0 0 8px; color: #46605B; line-height: 1.5; }

.contact-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid #D5DBD3;
  font-weight: 600;
  color: #0E2A26;
}
.contact-btn:hover { background: #EEF1EC; }
.contact-btn--main { background: #D9B44A; border-color: #D9B44A; font-weight: 700; }
.contact-btn--main:hover { background: #E3C468; }

.contact-dialog__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #46605B;
}
/* ===== Окно «Заказать» ===== */
.contact-dialog {
  border: none;
  padding: 0;                        /* отступы внутри .contact-dialog__body */
  border-radius: 28px;
  width: min(420px, calc(100% - 32px));
  background: #fff;
  color: #0E2A26;
  font-family: 'Onest', system-ui, sans-serif;
  box-shadow: 0 30px 80px rgba(14, 42, 38, .35);
}

.contact-dialog::backdrop {
  background: rgba(14, 42, 38, .55);
  backdrop-filter: blur(4px);
}

.contact-dialog__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
}

.contact-dialog h2 {
  margin: 0;
  padding-right: 32px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.contact-dialog p {
  margin: 0 0 8px;
  color: #46605B;
  line-height: 1.5;
}

.contact-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid #D5DBD3;
  font-weight: 600;
  color: #0E2A26;
  transition: transform .2s ease, background-color .2s ease;
}
.contact-btn:hover {
  background: #EEF1EC;
  transform: translateY(-2px);
}

.contact-btn--main {
  background: #D9B44A;
  border-color: #D9B44A;
  font-weight: 700;
}
.contact-btn--main:hover {
  background: #E3C468;
}

.contact-dialog__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #46605B;
}
.contact-dialog__close:hover {
  background: #EEF1EC;
}

.contact-dialog[open] {
  animation: dialog-in .25s ease;
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-dialog[open] { animation: none; }
}
#reviews {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 20px 56px;   /* секция стоит вне .card, поэтому свои боковые отступы */
}

#reviews .divider-title {
  margin: 0 0 24px;
  font-size: 35px;
  line-height: 1.3;
}

@media (min-width: 900px) {
  #reviews {
    padding: 0 48px 72px;
  }
}
.reviews__grid {
  columns: 3 260px;
  column-gap: 20px;
}

.review {
  display: block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  border: 1px solid #e3e5e3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  break-inside: avoid;
  transition: transform .2s ease, box-shadow .2s ease;
}

.review:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(14, 42, 38, .12);
}

.review img {
  display: block;
  width: 100%;
  height: auto;
}
.review-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(560px, calc(100% - 32px));
  max-height: 90vh;
  overflow: visible;
}

.review-dialog::backdrop {
  background: rgba(14, 42, 38, .7);
  backdrop-filter: blur(4px);
}

.review-dialog img {
  display: block;
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 16px;
}

.review-dialog__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
/* ===== Мобильная оптимизация ===== */

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }              /* без горизонтального «дрожания» */
a, button { -webkit-tap-highlight-color: transparent; }

/* на тачскринах hover «залипает» после тапа, отключаем сдвиги */
@media (hover: none) {
  .gallery-item:hover,
  .general a:hover,
  .contact-btn:hover,
  .review:hover { transform: none; }
  .review:hover { box-shadow: none; }
}

/* планшеты и узкие ноутбуки: первый экран в колонку */
@media (max-width: 1100px) {
  #A {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 0 !important;
    padding: 32px 24px !important;
    gap: 28px !important;
    margin-top: 16px !important;
  }
  .general { width: 100%; max-width: 640px; box-sizing: border-box; padding: 32px 28px; }
  .image1 { width: 100%; max-width: 450px; height: 480px; }
  #A + div { height: 40px !important; }   /* распорка под первым экраном */
  .about__inner { padding: 40px; }
}

/* телефоны */
@media (max-width: 700px) {
  .nav-wrap { padding: 10px 12px 0; }
  .brand { font-size: 13px; }
  .links .cta { min-height: 44px; display: inline-flex; align-items: center; }

  /* заголовок: разрешаем перенос и убираем фиксированные 440px у меняющегося слова */
  .general h1 { line-height: 1.1 !important; }
  .general h1 span { white-space: normal !important; }
  .general h1 > span:nth-child(2) > span { width: 6.5em !important; }

  .image1 { height: 320px; border-width: 5px; border-radius: 22px; }
  #A + div { height: 24px !important; }

  .gallery-item { border-radius: 20px; }
  .gallery-caption { padding: 18px; }
  .gallery-caption h3 { font-size: 26px; }

  .about__photo img { max-width: 100%; }
  .about__text p { font-size: 16px; line-height: 1.6; }
  .chips { font-size: 13px; }

  .step { padding: 20px; border-radius: 22px; }

  /* отзывы: две колонки, по тапу открываются крупно */
  #reviews { padding: 0 16px 40px; margin-top: 32px; }
  #reviews .divider-title { font-size: clamp(28px, 8vw, 35px); }
  .reviews__grid { columns: 2; column-gap: 12px; }
  .review { margin-bottom: 12px; border-radius: 12px; }

  /* окна */
  .contact-dialog__body { padding: 24px; }
  .contact-dialog__close { width: 44px; height: 44px; }
  .review-dialog { max-height: 90dvh; }
  .review-dialog img { max-height: 90dvh; }
}

/* совсем маленькие экраны: отзывы в одну колонку, чтобы текст читался */
@media (max-width: 480px) {
  .reviews__grid { columns: 1; }
}
/* заголовок первого экрана */
.general { min-width: 0; box-sizing: border-box; }

.general h1 {
  font-size: clamp(32px, 4.2vw, 56px) !important;
  line-height: 1.15 !important;
}

/* первая строка может переноситься по словам */
.general h1 > span:first-child {
  white-space: normal !important;
}

/* вторая строка «по + слово» всегда в одну строку */
.general h1 > span:nth-child(2) {
  white-space: nowrap !important;
}

/* окно для меняющегося слова: под самое длинное («гостеприимной») */
.general h1 > span:nth-child(2) > span {
  width: 7.5em !important;
}
@media (max-width: 700px) {
  /* размер привязан к ширине экрана, чтобы «по гостеприимной» влезало */
  .general h1 {
    font-size: clamp(24px, 7.2vw, 34px) !important;
    line-height: 1.12 !important;
  }

  /* окно для меняющегося слова */
  .general h1 > span:nth-child(2) > span {
    width: 6.6em !important;
  }

  /* убираем пустоту между заголовком и кнопками */
  .general p:empty { display: none; }
  .general > div[style*="height:24px"] { display: none; }
  .general { gap: 14px; padding: 20px; }

  /* кнопки компактнее */
  .general a.pill {
    padding: 14px 20px !important;
    font-size: 15px !important;
  }
}