/* ============================================
   VALELLA INMOBILIARIA — Design System
   Elegant Real Estate Landing Page
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-white: #FFFFFF;
  --color-off-white: #FAF9F7;
  --color-beige-light: #F5F0EB;
  --color-beige: #EDE7E0;
  --color-gray-light: #E8E4E0;
  --color-gray: #B8B3AE;
  --color-gray-mid: #9A9590;
  --color-gray-dark: #5A5652;
  --color-charcoal: #3D3A37;
  --color-black: #1A1816;
  --color-accent: #C4A87C;
  --color-accent-dark: #A8905F;
  --color-accent-light: #D9C9A8;
  --color-success: #25D366;
  /* WhatsApp green */

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 900px;
  --navbar-height: 80px;
  --border-radius: 8px;
  --border-radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-black);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
}

h4 {
  font-size: 1.2rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-gray-dark);
}

.text-accent {
  color: var(--color-accent);
}

.text-center {
  text-align: center;
}

/* ---------- Section Label ---------- */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.section-title {
  margin-bottom: var(--space-lg);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-gray-mid);
  max-width: 600px;
  line-height: 1.8;
}

.section-subtitle.centered {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--beige {
  background-color: var(--color-beige-light);
}

.section--dark {
  background-color: var(--color-charcoal);
}

.section--dark h2,
.section--dark h3,
.section--dark p,
.section--dark .section-label {
  color: var(--color-white);
}

.section--dark .section-subtitle {
  color: var(--color-gray);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: var(--border-radius);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-gray-light);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--white {
  background-color: var(--color-white);
  color: var(--color-charcoal);
}

.btn--white:hover {
  background-color: var(--color-beige-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--whatsapp {
  background-color: var(--color-success);
  color: var(--color-white);
}

.btn--whatsapp:hover {
  background-color: #1EBE57;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1rem;
}

.btn--sm {
  padding: 10px 22px;
  font-size: 0.82rem;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1000;
  transition: all var(--transition-normal);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.navbar__logo {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 2px;
  transition: color var(--transition-normal);
}

.navbar.scrolled .navbar__logo {
  color: var(--color-black);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar__link {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__link:hover {
  color: var(--color-white);
}

.navbar.scrolled .navbar__link {
  color: var(--color-gray-dark);
}

.navbar.scrolled .navbar__link:hover {
  color: var(--color-black);
}

.navbar__cta {
  margin-left: var(--space-md);
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  transition: all var(--transition-normal);
  border-radius: 2px;
}

.navbar.scrolled .navbar__hamburger span {
  background-color: var(--color-charcoal);
}

.navbar__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--color-charcoal);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  transition: transform 10s linear;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(26, 24, 22, 0.75) 0%,
      rgba(26, 24, 22, 0.4) 50%,
      rgba(26, 24, 22, 0.6) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding-top: var(--navbar-height);
}

.hero__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero__title {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  margin-bottom: var(--space-2xl);
  max-width: 520px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.7s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.9s forwards;
}

/* ---------- ABOUT / NOSOTROS ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about__image-wrapper {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.about__image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}

.about__image-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  border: 3px solid var(--color-accent);
  border-radius: var(--border-radius-lg);
  z-index: -1;
}

.about__text .section-label {
  margin-bottom: var(--space-md);
}

.about__text h2 {
  margin-bottom: var(--space-lg);
}

.about__text p {
  margin-bottom: var(--space-lg);
}

.about__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.about__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.about__feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-beige-light);
  border-radius: var(--border-radius);
  color: var(--color-accent);
  font-size: 1.2rem;
}

.about__feature h4 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.about__feature p {
  font-size: 0.85rem;
  margin-bottom: 0;
  color: var(--color-gray-mid);
}

/* ---------- PROPERTIES / PROPIEDADES ---------- */
.properties-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.property-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.property-card__image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.property-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.property-card:hover .property-card__image img {
  transform: scale(1.05);
}

.property-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  color: var(--color-white);
  background-color: var(--color-accent);
}

.property-card__badge--renta {
  background-color: var(--color-gray-dark);
}

/* Unavailable overlay */
.property-card__unavailable {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-card__unavailable span {
  background: #b91c1c;
  color: var(--color-white);
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.property-card__body {
  padding: var(--space-lg) var(--space-xl);
}

.property-card__price {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: var(--space-xs);
}

.property-card__location {
  font-size: 0.85rem;
  color: var(--color-gray-mid);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.property-card__location svg {
  flex-shrink: 0;
}

.property-card__details {
  display: flex;
  gap: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-gray-light);
}

.property-card__detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-gray-mid);
}

.property-card__detail svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

.properties-cta {
  text-align: center;
  margin-top: var(--space-3xl);
}

/* ---------- GALLERY COLLAGE ---------- */
.gallery-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: var(--space-md);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.gallery-collage__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
}

/* First item spans 2 cols / 2 rows for visual impact */
.gallery-collage__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-collage__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.gallery-collage__item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* Gradient overlay for caption */
.gallery-collage__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
      rgba(26, 24, 22, 0.75) 0%,
      rgba(26, 24, 22, 0.15) 40%,
      transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  transition: background var(--transition-normal);
}

.gallery-collage__item:hover .gallery-collage__overlay {
  background: linear-gradient(0deg,
      rgba(26, 24, 22, 0.85) 0%,
      rgba(26, 24, 22, 0.2) 45%,
      transparent 65%);
}

.gallery-collage__caption {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transform: translateY(4px);
  transition: transform var(--transition-normal);
}

.gallery-collage__item:first-child .gallery-collage__caption {
  font-size: 1.25rem;
}

.gallery-collage__item:hover .gallery-collage__caption {
  transform: translateY(0);
}

.gallery-collage__location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition-normal) 0.05s;
}

.gallery-collage__item:first-child .gallery-collage__location {
  font-size: 0.88rem;
}

.gallery-collage__item:hover .gallery-collage__location {
  opacity: 1;
  transform: translateY(0);
}

.gallery-collage__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  color: var(--color-white);
  background-color: var(--color-accent);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.gallery-collage__badge--renta {
  background-color: var(--color-gray-dark);
}

/* ---------- SERVICES ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.service-card {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-gray-light);
  transition: all var(--transition-normal);
}

.service-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-beige-light);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: var(--space-md);
}

.service-card p {
  font-size: 0.92rem;
  color: var(--color-gray-mid);
  margin-bottom: 0;
}

/* ---------- STATS ---------- */
.stats-section {
  background: linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-black) 100%);
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 168, 124, 0.08), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.stat-item {
  padding: var(--space-xl);
}

.stat-item__number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stat-item__label {
  font-size: 0.88rem;
  color: var(--color-gray);
  letter-spacing: 0.3px;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  background-color: var(--color-beige-light);
  text-align: center;
  padding: var(--space-4xl) 0;
}

.cta-section h2 {
  margin-bottom: var(--space-md);
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  color: var(--color-gray-dark);
}

.cta-section .cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
.footer {
  background-color: var(--color-black);
  color: var(--color-gray);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}

.footer__brand p {
  font-size: 0.9rem;
  color: var(--color-gray-mid);
  margin-bottom: var(--space-lg);
  max-width: 280px;
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-gray-dark);
  color: var(--color-gray);
  transition: all var(--transition-fast);
}

.footer__social a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.footer__links li {
  margin-bottom: var(--space-sm);
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--color-gray-mid);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-accent);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  color: var(--color-gray-mid);
}

.footer__contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent);
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--color-gray-mid);
}

/* ---------- WHATSAPP FLOATING BUTTON ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-normal);
  animation: pulse-wa 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: var(--color-white);
}

.whatsapp-float__tooltip {
  position: absolute;
  right: 72px;
  background: var(--color-white);
  color: var(--color-charcoal);
  padding: 10px 16px;
  border-radius: var(--border-radius);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: all var(--transition-normal);
}

.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
  transform: translateX(0);
}

.whatsapp-float__tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--color-white);
}

/* ---------- CATALOG PAGE ---------- */
.catalog-hero {
  padding: calc(var(--navbar-height) + var(--space-3xl)) 0 var(--space-3xl);
  background: linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-black) 100%);
  text-align: center;
}

.catalog-hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.catalog-hero p {
  color: var(--color-gray);
  max-width: 500px;
  margin: 0 auto;
}

.catalog-filters {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: calc(-1 * var(--space-2xl));
  position: relative;
  z-index: 10;
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 180px;
}

.filter-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-gray-mid);
  margin-bottom: var(--space-xs);
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-gray-light);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-charcoal);
  background: var(--color-white);
  transition: border-color var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239A9590' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  padding: var(--space-3xl) 0;
}

.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-4xl) 0;
  color: var(--color-gray-mid);
}

/* ---------- PROPERTY MODAL ---------- */
.property-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: var(--space-lg);
}

.property-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.property-modal {
  position: relative;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(30px) scale(0.97);
  transition: transform var(--transition-normal);
}

.property-modal-overlay.active .property-modal {
  transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.property-modal::-webkit-scrollbar {
  width: 6px;
}

.property-modal::-webkit-scrollbar-track {
  background: transparent;
}

.property-modal::-webkit-scrollbar-thumb {
  background: var(--color-gray-light);
  border-radius: 3px;
}

/* Close button */
.property-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-white);
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.property-modal__close:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.1);
}

/* Gallery */
.property-modal__gallery {
  position: relative;
}

.property-modal__main-image {
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.property-modal__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.property-modal__thumbnails {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.property-modal__thumbnails::-webkit-scrollbar {
  height: 4px;
}

.property-modal__thumbnails::-webkit-scrollbar-thumb {
  background: var(--color-gray-light);
  border-radius: 2px;
}

.property-modal__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.property-modal__thumb:hover {
  opacity: 0.9;
}

.property-modal__thumb.active {
  border-color: var(--color-accent);
  opacity: 1;
}

/* Details */
.property-modal__details {
  padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
}

.property-modal__badge {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  color: var(--color-white);
  background-color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.property-modal__badge--renta {
  background-color: var(--color-gray-dark);
}

.property-modal__badge--unavailable {
  background-color: #b91c1c;
}

.property-modal__title {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}

.property-modal__price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.property-modal__location {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.92rem;
  color: var(--color-gray-mid);
  margin-bottom: var(--space-xl);
}

.property-modal__location svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.property-modal__specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-beige-light);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-xl);
}

.property-modal__spec {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.property-modal__spec svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.property-modal__spec-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-gray-mid);
}

.property-modal__spec-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

.property-modal__description {
  font-size: 0.95rem;
  color: var(--color-gray-dark);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
  white-space: pre-line;
}

/* Amenidades */
.property-modal__amenidades {
  margin-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray-light);
}

.property-modal__amenidades-group {
  margin-bottom: var(--space-md);
}

.property-modal__amenidades-group:last-child {
  margin-bottom: 0;
}

.property-modal__amenidades-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-gray-mid);
  margin-bottom: var(--space-sm);
}

.property-modal__amenidades-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.property-modal__amenidad-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-charcoal);
  background: var(--color-beige-light);
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.property-modal__amenidad-chip svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.property-modal__amenidad-chip:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.property-modal__amenidad-chip:hover svg {
  color: var(--color-white);
}

/* Financiamiento */
.property-modal__financiamiento {
  margin-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray-light);
}

.property-modal__financiamiento .property-modal__amenidades-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-modal__financiamiento .property-modal__amenidades-title svg {
  color: var(--color-accent);
}

.property-modal__amenidad-chip--financiamiento {
  background: rgba(37, 211, 102, 0.1);
  color: #166534;
}

.property-modal__amenidad-chip--financiamiento svg {
  color: #16a34a;
}

.property-modal__amenidad-chip--financiamiento:hover {
  background: #16a34a;
  color: var(--color-white);
}

.property-modal__amenidad-chip--financiamiento:hover svg {
  color: var(--color-white);
}

/* Modal Map */
.property-modal__map {
  margin-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray-light);
}

.property-modal__map-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: var(--space-md);
}

.property-modal__map-title svg {
  color: var(--color-accent);
}

#modalMap {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Index Map Section */
.map-section {
  background-color: var(--color-beige-light);
}

.map-section__container {
  margin-top: var(--space-2xl);
}

#indexMap {
  width: 100%;
  height: 450px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.property-modal__whatsapp {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-wa {

  0%,
  100% {
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
  }

  50% {
    box-shadow: 0 4px 28px rgba(37, 211, 102, 0.6);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {

  .properties-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    gap: var(--space-2xl);
  }

  .gallery-collage {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --navbar-height: 68px;
  }

  .container {
    padding: 0 var(--space-lg);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  /* Mobile Nav */
  .navbar__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: var(--color-white);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2xl);
    transition: right var(--transition-normal);
  }

  .navbar__links.open {
    right: 0;
  }

  .navbar__links .navbar__link {
    color: var(--color-charcoal);
    font-size: 1.1rem;
    padding: var(--space-sm) 0;
  }

  .navbar__links .navbar__link:hover {
    color: var(--color-accent);
  }

  .navbar__links .btn {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }

  .navbar__hamburger {
    display: flex;
  }

  /* Mobile overlay */
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
  }

  .mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  /* Hero Mobile */
  .hero__title {
    font-size: 2.2rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  /* About Mobile */
  .about {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about__image {
    height: 350px;
  }

  .about__features {
    grid-template-columns: 1fr;
  }

  /* Properties Mobile */
  .properties-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  /* Gallery Collage Mobile */
  .gallery-collage {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-collage__item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* Services Mobile */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Stats Mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  /* Footer Mobile */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  /* Catalog Filters Mobile */
  .catalog-filters {
    flex-direction: column;
  }

  .filter-group {
    min-width: 100%;
  }

  /* Property Modal Mobile */
  .property-modal-overlay {
    padding: var(--space-sm);
  }

  .property-modal__main-image {
    height: 260px;
  }

  .property-modal__details {
    padding: var(--space-lg);
  }

  .property-modal__specs {
    grid-template-columns: 1fr;
  }

  .property-modal__title {
    font-size: 1.3rem;
  }

  .property-modal__price {
    font-size: 1.25rem;
  }

  /* WhatsApp button mobile */
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  .whatsapp-float__tooltip {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero__content {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .stat-item__number {
    font-size: 2rem;
  }

  .property-card__details {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .gallery-collage {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-collage__item:first-child {
    grid-column: span 1;
    grid-row: span 1;
  }
}