:root {
  --blue: #0071c2;
  --blue-dark: #003b95;
  --blue-hover: #00487a;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --bg: #f5f5f5;
  --green: #008009;
  --score: #003b95;
  --amber: #febb02;
  --radius: 8px;
  --max: 1128px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 14px;
}
h1, h2, h3, h4, h5 { margin: 0 0 .5em; }
h2 { font-size: 22px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.link { color: var(--blue); }
.icon { vertical-align: -2px; color: var(--blue); }

/* Header */
.site-header {
  background: var(--blue-dark);
  color: #fff;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.lang-switch { display: flex; gap: 4px; }
.lang-btn { background: transparent; color: #cfe0f5; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 5px 12px; font-weight: 700; font-size: 13px; cursor: pointer; display: inline-block; text-decoration: none; }
.lang-btn:hover { text-decoration: none; }
.lang-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.lang-btn.active { background: #fff; color: var(--blue-dark); border-color: #fff; }
.logo {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.logo:hover { text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: background .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); text-decoration: none; }
.btn-primary:disabled { background: #9ec7e3; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-ghost:hover { background: #f0f6fb; }
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: 10px; }

/* Title block */
main { padding-bottom: 48px; }
.title-block { padding: 20px 0 8px; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.badge-stay {
  display: inline-block;
  background: #ebf3ff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.property-title { font-size: 26px; line-height: 1.25; }
.address { color: var(--text); font-size: 13px; }
.title-actions { flex-shrink: 0; }

/* Gallery mosaic */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 200px);
  gap: 6px;
  margin: 12px 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery .g-cell { position: relative; overflow: hidden; cursor: pointer; background: #ddd; }
.gallery .g-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery .g-cell:hover img { transform: scale(1.04); }
.gallery .g-main { grid-row: 1 / span 2; grid-column: 1; }
.gallery .g-more {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

/* Quick facts */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 4px 0 8px;
  margin-bottom: 28px;
}
.qf-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
}
.qf-ic { flex-shrink: 0; color: #1a1a1a; line-height: 0; }
.qf-ic svg { width: 28px; height: 28px; display: block; }
.qf-label { line-height: 1.25; }

/* About row */
.about-row { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-bottom: 32px; }
.about-main p { margin: 0 0 12px; }
.popular-title { margin-top: 18px; font-size: 16px; }
.popular-facilities { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.highlights-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  height: fit-content;
  background: #fff;
}
.hl-line { color: var(--green); font-weight: 600; font-size: 13px; margin: 0 0 12px; }
.hl-wifi { background: #f2f6fa; border-radius: 6px; padding: 10px; margin-bottom: 14px; }
.hl-wifi strong { margin-right: 8px; }
.score-pill {
  display: inline-block;
  background: var(--score);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
}

/* Availability / booking widget */
.availability { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 32px; }
.booking-widget { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 16px; }
.calendars { display: flex; gap: 20px; flex-wrap: wrap; }
.cal { width: 280px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 700; }
.cal-nav { background: #fff; border: 1px solid var(--line); border-radius: 4px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}
.cal-day:hover:not(.disabled):not(.empty) { border-color: var(--blue); }
.cal-day.empty { cursor: default; }
.cal-day.disabled { color: #ccc; text-decoration: line-through; cursor: not-allowed; }
.cal-day.selected { background: var(--blue); color: #fff; font-weight: 700; }
.cal-day.in-range { background: #e6f2fb; }

.booking-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; height: fit-content; }
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field-value { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-weight: 600; }
.guests-control { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.guest-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 28px; height: 28px; border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.price-box { background: #f2f6fa; border-radius: 6px; padding: 12px; margin: 12px 0; }
.price-line { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; }
.booking-error { color: #c00; font-size: 13px; margin: 8px 0; }
.free-cancel { color: var(--green); font-weight: 600; margin-top: 4px; }

/* Reviews */
.reviews { margin-bottom: 32px; }
.reviews-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.score-big { background: var(--score); color: #fff; font-weight: 700; font-size: 20px; border-radius: 6px 6px 6px 0; padding: 6px 10px; }
.review-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 32px; margin-bottom: 20px; }
.cat { display: grid; grid-template-columns: 120px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; }
.cat .bar { background: #e7eef5; height: 6px; border-radius: 3px; overflow: hidden; }
.cat .bar i { display: block; height: 100%; background: var(--blue-dark); }
.cat b { text-align: right; }
.review-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.review-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-card .avatar, .host-avatar { background: var(--blue-dark); color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.review-card header div { display: flex; flex-direction: column; line-height: 1.2; }
.review-card p { font-size: 13px; margin: 0; }

/* Q&A */
.qna { margin-bottom: 32px; }
.qna-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; align-items: start; }
.qna-item { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 13px; background: #fff; }
.qna-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 500; }
.qna-item summary::-webkit-details-marker { display: none; }
.qna-item summary::after { content: "\25BC"; font-size: 9px; color: var(--blue); transition: transform .2s; flex-shrink: 0; }
.qna-item[open] summary::after { transform: rotate(180deg); }
.qna-item p { margin: 8px 0 0; color: var(--muted); }

/* Host */
.host { margin-bottom: 32px; }
.host-row { display: flex; gap: 16px; align-items: flex-start; }
.host-avatar { width: 56px; height: 56px; font-size: 22px; flex-shrink: 0; }
.host-bio p { margin: 0 0 10px; font-size: 13px; }
.languages { color: var(--text); }

/* Surroundings */
.surroundings { margin-bottom: 32px; }
.surroundings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.surroundings-grid h4 { font-size: 14px; }
.surroundings-grid ul { list-style: none; padding: 0; margin: 0; }
.surroundings-grid li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

/* Facilities */
.facilities { margin-bottom: 32px; }
.facilities-score { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 16px; }
.facilities-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fac-group h4 { font-size: 14px; }
.fac-group ul { list-style: none; padding: 0; margin: 0; }
.fac-group li { font-size: 13px; padding: 3px 0; padding-left: 18px; position: relative; }
.fac-group li::before { content: "\2713"; color: var(--green); position: absolute; left: 0; }

/* House rules */
.house-rules { margin-bottom: 32px; }
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; }
.rule { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rule-icon { font-size: 20px; }
.rule strong { display: block; font-size: 14px; }
.rule p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* Fine print + FAQ */
.fine-print { margin-bottom: 32px; }
.faq-title { margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "\25BC"; font-size: 10px; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--blue-dark); color: #fff; padding: 32px 0; margin-top: 40px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-cols h5 { font-size: 14px; margin-bottom: 10px; }
.footer-cols a { color: #d6e2f5; display: block; font-size: 13px; padding: 3px 0; }
.footer-cols a:hover { color: #fff; }
.footer-cols .muted { color: #aebbd4; font-size: 12px; }
.copyright { border-top: 1px solid rgba(255,255,255,.2); margin-top: 24px; padding-top: 16px; font-size: 12px; color: #aebbd4; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1500; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 90vw; max-height: 90vh; text-align: center; }
.lb-figure img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lb-figure figcaption { color: #fff; margin-top: 10px; font-size: 14px; }
.lb-close, .lb-prev, .lb-next { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 28px; line-height: 1; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Location map */
.map-section { margin-bottom: 32px; }
.map-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; z-index: 0; isolation: isolate; }
#leafletMap { width: 100%; height: 420px; }
.map-tip { font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.map-tip.stay { background: var(--blue); color: #fff; border-color: var(--blue); text-align: center; }
.map-tip.stay.leaflet-tooltip-top::before { border-top-color: var(--blue); }
.map-addr { font-size: 13px; margin-top: 10px; }

/* Email modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: 12px; padding: 28px 24px; max-width: 420px; width: 100%; text-align: center; position: relative; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal-gift { font-size: 40px; margin-bottom: 8px; }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal p.muted { margin-bottom: 16px; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--text); }
#emailForm { display: flex; flex-direction: column; gap: 10px; }
#emailInput { padding: 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; font-family: inherit; }
#emailInput:focus { outline: none; border-color: var(--blue); }
.modal-msg { margin-top: 12px; font-size: 14px; font-weight: 600; }
.modal-msg.success { color: var(--green); }
.modal-msg.error { color: #c00; }

/* Responsive */
@media (max-width: 900px) {
  .about-row, .booking-widget { grid-template-columns: 1fr; }
  .gallery { grid-template-rows: repeat(2, 140px); }
  .quick-facts { grid-template-columns: repeat(3, 1fr); }
  .review-cards, .facilities-grid, .surroundings-grid { grid-template-columns: 1fr; }
  .review-categories, .rules-grid, .qna-grid, .footer-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .title-row { flex-direction: column; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .g-main { grid-column: 1 / span 2; }
  .quick-facts { grid-template-columns: repeat(2, 1fr); }
}
