/* ============================================================
   Novado Group — stilovi
   Boje i fontovi preuzeti s originalne Squarespace stranice:
   - Naslovi: "Instrument Serif"
   - Tekst:   "Newsreader"
   - Akcent:  tamnoplava hsl(218, 37%, 23%)
   - Svijetla pozadina: hsl(60, 7%, 87%)
   ============================================================ */

:root {
  --accent: hsl(218.18, 37.29%, 23.14%);
  --dark: hsl(330, 2.44%, 16.08%);
  --light: hsl(60, 7.46%, 86.86%);
  --white: #ffffff;
  --text: hsl(330, 2.44%, 16.08%);
  --text-muted: hsl(330, 2%, 38%);
  --font-heading: "Instrument Serif", Georgia, serif;
  --font-body: "Newsreader", Georgia, serif;
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  /* footer uvijek na dnu ekrana, i kad je stranica kraća od visine prozora */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.35rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  font-size: 1.05rem;
  color: var(--text);
  transition: opacity 0.15s;
}

.site-nav a:hover { opacity: 0.6; }

.site-nav a.active { text-decoration: underline; text-underline-offset: 5px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  padding: 8px;
}

/* Prebacivanje jezika (HR / EN / DE) */

.lang-switch {
  position: relative;
  margin-left: 10px;
}

/* Okrugla zastavica trenutnog jezika (otvara izbornik) */

.lang-current {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px;
  background: none;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-current:hover { background: rgba(0, 0, 0, 0.06); }

.lang-flag {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.18);
}

.lang-flag svg { display: block; width: 100%; height: 100%; }

.lang-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: transform 0.2s;
}

.lang-current[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

/* Padajuci izbornik s ostalim jezicima */

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
  z-index: 120;
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li { padding: 0; }

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s;
}

.lang-menu a:hover { background: var(--light); }

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

.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
  /* dok se fotografija učita, vidi se mutni placeholder (inline background-image) */
  background-size: cover;
  background-position: center;
}

/* Slika je 165% visine sekcije — vidi se ~60%, a ostatak se
   otkriva paralaks-pomakom pri skrolanju (js/main.js) */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  object-fit: cover;
  width: 100%;
  height: 165%;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { height: 100%; }
}

.hero.zoomable { cursor: zoom-in; }

/* ---------- Blur-up učitavanje slika ----------
   Wrapper nosi mutni mini-placeholder kao pozadinu (inline style),
   a prava slika se preko njega postupno pojavi kad se učita. */

.blur-up {
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: block;
  margin: 0;
}

.blur-up > img {
  opacity: 0;
  transition: opacity 0.6s ease;
  width: 100%;
  height: auto;
}

.blur-up > img.loaded { opacity: 1; }

.hero-bg {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-bg.loaded { opacity: 1; }

.zoom-img { cursor: zoom-in; }

/* ---------- Lightbox (povećani prikaz slike) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}

.lightbox.visible { opacity: 1; }

.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05) 55%);
}

.hero .container { padding-bottom: 64px; }

.hero p.subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  margin-top: 8px;
}

/* ---------- Traka "trenutno u prodaji" ---------- */

.banner {
  background: var(--accent);
  color: var(--white);
  text-align: center;
  padding: 28px 24px;
}

.banner h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: 0.06em;
}

/* ---------- Sekcije ---------- */

.section { padding: 88px 0; }
.section.light { background: var(--light); }
.section.dark { background: var(--accent); color: var(--white); }

.section-intro {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-intro p { margin-top: 20px; color: var(--text-muted); }

.section.dark .section-intro p { color: rgba(255, 255, 255, 0.8); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.two-col img,
.two-col .blur-up { border-radius: 6px; }

/* ---------- Kripto / partneri ---------- */

.crypto-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-style: italic;
  color: var(--text-muted);
}

.crypto-note img { height: 28px; width: auto; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 3px;
  transition: opacity 0.15s;
  cursor: pointer;
  border: 1px solid var(--accent);
}

.btn:hover { opacity: 0.85; }

.btn-primary { background: var(--accent); color: var(--white); }

.btn-outline { background: transparent; color: var(--accent); }

.section.dark .btn-outline { color: var(--white); border-color: var(--white); }

/* ---------- Kartice stanova ---------- */

.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 56px;
}

.unit-card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.unit-card .plan {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--white);
  padding: 12px;
  width: 100%;
}

.unit-card .unit-body { padding: 24px; border-top: 1px solid rgba(0, 0, 0, 0.08); flex: 1; }

.unit-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Naziv stana vodi na oglas kod agencije */

.unit-card h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.22);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.unit-card h3 a:hover,
.unit-card h3 a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.unit-card h3 .ext-icon {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.4em;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.unit-card h3 a:hover .ext-icon { opacity: 1; }

.unit-card ul {
  list-style: none;
  margin-top: 14px;
  color: var(--text-muted);
}

.unit-card li { padding: 4px 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.08); }

.unit-card li:last-child { border-bottom: none; }

.badge-sold {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  background: #b3261e;
  color: var(--white);
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

/* ---------- Partneri (investitor / posrednik) ---------- */

.partners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 48px;
}

.partner h4 { margin-bottom: 20px; }

.partner img { max-height: 72px; width: auto; }

.partner .partner-logos { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; min-height: 72px; }

/* Kartica agenta (posrednik u prodaji) */

.agent-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.agent-card > img {
  width: 110px;
  height: 110px;
  max-height: none;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-card h3 { font-size: 1.5rem; }

.agent-card .agent-title {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
}

.agent-card p { margin-top: 4px; }

.agent-card a {
  font-size: 1rem;
  word-break: break-all;
}

/* ---------- Kontakt forma ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-info p { margin-bottom: 10px; }

.contact-info a { text-decoration: underline; text-underline-offset: 3px; }

form .field { margin-bottom: 20px; }

form label {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

form input,
form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 3px;
  background: var(--white);
  color: var(--text);
}

form input:focus,
form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

form textarea { min-height: 140px; resize: vertical; }

.form-status { margin-top: 16px; font-style: italic; }

/* Honeypot polje protiv spam botova — nevidljivo ljudima,
   botovi ga ispune i Formspree takve poruke odbaci */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- FAQ ---------- */

.faq-list { max-width: 820px; margin: 48px auto 0; }

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.faq-item summary {
  cursor: pointer;
  padding: 22px 8px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.6rem;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item .answer { padding: 0 8px 24px; color: var(--text-muted); }

.faq-item .answer p + p { margin-top: 12px; }

/* ---------- Galerija (O Bjelovaru) ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.gallery-item img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
  border-radius: 6px;
}

.gallery-item h3 { margin-top: 14px; font-size: 1.4rem; }

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

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 40px;
  font-size: 1rem;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.site-footer h4 { color: var(--white); margin-bottom: 14px; }

.site-footer a { color: rgba(255, 255, 255, 0.85); }

.site-footer ul { list-style: none; }

.site-footer li { padding: 3px 0; }

.site-footer .copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

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

@media (max-width: 820px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .site-nav.open { display: flex; }

  .nav-toggle { display: block; }

  /* u mobilnom izborniku zastavica je uz lijevi rub -> izbornik otvori udesno */
  .lang-switch { margin-left: 0; }
  .lang-menu { left: 0; right: auto; }

  .two-col,
  .contact-grid,
  .partners-grid,
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: 56px 0; }
}
