/* ==========================================================
   TERRAMA INMOBILIARIA — Hoja de estilos principal
   Diseño: moderno, elegante, sobrio, mucho espacio en blanco.
   ========================================================== */

:root {
  /* --- Paleta de marca (fácil de sustituir después) --- */
  --primary: #1A1A1A;
  --primary-dark: #0A0A0A;
  --primary-light: #333333;
  --secondary: #6E7B3D;
  --secondary-dark: #566030;
  --background: #F8F8F6;
  --surface: #FFFFFF;
  --surface-alt: #F1EFEA;
  --text: #252525;
  --text-muted: #6B7078;
  --border: #E4E1D9;
  --white: #FFFFFF;
  --success: #3E7D5A;
  --danger: #B3492E;
  --warning: #B98A2E;

  /* --- Tipografía --- */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;

  /* --- Espaciado / geometría --- */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.06);
  --shadow: 0 8px 24px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 20px 48px rgba(26, 26, 26, 0.14);
  --container: 1220px;
  --header-h: 84px;
}

/* ================= RESET ================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-muted); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff;
  padding: 12px 18px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.hide-mobile { display: inline-flex; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--surface-alt); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 2.4vw, 2.4rem); color: var(--primary); }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--secondary-dark); font-weight: 700; margin-bottom: 12px;
}

/* ================= BOTONES ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: all .18s ease; white-space: nowrap;
}
.btn--sm { padding: 10px 18px; font-size: .85rem; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--secondary { background: var(--secondary); color: var(--primary-dark); }
.btn--secondary:hover { background: var(--secondary-dark); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ================= HEADER ================= */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(248,248,246,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark { height: 26px; width: auto; display: block; }
.brand__name {
  font-family: 'Montserrat', var(--font-sans); font-size: 1.1rem; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: .01em;
}
.brand__name em { font-family: 'Montserrat', var(--font-sans); font-style: normal; font-weight: 300; text-transform: none; color: var(--secondary-dark); }
.brand__name--light { color: #fff; font-size: 1.15rem; }
.brand__name--light em { color: var(--secondary); }

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { font-size: .93rem; font-weight: 500; color: var(--text); padding: 6px 2px; position: relative; }
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--secondary);
  transition: width .2s ease;
}
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }
.main-nav a.is-active { color: var(--primary); }

.site-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--primary); margin: 0 auto; transition: all .2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= HERO ================= */
.hero {
  position: relative; min-height: 640px; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(10, 10, 10,.35), rgba(10, 10, 10,.75)), var(--hero-img) center/cover no-repeat;
  color: #fff; padding-top: 90px;
}
.hero__inner { padding-bottom: 64px; width: 100%; }
.hero__content { max-width: 680px; margin-bottom: 44px; }
.hero__content .eyebrow { color: var(--secondary); }
.hero h1 { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; line-height: 1.12; margin-bottom: 16px; }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; max-width: 520px; }

/* Buscador */
.search-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 22px; display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end;
}
.search-box .field { display: flex; flex-direction: column; gap: 6px; }
.search-box label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.search-box select, .search-box input {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 12px; background: var(--background);
  color: var(--text);
}
.search-box select:focus, .search-box input:focus { outline: 2px solid var(--secondary); outline-offset: 1px; }
.search-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.search-tab {
  padding: 8px 18px; border-radius: 30px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08);
  color: #fff; font-size: .85rem; font-weight: 600;
}
.search-tab.is-active { background: var(--secondary); border-color: var(--secondary); color: var(--primary-dark); }

/* ================= TARJETAS DE PROPIEDAD ================= */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.property-card {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  transition: transform .22s ease, box-shadow .22s ease; display: flex; flex-direction: column; height: 100%;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.property-card__img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-alt); }
.property-card__img img { width: 100%; height: 100%; object-fit: cover; }
.property-card__tags { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; }
.tag {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 30px; background: rgba(26, 26, 26,.88); color: #fff;
}
.tag--venta { background: rgba(26, 26, 26,.9); }
.tag--renta { background: rgba(110, 123, 61,.95); color: var(--primary-dark); }
.tag--estatus { background: rgba(255,255,255,.92); color: var(--primary); }
.property-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.property-card__price { font-size: 1.28rem; font-weight: 800; color: var(--primary); }
.property-card__title { font-size: .98rem; font-weight: 600; color: var(--text); }
.property-card__loc { font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.property-card__specs { display: flex; gap: 14px; font-size: .82rem; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--border); margin-top: auto; }
.property-card__specs span { display: flex; align-items: center; gap: 5px; }
.property-card__cta { margin-top: 14px; }

/* ================= EXPLORAR POR TIPO ================= */
.grid-types { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.type-card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1;
  display: flex; align-items: flex-end; padding: 18px; color: #fff; background: var(--primary);
}
.type-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: transform .3s ease, opacity .3s ease; }
.type-card:hover img { transform: scale(1.06); opacity: .55; }
.type-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10,0), rgba(10, 10, 10,.82)); }
.type-card span { position: relative; z-index: 1; font-weight: 700; font-size: .98rem; }

/* ================= VENTA / RENTA ================= */
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.promo-block {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 320px;
  display: flex; align-items: flex-end; padding: 36px; color: #fff;
}
.promo-block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-block::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10,.15), rgba(10, 10, 10,.86)); }
.promo-block__content { position: relative; z-index: 1; }
.promo-block__content .eyebrow { color: var(--secondary); }
.promo-block__content h3 { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 600; }

/* ================= POR QUÉ TERRAMA ================= */
.grid-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.feature-card { text-align: left; padding: 8px 0; }
.feature-card__num { font-family: var(--font-serif); font-size: 2.2rem; color: var(--secondary); font-weight: 600; margin-bottom: 6px; }
.feature-card h4 { font-size: 1.02rem; color: var(--primary); }
.feature-card p { font-size: .92rem; margin: 0; }

/* ================= PRE-FOOTER CTA ================= */
.pre-footer { background: var(--primary); color: #fff; padding: 56px 0; }
.pre-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pre-footer h3 { font-family: var(--font-serif); font-size: 1.7rem; margin-bottom: 6px; font-weight: 600; }
.pre-footer p { color: rgba(255,255,255,.78); margin: 0; }
.pre-footer__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ================= FOOTER ================= */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.75); }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
.site-footer__brand p { color: rgba(255,255,255,.6); max-width: 320px; margin-top: 10px; }
.site-footer__social { display: flex; gap: 14px; margin-top: 14px; }
.site-footer__social a { font-size: .85rem; text-decoration: underline; }
.site-footer__col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.site-footer__col a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.site-footer__bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .8rem; }
.site-footer__proto { color: var(--secondary); }

/* ================= WHATSAPP FLOTANTE ================= */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); z-index: 90; transition: transform .18s ease;
}
.whatsapp-float:hover { transform: scale(1.07); }

/* ================= PÁGINA DE PROPIEDADES (LISTADO) ================= */
.results-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.results-count { font-size: .95rem; color: var(--text-muted); }
.results-count strong { color: var(--primary); }
.sort-select { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.sort-select select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; background: #fff; }

.filters-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; margin-bottom: 36px;
}
.filters-panel form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.filters-panel .field { display: flex; flex-direction: column; gap: 6px; }
.filters-panel label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; }
.filters-panel select, .filters-panel input {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; background: var(--background);
}
.filters-panel__actions { grid-column: 1 / -1; display: flex; gap: 12px; justify-content: flex-end; padding-top: 6px; }
.filters-toggle { display: none; }

.empty-state {
  text-align: center; padding: 90px 24px; background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--border);
}
.empty-state h3 { color: var(--primary); font-size: 1.3rem; }
.empty-state p { max-width: 420px; margin: 0 auto 20px; }

/* ================= FICHA DE PROPIEDAD ================= */
.property-hero { padding-top: 40px; }
.breadcrumbs { font-size: .82rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--primary); }

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 36px; border-radius: var(--radius-lg); overflow: hidden; }
.gallery__main { position: relative; aspect-ratio: 4/3; background: var(--surface-alt); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-rows: repeat(2, 1fr); gap: 12px; }
.gallery__thumbs button { padding: 0; border: none; background: var(--surface-alt); border-radius: var(--radius); overflow: hidden; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }

.property-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.property-main__header { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 24px; }
.property-main__header h1 { font-family: var(--font-serif); font-size: 2rem; color: var(--primary); font-weight: 600; }
.property-main__price { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.property-main__loc { color: var(--text-muted); font-size: .95rem; }

.specs-row { display: flex; flex-wrap: wrap; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.specs-row .spec { display: flex; flex-direction: column; gap: 2px; }
.specs-row .spec strong { font-size: 1.15rem; color: var(--primary); }
.specs-row .spec span { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

.property-main h2 { font-size: 1.2rem; color: var(--primary); margin-top: 32px; }
.features-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; }
.features-list li { font-size: .92rem; color: var(--text); padding-left: 22px; position: relative; }
.features-list li::before { content: '✓'; position: absolute; left: 0; color: var(--secondary-dark); font-weight: 700; }

.map-placeholder {
  height: 260px; border-radius: var(--radius); background: repeating-linear-gradient(135deg, var(--surface-alt), var(--surface-alt) 10px, #eae7df 10px, #eae7df 20px);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .88rem; border: 1px solid var(--border);
}

.sidebar-cta {
  position: sticky; top: calc(var(--header-h) + 24px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
}
.sidebar-cta h3 { font-size: 1.05rem; color: var(--primary); }
.sidebar-cta .btn { margin-bottom: 10px; }

/* ================= FORMULARIOS ================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: .82rem; font-weight: 600; color: var(--primary); }
.form-field label .req { color: var(--danger); }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface);
  color: var(--text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--secondary); outline-offset: 1px; }
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--danger); }
.form-error { font-size: .8rem; color: var(--danger); }
.form-hint { font-size: .78rem; color: var(--text-muted); }

.alert { padding: 16px 18px; border-radius: var(--radius); font-size: .92rem; margin-bottom: 24px; }
.alert--success { background: #E7F2EB; color: var(--success); border: 1px solid #bfe0cc; }
.alert--error { background: #FBEAE5; color: var(--danger); border: 1px solid #f0c6b8; }

.card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }

/* ================= NOSOTROS / CONTACTO ================= */
.page-hero { background: var(--primary); color: #fff; padding: 80px 0 60px; text-align: center; }
.page-hero h1 { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; }
.page-hero p { color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto; }

.about-block { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-block img { border-radius: var(--radius-lg); aspect-ratio: 4/3; object-fit: cover; }
.about-block + .about-block { margin-top: 88px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info-list { display: flex; flex-direction: column; gap: 22px; margin-top: 24px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-item .ico {
  width: 42px; height: 42px; border-radius: 8px; background: var(--surface-alt); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700;
}
.contact-info-item strong { display: block; color: var(--primary); font-size: .92rem; }
.contact-info-item span, .contact-info-item a { font-size: .92rem; color: var(--text-muted); }

/* ================= SIMULADOR DE AVALÚO ================= */
.avaluo-form-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
}
.avaluo-tabs { display: flex; gap: 10px; margin-bottom: 24px; }
.avaluo-tab {
  display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--background); color: var(--text-muted); font-weight: 600;
}
.avaluo-tab.is-active { background: var(--secondary); border-color: var(--secondary); color: var(--primary-dark); }

.avaluo-share-row { display: flex; justify-content: flex-end; margin-bottom: 20px; }

.avaluo-slider-row { display: flex; align-items: center; gap: 16px; margin: 4px 0 26px; }
.avaluo-slider-row input[type="range"] { flex: 1; accent-color: var(--secondary); }
.avaluo-slider-row .avaluo-slider-value { font-weight: 800; color: var(--primary); min-width: 52px; text-align: right; }
.avaluo-slider-label { font-size: .82rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; display: block; }
.avaluo-slider-label .hint { color: var(--text-muted); font-weight: 400; }

/* Resultado (oculto hasta calcular) */
.avaluo-resultado { display: none; margin-top: 40px; }
.avaluo-resultado.is-visible { display: block; }

.avaluo-range-box {
  background: var(--primary); color: #fff; border-radius: var(--radius-lg); padding: 36px; text-align: center;
  margin-bottom: 24px;
}
.avaluo-range-box .label { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--secondary); font-weight: 700; }
.avaluo-range-box .valor { font-family: var(--font-serif); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; margin: 10px 0; }
.avaluo-range-box p { color: rgba(255,255,255,.75); font-size: .85rem; max-width: 480px; margin: 0 auto; }

.avaluo-summary-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.avaluo-summary-head { background: var(--surface-alt); padding: 18px 26px; }
.avaluo-summary-head .eyebrow { margin: 0; }
.avaluo-summary-head strong { display: block; color: var(--primary); font-size: .82rem; margin-top: 4px; }
.avaluo-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
.avaluo-summary-grid .stat { background: var(--surface); padding: 22px 20px; text-align: center; }
.avaluo-summary-grid .stat span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 6px; }
.avaluo-summary-grid .stat strong { font-size: 1.1rem; color: var(--primary); }

.avaluo-breakdown { border-top: 1px solid var(--border); }
.avaluo-breakdown summary {
  cursor: pointer; padding: 16px 26px; font-weight: 700; color: var(--primary); display: flex;
  justify-content: space-between; align-items: center; list-style: none; font-size: .92rem;
}
.avaluo-breakdown summary::-webkit-details-marker { display: none; }
.avaluo-breakdown summary .total { color: var(--secondary-dark); }
.avaluo-breakdown summary::after { content: '+'; font-size: 1.2rem; color: var(--text-muted); }
.avaluo-breakdown[open] summary::after { content: '−'; }
.avaluo-breakdown-items { padding: 0 26px 18px; }
.avaluo-item-row {
  display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: .87rem; color: var(--text-muted);
}
.avaluo-item-row:last-child { border-bottom: none; }
.avaluo-item-row strong { color: var(--text); font-weight: 600; }

.avaluo-total-row {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 26px; background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.avaluo-total-row span { font-weight: 700; color: var(--primary); }
.avaluo-total-row strong { font-size: 1.2rem; color: var(--primary); }

.avaluo-disclaimer { font-size: .8rem; color: var(--text-muted); text-align: center; max-width: 560px; margin: 0 auto 24px; }
.avaluo-quote { text-align: center; font-family: var(--font-serif); font-style: italic; color: var(--primary); font-size: 1.1rem; margin-bottom: 28px; }
.avaluo-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Modal "Guardar simulación" */
.avaluo-modal {
  display: none; position: fixed; inset: 0; background: rgba(10, 10, 10,.6); z-index: 200;
  align-items: center; justify-content: center; padding: 24px;
}
.avaluo-modal.is-open { display: flex; }
.avaluo-modal__card {
  background: #fff; border-radius: var(--radius-lg); padding: 32px; max-width: 440px; width: 100%;
  box-shadow: var(--shadow-lg); position: relative;
}
.avaluo-modal__close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--background); font-size: 1rem; line-height: 1;
}

/* ================= EVALUADOR DE CRÉDITO ================= */
.credito-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.credito-hero__photo { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; }
.credito-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.credito-hero__badge {
  position: absolute; left: 16px; bottom: 16px; background: rgba(10, 10, 10,.88); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); font-size: .82rem;
}
.credito-hero__badge strong { display: block; }
.credito-hero__badge span { color: rgba(255,255,255,.7); font-size: .76rem; }
.credito-hero h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; color: var(--primary); }
.credito-hero h1 em { font-style: italic; color: var(--secondary-dark); }
.credito-checks { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.credito-checks span { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text); }
.credito-checks svg { color: var(--secondary-dark); width: 16px; height: 16px; }
.credito-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; justify-content: center; gap: 40px; margin-bottom: 32px; flex-wrap: wrap; }
.stepper-item { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: .5; }
.stepper-item.is-active, .stepper-item.is-done { opacity: 1; }
.stepper-item .dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-alt); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; border: 2px solid var(--border);
}
.stepper-item.is-active .dot { background: var(--secondary); border-color: var(--secondary); color: var(--primary-dark); }
.stepper-item.is-done .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper-item span:last-child { font-size: .78rem; color: var(--text-muted); font-weight: 600; }

/* ---------- Wizard ---------- */
.credito-step { display: none; }
.credito-step.is-active { display: block; }
.credito-wizard-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 760px; margin: 0 auto; box-shadow: var(--shadow-sm); }
.credito-wizard-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

.toggle-field .toggle-group { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle-group button {
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--background);
  color: var(--text); font-size: .87rem; font-weight: 500;
}
.toggle-group button.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.toggle-field { margin-bottom: 18px; }
.toggle-field.has-error .toggle-group button { border-color: var(--danger); }
.toggle-field > label { display: block; font-size: .82rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; }

.confirm-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .89rem; }
.confirm-row span { color: var(--text-muted); }
.confirm-row strong { color: var(--text); }

/* ---------- Resultado ---------- */
.credito-resultado { display: none; }
.credito-resultado.is-active { display: block; }

.perfil-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 30px; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.perfil-badge.perfil-premium { background: #E7F2EB; color: var(--success); }
.perfil-badge.perfil-solido { background: #FCF3DE; color: var(--warning); }
.perfil-badge.perfil-revisar { background: #FBEAE5; color: var(--danger); }
#perfilMensaje { color: var(--text-muted); margin-bottom: 28px; }

.credito-cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.credito-cap-box { background: var(--surface-alt); border-radius: var(--radius); padding: 22px; text-align: center; }
.credito-cap-box span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 8px; }
.credito-cap-box strong { font-size: 1.4rem; color: var(--primary); }
#resMensajeCapacidad { text-align: center; padding: 14px; border-radius: var(--radius-sm); background: #E7F2EB; color: var(--success); font-size: .9rem; margin-bottom: 28px; }

.specs-row .spec strong { font-size: 1.3rem; }

.credito-debt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.debt-bar-box span { font-size: .8rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.debt-bar-track { height: 10px; border-radius: 6px; background: var(--surface-alt); overflow: hidden; }
.debt-bar-fill { height: 100%; background: var(--secondary); border-radius: 6px; }
.debt-bar-box strong { display: block; margin-top: 6px; color: var(--primary); }

.credito-range-box {
  background: var(--primary); color: #fff; border-radius: var(--radius-lg); padding: 30px; text-align: center; margin: 28px 0;
}
.credito-range-box .label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--secondary); font-weight: 700; }
.credito-range-box .valor { font-family: var(--font-serif); font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 600; margin: 8px 0; }
.credito-range-box p { color: rgba(255,255,255,.75); font-size: .82rem; max-width: 480px; margin: 0 auto; }

.credito-prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 20px 0 32px; }
.credito-prop-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; align-items: center; }
.credito-prop-card img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.credito-prop-card strong { display: block; font-size: .86rem; color: var(--primary); }
.credito-prop-card span { display: block; font-size: .78rem; color: var(--text-muted); }
.credito-prop-card .precio { color: var(--secondary-dark); font-weight: 700; margin-top: 2px; }

.credito-productos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0 32px; }
.credito-producto-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.credito-producto-card.is-sugerida { border-color: var(--secondary); box-shadow: 0 0 0 1px var(--secondary); }
.credito-producto-card.is-fuera { opacity: .7; }
.credito-producto-card h4 { color: var(--primary); font-size: 1rem; margin-bottom: 4px; }
.credito-producto-cuota { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 12px 0 8px; }
.credito-producto-cuota span { font-size: .8rem; font-weight: 400; color: var(--text-muted); }
.credito-producto-specs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .74rem; color: var(--text-muted); margin-bottom: 14px; }
.credito-producto-specs span { background: var(--surface-alt); padding: 4px 8px; border-radius: 20px; }
.credito-fuera-aviso { font-size: .76rem; color: var(--danger); margin-bottom: 10px; font-weight: 600; }
.tag-sugerida {
  position: absolute; top: -10px; right: 16px; background: var(--secondary); color: var(--primary-dark);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
}

.credito-amort-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 32px; }
.credito-amort-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 18px; font-size: .84rem; color: var(--text-muted); }
.credito-amort-meta strong { color: var(--primary); display: block; }
table.amort-table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 560px; }
table.amort-table th { text-align: left; padding: 10px; background: var(--surface-alt); color: var(--text-muted); font-size: .72rem; text-transform: uppercase; }
table.amort-table td { padding: 10px; border-bottom: 1px solid var(--border); }

.bancos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 20px 0 32px; }
.banco-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.banco-card h4 { color: var(--primary); margin-bottom: 6px; }
.banco-tasa { font-size: 1.1rem; font-weight: 800; color: var(--secondary-dark); margin-bottom: 10px; }
.banco-beneficios { margin-top: 10px; }
.banco-beneficios li { font-size: .8rem; color: var(--text); padding: 3px 0; }

.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0 32px; }
.doc-item { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-alt); border-radius: var(--radius-sm); padding: 14px; font-size: .84rem; }

.next-steps { counter-reset: step; margin: 20px 0 32px; }
.next-steps li { display: flex; gap: 14px; padding: 10px 0; font-size: .9rem; }
.next-steps li::before {
  counter-increment: step; content: counter(step); flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--secondary); color: var(--primary-dark); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}

/* ================= UTILIDADES ================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.badge-list .tag { position: static; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-types { grid-template-columns: repeat(3, 1fr); }
  .grid-four { grid-template-columns: repeat(2, 1fr); }
  .property-layout { grid-template-columns: 1fr; }
  .sidebar-cta { position: static; }
  .filters-panel form { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: var(--header-h); right: 0; bottom: 0; left: 0;
    height: calc(100vh - var(--header-h)); background: var(--primary); flex-direction: column;
    align-items: flex-start; padding: 28px 24px; gap: 4px; transform: translateX(100%);
    transition: transform .25s ease; overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { color: #fff; padding: 14px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1.02rem; }
  .main-nav a.is-active { color: var(--secondary); }
  .nav-toggle { display: flex; }
  .hide-mobile { display: none !important; }

  .hero { min-height: 560px; }
  .search-box { grid-template-columns: 1fr 1fr; }
  .search-box .btn { grid-column: 1 / -1; }

  .grid-cards { grid-template-columns: 1fr; }
  .grid-types { grid-template-columns: repeat(2, 1fr); }
  .grid-two { grid-template-columns: 1fr; }
  .grid-four { grid-template-columns: 1fr; }

  .gallery { grid-template-columns: 1fr; }
  .gallery__thumbs { grid-template-rows: none; grid-auto-flow: column; grid-auto-columns: 1fr; }

  .form-grid { grid-template-columns: 1fr; }
  .about-block { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .filters-panel form { grid-template-columns: 1fr; display: none; }
  .filters-panel.is-open form { display: grid; margin-top: 18px; }
  .filters-toggle { display: inline-flex; }
  .site-footer__inner { grid-template-columns: 1fr; padding: 48px 0 32px; }
  .pre-footer__inner { flex-direction: column; align-items: flex-start; }
  .section { padding: 56px 0; }

  .avaluo-form-panel { padding: 22px; }
  .avaluo-summary-grid { grid-template-columns: 1fr; }
  .avaluo-total-row { flex-direction: column; align-items: flex-start; gap: 4px; }

  .credito-hero { grid-template-columns: 1fr; }
  .credito-hero__photo { aspect-ratio: 16/10; order: -1; }
  .credito-wizard-panel { padding: 20px; }
  .stepper { gap: 18px; }
  .stepper-item span:last-child { display: none; }
  .credito-cap-grid, .credito-debt-grid { grid-template-columns: 1fr; }
  .credito-productos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero__content { margin-bottom: 28px; }
}
