/* ══════════════════════════════════════════════════════════
   Забегаево — PHP version
   Mirrors the Next.js original 1:1
   ══════════════════════════════════════════════════════════ */

/* ── Reset & Variables ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #FAF8F5;
  --warm-white: #F5F2EE;
  --sand:       #C4A882;
  --sand-light: #EDE6DA;
  --stone:      #7A7068;
  --charcoal:   #2C2925;
  --ink:        #1A1A18;
  --border:     #E2DBD1;

  --font-cormorant: 'Cormorant Garamond', Georgia, serif;
  --font-jost:      'Jost', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-jost), sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

::selection { background: var(--sand-light); color: var(--ink); }

::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--sand); border-radius: 3px; }

.lightbox-open { overflow: hidden; }

/* ── Shared labels ────────────────────────────────────────── */
.label-sm {
  display: block;
  font-family: var(--font-jost);
  font-size: .625rem;   /* 10px */
  font-weight: 300;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1rem;
}
.label-xs {
  display: block;
  font-family: var(--font-jost);
  font-size: .625rem;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-cormorant);
  font-weight: 300;
  line-height: 1.1;
}

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(20,18,15,.88) 0%,
    rgba(20,18,15,.45) 45%,
    rgba(20,18,15,.08) 100%);
}

/* Nav */
.hero-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3.5rem;
  z-index: 20;
}
.hero-logo {
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
}
.hero-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-nav-link {
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  transition: color .3s;
}
.hero-nav-link:hover { color: #fff; }
.hero-nav-price {
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .625rem 1.25rem;
  background: var(--sand);
  color: var(--ink);
  transition: opacity .3s;
}
.hero-nav-price:hover { opacity: .85; }

/* Content */
.hero-content {
  position: relative;
  z-index: 10;
  padding: 0 3.5rem 6rem;
  max-width: 900px;
  animation: heroIn 1s cubic-bezier(.22,1,.36,1) .3s both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

.hero-eyebrow {
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-cormorant);
  font-weight: 300;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-family: var(--font-jost);
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,.7);
  margin-bottom: 2.5rem;
  max-width: 520px;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-jost);
  font-size: .8125rem;
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--ink);
  border: none;
  cursor: pointer;
  transition: background .3s;
}
.btn-book:hover { background: rgba(196,168,130,.85); }
.btn-book--sm { padding: 1rem 2rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-jost);
  font-size: .8125rem;
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  transition: background .3s;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 3.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  animation: heroIn 1s .3s both;
}
.scroll-line {
  width: 1px;
  height: 3.5rem;
  background: rgba(255,255,255,.3);
}
.scroll-label {
  font-family: var(--font-jost);
  font-size: .625rem;
  font-weight: 300;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  transform: rotate(90deg) translateX(50%);
  transform-origin: center;
  margin-top: .5rem;
}

/* ══════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════ */
.gallery-section {
  padding: 6rem 0 8rem;
  background: var(--warm-white);
}
.gallery-header {
  padding: 0 3.5rem;
  max-width: 1280px;
  margin: 0 auto 4rem;
}
.gallery-header .section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--ink);
}

/* CSS Masonry (columns) — same as Next.js */
.masonry {
  column-count: 4;
  column-gap: 10px;
  padding: 0 3.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 10px;
  cursor: pointer;
  overflow: hidden;

  /* scroll-reveal initial state */
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .65s cubic-bezier(.22,1,.36,1),
    transform .65s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.masonry-item.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .masonry-item { opacity: 1; transform: none; transition: none; }
}

.masonry-item-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.masonry-item-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.masonry-item:hover img { transform: scale(1.04); }
.masonry-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .3s;
}
.masonry-item:hover .masonry-hover { background: rgba(0,0,0,.1); }

/* ══════════════════════════════════════════════════════════
   PRICING
══════════════════════════════════════════════════════════ */
.pricing-section {
  padding: 7rem 0 10rem;
  background: var(--ink);
}
.pricing-wrap {
  padding: 0 3.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.pricing-wrap .section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #fff;
  margin-bottom: 1rem;
}
.pricing-sub {
  font-family: var(--font-jost);
  font-size: .9rem;
  font-weight: 300;
  color: rgba(255,255,255,.4);
  line-height: 1.85;
  max-width: 32rem;
  margin-bottom: 5rem;
}
.pricing-wrap .label-sm { color: var(--sand); }
.pricing-wrap .label-xs { margin-top: 0; }

/* Long-term grid */
.pricing-long {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.06);
  margin-bottom: 5rem;
}
.price-card {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--ink);
  border-top: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}
.price-card--hi {
  background: rgba(196,168,130,.12);
  border-top-color: rgba(196,168,130,.35);
}
.price-badge {
  position: absolute;
  top: 1rem; right: 1.25rem;
  font-family: var(--font-jost);
  font-size: .5625rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sand);
}
.price-period {
  font-family: var(--font-cormorant);
  font-size: 1.4rem;
  font-weight: 300;
  color: #fff;
  margin-bottom: .25rem;
}
.price-note {
  font-family: var(--font-jost);
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .05em;
  color: rgba(255,255,255,.3);
}
.price-amount-wrap { margin-top: 2rem; }
.price-amount {
  font-family: var(--font-cormorant);
  font-size: 2rem;
  font-weight: 300;
  color: #fff;
  line-height: 1;
}
.price-amount--hi { color: var(--sand); }
.price-unit {
  font-family: var(--font-jost);
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .08em;
  color: rgba(255,255,255,.3);
  margin-top: .25rem;
}

/* Short + Daily */
.pricing-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,.06);
  margin-bottom: 5rem;
}
.pricing-block {
  padding: 2.5rem 2rem;
  background: var(--ink);
}
.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.price-row:last-child { border-bottom: none; }
.price-row-period {
  font-family: var(--font-cormorant);
  font-size: 1.3rem;
  font-weight: 300;
  color: #fff;
}
.price-row-right { text-align: right; }
.price-row-val {
  font-family: var(--font-cormorant);
  font-size: 1.6rem;
  font-weight: 300;
  color: #fff;
}
.price-row-unit {
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  color: rgba(255,255,255,.35);
  margin-left: .25rem;
}

/* Footer conditions */
.pricing-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
@media (min-width: 768px) {
  .pricing-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.pricing-notes { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) {
  .pricing-notes { flex-direction: row; gap: 3rem; }
}
.pricing-note {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.note-dot {
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sand);
  flex-shrink: 0;
}
.pricing-note span:last-child {
  font-family: var(--font-jost);
  font-size: .78rem;
  font-weight: 300;
  color: rgba(255,255,255,.35);
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--ink);
  padding: 4rem 0;
}
.footer-wrap {
  padding: 0 3.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 2rem;
}
.footer-brand {
  font-family: var(--font-jost);
  font-size: .875rem;
  font-weight: 300;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-brand-sub {
  font-family: var(--font-jost);
  font-size: .8rem;
  font-weight: 300;
  color: rgba(255,255,255,.4);
  line-height: 1.9;
}
.footer-label {
  font-family: var(--font-jost);
  font-size: .625rem;
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.5rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.footer-links a {
  font-family: var(--font-jost);
  font-size: .875rem;
  font-weight: 300;
  color: rgba(255,255,255,.6);
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-addr {
  font-family: var(--font-jost);
  font-size: .875rem;
  font-weight: 300;
  color: rgba(255,255,255,.5);
  line-height: 1.9;
}
.footer-addr-note {
  font-family: var(--font-jost);
  font-size: .8rem;
  font-weight: 300;
  color: rgba(255,255,255,.3);
  margin-top: 1rem;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.footer-bottom p {
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  color: rgba(255,255,255,.25);
}
.footer-bottom p:last-child { color: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════════════════
   CONTACT MODAL
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15,12,10,.75);
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 51;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modalIn .3s cubic-bezier(.22,1,.36,1);
}
.modal[hidden] { display: none; }

@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { from { opacity: 1 } to { opacity: 0 } }
@keyframes modalIn  { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }
@keyframes modalOut { from { opacity: 1; transform: none } to { opacity: 0; transform: translateY(16px) } }

.modal-inner {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--cream);
}

/* We use the .modal div itself as the wrapper, so inner content is direct children */
.modal > * { pointer-events: auto; }

/* Re-structure: modal content inside a white box */
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--stone);
  cursor: pointer;
  z-index: 1;
  transition: color .2s;
}
.modal-close:hover { color: var(--ink); }

/* ── Override: the modal content box ── */
.modal {
  /* already positioned fixed */
}

/* Content box inside .modal — we'll wrap it in PHP */
.modal-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--cream);
}
.modal-header {
  padding: 2.5rem 2rem 1.75rem;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-cormorant);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--ink);
}
.modal-contacts {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: opacity .2s;
}
.contact-item:hover { opacity: .8; }
.contact-icon { flex-shrink: 0; display: flex; align-items: center; }
.contact-text { flex: 1; min-width: 0; }
.contact-label {
  font-family: var(--font-jost);
  font-size: .7rem;
  font-weight: 300;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: .125rem;
}
.contact-detail {
  font-family: var(--font-jost);
  font-size: .9rem;
  font-weight: 300;
}
.contact-arrow { flex-shrink: 0; opacity: .5; }
.modal-note {
  padding: 0 2rem 2rem;
  text-align: center;
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  color: var(--stone);
}

/* ══════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15,12,10,.97);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease;
}
.lightbox[hidden] { display: none; }

.lb-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 1.875rem;
  font-weight: 300;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: color .2s;
  line-height: 1;
  z-index: 1;
}
.lb-close:hover { color: #fff; }

.lb-counter {
  position: absolute;
  top: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-jost);
  font-size: .75rem;
  font-weight: 300;
  letter-spacing: .15em;
  color: rgba(255,255,255,.4);
}

.lb-prev, .lb-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 2.5rem;
  font-weight: 300;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 1rem;
  transition: color .2s;
  line-height: 1;
  z-index: 1;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover, .lb-next:hover { color: #fff; }

.lb-img-wrap {
  width: min(90vw, 1100px);
  height: min(85vh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ══════════════════════════════════════════════════════════
   FADE-IN ANIMATIONS (scroll reveal)
══════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ══════════════════════════════════════════════════════════
   GALLERY PREVIEW (on index.php)
══════════════════════════════════════════════════════════ */
.gallery-preview-section {
  padding: 6rem 0 8rem;
  background: var(--warm-white);
}
.gallery-preview-wrap {
  padding: 0 3.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.gallery-preview-text {
  margin-bottom: 3rem;
}
.gallery-preview-link {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
.gallery-preview-thumb {
  overflow: hidden;
  background: var(--sand-light);
}
.gallery-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.gallery-preview-link:hover .gallery-preview-thumb img { transform: scale(1.04); }

.gallery-preview-cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 2rem;
  background: linear-gradient(to top, rgba(20,18,15,.55) 0%, transparent 50%);
  pointer-events: none;
}
.gallery-preview-cta span {
  font-family: var(--font-jost);
  font-size: .85rem;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.4);
  padding-bottom: .2rem;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .masonry { column-count: 3; }
  .pricing-long { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-nav     { padding: 1.5rem; }
  .hero-content { padding: 0 1.5rem 4rem; }
  .scroll-indicator { right: 1.5rem; }

  .gallery-header { padding: 0 1.5rem; }
  .masonry { column-count: 2; padding: 0 1.5rem; }

  .gallery-preview-wrap { padding: 0 1.5rem; }
  .gallery-preview-link { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 160px); }
  .gallery-preview-link .gallery-preview-thumb:nth-child(n+5) { display: none; }

  .pricing-wrap { padding: 0 1.5rem; }
  .pricing-long { grid-template-columns: 1fr 1fr; }
  .pricing-bottom { grid-template-columns: 1fr; }

  .footer-wrap { padding: 0 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .hero-btns { flex-direction: column; }
  .btn-book, .btn-ghost { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .masonry { column-count: 1; }
  .pricing-long { grid-template-columns: 1fr; }
}
