/* =========================================
   Дом у Леса — v4
   CSS: Inter + Playfair Display, mobile-first
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: #1a1a2e;
  background: #faf9f6;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Typography --- */
h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 600; }
.section { padding: 80px 0; }
.section--dark { background: #1a1a2e; color: #faf9f6; }
.section__header {
  text-align: center;
  margin-bottom: 48px;
}
.section__title {
  font-size: 2rem;
  margin-bottom: 12px;
}
.section--dark .section__title { color: #faf9f6; }
.section__desc {
  color: #6b7280;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.section--dark .section__desc { color: #9ca3af; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-align: center;
  justify-content: center;
}
.btn--primary {
  background: #2d6a4f;
  color: #fff;
  border-color: #2d6a4f;
}
.btn--primary:hover { background: #1b4332; border-color: #1b4332; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(45,106,79,0.3); }
.btn--outline {
  background: transparent;
  color: #2d6a4f;
  border-color: #2d6a4f;
}
.btn--outline:hover { background: #2d6a4f; color: #fff; transform: translateY(-1px); }
.section--dark .btn--outline { color: #faf9f6; border-color: #faf9f6; }
.section--dark .btn--outline:hover { background: #faf9f6; color: #1a1a2e; }
.btn--lg { padding: 16px 40px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250,249,246,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.3s;
}
.header--scrolled { background: rgba(250,249,246,0.98); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}
.header__logo-icon { font-size: 1.4rem; }
.header__nav { display: flex; gap: 24px; }
.header__nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4b5563;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.header__nav a:hover { color: #2d6a4f; border-bottom-color: #2d6a4f; }

/* Burger */
.header__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.header__burger span { display: block; width: 24px; height: 2px; background: #1a1a2e; border-radius: 2px; transition: 0.3s; }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 720px;
}
.hero__location {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  margin-bottom: 16px;
}
.hero__title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.1;
}
.hero__subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 540px;
}
.hero__features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.hero__features span {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- About --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__specs li {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}
.about__specs li:last-child { border-bottom: none; }
.about__note {
  margin-top: 20px;
  padding: 16px;
  background: #e8f5e9;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #2d6a4f;
}
.about__image img {
  border-radius: 16px;
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* --- Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.gallery__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 16/7; }
.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery__item:hover .gallery__caption { opacity: 1; }

/* --- Prices --- */
.prices__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}
.price-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  position: relative;
}
.price-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.price-card--highlight {
  border-color: #2d6a4f;
  box-shadow: 0 4px 20px rgba(45,106,79,0.12);
}
.price-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2d6a4f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 16px;
  border-radius: 20px;
}
.price-card__days { font-weight: 600; font-size: 0.95rem; color: #6b7280; margin-bottom: 12px; }
.price-card__value { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.price-card__period { font-size: 0.85rem; color: #9ca3af; margin-bottom: 16px; }
.price-card__note { font-size: 0.85rem; color: #6b7280; }
.prices__info {
  background: #fff;
  border-radius: 12px;
  padding: 24px 32px;
  border: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.prices__info p { font-size: 0.95rem; color: #4b5563; }

/* --- Services --- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s ease;
}
.service-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.service-card--featured {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.06);
}
.service-card--included {
  border-color: #2d6a4f;
  background: rgba(45,106,79,0.06);
}
.service-card__icon { font-size: 2rem; margin-bottom: 12px; }
.service-card__title { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 8px; }
.service-card__price { font-size: 1.3rem; font-weight: 700; color: #f59e0b; margin-bottom: 16px; }
.service-card__list { margin-bottom: 12px; }
.service-card__list li {
  padding: 4px 0;
  font-size: 0.9rem;
  color: #9ca3af;
}
.service-card__list li::before { content: "✓ "; color: #2d6a4f; font-weight: 700; }
.service-card__note {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
}

/* --- Location --- */
.location__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.location__info h3 { font-size: 1.3rem; margin-bottom: 16px; }
.location__info ul { margin-bottom: 20px; }
.location__info ul li { padding: 6px 0; font-size: 0.95rem; color: #4b5563; }
.location__address {
  background: #e8f5e9;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.location__links { display: flex; gap: 12px; flex-wrap: wrap; }
.location__map { border-radius: 12px; overflow: hidden; }

/* --- Booking Form --- */
.booking-form {
  max-width: 640px;
  margin: 0 auto;
}
.booking-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.booking-form__group {
  margin-bottom: 16px;
}
.booking-form__group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: #d1d5db;
}
.booking-form__group input,
.booking-form__group textarea,
.booking-form__group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #faf9f6;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.booking-form__group input:focus,
.booking-form__group textarea:focus {
  outline: none;
  border-color: #2d6a4f;
  background: rgba(255,255,255,0.1);
}
.booking-form__group input::placeholder,
.booking-form__group textarea::placeholder { color: #6b7280; }
.booking-form__group input.error,
.booking-form__group textarea.error { border-color: #ef4444; }
.booking-form__actions { text-align: center; margin-top: 8px; }
.booking-form__status {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: none;
}
.booking-form__status--success { display: block; background: rgba(45,106,79,0.15); color: #4ade80; }
.booking-form__status--error { display: block; background: rgba(239,68,68,0.15); color: #f87171; }
.booking-form__status--sending { display: block; background: rgba(96,165,250,0.15); color: #93c5fd; }

/* --- Contacts --- */
.contacts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.contact-card {
  text-align: center;
  padding: 32px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.contact-card__icon { font-size: 2rem; margin-bottom: 12px; }
.contact-card h3 { margin-bottom: 8px; }
.contact-card__link {
  display: block;
  font-weight: 600;
  color: #2d6a4f;
  margin-bottom: 4px;
  font-size: 1rem;
}
.contact-card p { font-size: 0.85rem; color: #6b7280; }

/* --- Footer --- */
.footer {
  background: #1a1a2e;
  color: #9ca3af;
  padding: 32px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__info p { font-size: 0.9rem; }
.footer__small { font-size: 0.8rem; margin-top: 4px; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: 0.85rem; transition: color 0.2s; }
.footer__links a:hover { color: #faf9f6; }

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.lightbox--open { display: flex; }
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox__close:hover { opacity: 1; }

/* --- PDF button --- */
#pdfDownloadBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #2d6a4f;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45,106,79,0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
#pdfDownloadBtn:hover { background: #1b4332; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(45,106,79,0.4); }
#pdfDownloadBtn:disabled { opacity: 0.6; cursor: wait; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.6s ease forwards; }

/* --- @media print: PDF fallback --- */
@media print {
  body { color: #1a1a2e; background: #fff; font-size: 12pt; }
  .header, .hero, .lightbox, #pdfDownloadBtn, .footer__links { display: none !important; }
  .section { padding: 16px 0; page-break-inside: avoid; }
  .section--dark { background: #fff !important; color: #1a1a2e !important; }
  .section--dark .section__title { color: #1a1a2e !important; }
  .section--dark .section__desc { color: #4b5563 !important; }
  .section--dark .btn--outline { color: #2d6a4f !important; border-color: #2d6a4f !important; }
  .gallery__item { break-inside: avoid; }
  .gallery__caption { opacity: 1 !important; position: static !important; background: none !important; color: #4b5563 !important; padding: 4px 0 !important; }
  .location__map iframe { display: none; }
  .booking-form { display: none; }
  .about__grid, .location__grid, .services__grid, .prices__grid, .contacts__grid { break-inside: avoid; }
  .price-card { border: 1px solid #ccc; box-shadow: none !important; transform: none !important; }
  .price-card--highlight { border-color: #2d6a4f; }
  .service-card { border: 1px solid #ccc; }
  .contact-card { border: 1px solid #ccc; }
  .about__image img { height: auto; max-height: 300px; }
  .btn { border: 1px solid #2d6a4f; color: #2d6a4f !important; background: none !important; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .prices__grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto 36px; }
  .services__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .contacts__grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero__title { font-size: 2.2rem; }
  .hero__subtitle { font-size: 1rem; }
  .about__grid,
  .location__grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__item:first-child { grid-column: 1; aspect-ratio: 4/3; }
  .booking-form__row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }

  /* Mobile nav */
  .header__nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(250,249,246,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
  }
  .header__nav--open { display: flex; }
  .header__burger { display: flex; }
  .about__image img { height: 280px; }
  .prices__info { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 1.8rem; }
  .hero { min-height: 85vh; }
  .hero__features { gap: 8px; }
  .hero__features span { font-size: 0.8rem; padding: 6px 12px; }
  .section__title { font-size: 1.5rem; }
  .price-card__value { font-size: 2rem; }
}

/* Privacy checkbox */
.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}
.form__checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #2d6a4f;
  cursor: pointer;
}
.form__checkbox a {
  color: #2d6a4f;
  text-decoration: underline;
}
.footer__bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  opacity: 0.7;
}
.footer__bottom a {
  color: #a8d5ba;
  text-decoration: none;
}
.footer__bottom a:hover {
  text-decoration: underline;
}

/* Telegram button */
.hero__btn--tg {
  background: #2AABEE;
  margin-left: 10px;
}
.hero__btn--tg:hover {
  background: #1a9ad9;
}
.form__tg-hint {
  text-align: center;
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
}
.form__tg-hint a {
  color: #2AABEE;
  font-weight: 600;
  text-decoration: none;
}
.form__tg-hint a:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .hero__btn--tg {
    margin-left: 0;
    margin-top: 10px;
  }
}

/* Telegram hint in form */
.booking-form__tg-hint {
  text-align: center;
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
}
.booking-form__tg-hint a {
  color: #2AABEE;
  font-weight: 600;
  text-decoration: none;
}
.booking-form__tg-hint a:hover {
  text-decoration: underline;
}
/* Telegram button in hero */
.hero__tg-btn {
  margin-left: 10px;
}
.hero__tg-btn:hover {
  background: #2AABEE;
  color: #fff;
  border-color: #2AABEE;
}
@media (max-width: 768px) {
  .hero__tg-btn {
    margin-left: 0;
    margin-top: 10px;
  }
}
