/* =========================================================
   FININFORM - Estilos generales
   Paleta basada en el logo real de Fininform (rosa/magenta + negro).
   Si el logo definitivo trae un hex distinto, ajustar solo estas
   variables --ff-primary / --ff-primary-dark y se propaga a toda la web.
   ========================================================= */
:root {
  --ff-primary: #e2078a;
  --ff-primary-dark: #a80561;
  --ff-accent: #1a1a1a;
  --ff-accent-dark: #000000;
  --ff-light: #fdf3f8;
  --ff-text: #22303c;
  --ff-muted: #6b7a85;
  --ff-radius: 14px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ff-text);
  background: #fff;
}

h1, h2, h3, h4, .navbar-brand {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
}

a { color: var(--ff-primary); }
a:hover { color: var(--ff-accent-dark); }

/* ---------- Navbar ---------- */
.ff-navbar {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(11, 61, 89, .08);
}
.ff-navbar .navbar-brand {
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.ff-navbar .navbar-brand img {
  height: 42px;
  width: auto;
  display: block;
}
.ff-navbar .nav-link {
  color: var(--ff-text);
  font-weight: 500;
}
.ff-navbar .nav-link.active,
.ff-navbar .nav-link:hover { color: var(--ff-primary); }
.ff-navbar .btn-ff-phone {
  background: var(--ff-primary);
  color: #fff;
  border-radius: 30px;
  padding: .5rem 1.1rem;
  font-weight: 600;
}
.ff-navbar .btn-ff-phone:hover { background: var(--ff-primary-dark); color:#fff; }

/* ---------- Hero ---------- */
.ff-hero {
  background: linear-gradient(135deg, var(--ff-primary) 0%, var(--ff-primary-dark) 100%);
  color: #fff;
  padding: 5.5rem 0 6.5rem;
}
.ff-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.ff-hero p.lead { color: rgba(255,255,255,.85); }
.ff-search-card {
  background: #fff;
  border-radius: var(--ff-radius);
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(0,0,0,.18);
  margin-top: -3.5rem;
}

/* ---------- Hero de la home: con imagen de fondo, blobs y animaciones ---------- */
.ff-hero-home {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 7.5rem;
  background:
    linear-gradient(125deg, rgba(226,7,138,.92) 0%, rgba(168,5,97,.94) 55%, rgba(35,5,25,.96) 100%),
    url('https://images.unsplash.com/photo-1497366811353-6870744d04b2?q=80&w=1740&auto=format&fit=crop') center / cover no-repeat;
}
/* Foto de oficina PLACEHOLDER: sustituir la URL de arriba por la imagen real que nos paséis */
.ff-hero-home .ff-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: .35;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, transparent 70%);
  animation: ff-float 9s ease-in-out infinite;
  pointer-events: none;
}
.ff-hero-home .ff-blob-1 { width: 260px; height: 260px; top: -60px; right: 8%; animation-delay: 0s; }
.ff-hero-home .ff-blob-2 { width: 160px; height: 160px; bottom: -40px; left: 6%; animation-delay: 2.5s; opacity: .25; }
.ff-hero-home .ff-blob-3 { width: 110px; height: 110px; top: 35%; right: 22%; animation-delay: 1.2s; opacity: .2; }

@keyframes ff-float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-22px) translateX(12px) scale(1.06); }
}

.ff-hero-home .container { position: relative; z-index: 2; }

.ff-fade-up {
  opacity: 0;
  transform: translateY(22px);
  animation: ff-fade-up .8s ease forwards;
}
.ff-fade-up.ff-delay-1 { animation-delay: .12s; }
.ff-fade-up.ff-delay-2 { animation-delay: .28s; }
.ff-fade-up.ff-delay-3 { animation-delay: .44s; }

@keyframes ff-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Revelado suave de secciones al hacer scroll (activado por JS con IntersectionObserver) */
.ff-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.ff-reveal.ff-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ff-fade-up, .ff-reveal, .ff-hero-home .ff-blob {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Sections ---------- */
.ff-section { padding: 4.5rem 0; }
.ff-section-alt { background: var(--ff-light); }
.ff-badge-soft {
  background: rgba(11,61,89,.08);
  color: var(--ff-primary);
  border-radius: 30px;
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.ff-icon-box {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(11,61,89,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--ff-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.ff-zone-card {
  border-radius: var(--ff-radius);
  overflow: hidden;
  position: relative;
  height: 180px;
  color: #fff;
  display: flex; align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.ff-zone-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(35,5,25,.85), rgba(35,5,25,0));
}
.ff-zone-card span { position: relative; z-index: 1; padding: 1rem; font-weight: 600; }

/* ---------- Property cards ---------- */
.ff-card-inmueble {
  border: none;
  border-radius: var(--ff-radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(11,61,89,.10);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.ff-card-inmueble:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(11,61,89,.18);
}
.ff-card-inmueble .ff-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9edf0;
}
.ff-card-inmueble .ff-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.ff-badge-op {
  position: absolute; top: .75rem; left: .75rem;
  padding: .3rem .7rem;
  border-radius: 30px;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
}
.ff-badge-op.venta { background: var(--ff-primary); }
.ff-badge-op.alquiler { background: var(--ff-accent-dark); }
.ff-card-inmueble .ff-precio {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ff-primary);
}
.ff-card-inmueble .ff-caracteristicas {
  font-size: .85rem;
  color: var(--ff-muted);
}

/* ---------- Filtros ---------- */
.ff-filtros {
  background: #fff;
  border-radius: var(--ff-radius);
  box-shadow: 0 6px 20px rgba(11,61,89,.08);
  padding: 1.25rem;
}
.ff-chip {
  border: 1px solid #dbe2e7;
  background: #fff;
  border-radius: 30px;
  padding: .35rem .9rem;
  font-size: .85rem;
  cursor: pointer;
}
.ff-chip.active {
  background: var(--ff-primary);
  color: #fff;
  border-color: var(--ff-primary);
}

/* ---------- Footer ---------- */
.ff-footer {
  background: var(--ff-primary-dark);
  color: rgba(255,255,255,.85);
  padding: 3.5rem 0 1.5rem;
}
.ff-footer a { color: #fff; }
.ff-footer h5 { color: #fff; }
.ff-footer .ff-copy {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}

/* ---------- Detalle inmueble ---------- */
.ff-galeria-principal img { border-radius: var(--ff-radius); width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ff-galeria-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: .5rem; }
.ff-galeria-mini img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; cursor: pointer; transition: outline .15s ease; }

.ff-galeria-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: var(--ff-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.ff-galeria-flecha:hover {
  background: #fff;
  color: var(--ff-primary);
}
.ff-ficha-precio { font-size: 2rem; font-weight: 700; color: var(--ff-primary); }
.ff-tabla-carac td { padding: .5rem 0; border-bottom: 1px solid #eef1f3; }

.ff-whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 1000;
  background: #25D366; color: #fff; border-radius: 50%;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 1.6rem;
}

@media (max-width: 576px) {
  .ff-galeria-mini { grid-template-columns: repeat(3, 1fr); }
}
/* =========================================================
   Aviso de cookies (banner + panel de preferencias)
   Usa los colores corporativos de :root
   ========================================================= */
.ff-cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080;
  max-width: 1100px; margin: 0 auto;
  background: #fff; color: var(--ff-text);
  border-top: 5px solid var(--ff-primary);
  border-radius: var(--ff-radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  padding: 1.25rem 1.5rem;
  transform: translateY(140%); opacity: 0; visibility: hidden;
  transition: transform .35s ease, opacity .35s ease, visibility .35s;
}
.ff-cookie-banner.ff-visible { transform: none; opacity: 1; visibility: visible; }
.ff-cookie-inner { display: flex; align-items: center; gap: 1.5rem; }
.ff-cookie-info { flex: 1; }
.ff-cookie-banner h2,
.ff-cookie-modal h2 { font-size: 1.1rem; margin: 0 0 .4rem; color: var(--ff-accent); }
.ff-cookie-banner h2 .bi { color: var(--ff-primary); margin-right: .3rem; }
.ff-cookie-banner p { font-size: .9rem; margin: 0; color: var(--ff-text); }
.ff-cookie-banner a,
.ff-cookie-modal a { color: var(--ff-primary); font-weight: 600; }
.ff-cookie-acciones { display: flex; gap: .6rem; flex-shrink: 0; }

.ff-cookie-btn {
  border-radius: 30px; padding: .6rem 1.3rem; font-weight: 600; font-size: .9rem;
  border: 2px solid var(--ff-primary); cursor: pointer; white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ff-cookie-btn-pri { background: var(--ff-primary); color: #fff; }
.ff-cookie-btn-pri:hover { background: var(--ff-primary-dark); border-color: var(--ff-primary-dark); }
.ff-cookie-btn-sec { background: #fff; color: var(--ff-primary); }
.ff-cookie-btn-sec:hover { background: var(--ff-light); }
.ff-cookie-btn:focus-visible,
.ff-cookie-cerrar:focus-visible { outline: 3px solid var(--ff-accent); outline-offset: 2px; }

/* Panel de preferencias */
.ff-cookie-modal {
  position: fixed; inset: 0; z-index: 1090;
  background: rgba(26,26,26,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ff-cookie-modal[hidden] { display: none; }
.ff-cookie-modal-caja {
  background: #fff; border-radius: var(--ff-radius); width: 100%; max-width: 560px;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,.3); overflow: hidden;
}
.ff-cookie-modal-cab {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem; background: linear-gradient(135deg, var(--ff-primary) 0%, var(--ff-primary-dark) 100%);
}
.ff-cookie-modal-cab h2 { color: #fff; margin: 0; }
.ff-cookie-cerrar { background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; padding: .25rem; border-radius: 6px; }
.ff-cookie-modal-cuerpo { padding: 1.25rem 1.5rem; overflow-y: auto; font-size: .9rem; }
.ff-cookie-cat { border: 1px solid #eadbe4; border-radius: 10px; padding: .9rem 1rem; margin-top: .9rem; background: var(--ff-light); }
.ff-cookie-cat p { margin: .4rem 0 0; color: var(--ff-muted); font-size: .85rem; }
.ff-cookie-cat-cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ff-cookie-cat-cab label { margin: 0; cursor: pointer; }
.ff-cookie-siempre { font-size: .8rem; font-weight: 600; color: var(--ff-primary-dark); }
.ff-cookie-modal-pie {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem;
  padding: 1rem 1.5rem; border-top: 1px solid #f0e3eb;
}

/* Interruptor */
.ff-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.ff-switch input { opacity: 0; width: 0; height: 0; }
.ff-switch-slider { position: absolute; inset: 0; background: #c9ced3; border-radius: 26px; transition: background .2s; }
.ff-switch-slider::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.ff-switch input:checked + .ff-switch-slider { background: var(--ff-primary); }
.ff-switch input:checked + .ff-switch-slider::before { transform: translateX(20px); }
.ff-switch input:focus-visible + .ff-switch-slider { outline: 3px solid var(--ff-accent); outline-offset: 2px; }

body.ff-cookie-bloqueo { overflow: hidden; }

/* Enlaces legales del footer */
.ff-footer .ff-legal { margin-top: .5rem; }
.ff-footer .ff-legal a { color: rgba(255,255,255,.75); text-decoration: none; margin: 0 .5rem; }
.ff-footer .ff-legal a:hover { color: #fff; text-decoration: underline; }

/* Tabla de la política de cookies */
.ff-tabla-cookies { font-size: .9rem; }
.ff-tabla-cookies th { background: var(--ff-light); color: var(--ff-accent); }

@media (max-width: 768px) {
  .ff-cookie-banner { left: 0; right: 0; bottom: 0; border-radius: var(--ff-radius) var(--ff-radius) 0 0; padding: 1.1rem 1rem; }
  .ff-cookie-inner { flex-direction: column; align-items: stretch; gap: 1rem; }
  .ff-cookie-acciones { flex-direction: column-reverse; }
  .ff-cookie-btn { width: 100%; }
  .ff-cookie-modal-pie { flex-direction: column-reverse; }
}

/* Páginas legales */
.ff-completar { background: #fff3cd; color: #7a5b00; padding: 0 .3rem; border-radius: 4px; font-weight: 600; }
.ff-info-rgpd { font-size: .78rem; color: var(--ff-muted); line-height: 1.45; }
.ff-footer .ff-credito { margin-top: .4rem; font-size: .78rem; color: rgba(255,255,255,.55); }
.ff-footer .ff-credito a { color: rgba(255,255,255,.75); text-decoration: none; }
.ff-footer .ff-credito a:hover { color: #fff; text-decoration: underline; }
