/* ============================================================
   COLOURS AND FONTS (change these to restyle the whole site)
   ============================================================ */
:root {
  --sea:        #0A6FA8;  /* Mediterranean blue: main colour */
  --sea-dark:   #08415E;  /* deep water: headings, dark sections */
  --aqua:       #6CC4E8;  /* shallow water */
  --foam:       #EAF6FB;  /* pale sea: alternate section background */
  --sun:        #F7B32B;  /* summer sun: direct-booking buttons and highlights */
  --paper:      #FFFFFF;
  --ink:        #17313F;  /* text */
  --ink-soft:   #4A6270;
  --line:       #D3E3EA;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, "Book Antiqua", Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wave-foam:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='20' viewBox='0 0 160 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q20 0 40 10 T80 10 T120 10 T160 10 V20 H0Z' fill='%23EAF6FB'/%3E%3C/svg%3E");
  --wave-aqua:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='20' viewBox='0 0 160 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q20 0 40 10 T80 10 T120 10 T160 10 V20 H0Z' fill='%236CC4E8'/%3E%3C/svg%3E");
  --wave-sea:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='20' viewBox='0 0 160 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q20 0 40 10 T80 10 T120 10 T160 10 V20 H0Z' fill='%230A6FA8'/%3E%3C/svg%3E");
  --line-aqua:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6' fill='none' stroke='%236CC4E8' stroke-width='2.4'/%3E%3C/svg%3E");
  --line-sea:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6' fill='none' stroke='%230A6FA8' stroke-width='2.4'/%3E%3C/svg%3E");
  --wave-deep:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='20' viewBox='0 0 160 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q20 0 40 10 T80 10 T120 10 T160 10 V20 H0Z' fill='%2308415E'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: var(--sea); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--sea-dark); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.5rem; }
p  { margin: 0 0 1em; max-width: 65ch; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
/* Wave edges between sections */
.edge { height: 46px; background-repeat: repeat-x; background-size: 160px 22px, 230px 30px;
        background-position: left bottom -1px, left 70px bottom 8px; }
.edge-after-hero { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.edge-foam { background-color: var(--paper); background-image: var(--wave-foam), var(--wave-aqua); }
.edge-deep { background-color: var(--foam); background-image: var(--wave-deep), var(--wave-sea); }
.apartments { background: var(--foam); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--sea-dark); text-decoration: none; display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--sea); text-decoration: underline; }
@media (max-width: 720px) { .site-nav a:not(.nav-book) { display: none; } }
.nav-book { font-weight: 600; color: var(--sea) !important; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem) 0; }
.hero-title { max-width: none; margin-bottom: .6em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.hero-grid > * { min-width: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-lead { font-size: 1.15rem; color: var(--ink-soft); margin-top: 0; }
.hero-photo { position: relative; border-radius: 6px; overflow: hidden; margin: 0; min-height: 360px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
@media (max-width: 900px) { .hero-photo { min-height: 0; aspect-ratio: 3 / 2; order: -1; } }
.hero-photo figcaption { position: absolute; left: .7rem; bottom: .7rem; right: .7rem; width: fit-content;
  font-size: .85rem; color: #fff; background: rgba(8,65,94,.8); padding: .3rem .7rem; border-radius: 4px; }

/* Photo placeholders (shown until you add real photos to /images) */
.ph { position: relative; background: var(--foam); }

/* ---------- Booking panel (the main feature) ---------- */
.booker {
  margin-top: 2rem; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--sun);
  border-radius: 6px; padding: 1.4rem;
}
.booker h2 { font-size: 1.4rem; margin-bottom: .2em; }
.booker > p { font-size: .95rem; color: var(--ink-soft); margin-bottom: 1rem; }
.fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.f-apt { grid-column: span 6; }
.f-in, .f-out { grid-column: span 3; }
.f-ad, .f-ch { grid-column: span 3; }
@media (min-width: 560px) { .f-ad, .f-ch { grid-column: span 3; } }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
select, input {
  width: 100%; font: inherit; font-size: 1rem; padding: .6rem .7rem; border: 1px solid #B9B2A5;
  border-radius: 4px; background: #fff; color: var(--ink); min-height: 46px;
}
.nights { font-size: .95rem; margin: .9rem 0 0; min-height: 1.6em; }
.nights.warn { color: #8A3B12; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .9rem; }
@media (max-width: 480px) { .actions { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font: 600 1rem/1.25 var(--sans); padding: .85rem 1rem; border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; min-height: 52px;
}
.btn-direct { background: var(--sun); color: var(--sea-dark); }
.btn-direct:hover { background: #E9A314; }
.btn-bcom { background: #fff; color: var(--sea-dark); border-color: var(--sea); }
.btn-bcom:hover { background: var(--foam); }
.btn small { display: block; font-weight: 400; font-size: .8rem; opacity: .9; }
.btn span { display: block; }
.booker-note { font-size: .82rem; color: var(--ink-soft); margin: .8rem 0 0; }

/* ---------- Apartments ---------- */
.apartments-intro { margin-bottom: 1.6rem; }
/* Wavy line dividers */
.wave-line { height: 12px; background: var(--line-aqua) repeat-x left center / 40px 12px; margin: 0 0 2.2rem; }
.apt-divider { display: none; }
@media (max-width: 860px) {
  .apt-divider { display: block; height: 30px; margin: 1.4rem 0;
    background: var(--line-sea) repeat-x left 0 top 4px / 40px 12px, var(--line-aqua) repeat-x left 20px top 16px / 40px 12px; }
}
.apt-head { margin-bottom: .9rem; }
.apt-head h3 { margin-bottom: .2em; }
.photo-note { font-size: .92rem; color: var(--ink-soft); border-left: 3px solid var(--sun); padding-left: .8rem; }
.apt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 860px) { .apt-grid { grid-template-columns: 1fr; } }
.apt { display: flex; flex-direction: column; min-width: 0; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto;
  scroll-snap-type: x mandatory; border-radius: 6px; gap: 0; scrollbar-width: thin;
}
.gallery figure { margin: 0; aspect-ratio: 3 / 2; scroll-snap-align: start; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery { scrollbar-width: none; } .gallery::-webkit-scrollbar { display: none; }
.gallery-wrap { position: relative; margin-bottom: 1.1rem; }
.gal-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
           border: 0; background: rgba(255,255,255,.9); color: var(--sea-dark); font-size: 1.9rem; line-height: 1;
           cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; box-shadow: 0 1px 4px rgba(8,65,94,.3); }
.gal-btn:hover { background: #fff; }
.gal-prev { left: .6rem; } .gal-next { right: .6rem; }
.gal-btn[disabled] { opacity: 0; pointer-events: none; }
.gallery img, .hero-photo img { cursor: zoom-in; }
.gal-zoom { position: absolute; left: .6rem; bottom: .6rem; display: inline-flex; align-items: center; gap: .3rem;
            border: 0; border-radius: 999px; background: rgba(8,65,94,.8); color: #fff; font: 600 .8rem var(--sans);
            padding: .3rem .7rem .3rem .5rem; cursor: pointer; }
.gal-zoom svg { width: 16px; height: 16px; }
.gal-zoom:hover { background: var(--sea-dark); }

/* Enlarged photo viewer */
.lightbox img { transition: filter .25s; }
.lightbox img.lb-loading { filter: blur(1.5px); }
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
            background: rgba(4,24,35,.96); color: #fff; }
.lightbox::backdrop { background: rgba(4,24,35,.96); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 4rem); object-fit: contain; padding: 3.5rem 0 0; }
.lb-cap { margin: .6rem 1rem 1rem; font-size: .9rem; text-align: center; color: #CFE6F1; max-width: none; }
.lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(4,24,35,.65);
          color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; }
.lb-btn:hover { background: rgba(4,24,35,.9); }
.lb-close { top: .8rem; right: .8rem; }
.lb-prev { left: .8rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .8rem; top: 50%; transform: translateY(-50%); }
.lb-btn[hidden] { display: none; }
.gal-count { position: absolute; right: .6rem; bottom: .6rem; background: rgba(8,65,94,.8); color: #fff;
             font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; }
.apt-where { margin: 0; }
.apt-where a { color: var(--ink); text-decoration-color: var(--aqua); text-underline-offset: 3px; display: inline-flex; gap: .35rem; align-items: center; }
.pin { width: 20px; height: 20px; color: var(--sea); flex: none; }
.map { height: 110px; border-radius: 6px; overflow: hidden; margin-bottom: .6rem; display: flex; flex-direction: column;
       align-items: center; justify-content: center; gap: .3rem; border: 1px dashed var(--aqua); background: #fff; }
.map.loaded { height: 260px; border-style: solid; }
.map iframe { width: 100%; height: 100%; border: 0; }
.map-load { font: 600 .95rem var(--sans); padding: .6rem 1.1rem; border-radius: 4px; border: 2px solid var(--sea); background: #fff; color: var(--sea-dark); cursor: pointer; }
.map-load:hover { background: var(--foam); }
.map-note { font-size: .8rem; color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin: .5rem 0 1rem; }
.facts div { padding: .7rem 0; }
.facts div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.facts dt { font-size: .8rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; color: var(--sea-dark); }
.features { columns: 2; column-gap: 1.5rem; padding: 0; margin: 0 0 1.4rem; list-style: none; font-size: .95rem; }
@media (max-width: 420px) { .features { columns: 1; } }
.features li { break-inside: avoid; padding-left: 1.1rem; position: relative; margin-bottom: .35rem; }
.features li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.apt-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .7rem; }
.apt-actions .btn { flex: 1 1 200px; }

/* ---------- Book direct ---------- */
.direct { background: var(--sea-dark); color: #fff; }
.direct h2 { color: #fff; }
.direct-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .direct-grid { grid-template-columns: 1fr; } }
.direct dl { margin: 0; display: grid; gap: 1.1rem; }
.direct dt { font-family: var(--serif); font-size: 1.25rem; color: var(--sun); }
.direct dd { margin: 0; max-width: 55ch; }
.direct a { color: #fff; }

/* ---------- Good to know ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--sea); }
details[open] summary::after { content: "\2013"; }
details p { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { background: var(--foam); }
/* Intro text on the left, contact details on the right; the form sits underneath at full width */
.contact-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; margin-bottom: 2rem; }
.contact-intro p { margin-bottom: 0; }
@media (max-width: 760px) { .contact-intro { grid-template-columns: 1fr; margin-bottom: 1.5rem; } }
.contact li[hidden] { display: none; }
.contact ul { list-style: none; padding: 0; margin: 0; font-size: 1.1rem; }
.contact li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.contact li b { display: inline-block; min-width: 6.5rem; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }

/* ---------- Enquiry form ---------- */
.enquiry {
  background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--sun);
  border-radius: 6px; padding: 1.4rem;
}
.enquiry h3 { font-size: 1.3rem; margin-bottom: .8rem; }
.opt { font-weight: 400; color: var(--ink-soft); }

/* Field layout. Phones and tablets: two columns (name, apartment and message use the full width) */
.e-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.e-fields > div { min-width: 0; }
.e-fields input, .e-fields select { height: 46px; } /* date boxes otherwise sit a few pixels taller than the others */
.f-name, .f-apt, .f-msg { grid-column: 1 / -1; }
/* Small phones: one field per row, except Adults/Children which stay side by side */
@media (max-width: 480px) { .f-email, .f-phone, .f-date { grid-column: 1 / -1; } }
/* Desktop: a 12-column grid so the form is wide and short
   row 1: name | email | phone
   row 2: apartment | arrive | leave | adults | children
   row 3: message */
@media (min-width: 900px) {
  .enquiry { padding: 1.6rem 1.8rem; }
  .e-fields { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
  .f-name, .f-email, .f-phone, .f-apt { grid-column: span 4; }
  .f-date { grid-column: span 2; }
  .f-num  { grid-column: span 2; }
  .f-msg  { grid-column: 1 / -1; }
}

textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .6rem .7rem; border: 1px solid #B9B2A5;
  border-radius: 4px; background: #fff; color: var(--ink); min-height: 8rem; resize: vertical;
}
/* iPhone/iPad (Safari and Chrome): date boxes otherwise keep a fixed native width and overflow the form */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
/* keep the form title clear of the sticky header when the page scrolls to it */
#enquiry, #contact { scroll-margin-top: 5.5rem; }
.e-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Spam check and Send button: stacked on phones, side by side on desktop */
.e-foot { margin-top: .9rem; }
.e-captcha { min-height: 65px; }
.e-send { width: 100%; margin-top: .6rem; }
@media (min-width: 900px) {
  .e-foot { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
  .e-send { width: auto; min-width: 280px; margin-top: 0; }
}
.e-send:disabled { opacity: .6; cursor: wait; }
.e-status { font-size: .95rem; margin: .8rem 0 0; min-height: 1.6em; }
.e-status.warn { color: #8A3B12; }
.e-status.ok { color: #1B6B3A; font-weight: 600; }
.e-privacy { font-size: .82rem; color: var(--ink-soft); margin: .6rem 0 0; max-width: none; }

/* ---------- Footer ---------- */
footer { font-size: .88rem; color: #CFE6F1; background: var(--sea-dark); padding-block: 1.2rem 2.5rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
