:root {
  --sea: #12474f;
  --sea-deep: #0c3238;
  --pool: #5fb7be;
  --paper: #f9faf8;
  --stone: #eceee9;
  --ink: #14262b;
  --muted: #4d6166;
  --sun: #c9a24b;
  --line: #d3d9d4;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.75rem, 7vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1rem; max-width: 62ch; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--sea); color: #fff; padding: .75rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

/* Zaglavlje */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: .9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; color: var(--sea); white-space: nowrap; }
.top__right { display: flex; align-items: center; gap: 1.5rem; }
.top nav { display: flex; align-items: center; gap: 1.5rem; }
.top nav a { text-decoration: none; font-weight: 500; font-size: .95rem; }
.top nav a:not(.btn):hover { color: var(--sea); text-decoration: underline; text-underline-offset: 4px; }

/* Izbornik jezika */
.lang { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.lang a {
  display: block; padding: .35rem .6rem; border-radius: 999px;
  font-weight: 600; font-size: .85rem; line-height: 1; text-decoration: none; color: var(--muted);
}
.lang a:hover { color: var(--sea); background: var(--stone); }
.lang a[aria-current="true"] { background: var(--sea); color: #fff; }

/* Gumbi */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--sea); color: #fff; border: 2px solid var(--sea);
  padding: .8rem 1.5rem; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--sea-deep); border-color: var(--sea-deep); }
.btn--ghost { background: transparent; color: var(--sea); }
.btn--ghost:hover { background: var(--sea); color: #fff; }
.btn--small { padding: .5rem 1.1rem; font-size: .92rem; }
.top nav .btn { color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Luk: prepoznatljiv oblik istarskih prozora i vrata */
.arch { overflow: hidden; border-radius: 999px 999px 0 0; background: var(--stone); }
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}
.hero h1 { color: var(--sea); margin-bottom: 1.5rem; }
.hero p { font-size: 1.2rem; color: var(--muted); }
.hero__img { aspect-ratio: 4 / 5; width: 100%; }

/* O nama */
.about { background: var(--sea); color: #eaf3f2; padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.about > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.about h2 { color: #fff; }
.about p { font-size: 1.25rem; line-height: 1.6; max-width: 46rem; margin-left: 0; margin-right: auto; }
@media (min-width: 900px) {
  .about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; }
  .about > * { margin: 0; max-width: none; }
}

/* Sekcije */
.block { padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.block > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.block--tint { background: var(--stone); }

/* Apartmani */
.apts { display: grid; gap: 3rem; }
.apt { display: grid; grid-template-columns: minmax(0, 22rem) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.apt__img { aspect-ratio: 4 / 5; }
.apt__note { color: var(--sea); font-weight: 600; margin: .5rem 0 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; }
.chips li { border: 1px solid var(--line); background: #fff; padding: .3rem .85rem; border-radius: 999px; font-size: .92rem; }

/* Sadržaji */
.amenities { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; }
.amenities li { border-top: 2px solid var(--pool); padding-top: 1rem; }
.amenities h3 { font-size: 1.45rem; margin-bottom: .4rem; }
.amenities p { color: var(--muted); margin: 0; }

/* Galerija */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.g { margin: 0; overflow: hidden; background: var(--stone); }
.g img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.g--1 { grid-column: span 4; grid-row: span 2; }
.g--1 img { aspect-ratio: auto; min-height: 100%; }
.g--2, .g--3 { grid-column: span 2; }
.g--4, .g--5, .g--6 { grid-column: span 2; }

/* Lokacija */
.loc { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: stretch; }
address { font-style: normal; font-weight: 600; font-size: 1.15rem; margin-bottom: .75rem; }
.loc iframe { width: 100%; min-height: 22rem; border: 0; border-radius: 1rem; background: var(--line); }

/* FAQ */
.faq { max-width: 46rem !important; margin-left: 0 !important; }
details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--sea); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: .75rem 0 0; color: var(--muted); }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); }
.contact > * { margin: 0; max-width: none; }
.contact__list { list-style: none; padding: 0; margin: 1.5rem 0; font-size: 1.15rem; }
.contact__list li { margin-bottom: .4rem; }
.contact__list a { color: var(--sea); font-weight: 600; text-underline-offset: 4px; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.form input, .form textarea {
  font: inherit; padding: .7rem .85rem; border: 1px solid #b8c2bd; border-radius: .6rem; background: var(--paper); color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 3px solid var(--pool); outline-offset: 0; border-color: var(--sea); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .actions { margin-top: .25rem; }
.form__hint { font-size: .88rem; color: var(--muted); margin: 0; }

/* Podnožje */
.foot { background: var(--sea-deep); color: #cfe0df; padding: 2rem var(--gutter); display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.foot p { margin: 0; max-width: none; font-size: .95rem; }

/* Uži zasloni: izbornik se skriva, ostaje naziv i izbor jezika */
@media (max-width: 1040px) {
  .top nav { display: none; }
}

/* Mobitel */
@media (max-width: 860px) {
  .brand { font-size: 1.2rem; white-space: normal; line-height: 1.1; }
  .hero, .apt, .loc, .contact { grid-template-columns: 1fr; }
  .hero__img { max-width: 24rem; }
  .apt__img { max-width: 22rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .g--1 { grid-column: span 2; grid-row: auto; }
  .g--1 img { aspect-ratio: 4 / 3; min-height: 0; }
  .g--2, .g--3, .g--4, .g--5, .g--6 { grid-column: span 1; }
  .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Odabir datuma (flatpickr) u bojama stranice */
.flatpickr-calendar { font-family: var(--sans); border-radius: 1rem; box-shadow: 0 20px 50px -20px rgba(12,50,56,.4); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange,
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover {
  background: var(--sea); border-color: var(--sea); color: #fff;
}
.flatpickr-day.inRange, .flatpickr-day.inRange:hover { background: #dcecee; border-color: #dcecee; box-shadow: -5px 0 0 #dcecee, 5px 0 0 #dcecee; }
.flatpickr-day.today { border-color: var(--sun); }
.flatpickr-day.today:hover { background: var(--stone); border-color: var(--sun); color: var(--ink); }
