/* ------------------------------------------------------------------
   Immoweb listing replica - demo page for the CLARA widget
   Colours sampled from the reference screenshots in example_immoweb/
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Figtree";
  src: url("assets/immoweb/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0c216a;
  --blue: #1436af;
  --blue-dark: #0f2c8f;
  --green: #61d088;
  --green-dark: #4dbb75;
  --grey-text: #585e70;
  --panel: #f1f3f9;
  --line: #dfe3ee;
  --line-soft: #e9ecf5;
  --white: #fff;

  font-family: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--navy);
  background: var(--white);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 340px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
dl, dd, dt, p { margin: 0; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

/* ---------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 30px; height: 60px; }
.logo img { width: 155px; height: auto; }

.main-nav { display: flex; align-items: center; gap: 26px; font-size: 15px; color: var(--grey-text); }
.main-nav a:hover { color: var(--blue); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-classified {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 20px; border-radius: 20px;
  background: var(--green); color: var(--navy);
  font-size: 15px; font-weight: 700;
  transition: background .15s ease;
}
.btn-classified:hover { background: var(--green-dark); }
.btn-classified .plus { font-size: 19px; font-weight: 700; line-height: 1; margin-top: -2px; }

.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--navy); }
.icon-btn:hover { background: var(--panel); }
.icon-btn svg { width: 23px; height: 23px; stroke-width: 1.7; }
.ico-heart { stroke-width: 1.7; }

.lang-btn {
  display: inline-flex; align-items: center; gap: 2px;
  height: 38px; padding: 0 8px 0 12px;
  border: 1.5px solid var(--blue); border-radius: 6px;
  color: var(--navy); font-size: 15px; font-weight: 700;
}
.chev { stroke-width: 2.4; }
.lang-btn .chev { width: 18px; height: 18px; }

/* ------------------------------------------------------- title bar */

.classified-bar { background: var(--panel); padding: 12px 0 18px; }

.bar-nav { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--blue); margin-bottom: 12px; }
.bar-nav a { display: inline-flex; align-items: center; gap: 3px; }
.bar-nav a:hover { text-decoration: underline; }
.bar-nav .chev { width: 17px; height: 17px; }
.back-link { text-decoration: underline; }
.bar-sep { width: 1px; height: 20px; background: #c2c8dd; margin-inline: 4px; }

.bar-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 24px; }
.bar-title h1 { font-size: 32px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.bar-specs { margin-top: 5px; font-size: 17px; }
.bar-address { display: inline-block; margin-top: 3px; font-size: 15px; color: var(--blue); }
.bar-address:hover { text-decoration: underline; }
.bar-price { font-size: 34px; font-weight: 800; letter-spacing: -.015em; padding-top: 4px; white-space: nowrap; }

.bar-side { justify-self: end; text-align: right; }
.bar-code { font-size: 13px; color: var(--grey-text); }
.bar-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 18px;
  border: 1.5px solid var(--blue); border-radius: 20px;
  color: var(--blue); font-size: 15px; font-weight: 700;
  transition: background .15s ease;
}
.pill-btn:hover { background: #e6eafa; }
.pill-btn svg { width: 19px; height: 19px; }
.pill-btn.is-saved svg { fill: var(--blue); }

/* --------------------------------------------------------- layout */

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 26px;
  padding-top: 22px;
  padding-bottom: 60px;
}
.col-main { min-width: 0; }

/* -------------------------------------------------------- gallery */

.gallery { display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 12px; }
.gallery-main, .gallery-side figure { margin: 0; overflow: hidden; border-radius: 2px; background: var(--panel); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1241 / 692; }
.gallery-side { display: grid; grid-template-rows: repeat(3, 1fr); gap: 12px; }
.gallery-side img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 388 / 221; }
.gallery-side figure { cursor: pointer; }
.gallery-side img { transition: transform .4s ease; }
.gallery-side figure:hover img { transform: scale(1.04); }

.gallery-tools {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 16px 0 6px; font-size: 15px;
}
.stats-link, .tool-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); }
.stats-link { text-decoration: underline; }
.tool-links { display: flex; gap: 26px; }
.tool-links a:hover, .stats-link:hover { color: var(--blue-dark); }
.gallery-tools svg { width: 19px; height: 19px; }
.ico-stats { stroke-width: 2.6; }

/* --------------------------------------------------------- blocks */

.block { padding-top: 44px; }
.block h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.block > .spec-list, .block > .desc-sub { margin-top: 22px; }

.overview-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px; margin-top: 22px;
  font-size: 17px;
}
.overview-item { display: flex; align-items: center; gap: 12px; }
.overview-item svg { width: 26px; height: 26px; flex: none; stroke-width: 1.8; }

.desc-sub { font-size: 17px; font-weight: 700; }
.desc-body { margin-top: 16px; max-width: 74ch; font-size: 16px; color: var(--grey-text); line-height: 1.62; }
.desc-fade { color: #9aa0b3; }
.read-more { margin-top: 10px; color: var(--blue); font-size: 15px; text-decoration: underline; }

.spec-list { display: grid; gap: 9px; font-size: 16px; }
.spec-list > div { display: grid; grid-template-columns: minmax(0, 285px) minmax(0, 1fr); gap: 14px; align-items: start; }
.spec-list dt { color: var(--grey-text); }
.spec-list dd { font-weight: 700; }
.ext-link { color: var(--blue); text-decoration: underline; }

/* ------------------------------------------------------------ EPC */

.epc { position: relative; margin: 24px 0 30px; }
.epc-scale { display: grid; gap: 5px; }
.epc-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  width: var(--w); height: 19px;
  padding: 0 6px 0 7px;
  background: var(--c); color: #1c1c1c;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.epc-row::after {
  content: ""; position: absolute; left: 100%; top: 0;
  border: 9.5px solid transparent; border-left-color: var(--c); border-right-width: 0;
}
.epc-row b { position: relative; z-index: 1; }
.epc-marker { position: absolute; left: 148px; top: 24px; }
.epc-marker span {
  position: relative; display: grid; place-items: center;
  width: 26px; height: 19px; padding-left: 4px;
  background: #67bb2c; color: #1c1c1c; font-size: 10px; font-weight: 700;
}
.epc-marker span::before {
  content: ""; position: absolute; right: 100%; top: 0;
  border: 9.5px solid transparent; border-right-color: #67bb2c; border-left-width: 0;
}

/* ------------------------------------------------- similar cards */

.similar-head { display: flex; align-items: baseline; gap: 10px; }
.see-more { color: var(--blue); font-size: 15px; text-decoration: underline; }
.similar-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.similar-card { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--white); transition: box-shadow .18s ease; }
.similar-card:hover { box-shadow: 0 6px 20px rgba(12, 33, 106, .13); }
.similar-photo img { width: 100%; aspect-ratio: 352 / 254; object-fit: cover; }
.similar-body { padding: 12px 14px 16px; }
.similar-type { font-size: 14px; font-weight: 700; }
.similar-price { margin-top: 4px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.similar-meta { margin-top: 3px; font-size: 14px; color: var(--grey-text); }
.similar-next {
  position: absolute; right: -18px; top: 42%;
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; background: var(--white); color: var(--navy);
  box-shadow: 0 3px 14px rgba(12, 33, 106, .22);
}
.similar-next svg { width: 22px; height: 22px; }

/* ----------------------------------------------------------- forms */

.contact-form { display: grid; gap: 14px; margin-top: 22px; max-width: 720px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 15px; font-weight: 700; padding: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--blue); border-radius: 6px;
  background: var(--panel); padding: 11px 12px; font-size: 16px; color: var(--navy);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.phone-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
.phone-row select { font-weight: 700; color: var(--blue); }
.field input::placeholder, .field textarea::placeholder { color: var(--blue); opacity: .85; }

.radio-row { display: flex; gap: 34px; margin-top: 2px; }
.radio, .check { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; cursor: pointer; }
.check { margin-top: 6px; }
.radio input, .check input { width: 21px; height: 21px; accent-color: var(--blue); }

.textarea-wrap { position: relative; }
.char-count { position: absolute; right: 12px; bottom: 10px; font-size: 13px; color: var(--grey-text); }

.form-legal { font-size: 14px; color: var(--grey-text); line-height: 1.5; }
.form-legal a { color: var(--blue); text-decoration: underline; }

.btn-green {
  justify-self: start;
  height: 46px; padding: 0 26px; border-radius: 23px;
  background: var(--green); color: var(--navy);
  font-size: 16px; font-weight: 700;
  transition: background .15s ease;
}
.btn-green:hover { background: var(--green-dark); }

/* --------------------------------------------------------- sidebar */

.side-sticky { position: sticky; top: 76px; display: grid; gap: 14px; }
.agency-block { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; }
.agency-logo { border-radius: 4px; }
.agency-name { color: var(--blue); font-weight: 700; text-decoration: underline; }
.agency-text p { margin-top: 4px; font-size: 15px; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; height: 44px; border: 1.5px solid var(--blue); border-radius: 22px;
  color: var(--blue); font-size: 16px; font-weight: 700;
  transition: background .15s ease;
}
.btn-outline:hover { background: #e6eafa; }
.ico-phone { width: 20px; height: 20px; }

.side-form {
  margin-top: 4px; padding: 16px;
  border-radius: 8px; background: var(--white);
  box-shadow: 0 2px 14px rgba(12, 33, 106, .12);
}
.side-form .btn-green { justify-self: stretch; text-align: center; }
.message-toggle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; color: var(--navy);
}
.message-toggle svg { width: 20px; height: 20px; transition: transform .2s ease; }
.message-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }

/* -------------------------------------------------- floating card */

.float-agency {
  position: fixed; right: max(24px, calc(50% - 590px)); top: 88px; z-index: 55;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center;
  gap: 10px 12px; width: 268px; padding: 14px;
  border-radius: 8px; background: #fafbfe;
  box-shadow: 0 4px 18px rgba(12, 33, 106, .16);
}
.float-agency .btn-green { grid-column: 1 / -1; justify-self: center; }
.float-agency[hidden] { display: none; }

/* ---------------------------------------------------- CLARA slot */

.clara-slot-block { padding-top: 44px; }
#clara-widget { min-height: 120px; }
#clara-widget iframe { width: 100%; border: 0; display: block; border-radius: 10px; }
.clara-placeholder {
  display: grid; gap: 8px; place-items: center;
  padding: 40px 24px; border: 1px dashed #b9c1da; border-radius: 10px;
  background: var(--panel); color: var(--grey-text); text-align: center;
}
.clara-placeholder strong { color: var(--navy); font-size: 17px; }
.clara-placeholder span { font-size: 14px; }
.clara-placeholder code { font-size: 13px; background: #e2e7f4; padding: 2px 6px; border-radius: 4px; }

/* ---------------------------------------------------------- misc */

.site-footer { border-top: 1px solid var(--line-soft); background: var(--panel); padding: 26px 0 34px; }
.site-footer p { font-size: 13px; color: var(--grey-text); }
.site-footer a { color: var(--blue); text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 18px);
  padding: 12px 20px; border-radius: 8px; background: var(--navy); color: var(--white);
  font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .float-agency { display: none; }
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { max-width: 460px; }
  .side-sticky { position: static; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .bar-main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bar-price { font-size: 30px; }
  .bar-side { justify-self: start; text-align: left; }
  .bar-buttons { justify-content: flex-start; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery-side { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .similar-row { grid-template-columns: minmax(0, 1fr); }
  .similar-next { display: none; }
  .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .epc-marker { display: none; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 32px); }
  .bar-title h1 { font-size: 26px; }
  .bar-price { font-size: 26px; }
  .btn-classified { padding: 0 14px; font-size: 14px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}
