:root {
  --bg: #0f1e2a;
  --bg-soft: #0f2737;
  --surface: #122c40;
  --text: #f8f9fb;
  --muted: #b8c6d6;
  --gold: #d4af37;
  --gold-soft: #bf9430;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 2.5rem));
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section-light {
  background: #0b1d2a;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
}

p {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: #111;
}

.btn-gold:hover {
  background: var(--gold-soft);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 23, 35, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 152px;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.logo-img {
  width: auto;
  height: 108px;
  max-width: min(480px, calc(100vw - 8rem));
  min-width: 150px;
  aspect-ratio: 1536 / 1024;
  display: block;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.35));
}

.site-footer .logo-img {
  height: 128px;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.3));
}

.nav-menu {
  position: fixed;
  inset: 152px 0 auto 0;
  background: var(--bg-soft);
  padding: 1.2rem;
  display: none;
  flex-direction: column;
  gap: 0.9rem;
}

.nav-menu a {
  color: #fff;
  font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--gold);
}

.menu-toggle {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  padding: 0.45rem 0.65rem;
  border-radius: 9px;
}

.header-cta {
  display: none;
}

.nav-menu.open {
  display: flex;
}

/* Hero */
.hero {
  min-height: 72vh;
  display: grid;
  place-items: center;
  background: linear-gradient(rgba(15, 30, 42, 0.62), rgba(15, 30, 42, 0.9)),
    url("../img/hero-madrid.svg") center/cover no-repeat;
}

.page-hero {
  min-height: 42vh;
  display: grid;
  place-items: center;
  background: linear-gradient(rgba(15, 30, 42, 0.66), rgba(15, 30, 42, 0.96)),
    url("../img/hero-madrid.svg") center/cover no-repeat;
}

.hero-content {
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 0.7rem;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  font-size: 1.1rem;
}

.property-card {
  overflow: hidden;
  padding: 0;
}

.property-card img {
  height: 190px;
  width: 100%;
  object-fit: cover;
}

.property-body {
  padding: 1rem 1.1rem 1.2rem;
}

.price {
  color: var(--gold);
  font-weight: 700;
  margin: 0.45rem 0;
}

.testimonial {
  font-style: italic;
}

.cta-box {
  background: linear-gradient(130deg, #0f2538, #17354f);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(212, 175, 55, 0.34);
}

form {
  display: grid;
  gap: 0.8rem;
}

input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font: inherit;
  padding: 0.8rem 0.9rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #96a6b3;
}

.split {
  display: grid;
  gap: 1.4rem;
}

/* Blog */
.post-list a {
  color: #fff;
}

.post-list a:hover {
  color: var(--gold);
}

/* Footer */
.site-footer {
  background: #07121c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.4rem 0;
}

/* ===== Premium Lead UI (rediseño) ===== */
.section-tight {
  padding: 3.4rem 0;
}

.section-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
}

.subtle {
  margin: 0;
  color: var(--muted);
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cards-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Misma rejilla con más tarjetas (servicios ampliados) */
.cards-services .service-card {
  min-height: 158px;
}

.service-card {
  border-radius: 18px;
  padding: 1.2rem 1.15rem;
  background: rgba(18, 44, 64, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(18, 44, 64, 0.55);
}

.service-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.service-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.service-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.emphasis-card {
  border-radius: 22px;
  padding: 1.35rem;
  background: linear-gradient(140deg, rgba(212, 175, 55, 0.16), rgba(18, 44, 64, 0.42));
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow);
}

.emphasis-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}

.emphasis-number {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
  line-height: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stat-card {
  border-radius: 18px;
  padding: 1.1rem;
  background: rgba(18, 44, 64, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.stat-card .num {
  color: var(--gold);
  font-size: clamp(1.8rem, 4.2vw, 2.5rem);
  font-weight: 800;
}

.stat-card .label {
  margin-top: 0.35rem;
  color: var(--muted);
  font-weight: 600;
}

.cta-final {
  border-radius: 22px;
  padding: 1.6rem;
  background: linear-gradient(130deg, rgba(212, 175, 55, 0.14), rgba(15, 30, 42, 0.1));
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.cta-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}

.form-card {
  border-radius: 18px;
  padding: 1rem;
  background: rgba(18, 44, 64, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.form-card input,
.form-card textarea {
  background: rgba(255, 255, 255, 0.03);
}

.recomend-hide {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.redesign-hide {
  display: none !important;
}

.whatsapp-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 110;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow);
  text-decoration: none;
}

@media (min-width: 860px) {
  .cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .lead-grid {
    grid-template-columns: 1fr 1fr;
  }
  .emphasis-row {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cta-actions {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }
}

.footer-grid {
  display: grid;
  gap: 1.4rem;
}

.footer-links a {
  display: block;
  color: #d2d9df;
  margin-bottom: 0.35rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.legal {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #9ba8b2;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 110;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero con imagen fotográfica */
.hero.hero--photo {
  background: linear-gradient(rgba(15, 30, 42, 0.72), rgba(15, 30, 42, 0.88)),
    url("https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=2000&q=80") center/cover no-repeat;
}

/* Intro narrativa */
.intro-block {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.intro-block p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
}

.intro-block--compact p {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

/* Home: compradores */
.block-buyers {
  border-radius: 22px;
  padding: 1.5rem 1.35rem;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.14), rgba(18, 44, 64, 0.45));
  border: 1px solid rgba(212, 175, 55, 0.32);
  box-shadow: var(--shadow);
}

/* Referidos destacado */
.referidos-showcase {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 0.5rem 0 1rem;
}

.mega-number {
  font-size: clamp(3.25rem, 14vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1;
  margin: 0.35rem 0 0.75rem;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.coliving-teaser {
  border-radius: 22px;
  padding: 1.45rem 1.25rem;
  background: rgba(18, 44, 64, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 720px;
  margin: 0 auto;
}

.trust-pillars {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.25rem;
}

.trust-pillar {
  border-radius: 18px;
  padding: 1.15rem 1.1rem;
  background: rgba(18, 44, 64, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.25s ease;
}

.trust-pillar:hover {
  border-color: rgba(212, 175, 55, 0.35);
}

.trust-pillar-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
}

.colab-banner {
  border-radius: 22px;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(140deg, rgba(212, 175, 55, 0.16), rgba(18, 44, 64, 0.42));
  border: 1px solid rgba(212, 175, 55, 0.28);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.colab-banner .section-title {
  margin-bottom: 0.5rem;
}

@media (min-width: 860px) {
  .trust-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Slider testimonios */
.testimonial-slider {
  position: relative;
  margin-top: 1.75rem;
  min-height: 200px;
}

.slider-track {
  position: relative;
  min-height: 200px;
}

.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease;
  pointer-events: none;
}

.slider-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.slider-slide .stars {
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
  font-size: 1rem;
}

.slider-dots {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.slider-dots button[aria-current="true"] {
  background: var(--gold);
  transform: scale(1.15);
}

/* Buscador propiedades */
.filter-bar {
  border-radius: 18px;
  padding: 1.1rem 1rem;
  background: rgba(18, 44, 64, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

.filter-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.filter-grid label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: inherit;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
}

select:focus {
  outline: 2px solid rgba(212, 175, 55, 0.45);
  outline-offset: 1px;
}

.properties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.property-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.property-card-link:hover h3 {
  color: var(--gold);
}

.property-card-link .btn {
  pointer-events: none;
}

/* Ficha propiedad */
.propiedad-gallery {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  grid-template-columns: 1fr;
}

.propiedad-gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.propiedad-gallery-item img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.propiedad-page .cta-actions {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .properties-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .propiedad-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .properties-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .nav-wrap {
    min-height: 168px;
  }

  .logo-img {
    height: 136px;
  }

  .site-footer .logo-img {
    height: 156px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    background: transparent;
    padding: 0;
    align-items: center;
  }

  .header-cta {
    display: inline-flex;
  }

  .split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}
