/* ==========================================================================
   Apartmani TAFRA – Duće, Omiš
   ========================================================================== */

:root {
  --gold: #d1b000;
  --gold-dark: #a88d00;
  --text: #5a5a5a;
  --heading: #3f3f3f;
  --muted: #8a8a8a;
  --bg: #ffffff;
  --bg-alt: #f7f5ef;
  --line: #e7e2d3;
  --dark: #2b2b2b;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --header-h: 84px;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Marcellus", Georgia, serif;
  --font-sc: "Marcellus SC", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
}

img, video, iframe { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--gold-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; color: var(--heading); line-height: 1.25; margin: 0 0 .6em; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(860px, 100% - 32px); }
.center { text-align: center; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 34px;
  font-family: var(--font-head);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #fff; color: var(--text); }
.btn-outline { background: #fff; color: var(--text); }
.btn-outline:hover { background: var(--gold); color: #fff; }
.btn-light { background: transparent; color: #fff; border-color: #fff; }
.btn-light:hover { background: #fff; color: var(--text); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  transition: background .3s, box-shadow .3s;
}
.has-hero .site-header {
  position: fixed;
  left: 0; right: 0;
  background: rgba(255, 255, 255, .3);
  box-shadow: none;
}
.has-hero .site-header.scrolled,
.site-header.scrolled { background: rgba(255, 255, 255, .96); box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.logo img { width: 150px; height: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 10px 12px;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: .06em;
  color: #4d4d4d;
  text-shadow: .08em .08em rgba(211, 211, 211, .6);
}
.main-nav a:hover, .main-nav a.active { color: var(--gold-dark); }
.main-nav > ul > li > a.active { box-shadow: inset 0 -2px 0 var(--gold); }

.sub {
  position: absolute;
  top: 100%; left: 0;
  min-width: 240px;
  list-style: none;
  margin: 0; padding: 10px 0;
  background: #fff;
  box-shadow: var(--shadow);
  border-top: 2px solid var(--gold);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 8px 20px; color: var(--text); font-size: 15px; }
.sub a:hover { background: var(--bg-alt); }
.sub-toggle { display: none; }

.lang-switch { display: flex; gap: 2px; border-left: 1px solid var(--line); padding-left: 20px; }
.lang-switch a {
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #6a6a6a;
  border-radius: var(--radius);
}
.lang-switch a.active { background: var(--gold); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; margin: 5px 0; background: #555; transition: transform .3s, opacity .3s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  min-height: min(100vh, 900px);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  background: var(--bg) center / cover no-repeat;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15)), var(--bg);
  color: #fff;
}
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-family: var(--font-head); font-size: clamp(36px, 5.5vw, 64px); text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.hero .eyebrow { color: #fff; opacity: .9; }
.hero-sub { font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 28px); margin: 0 0 32px; }
.hero-photo img { width: 100%; max-width: 420px; margin-left: auto; border: 8px solid rgba(255, 255, 255, .85); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }

.eyebrow {
  font-family: var(--font-sc);
  font-size: 14px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 12px;
}

/* ---------- page head (inner pages) ---------- */

.page-head {
  position: relative;
  padding: 120px 0 100px;
  text-align: center;
  color: #fff;
  background: #444 center / cover no-repeat;
  background-image: linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .45)), var(--bg);
}
.page-head h1 { color: #fff; font-size: clamp(32px, 5vw, 56px); letter-spacing: .04em; margin: 0; }
.page-head h1::after { content: ""; display: block; width: 70px; height: 2px; background: var(--gold); margin: 22px auto 0; }
.page-sub { margin: 18px auto 0; max-width: 640px; font-size: 18px; opacity: .95; }

/* ---------- sections ---------- */

.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  text-align: center;
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 48px;
}
.section-title::after { content: ""; display: block; width: 60px; height: 2px; background: var(--gold); margin: 18px auto 0; }

.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--heading); }
.lead { font-size: 19px; }

/* ---------- filters + apartment cards ---------- */

.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -16px 0 36px; }
.filters button {
  font: inherit;
  font-family: var(--font-head);
  letter-spacing: .06em;
  padding: 8px 20px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.filters button:hover { border-color: var(--gold); }
.filters button.active { background: var(--gold); border-color: var(--gold); color: #fff; }

.apt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.apt-card { display: flex; flex-direction: column; background: #fff; color: var(--text); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; transition: transform .3s, box-shadow .3s, opacity .3s; }
.apt-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .14); color: var(--text); }
.apt-card.is-hidden { display: none; }
.apt-img { aspect-ratio: 1 / 1; overflow: hidden; }
.apt-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.apt-card:hover .apt-img img { transform: scale(1.06); }
.apt-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.apt-body h3 { font-size: 21px; margin-bottom: 8px; }
.apt-body p { margin: 0 0 16px; font-size: 15px; flex: 1; }
.link-more { font-family: var(--font-head); color: var(--gold-dark); letter-spacing: .05em; }

/* ---------- features ---------- */

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.features li { text-align: center; padding: 10px; }
.feat-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border: 1px solid var(--gold); border-radius: 50%; margin-bottom: 18px; }
.feat-ico svg { width: 32px; height: 32px; fill: var(--gold); }
.features h3 { font-size: 21px; }
.features p { margin: 0; font-size: 15px; }

/* ---------- gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.page-home .gallery { grid-template-columns: repeat(5, 1fr); }
.g-item { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-alt); position: relative; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s, filter .3s; }
.g-item::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: #fff; background: rgba(209, 176, 0, .35); opacity: 0; transition: opacity .3s; }
.g-item:hover img { transform: scale(1.06); }
.g-item:hover::after { opacity: 1; }

/* ---------- video ---------- */

.video { margin-top: 40px; }
.video video { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }
.videos { display: grid; gap: 20px; margin: 20px 0; }
.videos .video { margin: 0; }
.videos-2 { grid-template-columns: repeat(2, 1fr); }
.videos-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- CTA ---------- */

.cta { background: var(--dark) url("../uploads/2021/09/nanslovna5.jpg") center / cover; position: relative; color: #fff; }
.cta::before { content: ""; position: absolute; inset: 0; background: rgba(30, 30, 30, .65); }
.cta-inner { position: relative; padding: 80px 0; text-align: center; }
.cta h2 { color: #fff; font-size: clamp(26px, 3.5vw, 40px); margin-bottom: 28px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- apartments page ---------- */

.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; }
.about-img img { width: 100%; box-shadow: var(--shadow); }
.about-text .lead { margin: 0 0 28px; text-align: left; }

.units { display: grid; gap: 30px; }
.unit { display: grid; grid-template-columns: 340px 1fr; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.unit-img { overflow: hidden; }
.unit-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; transition: transform .6s; }
.unit:hover .unit-img img { transform: scale(1.05); }
.unit-body { padding: 36px 40px; }
.unit-body h3 { font-size: 28px; }
.unit-body h3 a { color: var(--heading); }
.unit-body h3 a:hover { color: var(--gold-dark); }

.ticks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 20px; }
.ticks li { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ticks svg { width: 18px; height: 18px; fill: var(--gold); flex-shrink: 0; }

/* ---------- apartment detail ---------- */

.unit-info { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; padding: 26px 30px; margin-bottom: 40px; background: var(--bg-alt); border-left: 3px solid var(--gold); }
.unit-info .ticks { margin: 0; flex: 1; min-width: 260px; }
.unit-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.other-units { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 50px; }
.other-units a { padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-family: var(--font-head); }
.other-units a:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 400px 1fr; gap: 50px; align-items: start; }
.contact-address { display: flex; gap: 12px; align-items: flex-start; font-family: var(--font-head); font-size: 20px; color: var(--heading); margin: 0 0 26px; }
.contact-address svg { width: 26px; height: 26px; fill: var(--gold); flex-shrink: 0; margin-top: 2px; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--heading); font-size: 19px; transition: border-color .2s, transform .2s; }
.contact-card:hover { border-color: var(--gold); transform: translateX(4px); color: var(--heading); }
.contact-card svg { width: 34px; height: 34px; flex-shrink: 0; }
.contact-card small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); line-height: 1.2; }
.contact-card.wa svg { fill: #25d366; }
.contact-card.viber svg { fill: #7360f2; }
.contact-card.phone svg { fill: var(--gold); }
.book-via { margin: 28px 0 12px; font-family: var(--font-sc); letter-spacing: .15em; font-size: 14px; color: var(--muted); }
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.partners a { display: grid; place-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; height: 74px; }
.partners a:hover { border-color: var(--gold); }
.partners img { max-height: 40px; width: auto; }
.map iframe { width: 100%; height: 520px; border: 0; box-shadow: var(--shadow); }

/* ---------- activities ---------- */

.flow > .prose { max-width: 820px; margin: 0 auto 40px; text-align: center; }
.flow > .section-title { margin-top: 70px; }
.flow > .section-title:first-child { margin-top: 0; }
.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.act-card { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); color: #fff; }
.act-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.act-card:hover img { transform: scale(1.07); }
.act-body { position: absolute; inset: auto 0 0 0; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); display: flex; flex-direction: column; gap: 4px; }
.act-body strong { font-family: var(--font-head); font-weight: 400; font-size: 22px; letter-spacing: .05em; }
.act-body span { font-size: 15px; line-height: 1.5; opacity: .92; }
.act-body a { color: #fff; text-decoration: underline; }
.act-card:hover { color: #fff; }

/* ---------- blog ---------- */

.article h2 { font-size: 30px; margin-top: 1.4em; }
.article h2:first-child { margin-top: 0; }
.article p { margin: 0 0 1.1em; }
.article figure { margin: 34px 0; }
.article figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- footer ---------- */

.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 50px 0 24px; font-size: 15px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.footer-links a { color: var(--text); font-family: var(--font-head); }
.footer-links a:hover { color: var(--gold-dark); }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--gold); transition: background .2s, transform .2s; }
.social a:hover { background: var(--heading); transform: translateY(-3px); }
.social svg { width: 20px; height: 20px; fill: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }

/* ---------- lightbox ---------- */

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(10, 10, 10, .94); padding: 40px 70px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); margin: 0 auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #ddd; margin-top: 12px; font-family: var(--font-head); letter-spacing: .05em; min-height: 1.5em; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; opacity: .75; transition: opacity .2s; font-family: Georgia, serif; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 14px; right: 22px; font-size: 44px; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 70px; padding: 10px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* ---------- language gate (root index) ---------- */

.lang-gate { min-height: 100vh; display: grid; place-items: center; background: #444 center / cover; background-image: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), var(--bg); }
.gate { text-align: center; color: #fff; padding: 40px 16px; }
.gate img { margin: 0 auto 20px; background: rgba(255, 255, 255, .85); padding: 10px 16px; border-radius: var(--radius); }
.gate h1 { color: #fff; font-size: clamp(26px, 4vw, 42px); margin-bottom: 34px; }
.gate-langs { display: grid; grid-template-columns: repeat(4, 140px); gap: 14px; justify-content: center; }
.gate-langs a { display: flex; flex-direction: column; padding: 22px 10px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .4); border-radius: var(--radius); color: #fff; transition: background .2s; }
.gate-langs a:hover { background: var(--gold); color: #fff; }
.gate-langs strong { font-family: var(--font-head); font-size: 30px; font-weight: 400; }

/* ---------- reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .main-nav > ul > li > a { padding: 10px 8px; font-size: 14px; }
  .apt-grid, .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  :root { --header-h: 70px; }
  .logo img { width: 120px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 30px;
    background: #fff;
    overflow-y: auto;
    /* zatvoren meni se ne smije pomjerati van ekrana – to širi stranicu */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .main-nav > ul > li > a { padding: 16px 4px; font-size: 17px; text-shadow: none; }
  .main-nav > ul > li > a.active { box-shadow: none; }
  .has-sub { display: flex; flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { display: block; width: 52px; background: none; border: 0; border-left: 1px solid var(--line); cursor: pointer; position: relative; }
  .sub-toggle::before, .sub-toggle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: var(--text); transform: translate(-50%, -50%); transition: transform .25s; }
  .sub-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
  .has-sub.open .sub-toggle::after { transform: translate(-50%, -50%); }
  .sub { position: static; width: 100%; box-shadow: none; border: 0; padding: 0 0 10px 14px; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.open .sub { display: block; }
  .has-sub:hover .sub { display: none; }
  .has-sub.open:hover .sub { display: block; }
  .lang-switch { border: 0; padding: 22px 0 0; justify-content: center; gap: 8px; }
  .lang-switch a { padding: 8px 14px; font-size: 15px; border: 1px solid var(--line); }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { display: none; }
  .hero { min-height: min(88vh, 760px); background-image: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .35)), var(--bg); }

  .about, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-img { max-width: 420px; margin: 0 auto; }
  .unit { grid-template-columns: 1fr; }
  .unit-img img { aspect-ratio: 16 / 10; }
  .act-grid { grid-template-columns: repeat(2, 1fr); }
  .page-home .gallery { grid-template-columns: repeat(3, 1fr); }
  .videos-3 { grid-template-columns: 1fr 1fr; }
  .gate-langs { grid-template-columns: repeat(2, 140px); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .page-head { padding: 80px 0 64px; }
  .apt-grid, .features, .act-grid, .videos-2, .videos-3 { grid-template-columns: 1fr; }
  .gallery, .page-home .gallery { grid-template-columns: 1fr 1fr; gap: 6px; }
  .unit-body { padding: 26px 22px; }
  .unit-info { padding: 20px; }
  .map iframe { height: 360px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .lightbox { padding: 50px 8px; }
  .lb-prev, .lb-next { font-size: 48px; top: auto; bottom: 6px; transform: none; }
  .gate-langs { grid-template-columns: repeat(2, 1fr); }
}
