:root {
  --yellow: #fff200;
  --yellow-soft: #fff9a8;
  --black: #111111;
  --anthracite: #2a2d2f;
  --gray: #737373;
  --line: #e6e6e6;
  --paper: #f7f7f4;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(17, 17, 17, 0.1);
  --soft-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.dialog-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 64px;
  padding: 7px clamp(16px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 60px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  object-position: center;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: var(--anthracite);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  padding: 10px 12px;
  color: var(--black);
  background: var(--yellow);
  border: 1px solid var(--black);
  border-radius: 6px;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-yellow {
  background-color: var(--yellow);
  color: #000;
  border: 1px solid var(--yellow);
}

.btn-black {
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
}

.btn-white {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
}

.button:hover {
  transform: translateY(-1px);
}

.primary,
.whatsapp {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
}

.dark {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.outline {
  color: var(--black);
  background: var(--white);
  border-color: var(--black);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(42px, 7vw, 72px) clamp(16px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(255, 242, 0, 0.18), rgba(255, 255, 255, 0)),
    var(--white);
}

.label {
  margin: 0 0 10px;
  color: var(--anthracite);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-text > p:not(.label),
.section-heading p,
.contact-section p,
.property-card p,
.detail-main p {
  color: var(--gray);
}

.hero-text > p:not(.label) {
  max-width: 680px;
  margin: 20px 0 0;
  font-size: 1.12rem;
}

.hero-actions,
.contact-actions,
.card-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-logo {
  display: block;
  width: min(100%, 210px);
  height: auto;
  max-height: 190px;
  object-fit: contain;
  object-position: center;
  justify-self: center;
  border-radius: 6px;
}

.hero-profile {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hero-profile img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
}

.hero-card strong,
.hero-card span {
  display: block;
}

.hero-card span {
  color: var(--gray);
  font-size: 0.9rem;
}

.section,
.contact-section {
  padding: clamp(54px, 8vw, 92px) clamp(16px, 5vw, 72px);
}

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

.filters {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(180px, 260px) minmax(180px, 260px);
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-chip {
  min-height: 44px;
  padding: 10px 16px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.is-active {
  background: var(--yellow);
  border-color: var(--black);
}

label {
  display: grid;
  gap: 6px;
  color: var(--anthracite);
  font-size: 0.82rem;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.results-meta {
  min-height: 24px;
  margin: 0 0 14px;
  color: var(--gray);
  font-weight: 700;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1120px;
}

.property-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
}

.property-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: #dddddd;
  background-position: center;
  background-size: cover;
}

.status {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: var(--black);
  background: var(--yellow);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.reference {
  color: var(--anthracite);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.property-body {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 10px;
  padding: 18px;
}

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

.property-facts,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.property-facts li,
.detail-facts li {
  padding: 6px 9px;
  color: var(--anthracite);
  background: #f0f0ec;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.property-card p {
  margin: 0;
}

.card-actions {
  margin-top: 2px;
  align-self: end;
}

.card-actions .button {
  flex: 1 1 150px;
  min-width: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  align-items: center;
  gap: 26px;
  padding-top: clamp(34px, 5vw, 52px);
  padding-bottom: clamp(34px, 5vw, 52px);
  color: var(--black);
  background: linear-gradient(90deg, rgba(255, 242, 0, 0.16), rgba(255, 255, 255, 0.94));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-section h2,
.contact-section p {
  color: var(--black);
}

.contact-section > div:first-child {
  max-width: 680px;
}

.contact-section p {
  margin-bottom: 0;
  color: var(--gray);
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-content: stretch;
  position: relative;
  z-index: 1;
}

.contact-actions .button {
  min-width: 0;
  white-space: nowrap;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px clamp(16px, 5vw, 72px);
  background: var(--black);
  color: var(--white);
}

.site-footer img {
  width: 52px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: center;
}

.site-footer strong,
.site-footer span,
.footer-contact a {
  display: block;
}

.site-footer span,
.footer-contact {
  color: #d6d6d6;
}

.property-dialog {
  width: min(1040px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  background: var(--white);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.property-dialog::backdrop {
  background: rgba(17, 17, 17, 0.68);
}

.dialog-close {
  position: sticky;
  top: 10px;
  left: calc(100% - 52px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 10px 10px -52px auto;
  color: var(--black);
  background: var(--yellow);
  border: 1px solid var(--black);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.detail {
  padding: 18px;
}

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 12px;
}

.gallery-main,
.gallery-thumbs div {
  background-position: center;
  background-size: cover;
  border-radius: 8px;
}

.gallery-main {
  min-height: 500px;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gallery-thumbs div {
  min-height: 244px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  margin-top: 24px;
}

.detail-main {
  display: grid;
  gap: 14px;
}

.detail-aside {
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 14px;
  padding: 16px;
  background: #f6f6f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.highlights {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.conditions {
  padding: 12px;
  margin: 0;
  color: var(--anthracite);
  background: var(--yellow-soft);
  border-radius: 6px;
  font-weight: 700;
}

.availability {
  display: inline-flex;
  width: fit-content;
  padding: 8px 10px;
  color: var(--black);
  background: var(--yellow);
  border-radius: 999px;
  font-weight: 900;
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: auto auto auto;
  }

  .main-nav {
    justify-content: end;
  }

  .hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 280px;
  }

  .filters {
    grid-template-columns: repeat(3, 1fr);
  }

  .filters label {
    grid-column: span 3;
  }

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

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .brand img {
    width: 52px;
    height: auto;
    max-height: 52px;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .header-whatsapp {
    display: inline-flex;
    min-height: 42px;
    padding: 10px 13px;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 10px;
  }

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

  .contact-actions .btn,
  .hero-actions .button {
    width: 100%;
  }

  .contact-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

@media (max-width: 560px) {
  .filters,
  .property-grid {
    grid-template-columns: 1fr;
  }

  .filters label {
    grid-column: auto;
  }

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

  .gallery-main {
    min-height: 300px;
  }

  .gallery-thumbs {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-thumbs div {
    min-height: 230px;
  }

  .detail {
    padding: 12px;
  }

  .detail-aside {
    position: static;
  }
}
