/* Holiday Home Ferias. Mobile first, one column, photos carry the page.
   Colours come from the place: Adriatic navy, Biokovo stone, olive, terracotta. */

:root {
  --ink: #1f2a2e;
  --muted: #5d6a6f;
  --navy: #163a4d;
  --navy-ink: #f3efe6;
  --stone: #efe9df;
  --olive: #5d6a43;
  --terracotta: #b4532a;
  --terracotta-dark: #96431f;
  --line: #e2ddd3;
  --whatsapp: #1f9e57;

  /* Built-in book faces: no font requests to third parties. */
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --topbar: 60px;
  --actionbar: 76px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-bottom: calc(var(--actionbar) + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 14px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; font-weight: 600; }
h3 { font-size: 1.1rem; }

.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.display {
  font-family: var(--display);
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.muted { color: var(--muted); }
.icon { flex: none; }

/* Bands: full-width colour sections */

.band { padding: 56px 0; }
.band--white { background: #fff; }
.band--stone { background: var(--stone); }
/* The reviews widget loads when scrolled to; keep room so the page does not jump. */
#reviews .wrap { min-height: 320px; }
.band--navy { background: var(--navy); color: var(--navy-ink); }
.band--olive { background: var(--olive); color: #f4f1e8; }
.band--navy .display, .band--olive .display { color: #fff; }
.band--white .display, .band--stone .display { color: var(--navy); }

.story__text { max-width: 62ch; font-size: 1.08rem; }
.band--navy .story__text, .band--olive .story__text { color: rgba(255, 255, 255, 0.86); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--terracotta); color: #fff; }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--terracotta-dark); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--whatsapp:hover { background: #188a4b; }
.btn--quiet { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--quiet:hover { border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.btn--square { width: 54px; padding: 0; flex: none; }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: rgba(0, 0, 0, 0.06); }
.icon-btn--light { color: #fff; }
.icon-btn--light:hover { background: rgba(255, 255, 255, 0.14); }

.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-underline-offset: 3px; }

/* Top bar */

.topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 16px; max-width: 1200px; min-height: var(--topbar); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; flex-direction: column; margin-right: auto; color: var(--navy); text-decoration: none; line-height: 1.1; }
.brand__name { font: 600 clamp(1.15rem, 5vw, 1.35rem)/1.05 var(--display); white-space: nowrap; }
.brand__place { color: var(--muted); font-size: 0.78rem; }
.topbar__nav, .topbar__book { display: none; }
.langs { display: flex; gap: 2px; }
.langs a { padding: 6px 7px; border-radius: 4px; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.langs a[aria-current] { color: var(--ink); background: var(--stone); }
.langs a:hover { color: var(--ink); }

/* Hero: the pool photo on its own; the name and details follow below it. */

.hero { position: relative; isolation: isolate; height: min(62svh, 560px); min-height: 300px; overflow: hidden; background: var(--navy); }
.hero__photo { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__all {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: 600 0.9rem/1.2 var(--font);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.listing-head { padding-top: 24px; padding-bottom: 40px; }
.listing-head__title { margin: 0 0 6px; font: 600 clamp(2rem, 8vw, 3rem)/1.05 var(--display); color: var(--navy); }
.listing-head__tagline { margin: 0 0 4px; font-size: 1.08rem; font-weight: 600; }
.specs { display: flex; flex-wrap: wrap; margin: 0 0 18px; color: var(--muted); font-size: 0.98rem; }
.specs span:not(:last-child)::after { content: "·"; margin: 0 9px; }
/* Positioned without z-index so the RentalBeam date picker can escape to the top. */
.search-card { position: relative; max-width: 760px; }

.intro { max-width: 62ch; margin: 28px 0 0; font-size: 1.12rem; }

/* Photo collages with captions */

.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.collage__item { margin: 0; }
.collage__item--main { grid-column: 1 / -1; }
.collage--2 .collage__item--main { grid-column: auto; }
.collage--2 .collage__item--main img { aspect-ratio: 4 / 3; }
.collage button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.collage img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.collage__item--main img { aspect-ratio: 3 / 2; }
.collage figcaption { margin-top: 6px; font-size: 0.86rem; color: var(--muted); }
.band--navy .collage figcaption { color: rgba(255, 255, 255, 0.7); }


/* Facts table */

.facts { width: 100%; margin-top: 10px; border-collapse: collapse; }
.facts th, .facts td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.facts th { width: 38%; padding-right: 16px; font-weight: 600; }
.facts td { color: var(--muted); }

/* Availability */

.calendar { margin: 22px 0; padding: 14px; border-radius: var(--radius); background: #fff; color: var(--ink); }
.fineprint { margin-top: 18px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); }
.fineprint a { color: #fff; }

.map { min-height: 320px; margin-top: 20px; border-radius: var(--radius); overflow: hidden; background: var(--stone); }

/* Guides */

.guide-list { margin: 22px 0 0; padding: 0; list-style: none; }
.guide-list li { border-top: 1px solid rgba(255, 255, 255, 0.25); }
.guide-list a { display: block; padding: 16px 0; text-decoration: none; }
.guide-list__title { display: block; font: 600 1.4rem/1.2 var(--display); color: #fff; }
.guide-list a:hover .guide-list__title { text-decoration: underline; }
.guide-list__text { display: block; margin-top: 4px; font-size: 0.93rem; color: rgba(255, 255, 255, 0.78); }
.prose .guide-list li { border-top-color: var(--line); }
.prose .guide-list__title { color: var(--navy); }
.prose .guide-list__text { color: var(--muted); }

/* Questions */

.more { border-bottom: 1px solid var(--line); }
.more summary { position: relative; padding: 15px 34px 15px 0; font-weight: 600; cursor: pointer; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.5rem; font-weight: 400; }
.more[open] summary::after { content: "\2212"; }
.more > p:last-child { margin-bottom: 16px; color: var(--muted); }

.contact-actions { display: grid; gap: 10px; margin-top: 16px; }
.contact-actions .btn { justify-content: flex-start; }

/* Photo viewer */

.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #111; color: #fff; }
.viewer::backdrop { background: #111; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer__bar { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px var(--gutter); }
.viewer__title { margin: 0 auto 0 0; font-weight: 600; }
.viewer__count { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.viewer__track { display: flex; flex: 1; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }
.viewer__nav { display: none; }

/* Long-form pages: terms, guides */

/* Two classes so the wide-screen .wrap widths never stretch reading pages. */
.wrap.prose { max-width: 760px; padding-top: 28px; padding-bottom: 56px; }
.prose h1 { margin: 8px 0 16px; font: 600 clamp(2.2rem, 8vw, 3.2rem)/1.05 var(--display); color: var(--navy); }
.prose h2 { margin-top: 32px; font: 600 1.8rem/1.15 var(--display); color: var(--navy); }
.prose .summary { font-size: 1.15rem; color: var(--ink); }
.prose ul { padding-left: 20px; }
.prose .note { color: var(--muted); }
.crumbs { margin: 0; color: var(--muted); font-size: 0.88rem; }
.stay-card { margin-top: 36px; padding: 24px 20px; border-radius: var(--radius); background: var(--navy); color: var(--navy-ink); }
.stay-card h2 { margin-top: 0; color: #fff; }
.not-found { min-height: 50vh; }

/* Footer */

.footer { padding: 40px 0 28px; background: #10293a; color: rgba(255, 255, 255, 0.8); font-size: 0.92rem; }
.footer a { color: #fff; }
.footer p { margin-bottom: 8px; }
.footer__brand { color: #fff; font: 600 1.6rem/1.1 var(--display); }
.footer__links { margin-top: 16px; }
.footer__legal { margin-top: 18px; color: rgba(255, 255, 255, 0.55); font-size: 0.82rem; }
.langs--footer { margin-top: 12px; }
.langs--footer a { color: rgba(255, 255, 255, 0.75); }
.langs--footer a[aria-current] { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Sticky action bar on phones */

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.actionbar .btn--primary { flex: 1; }

/* Booking sheet */

.sheet { width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 14px 14px 0 0; background: #fff; color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.5); }
.sheet__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 10px 10px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
.sheet__title { margin: 0; font: 600 1.6rem/1.1 var(--display); color: var(--navy); }
.sheet__body { padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
.sheet__help { margin-top: 20px; color: var(--muted); font-size: 0.95rem; }
.sheet .contact-actions { grid-template-columns: 1fr; }

body.has-open-dialog { overflow: hidden; }

/* Larger screens */

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .band { padding: 80px 0; }
  /* One large photo with two stacked beside it. */
  .collage--3 { grid-template-columns: 2fr 1fr; gap: 12px; }
  .collage--3 .collage__item--main { grid-column: 1; grid-row: span 2; }
  .collage--3 .collage__item--main img { height: calc(100% - 28px); aspect-ratio: auto; }
  .contact-actions { grid-template-columns: repeat(3, auto); justify-content: start; }
  .sheet { margin: auto; border-radius: 14px; }
  .viewer__nav { display: grid; position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1); }
  .viewer__nav--prev { left: 16px; }
  .viewer__nav--next { right: 16px; }
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .actionbar { display: none; }
  .hero { height: min(70vh, 760px); }
  .topbar__nav { display: flex; gap: 22px; }
  .topbar__nav a { color: var(--ink); font-size: 0.95rem; text-decoration: none; }
  .topbar__nav a:hover { text-decoration: underline; }
  .topbar__book { display: inline-flex; }
}

/* Large screens: wider page and larger type, so nothing floats in empty space. */
@media (min-width: 1440px) {
  html { font-size: 18px; }
  .wrap { max-width: 1240px; }
  .story__text { max-width: 70ch; font-size: 1.15rem; }
  .collage--3 { gap: 16px; }
}

@media (min-width: 2000px) {
  html { font-size: 20px; }
  .wrap { max-width: 1440px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
