/*
 * iProperty — public site styles. Plain CSS, no build step.
 * Modern-browser features (cascade layers, nesting, container queries, :has(),
 * view transitions) with graceful fallbacks where older browsers ignore them.
 */

@layer reset, base, layout, components, pages, utilities;

/* ------------------------------------------------------------ fonts */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-greek-ext.woff2) format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

/* ------------------------------------------------------------ tokens */

:root {
  /* brand (from the logo) */
  --blue-900: #0f2440;
  --blue-800: #16365f;
  --blue-700: #224b80;
  --blue-600: #2f5a96;
  --blue-100: #e7eef8;
  --blue-50:  #f3f7fc;
  --green-600: #2f8a55;
  --green-500: #3f9e66;
  --green-100: #e3f3e9;
  --sand-50: #faf7f2;
  --sand-100: #f3eee5;

  --ink: #18212e;
  --ink-soft: #4a5768;
  --muted: #6b7788;
  --line: #e2e7ee;
  --surface: #ffffff;
  --bg: #ffffff;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(15 36 64 / .06), 0 1px 3px rgb(15 36 64 / .08);
  --shadow: 0 6px 18px -6px rgb(15 36 64 / .18), 0 2px 6px rgb(15 36 64 / .06);
  --shadow-lg: 0 24px 48px -16px rgb(15 36 64 / .28);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(.83rem, .8rem + .15vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.2rem + .7vw, 1.75rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.3vw, 2.4rem);
  --step-4: clamp(1.9rem, 1.5rem + 2.2vw, 3.2rem);

  --container: 1200px;
  --gutter: clamp(1rem, .6rem + 2vw, 2rem);
  --header-h: 72px;

  color-scheme: light;
  accent-color: var(--blue-600);
}

/* ------------------------------------------------------------ reset */

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, picture, svg, video, iframe { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  p, h1, h2, h3, h4 { overflow-wrap: break-word; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
}

/* ------------------------------------------------------------ base */

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
  body {
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
  }
  h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; color: var(--blue-900); text-wrap: balance; }
  h1 { font-size: var(--step-4); font-weight: 750; }
  h2 { font-size: var(--step-3); font-weight: 700; }
  h3 { font-size: var(--step-1); font-weight: 650; }
  p { text-wrap: pretty; }
  a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: .2em; }
  a:hover { color: var(--blue-800); }
  :focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; border-radius: 4px; }
  ::selection { background: var(--blue-100); }
  hr { border: 0; border-top: 1px solid var(--line); }
}

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

@layer layout {
  .container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
  .section { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }
  .section-alt { background: var(--sand-50); }
  .section-head {
    display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-block-end: clamp(1.25rem, 1rem + 1vw, 2rem);
    & p { color: var(--ink-soft); margin-block-start: .35rem; }
  }
  .stack > * + * { margin-block-start: var(--stack, 1rem); }
}

/* ------------------------------------------------------------ components */

@layer components {
  /* accessibility helpers */
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .skip-link {
    position: absolute; inset-inline-start: 1rem; inset-block-start: -100px; z-index: 100;
    background: var(--blue-800); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
    &:focus { inset-block-start: 1rem; color: #fff; }
  }
  .icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  /* buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: var(--step-0); line-height: 1.2; text-decoration: none; white-space: nowrap;
    background: var(--surface); color: var(--blue-800); border-color: var(--line);
    transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
    &:hover { border-color: var(--blue-600); color: var(--blue-800); }
    &:active { transform: translateY(1px); }
  }
  .btn-primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; &:hover { background: var(--blue-800); border-color: var(--blue-800); color: #fff; } }
  .btn-accent { background: var(--green-500); border-color: var(--green-500); color: #fff; &:hover { background: var(--green-600); border-color: var(--green-600); color: #fff; } }
  .btn-ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .5); &:hover { background: rgb(255 255 255 / .12); color: #fff; border-color: #fff; } }
  .btn-sm { padding: .5rem .9rem; font-size: var(--step--1); }
  .btn-block { width: 100%; }

  /* chips & badges */
  .chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
  .chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--step--1); font-weight: 500;
    & .icon { color: var(--green-500); }
  }
  a.chip:hover { border-color: var(--blue-600); color: var(--blue-800); background: var(--blue-50); }
  .badge {
    display: inline-block; padding: .3rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; background: var(--blue-800); color: #fff;
  }
  .badge-green { background: var(--green-500); }
  .badge-soft { background: var(--blue-100); color: var(--blue-800); }

  /* ---------------- header & navigation */
  .announce {
    background: var(--green-600); color: #fff; font-size: var(--step--1); text-align: center; padding: .45rem var(--gutter);
    & a { color: #fff; font-weight: 600; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
    & a:hover { text-decoration: underline; color: #fff; }
  }
  .site-header {
    position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .92);
    backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
    &[data-scrolled] { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
  }
  .header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
  .brand { display: block; flex: none; & img { height: 34px; width: auto; } }
  .nav-toggle {
    display: none; margin-inline-start: auto; border: 1px solid var(--line); background: var(--surface);
    width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; color: var(--blue-800);
    & .icon { width: 22px; height: 22px; }
    & .icon-close { display: none; }
    &[aria-expanded="true"] { & .icon-menu { display: none; } & .icon-close { display: block; } }
  }
  .site-nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
  .nav-list {
    display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; margin-inline: auto;
    & > li > a, & > li > details > summary {
      display: flex; align-items: center; gap: .3rem; padding: .55rem .8rem; border-radius: 10px;
      color: var(--ink); text-decoration: none; font-weight: 550; font-size: .97rem; cursor: pointer; list-style: none;
    }
    & > li > a:hover, & > li > details > summary:hover, & > li > details[open] > summary { background: var(--blue-50); color: var(--blue-800); }
    & > li > a[aria-current="page"] { color: var(--blue-600); }
    & summary::-webkit-details-marker { display: none; }
    & summary .icon { width: .9em; height: .9em; transition: transform .2s; }
    & details[open] > summary .icon { transform: rotate(180deg); }
  }
  .nav-item { position: relative; }
  .dropdown {
    position: absolute; inset-block-start: calc(100% + .5rem); inset-inline-start: 0; min-width: 240px; z-index: 60;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: .5rem; list-style: none;
    & a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
    & a:hover { background: var(--blue-50); color: var(--blue-800); }
    & .dropdown-all { font-weight: 650; color: var(--blue-700); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: .25rem; }
  }
  .dropdown-mega {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .25rem 1rem; width: min(720px, 90vw);
    inset-inline-start: 50%; translate: -50% 0; /* centred under its menu item */
    & h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .6rem .75rem .25rem; }
    & h3 a { padding: 0; color: inherit; display: inline; }
    & ul { list-style: none; padding: 0; }
  }
  .nav-extra { display: flex; align-items: center; gap: .75rem; }
  .lang-switch {
    position: relative;
    & summary { list-style: none; display: flex; align-items: center; gap: .35rem; cursor: pointer; padding: .5rem .7rem; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
    & summary::-webkit-details-marker { display: none; }
    & summary:hover, &[open] summary { background: var(--blue-50); color: var(--blue-800); }
    & .dropdown { inset-inline: auto 0; min-width: 190px; }
    & a[aria-current="true"] { font-weight: 700; color: var(--blue-700); }
  }
  .nav-phone .icon { color: var(--green-500); }

  /* ---------------- breadcrumbs */
  .breadcrumbs {
    font-size: var(--step--1); color: var(--muted);
    & ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; }
    & li:not(:last-child)::after { content: "›"; margin-inline-start: .35rem; color: var(--line); color: #b4bdc9; }
    & a { color: var(--ink-soft); text-decoration: none; }
    & a:hover { color: var(--blue-700); text-decoration: underline; }
    & [aria-current] { color: var(--ink); font-weight: 500; }
  }

  /* ---------------- search form (adapts to its container) */
  .search-wrap { container-type: inline-size; }
  .search-form {
    color: var(--ink);
    display: grid; gap: .75rem; padding: clamp(1rem, .8rem + 1vw, 1.5rem);
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    & .field { display: flex; flex-direction: column; gap: .3rem; }
    & .field > span { font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
    & select { width: 100%; }
    & .btn { min-height: 48px; }
  }
  @container (min-width: 760px) {
    .search-form { grid-template-columns: auto 1fr 1fr auto; align-items: end; }
  }
  .segmented {
    display: inline-grid; grid-auto-flow: column; padding: 4px; border-radius: 999px; background: var(--blue-50); border: 0; min-height: 48px;
    & legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    & label { display: flex; align-items: center; justify-content: center; padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: background-color .15s, color .15s; }
    & input { position: absolute; opacity: 0; pointer-events: none; }
    & label:has(input:checked) { background: var(--surface); color: var(--blue-800); box-shadow: var(--shadow-sm); }
    & label:has(input:focus-visible) { outline: 3px solid var(--green-500); outline-offset: 1px; }
  }

  /* form controls */
  .input, select, textarea {
    width: 100%; padding: .75rem .9rem; min-height: 48px; border: 1px solid #cfd7e2; border-radius: 12px; background: #fff; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
    &:hover { border-color: #aab6c6; }
    &:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgb(47 90 150 / .15); }
  }
  select {
    appearance: none; padding-inline-end: 2.5rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5768' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 1.1rem;
  }
  textarea { min-height: 150px; resize: vertical; }
  .form-grid {
    display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    & .full { grid-column: 1 / -1; }
    & label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .95rem; color: var(--ink); }
    & .hint { font-weight: 400; color: var(--muted); font-size: var(--step--1); }
  }
  .radio-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; & label { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; } & input { width: 1.15rem; height: 1.15rem; } }
  .trap { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

  /* ---------------- listing cards */
  .cards { display: grid; gap: clamp(1rem, .7rem + 1.2vw, 1.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; padding: 0; }
  .card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    transition: box-shadow .2s, transform .2s, border-color .2s;
    &:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }
    &:hover .card-media img { transform: scale(1.04); }
    &:has(a:focus-visible) { outline: 3px solid var(--green-500); outline-offset: 2px; }
  }
  .card-media {
    position: relative; aspect-ratio: 4 / 3; background: var(--blue-50); overflow: hidden;
    & img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
  }
  .card-badges { position: absolute; inset: .75rem auto auto .75rem; display: flex; gap: .35rem; flex-wrap: wrap; }
  .card-noimg {
    display: grid; place-items: center; align-content: center; gap: .5rem; height: 100%; color: #9fb0c6; font-size: var(--step--1);
    & .icon { width: 56px; height: 56px; stroke-width: 1.2; }
  }
  .card-body { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.15rem 1.15rem; flex: 1; }
  .card-title {
    font-size: 1.08rem; line-height: 1.3;
    & a { color: var(--blue-900); text-decoration: none; }
    & a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
    & a:focus-visible { outline: none; }
  }
  .card-place { display: flex; align-items: center; gap: .35rem; color: var(--ink-soft); font-size: var(--step--1); & .icon { color: var(--green-500); } }
  .card-excerpt { color: var(--ink-soft); font-size: var(--step--1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .facts-row {
    display: flex; flex-wrap: wrap; gap: .35rem 1rem; list-style: none; padding: 0; color: var(--ink-soft); font-size: var(--step--1);
    & li { display: inline-flex; align-items: center; gap: .35rem; }
    & .icon { color: var(--blue-600); }
  }
  .card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-block-start: auto; padding-block-start: .75rem; border-top: 1px solid var(--line); }
  .price { font-weight: 750; font-size: 1.2rem; color: var(--blue-800); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .price-request { font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
  .code { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

  /* ---------------- empty state */
  .empty {
    text-align: center; padding: clamp(2rem, 1.5rem + 3vw, 4rem) 1rem; border: 1px dashed #cdd6e2; border-radius: var(--radius-lg); background: var(--blue-50);
    & .icon { width: 48px; height: 48px; margin: 0 auto 1rem; color: var(--blue-600); }
    & p { color: var(--ink-soft); max-width: 46ch; margin: .5rem auto 1.25rem; }
  }

  /* ---------------- map */
  .map-frame { border: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--blue-50); }

  /* ---------------- prose */
  .prose { max-width: 70ch; color: var(--ink-soft); & > * + * { margin-block-start: 1em; } & p { white-space: pre-line; } & strong, & b { color: var(--ink); } }
  .prose-html { white-space: normal; & p { white-space: normal; } }

  /* ---------------- footer */
  .site-footer {
    background: var(--blue-900); color: #c9d4e3; margin-block-start: clamp(3rem, 2rem + 4vw, 6rem); font-size: var(--step--1);
    & a { color: #fff; text-decoration: none; }
    & a:hover { text-decoration: underline; color: #fff; }
    & h2 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-block-end: 1rem; }
    & ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
    & .brand img { height: 36px; filter: brightness(0) invert(1); }
  }
  .footer-grid { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .site-footer .office strong { color: #fff; }
  .site-footer .office-icon { background: rgb(255 255 255 / .08); color: #8fd3aa; }

  /* ---------------- offices: both shown the same way (partials/office) */
  .offices { display: grid; gap: 1rem; }
  .office {
    display: flex; gap: .75rem; align-items: flex-start;
    & > div { display: grid; gap: .1rem; min-width: 0; }
    & strong { color: var(--ink); }
  }
  .office-icon {
    display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--green-100); color: var(--green-600);
  }
  .contact-lines { list-style: none; padding: 0; display: grid; gap: .4rem; }
  .footer-bottom { border-top: 1px solid rgb(255 255 255 / .12); padding-block: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
  .link-button { background: none; border: 0; padding: 0; color: #fff; font-size: inherit; cursor: pointer; text-align: start; &:hover { text-decoration: underline; } }
  .contact-line { display: flex; align-items: center; gap: .5rem; & .icon { color: var(--green-500); } }
}

/* ------------------------------------------------------------ pages */

@layer pages {
  /* home hero */
  .hero {
    position: relative; isolation: isolate; color: #fff; overflow: hidden;
    padding-block: clamp(3rem, 2rem + 6vw, 7rem) clamp(3rem, 2rem + 5vw, 6rem);
    background:
      radial-gradient(1200px 500px at 85% -10%, rgb(63 158 102 / .35), transparent 60%),
      radial-gradient(900px 600px at -10% 110%, rgb(47 90 150 / .9), transparent 60%),
      linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 55%, var(--blue-700) 100%);
    & h1 { color: #fff; max-width: 20ch; }
    & .hero-lead { font-size: var(--step-1); color: #d6e2f2; max-width: 52ch; margin-block: 1rem 2rem; }
    & .search-wrap { max-width: 980px; }
  }
  .hero-waves { position: absolute; inset: auto 0 -1px 0; z-index: -1; color: var(--bg); & svg { width: 100%; height: clamp(40px, 6vw, 90px); } }
  .hero-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-block-start: 1.75rem; color: #c3d3e8; font-size: var(--step--1);
    & span { display: inline-flex; gap: .4rem; align-items: center; } & .icon { color: #8fd3aa; } }

  /* areas */
  .area-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
  .area-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem;
    & h3 { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-block-end: .75rem; }
    & h3 a { color: var(--blue-900); text-decoration: none; }
    & h3 a:hover { color: var(--blue-600); }
    & ul { list-style: none; padding: 0; display: grid; gap: .15rem; }
    & li a { display: flex; justify-content: space-between; padding: .35rem .5rem; margin-inline: -.5rem; border-radius: 8px; color: var(--ink-soft); text-decoration: none; }
    & li a:hover { background: var(--blue-50); color: var(--blue-800); }
  }
  .count { font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--blue-50); border-radius: 999px; padding: .1rem .55rem; font-variant-numeric: tabular-nums; }

  /* call-to-action bands */
  .cta-band {
    display: grid; gap: 1.5rem; align-items: center; grid-template-columns: 1fr auto;
    padding: clamp(1.5rem, 1rem + 2.5vw, 3rem); border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--blue-800), var(--blue-600)); color: #dbe6f5;
    & h2 { color: #fff; font-size: var(--step-2); }
    & p { margin-block-start: .5rem; max-width: 60ch; }
    & .actions { display: flex; gap: .75rem; flex-wrap: wrap; }
  }
  .cta-band-green { background: linear-gradient(120deg, #23704a, var(--green-500)); color: #e6f6ec; }
  @media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

  /* page header band (listings, simple pages) */
  .page-head {
    background: linear-gradient(180deg, var(--blue-50), var(--bg)); padding-block: clamp(1.25rem, 1rem + 1.5vw, 2.25rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
    & h1 { font-size: var(--step-3); margin-block-start: .75rem; }
    & .page-sub { color: var(--ink-soft); margin-block-start: .4rem; }
  }
  .listing-tools { margin-block: 0 2rem; }

  /* property page */
  .property-head {
    display: grid; gap: 1rem 2rem; grid-template-columns: 1fr auto; align-items: end; padding-block: 1rem 1.5rem;
    & h1 { font-size: var(--step-3); margin-block: .6rem .4rem; }
    & .badges { display: flex; gap: .4rem; flex-wrap: wrap; }
    & .place { display: flex; align-items: center; gap: .4rem; color: var(--ink-soft); & .icon { color: var(--green-500); } }
    & .place a { color: inherit; } & .place a:hover { color: var(--blue-700); }
  }
  .head-price { text-align: end; & .price { font-size: var(--step-3); display: block; } }
  @media (max-width: 760px) { .property-head { grid-template-columns: 1fr; } .head-price { text-align: start; } }

  .gallery {
    display: grid; gap: .5rem; border-radius: var(--radius-lg); overflow: hidden; position: relative;
    grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 16 / 7.5;
    & :is(.g-main, .g-item, .g-hidden) { all: unset; cursor: zoom-in; position: relative; display: block; overflow: hidden; background: var(--blue-50); }
    & :is(.g-main, .g-item, .g-hidden):focus-visible { outline: 3px solid var(--green-500); outline-offset: -3px; }
    & img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .2s; }
    & :is(.g-main, .g-item):hover img { transform: scale(1.03); }
    & .g-main { grid-row: 1 / -1; }
    &[data-count="1"] { grid-template-columns: 1fr; aspect-ratio: 16 / 8; }
    &[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; & .g-main { grid-row: auto; } }
    &[data-count="3"] { grid-template-columns: 2fr 1fr; }
    &[data-count="4"] { & .g-item:last-child { grid-column: span 2; } }
  }
  .gallery-more {
    position: absolute; inset-inline-end: 1rem; inset-block-end: 1rem; z-index: 2;
    box-shadow: var(--shadow);
  }
  @media (max-width: 760px) {
    /* phones: a swipeable strip instead of the mosaic */
    .gallery {
      display: flex; aspect-ratio: auto; overflow-x: auto; scroll-snap-type: x mandatory; gap: .5rem; border-radius: var(--radius);
      scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); border-radius: 0;
      &::-webkit-scrollbar { display: none; }
      & :is(.g-main, .g-item, .g-hidden) { flex: 0 0 88%; aspect-ratio: 4 / 3; scroll-snap-align: center; border-radius: var(--radius); }
      & > button.g-hidden { display: block; }
    }
    .gallery-more { display: none; }
  }
  .gallery > .g-hidden { display: none; }

  .property-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; margin-block-start: 2rem; }
  @media (max-width: 960px) { .property-layout { grid-template-columns: 1fr; } }
  .property-main > section + section { margin-block-start: 2.25rem; padding-block-start: 2.25rem; border-top: 1px solid var(--line); }
  .property-main h2 { font-size: var(--step-2); margin-block-end: 1rem; }
  .key-facts-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem;
    & li { list-style: none; background: var(--blue-50); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .15rem; }
    & .icon { color: var(--blue-600); width: 22px; height: 22px; }
    & strong { font-size: 1.1rem; color: var(--blue-900); }
    & span { font-size: .8rem; color: var(--muted); }
    padding: 0;
  }
  .facts {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 2rem;
    & div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
    & dt { color: var(--ink-soft); }
    & dd { margin: 0; font-weight: 600; text-align: end; color: var(--ink); }
  }
  .features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .6rem 1.5rem; list-style: none; padding: 0;
    & li { display: flex; align-items: center; gap: .55rem; } & .icon { color: var(--green-500); } }

  .aside-card {
    position: sticky; top: calc(var(--header-h) + 1.25rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.5rem; box-shadow: var(--shadow);
    & .price { font-size: var(--step-2); display: block; }
    & h2 { font-size: var(--step-1); margin-block: 1.25rem .4rem; }
    & p { color: var(--ink-soft); font-size: var(--step--1); }
    & .actions { display: grid; gap: .6rem; margin-block-start: 1.25rem; }
  }

  /* lightbox */
  .lightbox {
    width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: rgb(8 18 33 / .96); color: #fff;
    &::backdrop { background: rgb(8 18 33 / .9); }
    &[open] { display: grid; grid-template-rows: auto 1fr auto; }
    & .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; font-variant-numeric: tabular-nums; }
    & .lb-stage { display: grid; place-items: center; min-height: 0; padding: 0 4rem; touch-action: pan-y; }
    & .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; user-select: none; }
    & .lb-btn { width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .08); color: #fff; display: grid; place-items: center; }
    & .lb-btn:hover { background: rgb(255 255 255 / .18); }
    & .lb-prev, & .lb-next { position: absolute; top: 50%; translate: 0 -50%; }
    & .lb-prev { inset-inline-start: 1rem; }
    & .lb-next { inset-inline-end: 1rem; }
    & .lb-caption { text-align: center; padding: .75rem 1rem 1.25rem; color: #b9c6d8; font-size: var(--step--1); }
  }
  @media (max-width: 760px) { .lightbox .lb-stage { padding: 0 .5rem; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 1rem; translate: none; } }

  /* contact */
  .contact-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
  @media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
  .info-card { background: var(--sand-50); border-radius: var(--radius-lg); padding: 1.5rem; display: grid; gap: 1.25rem; & h2 { font-size: var(--step-1); } }
  .form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); box-shadow: var(--shadow-sm); }
  .notice { padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--green-100); color: #1e5a38; font-weight: 500; }
  .notice-warn { background: #fff4e0; color: #8a5300; }

  .sitemap-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); & ul { padding-inline-start: 1.1rem; display: grid; gap: .3rem; } & h2 { font-size: var(--step-1); margin-block-end: .75rem; } }

  /* ---------------- energy-certificate section (/energeiako-pistopoiitiko/) */
  .pea-nav > li > a { font-size: .86rem; letter-spacing: .02em; padding-inline: .65rem; }
  .pea-footer {
    & .footer-bottom { border-top: 0; align-items: center; padding-block: 1.75rem; }
  }

  /* hero: deep green → brand blue, white text */
  .pea-hero {
    position: relative; isolation: isolate; overflow: hidden; color: rgb(255 255 255 / .86);
    padding-block: clamp(1.5rem, 1rem + 3vw, 4rem) clamp(2.5rem, 2rem + 3vw, 5rem);
    background:
      radial-gradient(900px 480px at 100% -10%, rgb(143 211 170 / .30), transparent 60%),
      radial-gradient(800px 600px at -10% 120%, rgb(47 90 150 / .65), transparent 60%),
      linear-gradient(135deg, #154a31 0%, #23704a 45%, var(--blue-800) 100%);
    & h1 { color: #fff; font-size: var(--step-4); margin-block: .9rem 0; max-width: 18ch; }
    & .breadcrumbs { margin-block-end: .25rem; color: rgb(255 255 255 / .7); }
    & .breadcrumbs a { color: rgb(255 255 255 / .82); }
    & .breadcrumbs a:hover, & .breadcrumbs [aria-current] { color: #fff; }
    & .breadcrumbs li:not(:last-child)::after { color: rgb(255 255 255 / .45); }
    & :focus-visible { outline-color: #fff; }
  }
  .pea-hero-grid { display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3.5rem); align-items: center; }
  @media (min-width: 900px) { .pea-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
  .pea-hero-text::before {
    content: ""; display: block; width: 3.25rem; height: 4px; border-radius: 4px; margin-block-end: 1rem;
    background: linear-gradient(90deg, #8fd3aa, #fff);
  }
  .pea-lead { font-size: var(--step-1); margin-block: 1rem 1.75rem; max-width: 56ch; }
  .pea-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
  .pea-hero-media {
    position: relative; margin: 0;
    & img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .45); background: #fff; }
    &::before {
      content: ""; position: absolute; inset: 8% -4% -6% 10%; z-index: -1; border-radius: var(--radius-lg);
      background: rgb(255 255 255 / .10); border: 1px solid rgb(255 255 255 / .16);
    }
  }

  /* how it works: four numbered steps, coloured like energy classes A → D */
  .pea-steps {
    display: grid; gap: clamp(1rem, .7rem + 1.2vw, 1.5rem); list-style: none; padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  }
  .pea-step {
    --c: #13853f; --c-ink: #0f6b32;
    position: relative; padding: 1.6rem 1.35rem 1.4rem; border-radius: var(--radius);
    background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, #fff), #fff 65%);
    border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line));
    box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
    &:nth-child(2) { --c: #4caf3a; --c-ink: #3b8a2c; }
    &:nth-child(3) { --c: #a3c020; --c-ink: #657b0f; }
    &:nth-child(4) { --c: #e8a300; --c-ink: #a06a00; }
    &:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
    /* coloured corner that carries the step number */
    &::before {
      content: ""; position: absolute; inset: -1px -1px auto auto; width: 4.6rem; height: 4.6rem;
      border-radius: 0 var(--radius) 0 100%;
      background: linear-gradient(225deg, color-mix(in srgb, var(--c) 80%, #000), var(--c));
    }
    & h2 { font-size: var(--step-1); margin-block: 1rem .5rem; }
    & p { color: var(--ink-soft); font-size: var(--step--1); line-height: 1.65; }
  }
  .pea-step-icon {
    display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px;
    background: color-mix(in srgb, var(--c) 20%, #fff); color: var(--c-ink);
    & .icon { width: 1.5rem; height: 1.5rem; }
  }
  .pea-step-num {
    position: absolute; inset: .85rem .9rem auto auto; z-index: 1; font-size: 1.3rem; font-weight: 800; line-height: 1;
    color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .2); font-variant-numeric: tabular-nums; letter-spacing: -.03em;
  }

  /* contact strip */
  .pea-contacts {
    background: linear-gradient(120deg, var(--blue-900), var(--blue-800)); color: #c9d4e3;
    padding-block: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
    & a { color: #fff; text-decoration: none; }
    & a:hover { text-decoration: underline; color: #fff; }
    & strong { display: block; color: #fff; font-weight: 650; }
    & p { font-size: var(--step--1); }
  }
  .pea-contacts-grid {
    display: grid; gap: 1.25rem 2rem; list-style: none; padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    & .office { gap: .9rem; }
    & .office > div { font-size: var(--step--1); }
    & .office strong { font-size: var(--step-0); }
    & .office-icon { width: 2.6rem; height: 2.6rem; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); color: #8fd3aa; }
  }

  /* questions & answers: white cards on light green, balanced columns */
  .pea-faq-section { background: linear-gradient(180deg, #eaf5ee, #f3f9f5); }
  .pea-faq { columns: 2 440px; column-gap: clamp(1rem, .7rem + 1.2vw, 1.75rem); }
  .pea-faq-item {
    break-inside: avoid; margin-block-end: clamp(1rem, .7rem + 1.2vw, 1.75rem);
    padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    border-radius: var(--radius-lg); background: #fff; border: 1px solid #d5e9dc; box-shadow: var(--shadow-sm);
    & h2 { font-size: var(--step-2); margin-block-end: .85rem; }
    & .prose { max-width: none; }
  }

  /* areas served (map tint from the filter in pea/layout) */
  .pea-regions { display: grid; gap: clamp(1rem, .7rem + 1.2vw, 1.75rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
  .pea-region {
    --tone: var(--blue-600); --tone-ink: var(--blue-800); --tone-bg: var(--blue-100);
    position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
    border-radius: var(--radius-lg); background: var(--surface); border: 1px solid color-mix(in srgb, var(--tone) 25%, var(--line));
    box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
    &:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
    & h2 { font-size: var(--step-2); margin-block-end: .6rem; }
    & h2 a { color: var(--tone-ink); text-decoration: none; }
    /* the whole card is the link's target area */
    & h2 a::after { content: ""; position: absolute; inset: 0; }
    &:hover h2 a { color: var(--tone); }
    & .prose { max-width: none; }
  }
  .pea-region-map {
    background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--tone-bg) 35%, #fff), var(--tone-bg));
    & img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; padding: 1rem; }
  }
  .pea-region-map img { filter: url(#tint-blue) drop-shadow(0 8px 10px rgb(15 36 64 / .18)); }
  .pea-region-body { padding: 1.35rem 1.5rem 1.6rem; }

  /* OpenStreetMap embeds */
  .pea-maps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
  .pea-map {
    margin: 0;
    & .map-frame { display: block; aspect-ratio: 16 / 8; border: 1px solid var(--line); }
    & figcaption { display: flex; gap: .4rem; align-items: center; margin-block-start: .6rem; font-weight: 600; color: var(--ink); & .icon { color: var(--green-500); } }
  }
  @media (max-width: 600px) { .pea-map .map-frame { aspect-ratio: 4 / 3; } }

  .btn-light { background: #fff; border-color: #fff; color: #23704a; &:hover { background: var(--green-100); border-color: var(--green-100); color: #1e5a38; } }
  .notice[data-warn] { background: #fff4e0; color: #8a5300; }
}

/* ------------------------------------------------------------ mobile navigation */

@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    /* absolute, not fixed: the header's backdrop-filter makes it the containing block anyway */
    display: none; position: absolute; inset-block-start: 100%; inset-inline: 0; height: calc(100dvh - var(--header-h)); z-index: 49; background: var(--surface);
    flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem var(--gutter) 2rem; overflow-y: auto;
    border-top: 1px solid var(--line);
    &[data-open] { display: flex; }
  }
  .nav-list {
    flex-direction: column; align-items: stretch; margin: 0;
    & > li > a, & > li > details > summary { padding: .9rem .5rem; font-size: 1.05rem; justify-content: space-between; border-bottom: 1px solid var(--line); border-radius: 0; }
  }
  .dropdown { position: static; box-shadow: none; border: 0; padding: .25rem 0 .75rem .75rem; min-width: 0; width: auto; }
  .dropdown-mega { grid-template-columns: 1fr; translate: none; }
  .nav-extra { flex-wrap: wrap; justify-content: space-between; }
  .lang-switch .dropdown { position: absolute; inset-block: auto 100%; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
  body:has(.site-nav[data-open]) { overflow: hidden; }
}

/* ------------------------------------------------------------ motion */

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

@media print {
  .site-header, .site-footer, .announce, .gallery-more, .aside-card .actions, .iprop-consent-reopen { display: none !important; }
  .property-layout { grid-template-columns: 1fr; }
}

@layer utilities {
  .mt-0 { margin-block-start: 0 !important; }
  .pt-0 { padding-block-start: 0 !important; }
  .muted { color: var(--muted); }
  .center { text-align: center; }
}
