/* ============================================
   CASATERRA BIENES RAÍCES – HOME v2
   Secciones exclusivas del home (hero con slider, buscador
   flotante, stats, destacados, proceso, CTA). Lo común a todo el
   sitio (barra superior, header, botones) vive en css/theme-v2.css.
   ============================================ */

/* ── HERO ── */
.hero-v2 {
  position: relative;
  min-height: min(760px, calc(100vh - var(--topbar-h) - var(--header-h)));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-primary);
  padding: 80px 24px 150px;
}
.hero-v2__slides { position: absolute; inset: 0; }
.hero-v2__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease, transform 7s ease;
}
.hero-v2__slide.is-active { opacity: 1; transform: scale(1); }
.hero-v2__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,39,68,.55) 0%, rgba(26,39,68,.62) 55%, rgba(17,24,39,.78) 100%);
}
.hero-v2__content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  text-align: center;
  color: var(--color-white);
}
.hero-v2__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero-v2__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-bottom: 20px;
  text-shadow: 0 2px 18px rgba(0,0,0,.25);
}
.hero-v2__subtitle {
  font-size: clamp(.98rem, 1.6vw, 1.1rem);
  color: rgba(255,255,255,.88);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-v2__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-v2__arrow {
  position: absolute;
  top: 45%;
  z-index: 3;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.hero-v2__arrow:hover { background: var(--color-accent); color: var(--color-primary); }
.hero-v2__arrow--prev { left: 32px; }
.hero-v2__arrow--next { right: 32px; }

/* ── BUSCADOR FLOTANTE ── */
.buscador-card {
  position: relative;
  z-index: 5;
  max-width: calc(var(--max-width) - 48px);
  margin: -96px auto 0;
  padding: 0 24px;
}
.buscador-card__tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.buscador-card__tab {
  border: none;
  cursor: pointer;
  padding: 11px 22px;
  font-size: .85rem;
  font-weight: 600;
  background: rgba(255,255,255,.92);
  color: var(--color-primary);
  border-radius: 8px 8px 0 0;
  transition: background var(--transition), color var(--transition);
}
.buscador-card__tab:hover { background: var(--color-white); }
.buscador-card__tab.is-active { background: var(--color-accent); color: var(--color-primary); }
.home-v2 .hero-search {
  background: var(--color-white);
  border-radius: 0 10px 10px 10px;
  box-shadow: 0 18px 50px rgba(17,24,39,.12);
  padding: 22px 24px;
  margin: 0;
  max-width: none;
  gap: 0;
  align-items: flex-end;
  flex-wrap: nowrap;
}
.home-v2 .hero-search__field {
  flex: 1 1 0;
  padding: 0 20px;
  border-right: 1px solid var(--border-soft);
  gap: 8px;
}
.home-v2 .hero-search__field:first-child { padding-left: 0; }
.home-v2 .hero-search__field:nth-child(3) { border-right: none; }
.home-v2 .hero-search__field label {
  position: static;
  width: auto; height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  font-size: .82rem;
  font-weight: 600;
  color: var(--color-primary);
}
.home-v2 .hero-search__field select {
  padding: 11px 12px;
  border-radius: var(--radius-btn);
  background-color: var(--surface);
  border: 1px solid var(--border-soft);
  font-size: .85rem;
  color: var(--color-primary);
  cursor: pointer;
}
.home-v2 .hero-search__field select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.home-v2 .hero-search__submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: .88rem;
}

/* ── SOBRE CASATERRA ── */
.about-v2 { padding: 110px 0 100px; background: var(--color-white); }
.about-v2__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about-v2__visual { position: relative; padding: 60px 40px 0 0; }
.about-v2__img { overflow: hidden; background: var(--color-light-gray); }
.about-v2__img img { width: 100%; height: 100%; object-fit: cover; }
.about-v2__img--main {
  height: 440px;
  border-radius: 90px 16px 90px 16px;
}
.about-v2__img--float {
  position: absolute;
  top: 0; right: 0;
  width: 58%;
  height: 210px;
  border-radius: 16px;
  border: 6px solid var(--color-white);
  box-shadow: 0 18px 40px rgba(17,24,39,.16);
}
.about-v2__badge {
  position: absolute;
  right: 6px;
  bottom: 70px;
  background: var(--color-white);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(17,24,39,.14);
  max-width: 230px;
}
.about-v2__badge strong {
  display: block;
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 2px;
}
.about-v2__badge > span { display: block; font-size: .78rem; color: var(--color-gray); line-height: 1.45; }
.about-v2__badge-icons { display: flex; margin-top: 12px; }
.about-v2__badge-icons span {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: var(--color-primary);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px;
}
.about-v2__badge-icons span:first-child { margin-left: 0; }
.about-v2__badge-icons .about-v2__badge-more {
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: .72rem;
  font-weight: 700;
}
.about-v2__text { line-height: 1.8; margin-bottom: 30px; }
.stats-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
  margin-bottom: 30px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.stats-v2 .stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.stats-v2 .stat-label {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  color: var(--color-gray);
  line-height: 1.35;
}

/* ── CARRUSELES DE PROPIEDADES ── */
.home-v2 .propiedades-section { padding: 100px 0; background: var(--color-white); }
.home-v2 .propiedades-section--alt { background: var(--surface); }
.home-v2 .propiedades-section__top .section-title { margin-bottom: 0; max-width: 620px; }
.home-v2 .propiedades-section__ver-todas {
  padding: 11px 18px;
  border-radius: var(--radius-btn);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: .84rem;
  transition: background var(--transition);
}
.home-v2 .propiedades-section__ver-todas:hover { background: var(--color-primary-light); }

.home-v2 .mini-prop-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(17,24,39,.04);
}
.home-v2 .mini-prop-card:hover { box-shadow: 0 18px 40px rgba(17,24,39,.1); }
.home-v2 .mini-prop-card__img { display: block; height: 210px; }
.home-v2 .mini-prop-card__tag {
  top: 14px; left: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--color-white);
  color: var(--color-primary);
}
.home-v2 .mini-prop-card__tag--reservado { background: #fef3c7; color: #92400e; }
.home-v2 .mini-prop-card__tag--vendido { background: #fee2e2; color: #991b1b; }
.home-v2 .mini-prop-card__body { padding: 18px 18px 20px; gap: 8px; }
.home-v2 .mini-prop-card__titulo {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.home-v2 .mini-prop-card__ubicacion {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: .8rem;
}
.home-v2 .mini-prop-card__ubicacion svg { flex-shrink: 0; color: var(--color-accent); }
.mini-prop-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.home-v2 .mini-prop-card__precio {
  margin: 0;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: .82rem;
  font-weight: 700;
}
.home-v2 .mini-prop-card__cta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  background: none;
  color: var(--color-primary);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 0;
}
.home-v2 .mini-prop-card__cta:hover { color: var(--color-accent); opacity: 1; }

.home-v2 .slider-btn {
  border: none;
  background: var(--color-accent);
  color: var(--color-primary);
}
.home-v2 .slider-btn:hover:not(:disabled) { background: var(--color-primary); color: var(--color-white); }
.home-v2 .slider-dot { background: #d9d5cc; }

/* ── DESARROLLOS DESTACADOS ── */
.destacados {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  background: var(--color-primary);
}
.destacados__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image .4s ease;
}
.destacados__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,39,68,.92) 0%, rgba(26,39,68,.72) 50%, rgba(26,39,68,.45) 100%);
}
.destacados__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.destacados__intro .section-title { color: var(--color-white); }
.destacados__intro p { color: rgba(255,255,255,.82); line-height: 1.75; max-width: 440px; margin-bottom: 30px; }
.destacados__card-wrap { display: flex; align-items: center; gap: 20px; justify-content: flex-end; }
.destacados__card {
  background: var(--color-white);
  border-radius: 14px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  border-bottom: 4px solid var(--color-accent);
  transition: opacity .2s ease, transform .2s ease;
}
.destacados__card.is-changing { opacity: 0; transform: translateY(8px); }
.destacados__ubicacion {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--color-gray);
  margin-bottom: 8px;
}
.destacados__ubicacion svg { color: var(--color-accent); }
.destacados__nombre {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.destacados__desc { font-size: .9rem; line-height: 1.7; margin-bottom: 14px; }
.destacados__highlight {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--color-primary);
  font-size: .76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 22px;
}
.destacados__nav { display: flex; flex-direction: column; gap: 12px; }
.destacados__btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--color-white);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.destacados__btn:hover { background: var(--color-accent); }

/* ── VENTAJAS ── */
.home-v2 .ventajas { background: var(--color-white); }
.home-v2 .ventaja-card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 34px 30px;
}
.home-v2 .ventaja-card:hover {
  background: var(--color-white);
  border-color: var(--border-soft);
  box-shadow: 0 18px 40px rgba(17,24,39,.08);
}
.home-v2 .ventaja-card__num {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-accent);
  font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: all var(--transition);
}
.home-v2 .ventaja-card:hover .ventaja-card__num { background: var(--color-accent); color: var(--color-primary); }
.home-v2 .ventaja-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }

/* ── PROCESO ── */
.proceso-v2 { padding: 100px 0; background: var(--surface); }
.proceso-v2__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.paso-v2 {
  background: var(--color-white);
  border-radius: 14px;
  padding: 36px 26px 30px;
  text-align: center;
  border: 1px solid var(--border-soft);
  transition: all var(--transition);
}
.paso-v2:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(17,24,39,.08); }
.paso-v2__icon {
  position: relative;
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--tag-bg);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.paso-v2__icon svg { width: 36px; height: 36px; }
.paso-v2__num {
  position: absolute;
  top: -2px; right: -2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: .78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--color-white);
}
.paso-v2 h3 {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--surface);
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  margin-bottom: 12px;
}
.paso-v2 p { font-size: .86rem; color: var(--color-gray); line-height: 1.65; }

/* ── CTA BANDA ── */
.cta-banda { padding: 90px 0 0; background: var(--color-white); }
.cta-banda__box {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--color-primary);
  padding: 56px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
/* Círculos concéntricos decorativos */
.cta-banda__box::before,
.cta-banda__box::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cta-banda__box::before {
  width: 520px; height: 520px;
  right: -120px; top: 50%;
  transform: translateY(-50%);
  background: repeating-radial-gradient(circle, rgba(255,255,255,.05) 0 2px, transparent 2px 46px);
}
.cta-banda__box::after {
  width: 260px; height: 260px;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(201,151,58,.18), transparent 70%);
}
.cta-banda__text { position: relative; z-index: 1; max-width: 560px; }
.cta-banda__text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: 14px;
}
.cta-banda__text p { color: rgba(255,255,255,.78); line-height: 1.7; }
.cta-banda__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.cta-banda__tel { color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 500; }
.cta-banda__tel:hover { color: var(--color-accent); }

/* ── VENDE (versión clara) ── */
.home-v2 .vende {
  padding: 100px 0;
  background: var(--color-white);
}
.home-v2 .vende::before { display: none; }
.home-v2 .vende .section-eyebrow { background: var(--tag-bg); color: var(--color-primary); }
.home-v2 .vende .section-title { color: var(--color-primary); }
.home-v2 .vende .section-subtitle { color: var(--color-gray); opacity: 1; }
.home-v2 .vende__visual .visual-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(17,24,39,.12);
}
.home-v2 .vende__badge {
  border-radius: 14px;
  width: auto; height: auto;
  padding: 16px 20px;
  background: var(--color-primary);
}
.home-v2 .vende__badge .badge-number { color: var(--color-accent); font-family: var(--font-heading); }
.home-v2 .vende__badge .badge-label { color: var(--color-white); }
.home-v2 .vende__list { gap: 14px; }
.home-v2 .vende-item {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface);
  transition: all var(--transition);
}
.home-v2 .vende-item:hover { background: var(--color-white); box-shadow: 0 12px 30px rgba(17,24,39,.08); }
.home-v2 .vende-item__icon {
  border-radius: 10px;
  background: var(--color-primary);
}
.home-v2 .vende-item h3 { color: var(--color-primary); font-weight: 600; }
.home-v2 .vende-item p { color: var(--color-gray); }
.home-v2 .vende__cta-nota { color: var(--color-gray); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

@media (max-width: 1024px) {
  .about-v2__grid,
  .destacados__inner { grid-template-columns: 1fr; gap: 48px; }
  .about-v2__visual { max-width: 560px; }
  .destacados__card-wrap { justify-content: flex-start; }
  .proceso-v2__grid { grid-template-columns: repeat(2, 1fr); }
  .cta-banda__box { flex-direction: column; align-items: flex-start; padding: 44px 36px; }
  .cta-banda__actions { align-items: flex-start; }
}

@media (max-width: 860px) {
  .home-v2 .hero-search { flex-wrap: wrap; gap: 14px; border-radius: 0 10px 10px 10px; }
  .home-v2 .hero-search__field { flex: 1 1 45%; padding: 0; border-right: none; }
  .home-v2 .hero-search__submit { flex: 1 1 100%; justify-content: center; margin-left: 0; }
}

@media (max-width: 768px) {
  .hero-v2 { padding: 64px 20px 130px; min-height: 560px; }
  .hero-v2__arrow { display: none; }
  .hero-v2__actions .btn { flex: 1 1 100%; }

  .buscador-card { margin-top: -80px; padding: 0 16px; }
  .buscador-card__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .buscador-card__tabs::-webkit-scrollbar { display: none; }
  .buscador-card__tab { padding: 10px 14px; font-size: .8rem; white-space: nowrap; }
  .home-v2 .hero-search { padding: 18px 16px; }

  .about-v2 { padding: 72px 0; }
  .about-v2__visual { padding: 40px 24px 0 0; }
  .about-v2__img--main { height: 320px; border-radius: 60px 14px 60px 14px; }
  .about-v2__img--float { height: 150px; }
  .about-v2__badge { bottom: -24px; right: 0; }
  .stats-v2 { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }

  .home-v2 .propiedades-section,
  .home-v2 .ventajas,
  .proceso-v2,
  .home-v2 .vende { padding: 72px 0; }
  .destacados { padding: 72px 0; }
  .destacados__card-wrap { flex-direction: column; align-items: stretch; }
  .destacados__card { max-width: none; padding: 26px 22px; }
  .destacados__nav { flex-direction: row; justify-content: center; }
  .destacados__nav svg { transform: rotate(-90deg); }

  .cta-banda { padding-top: 64px; }
  .cta-banda__box { padding: 36px 24px; }
}

@media (max-width: 560px) {
  .home-v2 .hero-search__field { flex: 1 1 100%; }
  .proceso-v2__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v2__slide { transition: opacity .01s; transform: none; }
}

/* ── AJUSTES ── */
.stats-v2 .stat-label { text-transform: none; letter-spacing: 0; }
.hero-v2__title { font-size: clamp(2.1rem, 5vw, 3.8rem); }
.home-v2 .vende__split { align-items: start; }
.home-v2 .vende__visual { position: sticky; top: calc(var(--topbar-h) + var(--header-h) + 24px); }
@media (max-width: 1024px) {
  .home-v2 .vende__visual { position: relative; top: auto; }
}
