/* ============================================================
   ACTIVO EN VENTA — Design System
   activoenventa.cl
   ============================================================ */

:root {
  /* Colores — paleta de marca (logo Activo en Venta) */
  --color-bg: #FAFAF8;
  --color-bg-alt: #F1F3F6;
  --color-white: #FFFFFF;
  --color-text: #13233F;
  --color-text-soft: #566079;
  --color-border: #E1E4EA;
  --color-accent: #C9A24C;      /* dorado del logo */
  --color-accent-dark: #A6813A;
  --color-navy: #0E2547;        /* azul marino del logo */
  --color-navy-soft: #16335F;
  --color-dark: #0E2547;
  --color-success: #3E6B4F;
  --color-whatsapp: #25D366;

  /* Tipografía */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciados */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Otros */
  --radius: 4px;
  --max-width: 1180px;
  --shadow-sm: 0 1px 3px rgba(28, 28, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 28, 26, 0.08);
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { color: var(--color-text-soft); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--alt { background: var(--color-bg-alt); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: var(--transition);
  white-space: nowrap;
}

/* Color de mayor contraste, reservado solo para el CTA principal de cada sección */
.btn--primary {
  background: var(--color-accent);
  color: var(--color-navy);
}
.btn--primary:hover { background: var(--color-accent-dark); color: var(--color-white); }

.btn--outline {
  background: transparent;
  color: var(--color-dark);
  border: 1.5px solid var(--color-dark);
  font-weight: 600;
}
.btn--outline:hover { background: var(--color-dark); color: var(--color-white); }

.btn--accent {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--accent:hover { background: var(--color-accent-dark); }

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
}
.btn--whatsapp:hover { filter: brightness(0.95); }

.btn--block { width: 100%; }
.btn--sm { padding: 0.6rem 1.2rem; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo span { color: var(--color-accent); }
.logo img {
  height: 56px;
  width: 56px;
  border-radius: 8px;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
}

.nav__links {
  display: flex;
  gap: var(--space-md);
}

.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: var(--transition);
}
.nav__links a:hover,
.nav__links a.active { color: var(--color-dark); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}
.nav__toggle span {
  width: 24px; height: 2px; background: var(--color-dark);
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero--photo {
  background-size: cover;
  background-position: center;
  padding-top: var(--space-2xl);
  padding-bottom: calc(var(--space-2xl) + 1rem);
}
.hero--photo .eyebrow { color: #E4D3AE; }
.hero--photo h1 { color: #fff; }
.hero--photo .hero__subtitle { color: rgba(255,255,255,0.88); }
.hero--photo .badge {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.hero__content { max-width: 720px; }

.hero__subtitle {
  font-size: 1.1rem;
  margin-top: var(--space-sm);
  max-width: 560px;
}

.hero__cta {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

/* ---------- Franja de confianza ---------- */
.trust-bar {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-soft);
}
.trust-bar__item::before {
  content: '✓';
  color: var(--color-accent-dark);
  font-weight: 700;
}
.hero--photo .trust-bar__item { color: rgba(255,255,255,0.85); }
.hero--photo .trust-bar__item::before { color: #E4D3AE; }

.hero__badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.badge {
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-soft);
  background: var(--color-white);
}

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card__image {
  aspect-ratio: 4/3;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: 0.85rem;
  text-align: center;
  padding: var(--space-sm);
}

.card__body { padding: var(--space-md); }

.card__tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-dark);
  font-weight: 600;
}

.card__title { margin: 0.4rem 0 0.5rem; font-size: 1.3rem; }

.card__meta {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
  flex-wrap: wrap;
}
.card__meta span {
  font-size: 0.82rem;
  color: var(--color-text-soft);
}

/* Property landing cards (Home) */
.property-card {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.property-card:hover { box-shadow: var(--shadow-md); }

.property-card__image {
  aspect-ratio: 16/10;
  background: var(--color-dark);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.property-card__eyebrow {
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(28,28,26,0.55);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.property-card__body { padding: var(--space-lg); }

/* Stat cards (Datos destacados) */
.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-align: left;
}
.stat-card__value {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--color-dark);
}
.stat-card__label {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  margin-top: 0.25rem;
}

/* Unit listing card (fichas dentro del hub) */
.unit-card {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: var(--space-md);
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
}
.unit-card__image {
  aspect-ratio: 4/3;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--color-text-soft);
  text-align: center;
  padding: var(--space-xs);
  overflow: hidden;
}
.unit-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.unit-card__status {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.unit-card__status--available { background: #E9F1EB; color: var(--color-success); }
.unit-card__status--pending { background: var(--color-bg-alt); color: var(--color-text-soft); }

/* ---------- Placeholder de dato pendiente ---------- */
.placeholder {
  color: var(--color-text-soft);
  font-style: italic;
  background: var(--color-bg-alt);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.92em;
}

/* ---------- Info técnica (tabla) ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--color-border); }
.info-table td { padding: 0.9rem 0.5rem; font-size: 0.95rem; }
.info-table td:first-child {
  color: var(--color-text-soft);
  width: 45%;
}
.info-table td:last-child { font-weight: 500; }

/* ---------- Galería ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}
.gallery__item {
  aspect-ratio: 1/1;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: 0.78rem;
  text-align: center;
  padding: var(--space-xs);
  overflow: hidden;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery__item--wide { grid-column: span 2; grid-row: span 2; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 14, 20, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close:hover { background: rgba(255,255,255,0.24); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.24); }
.lightbox__nav--prev { left: var(--space-md); }
.lightbox__nav--next { right: var(--space-md); }

/* ---------- Mapa ---------- */
.map-embed {
  width: 100%;
  aspect-ratio: 16/7;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(15%);
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  font-weight: 600;
  cursor: pointer;
}
.faq-item__q::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--color-accent-dark);
  transition: var(--transition);
}
.faq-item.open .faq-item__q::after { transform: rotate(45deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-item__a { max-height: 300px; padding-bottom: var(--space-md); }

/* ---------- Formulario ---------- */
.form-field { margin-bottom: var(--space-md); }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-note { font-size: 0.8rem; color: var(--color-text-soft); margin-top: var(--space-sm); }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  background: var(--color-whatsapp);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  font-size: 1.6rem;
  transition: var(--transition);
}
.whatsapp-float:hover { transform: scale(1.06); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: #C9C7BE;
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-2xl);
}
.site-footer a { color: #C9C7BE; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer-logo {
  height: 92px;
  width: 92px;
  border-radius: 12px;
  display: block;
  margin-bottom: var(--space-sm);
}
.footer-grid h4 { color: #fff; font-size: 0.9rem; margin-bottom: var(--space-sm); }
.footer-grid ul li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .unit-card { grid-template-columns: 140px 1fr; }
  .unit-card__cta { grid-column: span 2; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .unit-card { grid-template-columns: 1fr; }
  .unit-card__image { aspect-ratio: 16/9; }
}

/* Mobile nav open state */
.nav.nav--open .nav__links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-sm);
  z-index: 50;
}
