:root {
  --sky-blue: #0ba3d9;
  --sky-blue-dark: #0577a6;
  --sky-red: #d80f1e;
  --ink: #17212b;
  --muted: #667085;
  --line: #d9e2ea;
  --soft: #f4f8fb;
  --paper: #ffffff;
  --dark: #0c2536;
  --shadow: 0 18px 48px rgba(15, 35, 52, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  padding: 0 5vw;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(15, 35, 52, 0.06);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.brand img {
  width: 132px;
  height: 58px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.02;
}

.brand strong { color: var(--dark); }

.brand small {
  margin-top: 5px;
  color: var(--sky-red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  color: #344054;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 30px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 3px;
  background: var(--sky-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.nav-cta,
.hero-search button,
.mini-search button,
.cta-band a,
.drawer-actions a:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: #fff;
  background: var(--sky-blue);
  border: 0;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(11, 163, 217, 0.22);
  font-weight: 900;
  cursor: pointer;
}

.nav-cta:hover,
.hero-search button:hover,
.mini-search button:hover,
.cta-band a:hover {
  background: var(--sky-blue-dark);
}

.premium-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 480px);
  gap: 50px;
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: 74px 5vw 64px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 52%, rgba(255, 255, 255, 0.58) 100%),
    url("assets/gallery/borrowdale-03.png");
  background-position: center;
  background-size: cover;
}

.premium-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 9px;
  background: linear-gradient(90deg, var(--sky-blue), var(--sky-red));
}

.hero-grid { display: none; }

.hero-content,
.hero-showcase {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sky-red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 920px;
  margin-bottom: 18px;
  color: var(--dark);
  font-size: clamp(3rem, 6.6vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  color: var(--dark);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
}

.hero-content p:not(.eyebrow),
.lead {
  color: #465667;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-search,
.mini-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(760px, 100%);
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-search input,
.mini-search input,
.filter-bar select {
  min-width: 0;
  height: 52px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 6px;
  outline: 0;
}

.hero-search input:focus,
.mini-search input:focus,
.filter-bar select:focus {
  border-color: var(--sky-blue);
  box-shadow: 0 0 0 4px rgba(11, 163, 217, 0.12);
}

.hero-showcase {
  align-self: stretch;
  display: grid;
  align-content: end;
  min-height: 520px;
}

.hero-showcase img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  border: 8px solid #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.showcase-card {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  padding: 18px;
  color: #fff;
  background: rgba(12, 37, 54, 0.92);
  border-left: 5px solid var(--sky-red);
  border-radius: 8px;
}

.showcase-card span,
.showcase-card small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
}

.showcase-card strong {
  display: block;
  margin: 6px 0;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: #fff;
}

.insight-strip div {
  min-height: 118px;
  padding: 26px 5vw;
  border-right: 1px solid var(--line);
}

.insight-strip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--sky-blue);
  font-size: 1.45rem;
}

.insight-strip span {
  color: var(--muted);
}

.section {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 82px 0;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}

.text-link {
  color: var(--sky-blue);
  font-weight: 900;
}

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

.property-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 35, 52, 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(15, 35, 52, 0.16);
}

.gallery-strip {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #eef3f7;
}

.gallery-strip::-webkit-scrollbar { display: none; }

.gallery-strip img {
  width: 100%;
  aspect-ratio: 16 / 10.8;
  object-fit: cover;
  scroll-snap-align: start;
  cursor: zoom-in;
  display: block;
}

.photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fff;
  background: var(--sky-red);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.property-body {
  padding: 20px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.price {
  color: var(--dark);
  font-size: 1.55rem;
  font-weight: 900;
}

.tag {
  padding: 7px 10px;
  color: #fff;
  background: var(--sky-blue);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.property-body h3 {
  margin: 10px 0 7px;
  color: var(--dark);
}

.location {
  color: var(--muted);
  line-height: 1.5;
}

.details-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.details-list li {
  color: #334155;
  line-height: 1.45;
}

.details-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  background: var(--sky-red);
  border-radius: 50%;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.facts span {
  padding: 7px 9px;
  color: var(--dark);
  background: #eef7fb;
  border: 1px solid #d7edf7;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.card-actions,
.drawer-actions,
.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-actions a,
.card-actions button,
.drawer-actions a,
.contact-actions a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 900;
}

.card-actions a,
.contact-actions a:nth-child(4) {
  color: #fff;
  background: var(--sky-blue);
}

.card-actions button,
.drawer-actions a:nth-child(2),
.contact-actions a {
  color: var(--sky-blue);
  background: #fff;
  border: 1px solid var(--sky-blue);
  cursor: pointer;
}

.card-actions button:hover,
.contact-actions a:hover {
  background: #eff9fd;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 72px 5vw;
  background: linear-gradient(135deg, var(--dark), #123e58);
  border-top: 5px solid var(--sky-red);
}

.cta-band h2 {
  margin: 0;
  color: #fff;
}

.cta-band .eyebrow { color: #fff; }

.listings-shell {
  display: grid;
  grid-template-columns: minmax(340px, 38vw) 1fr;
  min-height: calc(100vh - 82px);
  background: var(--soft);
}

.map-panel {
  position: sticky;
  top: 82px;
  height: calc(100vh - 82px);
  padding: 18px;
  overflow: auto;
  background: #eaf4f9;
  border-right: 1px solid var(--line);
}

.map-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(11, 163, 217, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(11, 163, 217, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #dff4fb 0%, #f8fbfd 55%, #f6e7e8 100%);
  background-size: 58px 58px, 58px 58px, cover;
  border: 1px solid #c8e2ee;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scan-line { display: none; }

.map-toolbar,
.agency-panel {
  position: relative;
  z-index: 4;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  color: var(--dark);
  box-shadow: 0 12px 28px rgba(15, 35, 52, 0.1);
}

.pin {
  position: absolute;
  z-index: 5;
  min-height: 36px;
  padding: 0 13px;
  color: #fff;
  background: var(--sky-blue);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(15, 35, 52, 0.2);
  font-weight: 900;
  cursor: pointer;
}

.pin-one { left: 20%; top: 28%; }
.pin-two { right: 18%; top: 39%; }
.pin-three { left: 26%; bottom: 24%; background: var(--sky-red); }
.pin-four { right: 14%; bottom: 18%; background: var(--dark); }

.map-roads::before,
.map-roads::after {
  content: "";
  position: absolute;
  width: 130%;
  height: 18px;
  background: rgba(11, 163, 217, 0.18);
  transform-origin: center;
}

.map-roads::before { left: -20%; top: 45%; transform: rotate(-18deg); }
.map-roads::after { left: -10%; top: 66%; transform: rotate(20deg); }

.agency-panel {
  margin-top: 16px;
  color: var(--dark);
}

.agency-panel p,
.contact-card p,
.service-matrix p {
  color: var(--muted);
  line-height: 1.6;
}

.agency-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agency-actions a {
  padding: 8px 10px;
  color: var(--sky-blue);
  background: #eef8fd;
  border: 1px solid #d4edf7;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.listing-workspace {
  padding: 28px;
}

.workspace-top {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.workspace-top h1,
.page-hero h1,
.contact-page h1 {
  color: var(--dark);
  font-size: clamp(2.5rem, 5vw, 4.4rem);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.filter,
.outline-filter {
  min-height: 44px;
  padding: 0 16px;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.filter.active {
  color: #fff;
  background: var(--sky-red);
  border-color: var(--sky-red);
}

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--muted);
}

.result-line strong { color: var(--sky-blue); }

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: min(560px, 100%);
  height: 100vh;
  padding: 18px;
  color: var(--ink);
  background: #fff;
  border-left: 5px solid var(--sky-blue);
  box-shadow: -24px 0 80px rgba(15, 35, 52, 0.18);
  transform: translateX(105%);
  transition: transform 180ms ease;
  overflow: auto;
}

.detail-drawer.open { transform: translateX(0); }

.drawer-close,
.modal-close {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  width: 42px;
  height: 42px;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.drawer-gallery {
  margin-top: 48px;
}

.drawer-gallery img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
}

.drawer-price {
  margin-top: 18px;
  color: var(--sky-blue);
  font-size: 1.55rem;
  font-weight: 900;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(12, 37, 54, 0.9);
}

.gallery-modal.open { display: grid; }

.gallery-modal img {
  max-width: min(980px, 86vw);
  max-height: 78vh;
  object-fit: contain;
  border: 8px solid #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: fixed;
  right: 24px;
  top: 24px;
  float: none;
}

.gallery-arrow {
  position: fixed;
  top: 50%;
  width: 62px;
  height: 44px;
  color: #fff;
  background: var(--sky-blue);
  border: 0;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.gallery-arrow.previous { left: 24px; }
.gallery-arrow.next { right: 24px; }

#modalCaption {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 16px;
  color: #fff;
  text-align: center;
}

.page-hero,
.contact-page {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 90px 0 54px;
}

.service-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-matrix article,
.contact-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--sky-blue);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 35, 52, 0.08);
}

.service-matrix span {
  color: var(--sky-red);
  font-weight: 900;
}

.contact-page {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 430px);
  gap: 44px;
  align-items: start;
}

.contact-card img {
  width: 100%;
  margin-bottom: 18px;
  border-radius: 8px;
}

.contact-actions.big {
  margin-top: 24px;
}

@media (max-width: 1000px) {
  .site-header,
  .premium-hero,
  .listings-shell,
  .workspace-top,
  .split-section,
  .contact-page {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: start;
    overflow-x: auto;
  }

  .map-panel {
    position: relative;
    top: auto;
    height: auto;
    order: 2;
  }

  .listing-workspace {
    order: 1;
  }

  .insight-strip,
  .service-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-block: 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 116px;
  }

  .premium-hero {
    min-height: auto;
    padding-top: 54px;
  }

  .hero-search,
  .mini-search,
  .featured-grid,
  .listing-grid,
  .insight-strip,
  .service-matrix,
  .card-actions,
  .drawer-actions,
  .contact-actions,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .cta-band {
    display: grid;
  }

  .hero-showcase {
    min-height: auto;
  }

  .hero-showcase img {
    min-height: 320px;
  }

  .listing-workspace {
    padding: 18px;
  }

  .gallery-arrow {
    top: auto;
    bottom: 70px;
  }
}
