/* ============================================
   CASATERRA BIENES RAÍCES – TEMA v2 (todo el sitio)
   Barra superior, header blanco, botones, etiquetas de sección,
   tipografía y ajustes de páginas internas. Se activa con
   <body class="theme-v2">; el home suma css/home-v2.css.
   ============================================ */

.theme-v2 {
  --topbar-h: 40px;
  --font-heading: 'Montserrat', system-ui, sans-serif;
  --radius-btn: 6px;
  --tag-bg: rgba(26,39,68,.07);
  --surface: var(--color-off-white);
  --border-soft: #e7e4dd;
  padding-top: calc(var(--topbar-h) + var(--header-h));
  color: var(--color-text);
}

/* ── TIPOGRAFÍA Y ETIQUETAS DE SECCIÓN ── */
.theme-v2 .section-eyebrow {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--color-primary);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.theme-v2 .section-eyebrow--light {
  background: rgba(255,255,255,.14);
  color: var(--color-white);
}
.theme-v2 .section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -.02em;
}
.theme-v2 .section-header { margin-bottom: 48px; }
.theme-v2 .section-header .section-title { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ── BOTONES ── */
.theme-v2 .btn {
  border-radius: var(--radius-btn);
  letter-spacing: 0;
  font-weight: 600;
  font-size: .88rem;
  padding: 13px 22px;
}
.theme-v2 .btn--large { padding: 16px 28px; font-size: .95rem; }
.theme-v2 .btn--primary:hover { box-shadow: 0 8px 20px rgba(201,151,58,.3); }
.theme-v2 .btn--light {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}
.theme-v2 .btn--light:hover {
  background: var(--color-off-white);
  transform: translateY(-2px);
}

/* ── BARRA SUPERIOR ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  height: var(--topbar-h);
  background: var(--color-primary);
  color: rgba(255,255,255,.85);
  font-size: .76rem;
  font-weight: 500;
}
.topbar__inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__info { display: flex; align-items: center; gap: 24px; min-width: 0; }
.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color var(--transition);
}
.topbar__item svg { color: var(--color-accent); flex-shrink: 0; }
.topbar__item:hover { color: var(--color-white); }
.topbar__social { display: flex; gap: 6px; }
.topbar__social a {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
}
.topbar__social a:hover { background: var(--color-accent); color: var(--color-primary); }

/* ── HEADER BLANCO ── */
.theme-v2 .header {
  top: var(--topbar-h);
  background: var(--color-white);
  border-bottom: 1px solid var(--border-soft);
}
.theme-v2 .header.scrolled {
  background: var(--color-white);
  box-shadow: 0 6px 20px rgba(17,24,39,.08);
}
.theme-v2 .header__logo-img { height: 46px; }
.theme-v2 .nav-link {
  color: var(--color-primary);
  font-weight: 500;
  font-size: .84rem;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
}
.theme-v2 .nav-link:hover { color: var(--color-accent); }
.theme-v2 .nav-link--cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 600;
  padding: 10px 16px;
  margin-left: 10px;
}
.theme-v2 .nav-link--cta:hover { background: var(--color-accent-light); color: var(--color-primary); }
.theme-v2 .nav-dropdown {
  background: var(--color-white);
  border: 1px solid var(--border-soft);
  box-shadow: 0 14px 34px rgba(17,24,39,.12);
}
.theme-v2 .nav-dropdown__link { color: var(--color-primary); font-weight: 500; }
.theme-v2 .nav-dropdown__link:hover { background: var(--surface); color: var(--color-accent); }
.theme-v2 .lang-switch { background: var(--tag-bg); }
.theme-v2 .lang-switch__btn { color: var(--color-primary); opacity: .7; }
.theme-v2 .lang-switch__btn.active,
.theme-v2 .lang-switch__btn:hover { opacity: 1; }
.theme-v2 .hamburger span { background: var(--color-primary); }

/* ── FLECHA EN EL BOTÓN DEL MENÚ ── */
.theme-v2 .nav-link--cta::after {
  content: '';
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── SECCIONES OSCURAS: etiqueta y título claros ── */
.theme-v2 :is(.proceso, .testimonios, .video-section, .vende) .section-eyebrow {
  background: rgba(255,255,255,.12);
  color: var(--color-accent);
}

/* ══════════════════════════════
   PÁGINAS INTERNAS
══════════════════════════════ */

/* Portadas de color sólido (listados, nosotros, contacto, FAQ, legales, buscador).
   El body ya deja espacio para la barra superior y el header. */
.theme-v2 :is(.listing-hero, .buscar-hero, .nosotros-hero, .contacto-hero, .faq-hero, .aviso-hero) {
  position: relative;
  overflow: hidden;
  padding-top: 72px;
  padding-bottom: 64px;
  background:
    radial-gradient(circle at 88% 120%, rgba(201,151,58,.22), transparent 42%),
    repeating-radial-gradient(circle at 92% 110%, rgba(255,255,255,.045) 0 2px, transparent 2px 44px),
    var(--color-primary);
}
.theme-v2 .buscar-hero { padding-top: 56px; padding-bottom: 40px; }
.theme-v2 :is(.listing-hero, .buscar-hero, .nosotros-hero, .contacto-hero, .faq-hero, .aviso-hero) > * { position: relative; }
.theme-v2 [class*="hero__title"] {
  font-family: var(--font-heading);
  letter-spacing: -.025em;
}
.theme-v2 :is(.listing-hero__eyebrow, .nosotros-hero__eyebrow, .contacto-hero__eyebrow, .faq-hero__eyebrow) {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  margin-bottom: 14px;
}

/* Portada de desarrollos (foto + formulario) */
.theme-v2 .hero {
  padding-top: 0;
  min-height: calc(100vh - var(--topbar-h) - var(--header-h));
}
.theme-v2 .hero__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.theme-v2 .hero__form-card { border-radius: 14px; }
.theme-v2 .dev-subnav {
  top: calc(var(--topbar-h) + var(--header-h));
  background: var(--color-primary);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.theme-v2 .header.scrolled + .dev-subnav { background: var(--color-primary); }
.theme-v2 .dev-subnav__link { border-radius: var(--radius-btn); }
.theme-v2 .dev-subnav__link:hover { background: rgba(255,255,255,.1); color: var(--color-accent); }
.theme-v2.has-subnav .hero {
  padding-top: var(--subnav-h);
  min-height: calc(100vh - var(--topbar-h) - var(--header-h));
}

/* Ficha de propiedad */
.theme-v2 .prop-hero { margin-top: 0; }
.theme-v2 .prop-hero__badge { border-radius: 4px; }
.theme-v2 .prop-title,
.theme-v2 .prop-cta-strip__text { font-family: var(--font-heading); letter-spacing: -.015em; }
.theme-v2 .prop-cta-strip__text { font-style: normal; }
.theme-v2 .prop-sidebar,
.theme-v2 .listing-sidebar { top: calc(var(--topbar-h) + var(--header-h) + 24px); }
.theme-v2 .prop-price-box { border-radius: 14px; border-top: 4px solid var(--color-accent); }
.theme-v2 .prop-cta { border-radius: var(--radius-btn); }
.theme-v2 .prop-cta--accent.prop-cta--btn { background: var(--color-accent); color: var(--color-primary); }
.theme-v2 .prop-detalle { background: var(--surface); border: 1px solid var(--border-soft); }
.theme-v2 .prop-amenidad { border-radius: 4px; }

/* Tarjetas de listados (mismo estilo que el home) */
.theme-v2 .prop-card {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 16px rgba(17,24,39,.04);
}
.theme-v2 .prop-card:hover { box-shadow: 0 18px 40px rgba(17,24,39,.1); }
.theme-v2 .prop-card__badge { border-radius: 4px; }
.theme-v2 .prop-card__title {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -.01em;
}
.theme-v2 .prop-card__chip { border-radius: 4px; background: var(--surface); }
.theme-v2 .prop-card__footer { padding-top: 14px; border-top: 1px solid var(--border-soft); }
.theme-v2 .prop-card__price {
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: .85rem;
}
.theme-v2 .prop-card__btn { border-radius: var(--radius-btn); }
.theme-v2 .sidebar-filter-btn,
.theme-v2 .sidebar-tipo-btn { border-radius: var(--radius-btn); }

/* Tarjetas generales del sitio */
.theme-v2 :is(.desarrollo-card, .modelo-card) {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
.theme-v2 .desarrollo-card--active,
.theme-v2 .modelo-card--featured { border-color: var(--color-accent); }
.theme-v2 :is(.desarrollo-card__tag, .modelo-card__badge, .financiamiento-card__tag) { border-radius: 4px; }
.theme-v2 .desarrollo-card__name,
.theme-v2 .modelo-card__name { letter-spacing: -.02em; }
.theme-v2 :is(.amenidad-card, .financiamiento-card, .ventaja-card) {
  border: 1px solid transparent;
  border-radius: 14px;
}
.theme-v2 :is(.amenidad-card, .financiamiento-card):hover {
  border-color: var(--border-soft);
  box-shadow: 0 18px 40px rgba(17,24,39,.08);
}
.theme-v2 :is(.amenidad-card__icon, .financiamiento-card__icon) {
  background: var(--color-primary);
  color: var(--color-accent);
  border-radius: 10px;
}
.theme-v2 .testimonio-card { border-radius: 14px; }
.theme-v2 .respaldo-block { border-radius: 14px; border-width: 1px; }
.theme-v2 .galeria__item { border-radius: 10px; }
.theme-v2 .cta-ruptura__title { letter-spacing: -.02em; }

/* Contacto y formularios */
.theme-v2 .contacto { background: var(--surface); }
.theme-v2 .canal-item { background: var(--color-white); border: 1px solid var(--border-soft); }
.theme-v2 .canal-item strong { word-break: break-word; }
.theme-v2 .canal-icon { background: var(--color-primary); color: var(--color-accent); border-radius: 10px; }
.theme-v2 .canal-item--whatsapp .canal-icon { color: var(--color-whatsapp); }
.theme-v2 .contacto__form-wrapper {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(17,24,39,.08);
}
.theme-v2 .form-group input,
.theme-v2 .form-group select,
.theme-v2 .form-group textarea {
  border: 1px solid #e2ded6;
  border-radius: var(--radius-btn);
  background: var(--surface);
}
.theme-v2 .form-group input:focus,
.theme-v2 .form-group select:focus,
.theme-v2 .form-group textarea:focus { background: var(--color-white); }
.theme-v2 .contact-modal { border-radius: 14px; }

/* Botón flotante "Quiero asesoría" (en el home va encima de "Vende tu propiedad") */
.asesoria-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border-radius: 10px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(26,39,68,.35);
  transition: all var(--transition);
}
.asesoria-fab:hover {
  background: var(--color-primary-light);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26,39,68,.45);
}
.asesoria-fab__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-accent);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asesoria-fab__icon svg { width: 18px; height: 18px; }
.asesoria-fab__text { white-space: nowrap; }
.vende-fab ~ .asesoria-fab { bottom: 90px; }
@media (max-width: 768px) {
  .asesoria-fab { right: 16px; bottom: 16px; padding: 8px; }
  .asesoria-fab__text { display: none; }
  .asesoria-fab__icon { width: 40px; height: 40px; }
  .vende-fab ~ .asesoria-fab { bottom: 82px; }
}

/* Botón flotante "Vende tu propiedad" */
.theme-v2 .vende-fab { border-radius: 10px; padding: 8px 18px 8px 8px; }
.theme-v2 .vende-fab__icon { border-radius: 8px; }
@media (max-width: 768px) {
  .theme-v2 .vende-fab { padding: 8px; }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1100px) {
  .theme-v2 .nav-link { padding: 8px 9px; font-size: .8rem; }
  .topbar__item--wide { display: none; }
}
@media (max-width: 768px) {
  .theme-v2 { --topbar-h: 0px; }
  .topbar { display: none; }
  .theme-v2 .header__nav.open {
    top: var(--header-h);
    background: var(--color-white);
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 18px 30px rgba(17,24,39,.12);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .theme-v2 .nav-link--cta { margin-left: 0; justify-content: center; }
  .theme-v2 .nav-item--dropdown .nav-link { justify-content: center; }
  .theme-v2 .nav-dropdown { background: var(--surface); border: none; box-shadow: none; }
  .theme-v2 .lang-switch--nav { background: var(--tag-bg); }
  .theme-v2 .header__logo-img { height: 40px; }
}
