/* ===========================================================
   KARTEL.ba — Agencija za nekretnine
   Glavni stylesheet
   =========================================================== */

:root {
  --red: #E63329;
  --red-dark: #c42319;
  --ink: #1b1e26;
  --text: #2b2f36;
  --muted: #6b7280;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --header-bg: rgba(255,255,255,.92);
  --gold: #c9a24b;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(20, 23, 31, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 23, 31, 0.14);
  --maxw: 1200px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --ink: #f3f5f9;
  --text: #c3c9d4;
  --muted: #8a92a0;
  --line: #28303c;
  --bg: #0f1319;
  --bg-soft: #161b23;
  --card: #1a2029;
  --header-bg: rgba(16,20,26,.92);
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea { background-color: var(--card); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }

.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .eyebrow {
  color: var(--red); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.8rem; display: block; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px; font-weight: 700;
  font-size: 0.95rem; cursor: pointer; border: 2px solid transparent;
  transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(230,51,41,.3); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: var(--card); color: var(--ink); border-color: var(--card); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.4rem; color: var(--ink); letter-spacing: -0.04em; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--red);
  display: grid; place-items: center; color: #fff; font-weight: 900;
  box-shadow: 0 4px 12px rgba(230,51,41,.35);
}
.logo .ba { color: var(--red); }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--text); transition: color .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--red); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 640px; display: flex; align-items: center;
  color: #fff; text-align: center;
  background: linear-gradient(rgba(20,23,31,.5), rgba(20,23,31,.66)),
    url("../images/mostar-hero.jpg") center/cover;
}
.hero .eyebrow { color: #fff; opacity: .9; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 4rem); margin: 16px 0; }
.hero p.lead { font-size: 1.15rem; opacity: .92; max-width: 620px; margin: 0 auto; }

/* ---------- Search bar ---------- */
.search-bar {
  margin: 40px auto 0; max-width: 920px; background: var(--card); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 10px; display: flex; gap: 8px; align-items: stretch;
  flex-wrap: wrap;
}
.search-field { flex: 1 1 180px; text-align: left; padding: 10px 16px; border-radius: 10px; }
.search-field + .search-field { border-left: 1px solid var(--line); }
.search-field label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.search-field select, .search-field input {
  width: 100%; border: none; font-size: 1rem; font-weight: 600; color: var(--ink);
  background: transparent; outline: none; cursor: pointer; font-family: var(--font);
}
.search-bar .btn { flex: 0 0 auto; align-self: center; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats .stat h3 { font-size: 2.6rem; color: var(--red); }
.stats .stat p { color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---------- Property cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff;
  padding: 5px 12px; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge.sale { background: var(--ink); }
.fav { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); border: none; cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; color: var(--red); transition: .2s; }
.fav:hover { background: var(--card); transform: scale(1.1); }
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-price { font-size: 1.4rem; font-weight: 900; color: var(--ink); }
.card-price span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 6px 0 4px; }
.card-loc { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 5px; }
.card-meta { display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text); font-size: .88rem; font-weight: 600; }
.card-meta span { display: flex; align-items: center; gap: 5px; }

/* ---------- Service / feature cards ---------- */
.feature { text-align: center; padding: 34px 24px; border-radius: var(--radius); background: var(--bg-soft); transition: .25s; }
.feature:hover { background: var(--card); box-shadow: var(--shadow); transform: translateY(-4px); }
.feature .ico { width: 64px; height: 64px; border-radius: 16px; background: var(--card); color: var(--red); display: grid; place-items: center; margin: 0 auto 18px; font-size: 1.7rem; box-shadow: var(--shadow); }
.feature:hover .ico { background: var(--red); color: #fff; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ---------- Split section ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.split .eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.split h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 10px 0 18px; }
.split p { color: var(--muted); margin-bottom: 16px; }
.check-list { list-style: none; margin: 18px 0 28px; }
.check-list li { display: flex; gap: 12px; margin-bottom: 12px; font-weight: 600; color: var(--text); }
.check-list li::before { content: "✓"; color: var(--red); font-weight: 900; }

/* ---------- City tiles ---------- */
.city-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; color: #fff; display: flex; align-items: flex-end; }
.city-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.city-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(20,23,31,.8)); }
.city-tile:hover img { transform: scale(1.08); }
.city-tile .label { position: relative; z-index: 2; padding: 20px; }
.city-tile .label h3 { color: #fff; font-size: 1.3rem; }
.city-tile .label span { opacity: .85; font-size: .9rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(125deg, var(--red), var(--red-dark) 70%, #9e1a12); color: #fff; border-radius: 22px;
  padding: 56px; text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 20px 50px rgba(230,51,41,.28);
}
.cta-band::before { content: ""; position: absolute; top: -40%; right: -10%; width: 50%; height: 180%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%); pointer-events: none; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta-band p { opacity: .85; max-width: 560px; margin: 14px auto 28px; }

/* ---------- Testimonials ---------- */
.quote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.quote .stars { color: var(--gold); margin-bottom: 12px; }
.quote p { font-style: italic; color: var(--text); margin-bottom: 18px; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote .who strong { display: block; color: var(--ink); }
.quote .who span { color: var(--muted); font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7cad2; padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.site-footer .logo { color: #fff; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #8a8f9a; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: .2s; }
.socials a:hover { background: var(--red); color: #fff; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: linear-gradient(rgba(20,23,31,.7), rgba(20,23,31,.7)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=80") center/cover;
  color: #fff; padding: 70px 0; text-align: center;
}
.page-head h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.breadcrumb { margin-top: 10px; opacity: .85; font-size: .9rem; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* ---------- Listings layout ---------- */
.listings-wrap { display: grid; grid-template-columns: 290px 1fr; gap: 32px; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; align-self: start; position: sticky; top: 92px; }
.filters h3 { font-size: 1.1rem; margin-bottom: 18px; }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 7px; color: var(--ink); }
.filter-group select, .filter-group input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--font); font-size: .92rem; color: var(--text); outline: none; background: var(--card);
}
.filter-group select:focus, .filter-group input:focus { border-color: var(--red); }
.range-row { display: flex; gap: 8px; }

.listings-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.listings-top .count { color: var(--muted); font-weight: 600; }
.listings-top .count b { color: var(--ink); }
.sort-select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; font-family: var(--font); font-weight: 600; outline: none; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1/-1; }

/* ---------- Floor-plan gallery (tlocrt + slike) ---------- */
.fp-gallery { display: grid; grid-template-columns: 1fr 440px; gap: 20px; margin-bottom: 36px; }
.fp-left { min-width: 0; }
.fp-stage { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; background: #0d0f14; }
.fp-stage img { width: 100%; height: 100%; object-fit: cover; }
.fp-room-tag { position: absolute; top: 14px; left: 14px; z-index: 3; background: var(--red); color: #fff; padding: 7px 14px; border-radius: 22px; font-weight: 700; font-size: .9rem; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.fp-counter { position: absolute; bottom: 14px; right: 14px; z-index: 3; background: rgba(13,15,20,.75); color: #fff; padding: 5px 12px; border-radius: 20px; font-weight: 700; font-size: .82rem; }
.fp-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: .2s; box-shadow: var(--shadow); }
.fp-arrow:hover { background: var(--red); color: #fff; }
.fp-arrow.prev { left: 14px; }
.fp-arrow.next { right: 14px; }

.fp-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.fp-thumb { flex: 0 0 120px; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--card); cursor: pointer; padding: 0; transition: .2s; }
.fp-thumb img { width: 100%; height: 76px; object-fit: cover; display: block; }
.fp-thumb span { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); padding: 5px 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-thumb.active { border-color: var(--red); }
.fp-thumb.active span { color: var(--red); }

.fp-plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-self: start; box-shadow: var(--shadow); }
.fp-plan-head { margin-bottom: 10px; }
.fp-plan-head strong { display: block; color: var(--ink); font-size: 1rem; }
.fp-plan-head span { color: var(--muted); font-size: .78rem; }
.fp-svg { width: 100%; height: auto; display: block; }

.fp-wall { fill: #f7f8fa; stroke: var(--ink); stroke-width: 4; }
.fp-room { cursor: pointer; }
.fp-room-rect { fill: #eef1f5; stroke: #aeb6c2; stroke-width: 2; transition: fill .2s; }
.fp-room:hover .fp-room-rect { fill: #e2e6ec; }
.fp-room.active .fp-room-rect { fill: #ffe2df; stroke: var(--red); }
.fp-room-label { font-size: 13px; font-weight: 700; fill: #4a5261; text-anchor: middle; pointer-events: none; font-family: var(--font); }
.fp-room.active .fp-room-label { fill: var(--red-dark); }
.fp-room-dim { font-size: 12px; font-weight: 600; fill: #8a93a2; text-anchor: middle; pointer-events: none; font-family: var(--font); }
.fp-room.active .fp-room-dim { fill: var(--red); }

.fp-cam { cursor: pointer; }
.fp-cam-dot { fill: #fff; stroke: var(--ink); stroke-width: 3; transition: .2s; }
.fp-cam-num { text-anchor: middle; font-size: 15px; font-weight: 800; fill: var(--ink); font-family: var(--font); pointer-events: none; }
.fp-cam:hover .fp-cam-dot { fill: #ffd9d5; }
.fp-cam.active .fp-cam-dot { fill: var(--red); stroke: var(--red-dark); r: 18; }
.fp-cam.active .fp-cam-num { fill: #fff; }

/* ---------- Glavna galerija fotografija (do 30) ---------- */
.pg { margin-bottom: 30px; }
.pg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.pg-head strong { font-size: 1.1rem; color: var(--ink); }
.pg-head span { color: var(--muted); font-size: .9rem; }
.pg-stage { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: #0d0f14; }
.pg-stage img { width: 100%; height: 100%; object-fit: cover; }
.pg .fp-thumbs { margin-top: 12px; }
.pg-thumb { flex: 0 0 92px; }
.pg-thumb img { height: 66px; }

/* ---------- Vlastiti (uploadovani) tlocrt — prikaz ---------- */
.cp-view { position: relative; line-height: 0; border-radius: 8px; overflow: hidden; }
.cp-view img { width: 100%; display: block; }
.cp-view .cp-marker { position: absolute; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%;
  background: var(--card); color: var(--ink); border: 3px solid var(--ink); font-weight: 800; font-size: .9rem; cursor: pointer;
  display: grid; place-items: center; line-height: 1; transition: .18s; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.cp-view .cp-marker:hover { background: #ffd9d5; }
.cp-view .cp-marker.active { background: var(--red); border-color: var(--red-dark); color: #fff; transform: translate(-50%, -50%) scale(1.14); }

/* ---------- Property detail ---------- */
.detail-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 36px; }
.detail-gallery .main { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; }
.detail-gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.detail-gallery .thumbs img { border-radius: var(--radius); height: 100%; object-fit: cover; }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.detail-main h1 { font-size: 1.9rem; margin-bottom: 8px; }
.detail-price { font-size: 2.2rem; font-weight: 900; color: var(--red); margin: 18px 0; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.spec { background: var(--bg-soft); border-radius: 10px; padding: 16px; }
.spec span { color: var(--muted); font-size: .85rem; display: block; }
.spec b { color: var(--ink); font-size: 1.05rem; }
.detail-desc { margin: 24px 0; color: var(--text); }
.detail-desc h3 { margin: 24px 0 10px; }
.amenities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.amenities li { list-style: none; display: flex; gap: 10px; color: var(--text); }
.amenities li::before { content: "✓"; color: var(--red); font-weight: 900; }
.agent-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 92px; box-shadow: var(--shadow); }
.agent-card .agent { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.agent-card .agent img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.agent-card .agent strong { display: block; color: var(--ink); }
.agent-card .agent span { color: var(--muted); font-size: .85rem; }
.agent-card .form-field { margin-bottom: 12px; }
.agent-card input, .agent-card textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-family: var(--font); outline: none; }
.agent-card input:focus, .agent-card textarea:focus { border-color: var(--red); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info .info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info .ico { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; background: var(--bg-soft); color: var(--red); display: grid; place-items: center; font-size: 1.3rem; }
.contact-info .info-item strong { display: block; color: var(--ink); }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--font); font-size: .95rem; outline: none;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--red); }
.form-note { padding: 14px; border-radius: 9px; background: #e9f7ef; color: #1b7a43; font-weight: 600; margin-top: 10px; display: none; }
.form-note.show { display: block; }

/* ---------- Values / team ---------- */
.team-card { text-align: center; }
.team-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; }
.team-card h3 { font-size: 1.1rem; }
.team-card span { color: var(--red); font-weight: 600; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid, .detail-layout, .fp-gallery { grid-template-columns: 1fr; gap: 32px; }
  .listings-wrap { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-gallery { grid-template-columns: 1fr; }
  .agent-card { position: static; }
}
@media (max-width: 680px) {
  .nav-links { position: fixed; inset: 72px 0 auto 0; background: var(--card); flex-direction: column; padding: 20px; gap: 16px; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .3s; box-shadow: var(--shadow); }
  .nav-links.open { transform: translateY(0); }
  .menu-toggle { display: flex; }
  .nav-actions .btn-outline { display: none; }
  .grid-3, .grid-4, .grid-2, .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat h3 { font-size: 1.9rem; }
  .search-field + .search-field { border-left: none; border-top: 1px solid var(--line); }
  .search-bar { flex-direction: column; }
  .search-bar .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .spec-grid, .amenities { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

/* ===========================================================
   Quick-winovi: KM/m2, tema, WhatsApp, FAQ, kalkulator, zakazivanje
   =========================================================== */

/* Cijena po m2 */
.card-perm2 { color: var(--muted); font-weight: 700; font-size: .82rem; margin-top: 2px; }
.detail-perm2 { color: var(--muted); font-weight: 700; font-size: 1rem; margin: -10px 0 18px; }

/* Prekidac teme */
.theme-toggle { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 1.05rem; line-height: 1; display: grid; place-items: center; transition: .2s; }
.theme-toggle:hover { border-color: var(--red); }

/* Plutajuci kontakt (WhatsApp) */
.float-contact { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; gap: 12px; }
.fc-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); color: #fff; transition: transform .2s; }
.fc-btn:hover { transform: scale(1.08); }
.fc-wa { background: #25d366; }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 18px 20px;
  font-family: var(--font); font-weight: 700; font-size: 1rem; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-ico { color: var(--red); font-size: 1.4rem; font-weight: 400; transition: transform .25s; flex: 0 0 auto; }
.faq-item.open .faq-ico { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 20px 18px; color: var(--muted); }

/* Kalkulator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 920px; margin: 0 auto; align-items: start; }
.calc-inputs { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.calc-note { color: var(--muted); font-size: .78rem; margin-top: 12px; }
.calc-result { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; }
.calc-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); gap: 14px; }
.calc-row span { opacity: .82; font-size: .92rem; }
.calc-row b { font-weight: 700; white-space: nowrap; }
.calc-sub { border-bottom: 2px solid rgba(255,255,255,.25); }
.calc-sub b { color: #fff; }
.calc-total { border-bottom: none; padding-top: 16px; }
.calc-total span { opacity: 1; font-weight: 700; }
.calc-total b { color: var(--red); font-size: 1.5rem; }

/* Zakazivanje pregleda */
.book-card { margin-top: 20px; }
.book-title { font-size: 1.1rem; margin-bottom: 4px; }
.book-sub { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.book-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.book-mode { border: 1px solid var(--line); border-radius: 10px; padding: 11px; text-align: center; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 6px; }
.book-mode input { position: absolute; opacity: 0; width: 0; height: 0; }
.book-mode:has(input:checked) { border-color: var(--red); background: rgba(230,51,41,.08); color: var(--red); }
.book-card .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.book-card label { font-size: .78rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; display: block; }

@media (max-width: 680px) {
  .calc { grid-template-columns: 1fr; }
  .float-contact { right: 14px; bottom: 14px; }
}

/* Logo slika + kredit za fotografiju */
.logo-img { height: 46px; width: auto; display: block; background: #fff; padding: 3px 7px; border-radius: 8px; }
.site-footer .logo-img { height: 42px; }
.photo-credit { position: absolute; bottom: 8px; left: 12px; z-index: 3; color: rgba(255,255,255,.6); font-size: .68rem; }

/* Telefon agenta u timu */
.team-phone { display: inline-block; margin-top: 8px; color: var(--red); font-weight: 700; font-size: .92rem; }
.team-phone:hover { text-decoration: underline; }

/* Profesionalni horizontalni logo (kućica + tekst) */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { height: 34px; width: auto; display: block; }
.brand-text { display: inline-flex; flex-direction: column; line-height: .9; font-weight: 900; font-size: 1.32rem; letter-spacing: .04em; color: var(--ink); }
.brand-sub { font-size: .54rem; font-weight: 700; letter-spacing: .3em; color: var(--red); margin-top: 4px; }
.site-footer .brand-text { color: #fff; }
.site-footer .brand-mark { height: 32px; }
@media (max-width: 420px){ .brand-mark{height:28px} .brand-text{font-size:1.1rem} .brand-sub{font-size:.48rem;letter-spacing:.22em} }

/* OLX oznaka na kartici */
.olx-tag { position: absolute; top: 12px; right: 56px; background: #0b5aa2; color: #fff; padding: 5px 11px; border-radius: 20px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* Lightbox (popup galerija) */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,10,14,.93); display: grid; place-items: center; animation: lbIn .18s ease; }
@keyframes lbIn { from { opacity: 0 } to { opacity: 1 } }
.lightbox .lb-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox .lb-close { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; cursor: pointer; }
.lightbox .lb-close:hover { background: var(--red); }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-nav:hover { background: var(--red); }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }
.lightbox .lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0,0,0,.5); padding: 6px 16px; border-radius: 20px; font-weight: 700; font-size: .9rem; }
@media (max-width: 680px){ .lightbox .lb-nav{width:44px;height:44px;font-size:1.5rem} .lightbox .lb-prev{left:8px} .lightbox .lb-next{right:8px} }

/* ===== Brend refresh: crvena dominacija + moderni akcenti ===== */
/* Gornja crvena traka (telefon/adresa — vidljivo na svakoj stranici, dobro i za lokalni SEO) */
.topbar { background: linear-gradient(90deg, var(--red), var(--red-dark)); color: #fff; font-size: .82rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 700; }
.topbar a:hover { text-decoration: underline; }
.topbar-left { font-weight: 600; opacity: .95; }
.topbar-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
@media (max-width: 680px) {
  .topbar { font-size: .72rem; }
  .topbar-in { min-height: 0; padding: 7px 0; justify-content: center; text-align: center; }
  .topbar-left { display: none; }
}

/* Crveni akcent ispod naslova sekcija */
.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--red); border-radius: 3px; margin: 16px auto 0; }
.split h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--red); border-radius: 3px; margin: 14px 0 0; }

/* Dugmad unutar crvenog CTA = bijela (kontrast) */
.cta-band .btn-primary { background: #fff; color: var(--red); }
.cta-band .btn-primary:hover { background: #f3f3f3; color: var(--red-dark); box-shadow: 0 10px 24px rgba(0,0,0,.2); }

/* Crveni akcent na vrhu kartice pri hoveru */
.card { border-top: 3px solid transparent; }
.card:hover { border-top-color: var(--red); }

/* ===== Mobilne dorade: oglasi 1 u redu + uredni naslovi ===== */
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .card-media { aspect-ratio: 16/10; }
  .card-title { font-size: 1.1rem; }
  .card-price { font-size: 1.5rem; }
  .card-meta { font-size: .95rem; }
  .listings-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .sort-select { width: 100%; }
}
