:root {
  --ink: #1c241f;
  --muted: #6f766f;
  --line: #e8dfd2;
  --paper: #faf6ee;
  --white: #fff;
  --brand: #284238;
  --brand-dark: #17231f;
  --yellow: #e8955a;
  --orange: #d66b4a;
  --green: #6f9f8d;
  --red: #bf4f4f;
  --shadow: 0 18px 42px rgba(50, 37, 24, .12);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(214,107,74,.07) 0 1px, transparent 1px 36px),
    linear-gradient(180deg, #f7efe4 0, #fffaf3 440px, #faf6ee 100%);
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin-top: 0; overflow-wrap: anywhere; }

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,250,243,.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand img { width: 236px; height: auto; }

.links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 14px;
}

.links a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #243244;
}

.links a:hover { background: #efe3d2; color: var(--brand-dark); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.button.secondary {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--line);
}

.button.accent {
  background: linear-gradient(135deg, #f3ad6b, #df704c);
  border-color: #d66b4a;
  color: #1d2733;
}

.hero { padding: 32px 0 18px; }

.hero-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(100deg, rgba(255,250,243,.98) 0 45%, rgba(255,250,243,.76) 68%, rgba(40,66,56,.12)),
    url("/assets/listings/house-yard-gevgelija.webp") center/cover;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-board::after {
  content: "";
  position: absolute;
  inset: auto 28px 22px auto;
  width: min(34%, 320px);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), transparent);
  opacity: .65;
}

.hero-board > *, .section-head > *, .listing-card, .card-body, .partner-card, .panel {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(40px, 5.7vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.lead {
  max-width: 690px;
  margin-bottom: 0;
  color: #405063;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}

.search-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.search-pills a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(50,37,24,.06);
}

.hero-actions, .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  justify-content: end;
  max-width: 420px;
}

.section { padding: 36px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 4px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head p { color: var(--muted); max-width: 520px; margin-bottom: 0; }

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.quick-strip a, .seo-card {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff;
}

.quick-strip strong { color: var(--brand-dark); font-size: 17px; }
.quick-strip span { color: var(--muted); font-size: 14px; font-weight: 700; }

.chips { display: none; }

.trust {
  padding: 12px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.trust-grid span {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  color: var(--brand-dark);
  font-weight: 900;
  text-align: center;
}

.soft-section {
  background: #f4eadc;
  border-block: 1px solid var(--line);
}

.seo-grid, .post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.seo-card, .post-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 24px rgba(50,37,24,.07);
}

.seo-card strong, .post-card h2, .post-card h3 {
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1.18;
}

.seo-card span, .post-card p {
  color: var(--muted);
  font-weight: 700;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.listing-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(50, 37, 24, .09);
}

.listing-card:hover {
  border-color: #dfc4a7;
  box-shadow: 0 18px 34px rgba(50, 37, 24, .14);
}

.card-link {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.listing-card figure { margin: 0; position: relative; background: #efe2d0; }
.listing-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.listing-card:hover img { transform: scale(1.025); }

.listing-card.featured {
  grid-column: span 2;
}

.listing-card.featured img { aspect-ratio: 2 / 1; }
.listing-card.wide { grid-column: span 2; }
.listing-card.wide img { aspect-ratio: 2 / 1; }

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 7px 9px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.badge.rent { background: var(--orange); }
.badge.daily { background: #7a3f28; }
.badge.invest { background: var(--green); }
.badge.sold { background: var(--red); }

.card-body {
  display: grid;
  align-content: start;
  padding: 15px;
}

.type {
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.listing-card h3 {
  min-height: 52px;
  margin: 7px 0 8px;
  font-size: 19px;
  line-height: 1.18;
}

.meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.price {
  margin-bottom: 12px;
  color: #7a3f28;
  font-size: 23px;
  font-weight: 950;
}

.details {
  width: fit-content;
  margin-top: auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f7eadb;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
}

.partner-band { background: #f4eadc; border-top: 1px solid var(--line); }

.dissans-recommendation {
  background:
    linear-gradient(180deg, #17231f 0%, #203a31 100%);
  color: #fff;
  border-block: 1px solid rgba(232,223,210,.18);
}

.dissans-recommendation .section-head p {
  color: rgba(255,255,255,.72);
}

.dissans-banner {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(232,149,90,.44);
  border-radius: 18px;
  background: #07162a;
  box-shadow: 0 22px 52px rgba(23, 35, 31, .28);
}

.dissans-banner img {
  width: 100%;
  height: auto;
  transition: transform .25s ease, filter .25s ease;
}

.dissans-banner:hover img {
  transform: scale(1.01);
  filter: saturate(1.06);
}

.partner-recommendation {
  background:
    linear-gradient(180deg, #fffaf3, #f1e5d5);
  border-top: 1px solid var(--line);
}

.sponsor-banner {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(23,35,31,.18);
  border-radius: 22px;
  background: #081524;
  box-shadow: 0 22px 52px rgba(50, 37, 24, .18);
}

.sponsor-banner img {
  width: 100%;
  height: auto;
  transition: transform .25s ease, filter .25s ease;
}

.sponsor-banner:hover img {
  transform: scale(1.01);
  filter: saturate(1.06);
}

.cta-band {
  background: var(--brand-dark);
  color: #fff;
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.cta-panel p { color: rgba(255,255,255,.74); }
.cta-panel .eyebrow { color: var(--yellow); }

.partner-grid, .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.partner-card, .panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.partner-card h2, .panel h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.1;
}

.partner-card p, .panel p { color: #4b5b6c; font-weight: 650; }

.portal-card {
  display: grid;
  gap: 14px;
}

.portal-card img {
  max-width: 320px;
  width: 100%;
  height: auto;
  padding: 12px;
  border-radius: 8px;
  background: #1d6a4c;
}

.listing-hero {
  padding: 38px 0;
  background: #f4eadc;
  border-bottom: 1px solid var(--line);
}

.category-hero {
  padding: clamp(34px, 5vw, 64px) 0;
}

.category-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.category-hero-grid .lead {
  max-width: 820px;
}

.category-summary {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(40, 66, 56, .16);
  border-radius: 18px;
  background: rgba(255, 250, 243, .72);
  box-shadow: 0 16px 32px rgba(50, 37, 24, .08);
}

.category-summary span {
  color: var(--orange);
  font-size: 58px;
  line-height: 1;
  font-weight: 950;
}

.category-summary strong {
  color: var(--brand-dark);
  font-size: 22px;
}

.category-summary p {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 750;
}

.category-listing-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumbs a::after {
  content: "/";
  margin-left: 8px;
  color: #b7aa98;
}

.listing-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.gallery-main {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.gallery-main img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.fact {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fact strong { display: block; font-size: 18px; }

.sticky { position: sticky; top: 92px; }
.content { padding: 34px 0; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}

.article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.article h2 { margin-top: 24px; font-size: 28px; }
.article h2:first-child { margin-top: 0; }
.article a { color: var(--brand); font-weight: 900; }
.article li { margin-bottom: 8px; }

.link-list, .mini-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.link-list a, .mini-list a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-list span { color: var(--muted); font-weight: 800; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label { display: block; margin-bottom: 6px; font-weight: 900; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  background: #fff;
}

textarea { min-height: 130px; resize: vertical; }
form { display: grid; gap: 14px; }
.status { font-weight: 900; }

iframe {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 18px;
}

.footer {
  padding: 34px 0;
  background: #17231f;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 20px;
}

.footer a { color: var(--yellow); font-weight: 900; }
.small { color: var(--muted); font-size: 14px; }
.footer .small { color: rgba(255,255,255,.72); }

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 28px rgba(23,33,48,.12);
}

.mobile-cta a {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 950;
}

.mobile-cta a:first-child {
  background: linear-gradient(135deg, #f3ad6b, #df704c);
  color: var(--brand-dark);
}

@media (max-width: 1020px) {
  .links { display: none; }
  .hero-board, .section-head, .category-hero-grid, .partner-grid, .split, .listing-detail, .content-grid, .contact-grid, .footer-grid, .cta-panel {
    grid-template-columns: 1fr;
  }
  .category-summary { max-width: 420px; }
  .hero-actions { justify-content: start; max-width: none; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-grid, .post-grid, .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .nav { min-height: 64px; }
  .brand img { width: 204px; }
  .nav > .button.compact { display: none; }
  .hero { padding-top: 18px; }
  .hero-board { padding: 18px; }
  .hero-board::after { display: none; }
  h1 { font-size: 36px; line-height: 1.08; }
  .lead { font-size: 17px; }
  .search-pills {
    display: grid;
    grid-template-columns: 1fr;
  }
  .search-pills a {
    text-align: center;
    overflow-wrap: anywhere;
  }
  .section-head { display: block; }
  .section-head p { margin-top: 8px; }
  body { padding-bottom: 76px; }
  .mobile-cta { display: grid; }
  .hero-actions .button, .quick-strip, .listing-grid, .facts, .seo-grid, .post-grid, .trust-grid {
    grid-template-columns: 1fr;
  }
  .quick-strip { display: grid; }
  .listing-card.featured, .listing-card.wide { grid-column: auto; }
  .listing-card.featured img, .listing-card.wide img { aspect-ratio: 4 / 3; }
  .button { width: 100%; }
  .sponsor-banner, .dissans-banner { border-radius: 18px; }
}
