/* ============================================================
   Б.И.С. Apartments — stylesheet
   Concept: pure white canvas, royal blue accents,
   charcoal serif headings, line-art decorations
   ============================================================ */

:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #23272f;           /* deep charcoal for headings */
  --muted: #6b7280;
  --blue: #0081ea;          /* Kislovodsk sky blue */
  --blue-dark: #0070cc;
  --blue-soft: #e9f4fe;     /* pale blue for panels */
  --line: #e6e9f2;
  --gold: #d9a441;          /* logo scroll accent */
  --shadow: 0 18px 55px rgba(31, 79, 216, .10);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { text-decoration: none; color: inherit; }
button, input, select { font: inherit; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}

/* ---------- Navigation (over the hero banner) ---------- */

.nav {
  position: absolute;
  z-index: 10;
  left: 0; right: 0; top: 0;
  padding: 26px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.menu { display: flex; align-items: center; gap: 34px; font-size: 13px; }
.menu a {
  color: white;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  opacity: .92;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}
.menu a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  background: rgba(0, 0, 0, .15);
  color: white;
  font-weight: 700;
}
.lang:hover { background: white; color: var(--blue); }

/* Instagram icon button (nav) */
.ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  width: 40px;
  border: none;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: white;
  box-shadow: 0 2px 10px rgba(214, 36, 159, .35);
  transition: transform .2s, filter .2s;
}
.ig:hover { transform: scale(1.08); filter: saturate(1.25) brightness(1.06); }

.book {
  background: var(--blue);
  border: 0;
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(31, 79, 216, .28);
}
.book:hover { background: var(--blue-dark); }
.book:disabled { opacity: .6; cursor: default; }

/* Hamburger — hidden on desktop */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  height: 2.5px;
  width: 26px;
  background: white;
  border-radius: 2px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}

/* Mobile drawer */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 30, 60, .4);
  z-index: 40;
  opacity: 0; pointer-events: none;
  transition: .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(320px, 84vw);
  background: white;
  z-index: 45;
  padding: 70px 34px 34px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  transform: translateX(-100%);
  transition: transform .32s ease;
  box-shadow: 10px 0 40px rgba(0, 0, 0, .12);
}
.drawer.open { transform: translateX(0); }

.drawer a {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  font-size: 17px;
}
.drawer-close {
  position: absolute;
  top: 16px; right: 18px;
  border: 0; background: none;
  font-size: 32px;
  color: var(--ink);
  cursor: pointer;
}
.drawer-book { margin-top: auto; text-align: center; padding: 15px; }

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink) url("photos/hero-bg.jpg") center 30% / cover no-repeat;
}

/* Subtle dark veil so the white logo stays readable */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 25, 45, .38), rgba(15, 25, 45, .12) 40%, rgba(15, 25, 45, .35));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 0 40px;
}

.hero-logo {
  width: min(1100px, 92vw);
  height: auto;
  margin: 0 auto 52px;
  display: block;
  filter: drop-shadow(0 4px 26px rgba(0, 0, 0, .45));
}

/* Quote under the booking bar */
.hero-quote {
  margin-top: 26px;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
  font-size: 15px;
  letter-spacing: .04em;
  font-style: italic;
}

/* Floating booking bar */
.search {
  position: relative;
  z-index: 3;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.1fr 1.1fr .8fr 1.2fr auto;
  gap: 8px;
  max-width: 1020px;
  margin: 0 auto;
  width: 100%;
  text-align: left;
}

.field { padding: 10px 16px; border-right: 1px solid var(--line); min-width: 0; }
.field label {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.field input, .field select {
  border: 0; outline: 0; background: transparent;
  width: 100%; min-width: 0;
  color: var(--ink);
}

.search button {
  border: 0;
  border-radius: 13px;
  background: var(--blue);
  color: white;
  padding: 0 34px;
  cursor: pointer;
  font-weight: 650;
  font-size: 16px;
}
.search button:hover { background: var(--blue-dark); }

/* Mobile-only BOOK NOW button (hidden on desktop) */
.hero-book-mobile {
  display: none;
  border: 0;
  background: var(--blue);
  color: white;
  border-radius: 999px;
  padding: 15px 44px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  margin: 26px auto 0;
  box-shadow: 0 10px 28px rgba(31, 79, 216, .32);
}

/* Decorative art */
.art {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
/* Flower hangs just below the banner edge so it sits on white, not on the photo */
.art-magnolia {
  left: 0;
  bottom: 0;
  transform: translateY(100%);
  width: clamp(170px, 24vw, 300px);
  opacity: .9;
}

/* ---------- Live map (Leaflet + real walking routes) ---------- */

.livemap-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 45px rgba(35, 39, 47, .10);
  background: white;
}

.livemap {
  height: 520px;
  width: 100%;
  z-index: 1;
}

/* Route photo cards under the map */
.map-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.map-chip {
  position: relative;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  height: 150px;
  text-align: left;
  transition: .3s;
  box-shadow: 0 6px 18px rgba(35, 39, 47, .10);
}
.map-chip img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: .4s;
}
.map-chip::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10, 18, 40, .72));
}
.map-chip:hover img { transform: scale(1.06); }
.map-chip.active { outline: 3px solid var(--blue); outline-offset: 2px; }

.map-chip .chip-label {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  z-index: 2;
  color: white;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.map-chip .chip-label small {
  display: block;
  font-weight: 500;
  font-size: 11.5px;
  opacity: .85;
  margin-top: 2px;
}

/* Leaflet popup styling to match site */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(15, 25, 45, .18);
}
.leaflet-popup-content { font-family: inherit; font-size: 14px; margin: 14px 18px; }
.leaflet-popup-content strong { color: var(--ink); display: block; }
.leaflet-popup-content span { color: var(--blue); font-weight: 600; font-size: 13px; }

/* Home marker label */
.home-marker {
  background: var(--blue);
  color: white;
  font-weight: 700;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(31, 79, 216, .4), 0 0 0 3px white;
  white-space: nowrap;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.city-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 20px;
  cursor: pointer;
  transition: .3s;
}
.city-grid img:hover { filter: brightness(1.06); box-shadow: 0 0 0 3px rgba(31, 79, 216, .35); }

/* ---------- Sections ---------- */

section { padding: 92px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 38px;
}

.kicker {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 700;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 400;
  margin: 8px 0 0;
  line-height: 1.05;
}

.lead { color: var(--muted); max-width: 520px; line-height: 1.7; }

/* ---------- Apartment cards ---------- */

.apartments {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(35, 39, 47, .06);
  transition: .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.photo {
  height: 340px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
}
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .28));
}

.badge {
  position: absolute;
  top: 18px; left: 18px;
  z-index: 2;
  background: rgba(255, 255, 255, .94);
  color: var(--blue);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.card-body {
  padding: 24px;
  background: white;
  color: var(--ink);
}
.card-body h3 {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--ink);
}

.meta {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.meta .stars { color: var(--blue); letter-spacing: .1em; }

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.outline {
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}
.outline:hover { background: var(--blue); color: white; }

/* Card buttons: solid blue with white font */
.card .outline {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}
.card .outline:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: white; }

/* ---------- Features ---------- */

.features { background: var(--blue-soft); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature {
  background: rgba(255, 255, 255, .75);
  padding: 25px;
  border-radius: 20px;
  border: 1px solid rgba(31, 79, 216, .12);
}
.feature .icon { font-size: 24px; color: var(--blue); margin-bottom: 15px; }
.feature h3 { font-size: 16px; margin: 0 0 8px; }
.feature p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 14px;
}

.g {
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: .3s;
}
.g:hover { filter: brightness(1.05); box-shadow: 0 0 0 3px rgba(31, 79, 216, .35); }

/* ---------- Call to action ---------- */

.direct {
  background: linear-gradient(115deg, #eef2fd, #fbfcff);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 52px;
  text-align: center;
}
.direct p {
  max-width: 650px;
  margin: 15px auto 25px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */

footer {
  background: white;
  border-top: 1px solid var(--line);
  padding: 38px 0;
}
.foot { display: flex; justify-content: space-between; gap: 25px; align-items: center; }
.foot-brand {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 14px;
}
.foot small { color: var(--muted); }

/* ---------- Booking modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, .5);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }

.modal-box {
  background: var(--paper);
  width: min(720px, 100%);
  border-radius: 26px;
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow: auto;
}
.modal-box h2 { font-size: 34px; margin-bottom: 8px; }

.booking-summary {
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.close {
  position: absolute;
  right: 18px; top: 15px;
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-row-full { grid-template-columns: 1fr; }

.form-row input, .form-row select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 13px;
  outline: none;
  min-width: 0;
}
.form-row input:focus, .form-row select:focus { border-color: var(--blue); }

.form-note { font-size: 12px; color: var(--muted); margin: -4px 0 12px; }
.submit { width: 100%; padding: 15px; }

/* ---------- Photo lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 35, .92);
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

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

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: white;
  font-size: 30px;
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: 0;
  color: white;
  font-size: 36px;
  cursor: pointer;
}

.lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  right: 20px; bottom: 20px;
  background: var(--ink);
  color: white;
  padding: 14px 18px;
  border-radius: 14px;
  display: none;
  z-index: 80;
  max-width: 340px;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

/* Tablets */
@media (max-width: 900px) {
  .menu { display: none; }
  .burger { display: flex; }
  .nav-inner { justify-content: space-between; }
  .search { grid-template-columns: 1fr 1fr; }
  .search button { min-height: 52px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
}

/* Phones */
@media (max-width: 600px) {
  .container { width: min(100% - 24px, 1180px); }

  .nav { padding: 14px 0; }
  .lang { padding: 7px 11px; font-size: 12px; }
  .ig { width: 36px; height: 30px; }
  .nav-actions .book { padding: 10px 14px; font-size: 12px; }

  /* Hero: hide the big search form, show BOOK NOW instead */
  .hero { min-height: 0; padding: 96px 0 44px; }
  .hero-content { padding: 0; }
  .hero-logo { margin-bottom: 22px; }
  .hero-quote { font-size: 13px; margin-top: 18px; }
  .search { display: none; }
  .hero-book-mobile { display: block; }

  /* Apartments jump up right after the hero */
  #apartments { padding-top: 30px; }
  #apartments .section-head {
    text-align: center;
    margin-bottom: 26px;
  }
  #apartments h2 {
    font-size: clamp(30px, 8.5vw, 38px);
  }
  #apartments .lead {
    display: none; /* tighter: the heading speaks for itself */
  }

  .art { width: 120px; }
  .art-magnolia { transform: translateY(100%); }

  .city-grid { grid-template-columns: 1fr 1fr; }
  .city-grid img { height: 180px; }
  .livemap { height: 380px; }
  .map-chips { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .map-chip { height: 110px; }

  section { padding: 52px 0; }
  .section-head { display: block; margin-bottom: 26px; }

  .apartments { grid-template-columns: 1fr; }
  .photo { height: 250px; }
  .features-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }

  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .modal-box { padding: 22px 18px; border-radius: 20px; }
  .modal-box h2 { font-size: 26px; }

  .direct { padding: 35px 22px; }
  .foot { flex-direction: column; text-align: center; gap: 12px; }

  .toast { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

/* Tablets (keep the search bar, but stacked 2-wide) */
@media (min-width: 601px) and (max-width: 900px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search button { min-height: 52px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .nav-actions .book { padding: 9px 11px; }
}
