/* CEFAS Home — visual system */
:root {
  --cefas-navy: #0a2342;
  --cefas-navy-deep: #06182f;
  --cefas-blue: #2f80ed;
  --cefas-blue-soft: #e8f1fc;
  --cefas-blue-mist: #f3f7fc;
  --cefas-sky: #5aa6ff;
  --cefas-ink: #10233f;
  --cefas-muted: #6b7c93;
  --cefas-line: #d7e3f2;
  --cefas-white: #ffffff;
  --cefas-radius: 22px;
  --cefas-radius-sm: 14px;
  --cefas-shadow: 0 18px 40px rgba(10, 35, 66, 0.12);
  --cefas-font: 'Manrope', sans-serif;
  --cefas-display: 'Outfit', sans-serif;
  --cefas-header-h: 64px;
  --cefas-bottom-h: 72px;
  --cefas-max: 1120px;
}

body.cefas-home-body {
  margin: 0;
  font-family: var(--cefas-font);
  color: var(--cefas-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dcecff 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 8%, #eaf3ff 0%, transparent 50%),
    linear-gradient(180deg, #f7fafd 0%, #ffffff 42%, #f4f8fc 100%);
  -webkit-font-smoothing: antialiased;
}

body.cefas-home-body main {
  min-height: 100vh;
  padding-bottom: calc(var(--cefas-bottom-h) + 18px);
}

@media (min-width: 960px) {
  body.cefas-home-body main {
    padding-bottom: 40px;
  }
}

.cefas-home *,
.cefas-home *::before,
.cefas-home *::after {
  box-sizing: border-box;
}

.cefas-home a {
  color: inherit;
  text-decoration: none;
}

/* Reset agresivo frente a Elementor / theme legacy */
.cefas-home button,
.cefas-home input,
.cefas-home a.cefas-btn {
  font-family: var(--cefas-font) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  opacity: 1 !important;
  filter: none !important;
}

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

.cefas-container {
  width: min(100% - 32px, var(--cefas-max));
  margin-inline: auto;
}

/* Header */
.cefas-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--cefas-header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(247, 250, 253, 0.86);
  border-bottom: 1px solid rgba(215, 227, 242, 0.7);
}

.cefas-header__inner {
  width: min(100% - 32px, var(--cefas-max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cefas-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cefas-brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: #0b0b0b;
  flex-shrink: 0;
}

.cefas-brand__text {
  font-family: var(--cefas-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--cefas-navy);
  white-space: nowrap;
}

.cefas-brand__text span {
  display: block;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cefas-muted);
}

.cefas-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cefas-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--cefas-white);
  box-shadow: 0 4px 14px rgba(10, 35, 66, 0.08);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--cefas-navy);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cefas-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 35, 66, 0.14);
}

.cefas-icon-btn svg {
  width: 20px;
  height: 20px;
}

.cefas-pse-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--cefas-white);
  box-shadow: 0 4px 14px rgba(10, 35, 66, 0.1);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cefas-pse-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 35, 66, 0.16);
}

.cefas-pse-btn img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

/* Mobile nav drawer */
.cefas-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cefas-drawer.is-open {
  pointer-events: auto;
  opacity: 1;
}

.cefas-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 24, 47, 0.45);
}

.cefas-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86vw, 340px);
  height: 100%;
  background: var(--cefas-white);
  padding: 28px 22px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -20px 0 40px rgba(10, 35, 66, 0.18);
}

.cefas-drawer.is-open .cefas-drawer__panel {
  transform: translateX(0);
}

.cefas-drawer__panel nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.cefas-drawer__panel a {
  padding: 14px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--cefas-navy);
}

.cefas-drawer__panel a:hover {
  background: var(--cefas-blue-soft);
}

/* Hero */
.cefas-hero {
  padding: 18px 0 8px;
  overflow: hidden;
}

.cefas-hero__grid {
  display: grid;
  gap: 22px;
  align-items: center;
}

@media (min-width: 900px) {
  .cefas-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    min-height: min(72vh, 620px);
  }
}

.cefas-hero__copy {
  animation: cefasRise 0.7s ease forwards;
}

.cefas-home .cefas-hero__title {
  font-family: var(--cefas-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--cefas-navy) !important;
  margin: 0 0 14px;
  max-width: 16ch;
}

.cefas-hero__text {
  margin: 0 0 16px;
  color: var(--cefas-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 38ch;
}

.cefas-trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--cefas-navy);
  font-weight: 600;
  font-size: 0.92rem;
}

.cefas-trust__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #1f9d57;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.cefas-trust__icon svg {
  width: 13px;
  height: 13px;
}

.cefas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font-family: var(--cefas-font);
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cefas-home .cefas-btn--primary,
a.cefas-btn.cefas-btn--primary {
  background-color: #0a2342 !important;
  background-image: linear-gradient(135deg, #0a2342 0%, #123864 100%) !important;
  color: #ffffff !important;
  padding: 15px 22px;
  font-size: 0.95rem;
  box-shadow: 0 14px 28px rgba(10, 35, 66, 0.28);
  text-decoration: none !important;
}

.cefas-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(10, 35, 66, 0.34);
}

.cefas-btn--primary svg {
  width: 18px;
  height: 18px;
}

.cefas-btn--ghost {
  background: var(--cefas-white);
  color: var(--cefas-navy);
  padding: 12px 18px;
  font-size: 0.9rem;
}

.cefas-btn--ghost:hover {
  transform: translateY(-1px);
}

.cefas-hero__visual {
  position: relative;
  animation: cefasFadeSlide 0.9s 0.1s ease forwards;
  min-height: 220px;
}

.cefas-hero__frame {
  position: relative;
  margin-left: auto;
  width: min(100%, 520px);
  aspect-ratio: 5 / 4;
  border-radius: 28px 8px 28px 8px;
  overflow: hidden;
  transform: rotate(2.5deg) translateX(4%);
  box-shadow: var(--cefas-shadow);
  background: #c9d8ea;
}

@media (max-width: 899px) {
  .cefas-hero__frame {
    width: 78%;
    margin-right: -8%;
    aspect-ratio: 4 / 3.4;
  }
}

.cefas-hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.cefas-hero__card {
  position: absolute;
  left: 8%;
  bottom: 8%;
  background: var(--cefas-white);
  border-radius: 16px;
  padding: 14px 16px;
  width: min(220px, 70%);
  box-shadow: 0 16px 30px rgba(10, 35, 66, 0.16);
  animation: cefasFloat 4.5s ease-in-out infinite;
}

.cefas-hero__card strong {
  display: block;
  font-family: var(--cefas-display);
  font-size: 1rem;
  color: var(--cefas-navy);
  margin-bottom: 4px;
}

.cefas-hero__card span {
  color: var(--cefas-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Search */
.cefas-search {
  margin-top: 8px;
  animation: cefasRise 0.7s 0.15s ease forwards;
}

.cefas-search__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cefas-white);
  border: 1px solid var(--cefas-line);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 10px 28px rgba(10, 35, 66, 0.08);
}

.cefas-search__bar svg {
  width: 18px;
  height: 18px;
  color: var(--cefas-muted);
  flex-shrink: 0;
}

.cefas-search__bar input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: 500 0.92rem/1.3 var(--cefas-font);
  color: var(--cefas-ink);
  min-width: 0;
}

.cefas-search__bar input::placeholder {
  color: #93a4bb;
}

.cefas-search__filter {
  border: 0;
  background: var(--cefas-blue-soft);
  color: var(--cefas-navy);
  font: 700 0.85rem var(--cefas-font);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.cefas-types {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 2px 6px;
  scrollbar-width: none;
}

.cefas-types::-webkit-scrollbar {
  display: none;
}

.cefas-type {
  flex: 0 0 auto;
  width: 92px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 18px;
  padding: 12px 8px;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
  color: var(--cefas-muted);
  font: 600 0.78rem/1.2 var(--cefas-font);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.cefas-type__icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--cefas-white);
  border: 1px solid var(--cefas-line);
  display: grid;
  place-items: center;
  color: var(--cefas-navy);
}

.cefas-type__icon svg {
  width: 22px;
  height: 22px;
}

.cefas-type.is-active,
.cefas-type:hover {
  color: var(--cefas-navy);
  transform: translateY(-2px);
}

.cefas-type.is-active .cefas-type__icon,
.cefas-type:hover .cefas-type__icon {
  background: linear-gradient(160deg, #2f80ed, #175fbf);
  border-color: transparent;
  color: var(--cefas-white);
  box-shadow: 0 10px 18px rgba(47, 128, 237, 0.28);
}

/* Featured */
.cefas-featured {
  padding: 28px 0 10px;
}

.cefas-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cefas-section-head h2 {
  margin: 0;
  font-family: var(--cefas-display);
  font-size: 1.35rem;
  font-weight: 750;
  color: var(--cefas-navy);
}

.cefas-section-head a {
  color: var(--cefas-blue);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.cefas-featured__track,
.destacados-card.cefas-featured__track {
  display: flex !important;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cefas-featured__track::-webkit-scrollbar {
  display: none;
}

.cefas-prop-card {
  flex: 0 0 min(78vw, 280px);
  scroll-snap-align: start;
  background: var(--cefas-white);
  border: 1px solid rgba(215, 227, 242, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(10, 35, 66, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: cefasRise 0.55s ease forwards;
}

.cefas-prop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(10, 35, 66, 0.12);
}

.cefas-prop-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #d7e2ef center/cover no-repeat;
}

.cefas-prop-card__badges {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.cefas-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(10, 35, 66, 0.82);
  color: #fff;
  backdrop-filter: blur(4px);
}

.cefas-badge--soft {
  background: rgba(255, 255, 255, 0.92);
  color: var(--cefas-navy);
}

.cefas-fav {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #8aa0b8;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cefas-fav svg {
  width: 16px;
  height: 16px;
}

.cefas-prop-card__body {
  padding: 14px 14px 16px;
}

.cefas-prop-card__title {
  margin: 0 0 4px;
  font-family: var(--cefas-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--cefas-navy);
}

.cefas-prop-card__loc {
  margin: 0 0 10px;
  color: var(--cefas-muted);
  font-size: 0.84rem;
}

.cefas-prop-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  color: var(--cefas-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.cefas-prop-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cefas-prop-card__meta svg {
  width: 14px;
  height: 14px;
}

.cefas-prop-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cefas-prop-card__price {
  font-family: var(--cefas-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--cefas-navy);
}

.cefas-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cefas-blue-soft);
  color: #1d5db8;
  font-size: 0.75rem;
  font-weight: 700;
}

.cefas-featured__empty,
.cefas-featured__loading {
  width: 100%;
  padding: 28px 16px;
  text-align: center;
  color: var(--cefas-muted);
  background: var(--cefas-white);
  border-radius: var(--cefas-radius);
  border: 1px dashed var(--cefas-line);
}

/* Banner */
.cefas-banner {
  margin: 10px 0 28px;
}

.cefas-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(420px 180px at 90% 0%, rgba(90, 166, 255, 0.35), transparent 60%),
    linear-gradient(135deg, var(--cefas-navy-deep), #123a6b 55%, #0f4f9a);
  color: #fff;
  box-shadow: 0 18px 36px rgba(10, 35, 66, 0.22);
}

@media (min-width: 720px) {
  .cefas-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 26px 30px;
  }
}

.cefas-banner__copy {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cefas-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cefas-banner__icon svg {
  width: 22px;
  height: 22px;
}

.cefas-banner__copy h3 {
  margin: 0 0 6px;
  font-family: var(--cefas-display);
  font-size: 1.15rem;
}

.cefas-banner__copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 46ch;
}

/* Stats */
.cefas-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

@media (min-width: 800px) {
  .cefas-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cefas-stat {
  text-align: center;
  padding: 8px 6px 18px;
}

.cefas-stat__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 18px;
  background: var(--cefas-white);
  border: 1px solid var(--cefas-line);
  color: var(--cefas-blue);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(10, 35, 66, 0.06);
}

.cefas-stat__icon svg {
  width: 24px;
  height: 24px;
}

.cefas-stat strong {
  display: block;
  font-family: var(--cefas-display);
  font-size: 1.35rem;
  color: var(--cefas-navy);
  margin-bottom: 2px;
}

.cefas-stat span {
  color: var(--cefas-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Bottom nav */
.cefas-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(100% - 20px, 460px);
  height: 64px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(215, 227, 242, 0.95);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(10, 35, 66, 0.16);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 8px 8px 10px;
  z-index: 60;
}

@media (min-width: 960px) {
  .cefas-bottom-nav {
    display: none;
  }
}

.cefas-bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #8aa0b8;
  font-size: 0.68rem;
  font-weight: 700;
}

.cefas-bottom-nav a svg {
  width: 20px;
  height: 20px;
}

.cefas-bottom-nav a.is-active {
  color: var(--cefas-navy);
}

.cefas-bottom-nav__plus {
  width: 52px;
  height: 52px;
  margin-top: -22px;
  border-radius: 999px;
  background: linear-gradient(160deg, #2f80ed, #1558b0);
  color: #fff !important;
  box-shadow: 0 12px 22px rgba(47, 128, 237, 0.35);
  display: grid !important;
  place-items: center;
  align-self: start;
  gap: 0 !important;
}

.cefas-bottom-nav__plus span {
  display: none;
}

.cefas-bottom-nav__plus svg {
  width: 24px;
  height: 24px;
}

.cefas-bottom-nav a span {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hide legacy theme chrome on home */
body.cefas-home-body .elementor,
body.cefas-home-body #wpadminbar + .cefas-header {
  /* keep admin bar spacing handled by WP */
}

@keyframes cefasRise {
  from {
    opacity: 0.01;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cefasFadeSlide {
  from {
    opacity: 0.01;
    transform: translateX(24px) rotate(2.5deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(2.5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cefas-hero__copy,
  .cefas-hero__visual,
  .cefas-search,
  .cefas-prop-card,
  .cefas-hero__card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@keyframes cefasFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Preloader inside featured */
.cefas-featured .preloader {
  width: 100%;
  padding: 40px 0;
  display: grid;
  place-items: center;
}

.cefas-featured .spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #d7e3f2;
  border-top-color: var(--cefas-blue);
  animation: cefasSpin 0.8s linear infinite;
}

.cefas-featured .spinner div {
  display: none;
}

@keyframes cefasSpin {
  to {
    transform: rotate(360deg);
  }
}
