/* ========================================
   Coral Inmobiliaria — Demo InPulsa
   Brand: #C2A242 (gold) + #434953 (slate)
   Reproducción de https://www.coralinmobiliaria.es
   ======================================== */

:root {
  --c-gold: #C2A242;
  --c-gold-dark: #9B8133;
  --c-slate: #434953;
  --c-slate-dark: #2C2F36;
  --c-text: #2c2c2c;
  --c-text-soft: #6b6b6b;
  --c-bg: #ffffff;
  --c-bg-soft: #fafafa;
  --c-border: #e5e5e5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --font-h: 'Montserrat', system-ui, sans-serif;
  --font-b: 'Open Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Belt-and-suspenders against horizontal scroll on mobile.
   Two known sources: hero-slide with transform: scale(1.05) (escapes its
   parent's overflow boundary in some browsers) and the .bleed wrapper that
   uses 100vw + negative margin to break out of the page padding (off by a
   few pixels when the body has a scrollbar). Clipping at the root makes
   the page never scroll sideways regardless. */
html, body { overflow-x: hidden; max-width: 100%; }
body { font-family: var(--font-b); color: var(--c-text); background: var(--c-bg); }

img { max-width: 100%; display: block; }

a { color: var(--c-gold); text-decoration: none; }
a:hover { color: var(--c-gold-dark); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ─── Demo nav (oculto en demo "puro") ─── */
.demo-nav {
  background: #f0eef2;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--c-border);
}
.demo-nav a { color: var(--c-text-soft); }
.demo-tag {
  margin-left: auto;
  background: var(--c-gold);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* ─── Header ─── */
.header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--c-slate);
}
.brand-logo { width: 44px; height: 44px; border-radius: 8px; }
.brand-text { font-size: 18px; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--c-slate);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--c-gold); }

/* ─── Hero (slideshow) ─── */
.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 35s infinite;
  transform: scale(1.05);
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 7s; }
.hero-slide:nth-child(3) { animation-delay: 14s; }
.hero-slide:nth-child(4) { animation-delay: 21s; }
.hero-slide:nth-child(5) { animation-delay: 28s; }

@keyframes heroFade {
  0%, 2% { opacity: 0; transform: scale(1.05); }
  4%, 18% { opacity: 1; transform: scale(1.00); }
  20%, 100% { opacity: 0; transform: scale(1.05); }
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(67,73,83,0.55) 0%, rgba(67,73,83,0.25) 60%, rgba(0,0,0,0.5) 100%);
  display: flex;
  align-items: center;
  z-index: 2;
}
.hero-cta {
  display: inline-block;
  margin-top: 32px;
  background: var(--c-gold);
  color: #fff;
  padding: 16px 40px;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--font-h);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta:hover {
  background: var(--c-gold-dark);
  transform: translateY(-2px);
  color: #fff;
}
.hero-content {
  max-width: 600px;
  color: #fff;
}
.hero-title {
  font-family: var(--font-h);
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  margin: 0;
  opacity: 0.95;
}

/* ─── Services ─── */
.services { padding: 96px 0; background: var(--c-bg); }
.section-title {
  font-family: var(--font-h);
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 12px;
  color: var(--c-slate);
  letter-spacing: -0.01em;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--c-gold);
  margin: 16px auto 0;
}
.section-subtitle {
  text-align: center;
  color: var(--c-text-soft);
  font-size: 15px;
  margin: 0 0 48px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.service-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.service-img {
  height: 220px;
  background-size: cover;
  background-position: center;
}
.service-card h3 {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 600;
  margin: 24px 24px 8px;
  color: var(--c-slate);
}
.service-card p {
  margin: 0 24px 28px;
  color: var(--c-text-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Featured (carousel) ─── */
.featured { padding: 80px 0; background: var(--c-bg-soft); }
/* Full-bleed wrapper: width 100% (not 100vw — 100vw includes scrollbar and
   triggers a horizontal scroll on mobile) and use negative margins only as
   far as the container padding allows. */
.bleed { width: 100%; padding: 32px 0 16px; }

/* ─── Properties (search + map) ─── */
.properties { padding: 80px 0; background: var(--c-bg); }
.properties-widget-wrap {
  max-width: 1440px;
  margin: 32px auto 0;
  padding: 0 16px;
}

/* ─── Override widget primary color to Coral gold ─── */
inpulsa-properties,
inpulsa-properties-carousel {
  --primary: var(--c-gold);
  --primary-color: var(--c-gold);
  --ip-primary: var(--c-gold);
  --ip-primary-dark: var(--c-gold-dark);
  --color-primary: var(--c-gold);
  --color-primary-dark: var(--c-gold-dark);
  --accent: var(--c-slate);
  --ip-accent: var(--c-slate);
}

/* ─── Newsletter ─── */
.newsletter {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--c-gold) 0%, var(--c-gold-dark) 100%);
  color: #fff;
  text-align: center;
}
.section-title-light {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px;
}
.section-subtitle-light {
  margin: 0 0 32px;
  opacity: 0.9;
  font-size: 15px;
}
.newsletter-form {
  display: inline-flex;
  gap: 8px;
  max-width: 480px;
  width: 100%;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border: 0;
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
}
.newsletter-form button {
  padding: 14px 28px;
  background: var(--c-slate);
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font-h);
  letter-spacing: 0.04em;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--c-slate-dark); }

/* ─── Footer ─── */
.footer {
  background: var(--c-slate);
  color: #c8cdd5;
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer h4 {
  font-family: var(--font-h);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.footer p { margin: 4px 0; font-size: 14px; line-height: 1.7; }
.footer-logo { width: 56px; height: 56px; border-radius: 8px; margin-bottom: 12px; }
.footer-text { color: #fff; font-weight: 600; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #8a8f9a;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { height: 400px; }
  .hero-title { font-size: 36px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .section-title { font-size: 28px; }
}
