:root {
  color-scheme: light;
  --ink: #062b4f;
  --muted: #5f7288;
  --paper: #f4f8fc;
  --surface: #ffffff;
  --line: #dbe7f2;
  --brand: #07598f;
  --brand-dark: #062f56;
  --brand-soft: #eaf4fb;
  --red: #d71920;
  --cyan: #1fb9de;
  --shadow: 0 18px 52px rgba(6, 47, 86, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 185, 222, 0.12), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, #eef6fb 48%, #ffffff 100%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.section {
  padding: clamp(26px, 5vw, 58px) clamp(16px, 4vw, 54px) 68px;
}

.listings-section {
  min-height: 100vh;
}

.rental-topbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  max-width: 1320px;
  margin: 0 auto 26px;
  padding: clamp(12px, 2vw, 20px) clamp(16px, 2.5vw, 26px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 54px rgba(6, 47, 86, 0.12);
  backdrop-filter: blur(14px);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-link img {
  width: clamp(92px, 10vw, 132px);
  height: auto;
  object-fit: contain;
  display: block;
}

.topbar-title .eyebrow {
  margin-bottom: 8px;
  color: var(--red);
}

.topbar-title h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(31px, 3.6vw, 52px);
  line-height: 0.95;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-menu {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: flex-end;
  align-self: end;
  gap: 12px;
  padding-bottom: 8px;
  white-space: nowrap;
}

.header-menu a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  color: var(--brand-dark);
  background: white;
  border: 1px solid #b8d3ea;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(6, 47, 86, 0.07);
}

.header-menu .phone-action {
  grid-column: 1 / -1;
  justify-self: end;
  color: var(--brand-dark);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  font-size: 18px;
  padding-right: 0;
}

.header-menu .apply-action {
  color: white;
  border-color: var(--brand);
  background: linear-gradient(135deg, #0b6ca6, var(--brand-dark));
  box-shadow: 0 12px 24px rgba(6, 89, 143, 0.18);
}

.header-menu a:hover {
  transform: translateY(-1px);
}

.topbar-actions a,
.topbar-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  color: var(--brand-dark);
  background: white;
  border: 1px solid #b8d3ea;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.topbar-actions .topbar-call {
  color: white;
  border-color: var(--brand);
  background: linear-gradient(135deg, #0868a8, var(--brand-dark));
  box-shadow: 0 13px 26px rgba(6, 89, 143, 0.22);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.filters {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1.55fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(150px, 0.8fr) minmax(160px, 0.9fr) minmax(120px, 0.55fr);
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto 24px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 52px rgba(6, 47, 86, 0.17);
}

.filters label {
  display: grid;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
}

.filters input,
.filters select {
  min-height: 48px;
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
  background: #f1f6fb;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filters input:focus,
.filters select:focus {
  background: #ffffff;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(31, 185, 222, 0.14);
}

.search-button {
  align-self: end;
  min-height: 48px;
  padding: 0 22px;
  color: white;
  background: linear-gradient(135deg, #0b6ca6, var(--brand-dark));
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(6, 89, 143, 0.22);
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto 24px;
  padding: 0 clamp(18px, 2vw, 0px);
  color: var(--muted);
  font-size: 14px;
}

.result-bar span:first-child {
  color: var(--brand-dark);
  font-size: 26px;
  font-weight: 900;
}

.sync-note {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 14px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
}

.listing-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:focus-visible {
  outline: 4px solid rgba(31, 185, 222, 0.35);
  outline-offset: 4px;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 62px rgba(6, 47, 86, 0.18);
}

.listing-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dfe8f1;
}

.listing-image::before {
  content: "CPM";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(6, 47, 86, 0.18);
  font-size: 54px;
  font-weight: 900;
}

.card-slider {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.card-slider::-webkit-scrollbar {
  display: none;
}

.listing-image img,
.card-slider img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  scroll-snap-align: start;
  transition: transform 0.28s ease;
}

.listing-card:hover .listing-image img {
  transform: scale(1.035);
}

.slide-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(6, 47, 86, 0.2);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 24px;
  line-height: 1;
}

.slide-control.prev {
  left: 14px;
}

.slide-control.next {
  right: 14px;
}

.photo-count {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 12px;
  padding: 8px 11px;
  color: white;
  background: rgba(6, 89, 143, 0.94);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.status {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 8px 11px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.listing-body {
  padding: 22px;
}

.price {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 900;
}

.listing-title {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: clamp(25px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: 0;
}

.address {
  min-height: 42px;
  margin: 0 0 18px;
  color: #315a7d;
  line-height: 1.45;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
}

.facts div:last-child {
  border-right: 0;
}

.facts span {
  color: var(--brand);
  font-size: 18px;
}

.facts strong {
  display: block;
  color: var(--brand-dark);
  font-size: 13px;
}

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

.feature {
  padding: 7px 9px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid rgba(6, 89, 143, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-actions {
  display: flex;
  margin-top: 18px;
}

.details-link {
  width: 100%;
  min-height: 48px;
  color: white;
  background: linear-gradient(135deg, #0b6ca6, var(--brand-dark));
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(6, 89, 143, 0.18);
}

.empty-state {
  max-width: 1320px;
  margin: 24px auto 0;
  padding: 24px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 40px;
  align-items: center;
  padding: 62px clamp(20px, 5vw, 72px);
  color: white;
  background: linear-gradient(135deg, rgba(6, 47, 86, 0.98), rgba(6, 89, 143, 0.92));
}

.contact-section .eyebrow,
.contact-section h2 {
  color: white;
}

.contact-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.contact-section p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.18);
}

.contact-card a,
.contact-card span {
  display: block;
  padding: 15px;
  color: var(--brand-dark);
  background: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: white;
  border-top: 1px solid var(--line);
}

.site-footer a {
  text-decoration: none;
  font-weight: 900;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: clamp(10px, 3vw, 28px);
}

.detail-modal.open {
  display: grid;
  place-items: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 31, 0.72);
  backdrop-filter: blur(8px);
}

.detail-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: min(900px, 92vh);
  overflow: auto;
  background: white;
  border-radius: 18px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.detail-close {
  position: sticky;
  top: 14px;
  float: right;
  z-index: 5;
  width: 42px;
  height: 42px;
  margin: 14px 14px -56px 0;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(6, 47, 86, 0.16);
}

#detailContent {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  gap: 0;
}

.detail-gallery {
  padding: 18px;
  background: #edf3f8;
}

.empty-gallery {
  min-height: 380px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.detail-main-photo {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #dfe8f1;
  border-radius: 14px;
}

.detail-main-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

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

.detail-thumbs button {
  display: grid;
  gap: 6px;
  padding: 6px;
  color: var(--muted);
  background: white;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.detail-thumbs button.active {
  color: var(--brand-dark);
  border-color: var(--cyan);
}

.detail-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
}

.detail-content {
  padding: clamp(24px, 4vw, 42px);
}

.detail-content h2 {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.detail-price {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.detail-address {
  margin: 8px 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.detail-summary,
.detail-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-summary h3,
.detail-block h3 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 20px;
}

.detail-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.detail-grid div {
  padding: 12px;
  background: var(--paper);
  border-radius: 10px;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.top-detail-actions {
  margin-top: 18px;
  margin-bottom: 24px;
}

.detail-actions a {
  flex: 1;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
}

.detail-actions a:first-child {
  color: white;
  background: linear-gradient(135deg, #0b6ca6, var(--brand-dark));
}

.detail-actions a:not(:first-child) {
  color: var(--brand-dark);
  background: #eef4fa;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  padding: clamp(16px, 4vw, 32px);
}

.contact-modal.open {
  display: grid;
  place-items: center;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 31, 0.72);
  backdrop-filter: blur(8px);
}

.contact-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 38px);
  background: white;
  border-radius: 18px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.contact-panel h2 {
  margin: 0 0 20px;
  color: var(--brand-dark);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.08;
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  color: var(--brand-dark);
  background: #f2f7fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.contact-options {
  display: grid;
  gap: 12px;
}

.contact-options a {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 16px;
  color: var(--brand-dark);
  background: #eef4fa;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
}

.contact-options .primary-option {
  color: white;
  background: linear-gradient(135deg, #0b6ca6, var(--brand-dark));
}

@media (max-width: 1180px) {
  .rental-topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar-actions,
  .header-menu {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .filters {
    grid-template-columns: 1fr 1fr 1fr;
    margin-left: 18px;
    margin-right: 18px;
  }

  .listing-grid,
  .result-bar {
    margin-left: 18px;
    margin-right: 18px;
  }
}

@media (max-width: 920px) {
  .rental-topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .topbar-title h1 {
    font-size: clamp(36px, 9vw, 58px);
  }

  .topbar-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-menu {
    width: 100%;
    justify-content: center;
    grid-template-columns: 1fr;
  }

  .header-menu .phone-action {
    justify-self: center;
    padding-right: 16px;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #detailContent {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .logo-link {
    display: grid;
    justify-items: center;
  }

  .topbar-actions {
    display: grid;
  }

  .topbar-actions a {
    width: 100%;
  }

  .filters,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .result-bar {
    display: grid;
  }

  .address {
    min-height: 0;
  }

  .facts {
    grid-template-columns: 1fr;
    border: 0;
    gap: 8px;
  }

  .facts div {
    border: 0;
    background: var(--paper);
    border-radius: 8px;
  }

  .contact-section,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-panel {
    max-height: 94vh;
  }

  .detail-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-grid,
  .detail-actions {
    grid-template-columns: 1fr;
    display: grid;
  }
}
