:root {
  --sand:   #F8F9FA;   /* body background */
  --linen:  #F3F4F6;   /* surfaces, hover states */
  --stone:  #E5E7EB;   /* borders, active states */
  --bark:   #717171;   /* secondary text */
  --soil:   #1C1C1E;   /* charcoal text & navbar */
  --olive:  #1EB08B;   /* PisoFlow accent */
  --sage:   #1EB08B;   /* PisoFlow main green */
  --clay:   #EA580C;   /* warning/alerts */
  --white:  #FFFFFF;   /* cards background */
  --whatsapp: #25d366; /* whatsapp brand */

  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
  --transition-apple: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  background-color: var(--sand);
  color: var(--soil);
  line-height: 1.5;
  font-size: 15px;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* BARRA DE NAVEGACIÓN */
.navbar {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--stone);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--soil);
  font-size: 1.2rem;
}

.logo img {
  height: 36px;
}

.btn-nav-catalog {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--soil);
  border: 1px solid var(--soil);
  padding: 8px 20px;
  border-radius: 20px;
  transition: var(--transition-apple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-nav-catalog:hover {
  background: var(--soil);
  color: var(--white);
}

/* Cambio de idioma, junto al botón de volver */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-lang {
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--soil);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
}

@media (max-width: 520px) {
  .btn-nav-lang span,
  .btn-nav-catalog span {
    display: none;
  }
  .btn-nav-catalog {
    padding: 8px 12px;
  }
}

/* HERO SECTION */
.hero {
  padding: 100px 0 60px 0;
  text-align: center;
  /* Color de la agencia con un ligero oscurecido en diagonal (antes, verde
     PisoFlow fijo). */
  background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.14) 100%), var(--sage);
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--on-primary, var(--white));
  margin-bottom: 28px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--on-primary, rgba(255, 255, 255, 0.9));
  max-width: 650px;
  margin: 0 auto 48px auto;
  line-height: 1.6;
}

/* GRID DE BENEFICIOS */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px;
  margin: 60px 0 80px 0;
}

.benefit-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: 16px;
  border: 1px solid var(--stone);
  box-shadow: var(--shadow-premium);
  transition: var(--transition-apple);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--primary, #1EB08B) 20%, transparent);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary, #1EB08B) 8%, transparent);
  color: var(--primary-text, var(--sage));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.benefit-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--soil);
}

.benefit-desc {
  font-size: 0.88rem;
  color: var(--bark);
  line-height: 1.6;
}

/* SECCIÓN CAPTACIÓN DE PROPIETARIOS CON GRID LAYOUT */
.capture-layout-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.05fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  margin: 0 auto 100px auto;
  max-width: 1200px;
}

.capture-media-side {
  position: relative;
  background-color: var(--soil);
  overflow: hidden;
  min-height: 520px;
}

.capture-media-side video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.capture-media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(28,28,30,0.15) 30%, rgba(28,28,30,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  color: var(--white);
  text-align: left;
}

.capture-media-overlay-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--white);
}

.capture-media-overlay-desc {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
  color: var(--white);
}

.form-section-side {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-section-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--stone);
  padding-bottom: 20px;
  text-align: left;
}

.form-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: 14px;
}

.form-section-desc {
  font-size: 0.92rem;
  color: var(--bark);
}

@media (max-width: 900px) {
  .capture-layout-grid {
    grid-template-columns: 1fr;
    border-radius: 16px;
    margin-left: 12px;
    margin-right: 12px;
  }
  .capture-media-side {
    min-height: 300px;
    height: 300px;
  }
  .capture-media-overlay {
    padding: 24px;
  }
  .capture-media-overlay-title {
    font-size: 1.5rem;
  }
  .form-section-side {
    padding: 32px 24px;
  }
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soil);
}

.form-control {
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--stone);
  background: var(--sand);
  font-size: 0.9rem;
  color: var(--soil);
  outline: none;
  transition: var(--transition-apple);
  width: 100%;
}

.form-control:focus {
  border-color: var(--sage);
  background: var(--white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #1EB08B) 10%, transparent);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  height: auto;
  padding: 12px 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.btn-submit {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  border: none;
  background: var(--soil);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-apple);
  margin-top: 10px;
}

.btn-submit:hover {
  background: var(--sage);
  color: var(--on-primary, var(--white));
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* CARTA DE ÉXITO */
.result-box {
  text-align: center;
  padding: 30px 10px;
  display: none;
}

.result-icon {
  font-size: 3.5rem;
  color: var(--primary-text, var(--sage));
  margin-bottom: 16px;
}

.result-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: 10px;
}

.result-desc {
  color: var(--bark);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px auto;
}

.btn-wa-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--whatsapp);
  color: white;
  font-weight: bold;
  font-size: 0.92rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  transition: var(--transition-apple);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-wa-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

/* FOOTER */
.footer {
  background: var(--soil);
  color: var(--white);
  padding: 40px 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.footer-logo img {
  height: 28px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--bark);
  text-decoration: none;
  transition: var(--transition-apple);
}

.footer-links a:hover {
  color: var(--white);
}

/* LOADER animation */
.loader {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid var(--white);
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Elementos que antes usaban style="" inline */
.btn-back-catalog {
  display: inline-flex;
  text-decoration: none;
  width: auto;
  padding: 0 24px;
  margin-top: 0;
}

#owner-whatsapp-fallback .result-icon,
#owner-whatsapp-fallback .result-title {
  color: var(--clay);
}

.wa-fallback-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-retry-form {
  max-width: 160px;
  margin: 0 auto;
  height: 38px;
}

/* Oculta lo que la agencia no tiene (logo, WhatsApp); sin esto, cualquier
   clase con display anula el atributo hidden. */
[hidden] {
  display: none !important;
}

/* Información básica de privacidad bajo el formulario (art. 13 RGPD) */
.privacy-note {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--bark);
  margin-top: 14px;
}

.privacy-note a {
  color: var(--primary-text, var(--sage));
}

/* ===================================================================
   Estilo de la web de la agencia (Luxury, Modern, Boutique), el mismo que
   la portada. propietarios.js pone la clase en <body> y carga sus fuentes.
   =================================================================== */
body.theme-luxury { --font-display: 'Cormorant Garamond', Georgia, serif; --font-body: 'Jost', system-ui, sans-serif; --page-bg: #FFFFFF; --radius: 0px; --radius-btn: 0px; --title-weight: 500; }
body.theme-modern { --font-display: 'Manrope', system-ui, sans-serif; --font-body: 'Manrope', system-ui, sans-serif; --page-bg: #F8FAFC; --radius: 20px; --radius-btn: 14px; --title-weight: 800; }
body.theme-boutique { --font-display: 'Fraunces', Georgia, serif; --font-body: 'Nunito Sans', system-ui, sans-serif; --page-bg: #F6F1EA; --radius: 28px; --radius-btn: 999px; --title-weight: 600; }

body.theme-luxury, body.theme-modern, body.theme-boutique { background: var(--page-bg); }

:where(body.theme-luxury, body.theme-modern, body.theme-boutique) *:where(:not(.ti)) { font-family: var(--font-body); }

:is(body.theme-luxury, body.theme-modern, body.theme-boutique) :is(.logo, .hero-title, .benefit-title, .capture-media-overlay-title, .form-section-title, .result-title, .footer-logo) {
  font-family: var(--font-display);
  font-weight: var(--title-weight);
}

:is(body.theme-luxury, body.theme-modern, body.theme-boutique) :is(.benefit-card, .capture-layout-grid) { border-radius: var(--radius); }
:is(body.theme-luxury, body.theme-modern, body.theme-boutique) :is(.btn-submit, .btn-wa-cta, .btn-nav-catalog) { border-radius: var(--radius-btn); }

body.theme-luxury .hero-title { font-size: clamp(2.4rem, 5vw, 3.8rem); }
body.theme-luxury :is(.btn-submit, .btn-nav-catalog) { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.82rem; }
body.theme-boutique .hero-title em { font-style: italic; }
:is(body.theme-luxury, body.theme-modern, body.theme-boutique) :is(.logo, .footer-logo, .hero-title) *:not(.ti) { font-family: inherit; }
