@font-face {
  font-family: Holden-Medium;
  src: url(../fonts/Holden/Holden-Medium.ttf);
}

@font-face {
  font-family: Cabin;
  src: url(../fonts/Cabin/Cabin-Regular.ttf);
}

@font-face {
  font-family: Poppins-Medium;
  src: url(../fonts/Poppins/Poppins-Medium.ttf);
}

.funnel-page,
.funnel-page * {
  box-sizing: border-box;
}

.validation-container.funnel-page,
.funnel-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f6f7fb 0%, #e8ecf1 100%);
  font-family: Cabin, sans-serif;
  overflow-x: hidden;
  text-align: center;
}

/* Base validation (igual que validar_telefono_cotizar) */
.validation-card {
  background: white;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.validation-logo {
  margin-bottom: 2rem;
}

.validation-logo img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(68, 81, 158, 0.2);
}

.validation-title {
  font-family: Poppins-Medium, sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.validation-subtitle {
  font-family: Cabin, sans-serif;
  font-size: 1rem;
  color: #566573;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* Card funnel: glass + degradado marca */
.validation-card.funnel-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 12px 40px rgba(68, 81, 158, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.validation-card.funnel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(68, 81, 158, 0.11) 0%,
    rgba(90, 111, 216, 0.07) 38%,
    rgba(255, 255, 255, 0.22) 72%,
    rgba(246, 247, 251, 0.45) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.validation-card.funnel-card > * {
  position: relative;
  z-index: 1;
}

/* Cabecera funnel: logo + título + subtítulo más compactos */
.validation-card.funnel-card .validation-logo {
  margin-bottom: 0.65rem;
}

.validation-card.funnel-card .validation-title {
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.validation-card.funnel-card .validation-subtitle {
  margin-bottom: 1.15rem;
  line-height: 1.4;
}

body.iblod-density-scope .validation-card.funnel-card .validation-logo {
  margin-bottom: 0.5rem !important;
}

body.iblod-density-scope .validation-card.funnel-card .validation-title {
  margin-bottom: 0.25rem !important;
}

body.iblod-density-scope .validation-card.funnel-card .validation-subtitle {
  margin-bottom: 0.9rem !important;
}

.funnel-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.funnel-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-family: Cabin, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.78rem 1.15rem;
  border-radius: 12px;
  border: 1px dashed rgba(68, 81, 158, 0.28);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  color: #1a1a2e;
  text-decoration: none;
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.35;
  word-break: break-word;
  box-shadow:
    0 4px 14px rgba(68, 81, 158, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.funnel-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(90, 111, 216, 0.06) 55%,
    rgba(68, 81, 158, 0.04) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.funnel-button:hover,
.funnel-button:focus {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(68, 81, 158, 0.42);
  color: #44519e;
  text-decoration: none;
  box-shadow:
    0 6px 20px rgba(68, 81, 158, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 3px rgba(68, 81, 158, 0.09);
  transform: translateY(-1px);
}

.funnel-button:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.52);
}

.funnel-button-particular {
  margin-top: 0.35rem;
  color: #566573;
  background: rgba(255, 255, 255, 0.28);
}

.funnel-button-particular:hover,
.funnel-button-particular:focus {
  border-color: rgba(68, 81, 158, 0.5);
  color: #44519e;
}

.funnel-back-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.75rem;
}

.funnel-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: Cabin, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #566573;
  text-decoration: none;
  padding: 0.65rem 1.35rem;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  background: #fff;
  transition: all 0.25s ease;
}

.funnel-back:hover,
.funnel-back:focus {
  color: #44519e;
  border-color: #44519e;
  background: #f8f9fa;
  text-decoration: none;
}

.funnel-step-hidden {
  display: none;
}

/* Inspiración */
.funnel-page--inspiracion {
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem calc(9.5rem + env(safe-area-inset-bottom, 0px));
}

.funnel-inspiracion-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.funnel-inspiracion-header,
.funnel-page--inspiracion .funnel-inspiracion-wrap > .validation-card.funnel-card {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
}

body.iblod-density-scope .funnel-page--inspiracion .funnel-inspiracion-wrap > .validation-card.funnel-card {
  max-width: 100% !important;
  width: 100% !important;
}

#funnel-inspiracion-contenido,
#funnel-inspiracion-error {
  width: 100%;
}

.funnel-categoria-block {
  margin-bottom: 1.75rem;
}

.funnel-categoria-titulo {
  font-family: Poppins-Medium, Cabin, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 0.75rem 0.25rem;
}

.funnel-carousel-wrap {
  position: relative;
  width: 100%;
}

.funnel-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px dashed rgba(68, 81, 158, 0.35);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #44519e;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 4px 14px rgba(68, 81, 158, 0.18);
  padding: 0;
  transform: translateY(-50%);
}

.funnel-carousel-nav-prev {
  left: 8px;
}

.funnel-carousel-nav-next {
  right: 8px;
}

.funnel-carousel-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.92);
  border-color: #44519e;
  box-shadow: 0 6px 18px rgba(68, 81, 158, 0.22);
}

.funnel-carousel-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.funnel-carousel {
  width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.funnel-carousel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.funnel-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.funnel-carousel-item {
  flex: 0 0 140px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #f3f4f6;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.funnel-carousel-item img {
  display: block;
  width: 140px;
  height: 105px;
  object-fit: cover;
}

.funnel-carousel-item:hover {
  transform: translateY(-2px);
}

.funnel-carousel-item.seleccionada {
  border-color: #ea580c;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.funnel-carousel-item .funnel-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #ea580c;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.funnel-carousel-item.seleccionada .funnel-check {
  display: flex;
}

.funnel-vacio {
  font-size: 0.85rem;
  color: #9ca3af;
  padding: 0.5rem 0.25rem;
}

.funnel-footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  z-index: 100;
}

.funnel-btn-primary {
  font-family: Cabin, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1.1rem 2rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #44519e 0%, #5a6fd8 100%);
  color: #fff;
  width: 100%;
  max-width: 720px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(68, 81, 158, 0.3);
  transition: all 0.3s ease;
}

.funnel-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(68, 81, 158, 0.4);
}

.funnel-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.funnel-loading {
  text-align: center;
  padding: 2rem;
  color: #566573;
  font-family: Cabin, sans-serif;
}

.funnel-error {
  text-align: center;
  padding: 1rem;
  color: #f44336;
  font-size: 0.9rem;
}

.funnel-page--inspiracion .funnel-inspiracion-header .validation-logo {
  margin-bottom: 0.5rem;
}

.funnel-page--inspiracion .funnel-inspiracion-header .validation-title {
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

body.iblod-density-scope .funnel-page--inspiracion .funnel-inspiracion-header .validation-title {
  margin-bottom: calc(1.5rem * var(--iblod-density)) !important;
}

.funnel-page--inspiracion .funnel-inspiracion-header .validation-subtitle {
  margin-bottom: 0;
  line-height: 1.35;
}

.funnel-page--inspiracion .funnel-inspiracion-header #funnel-subtitulo-placeholder {
  margin-top: 0;
}

.funnel-page--inspiracion .funnel-inspiracion-header .funnel-coleccion-intro {
  font-family: Cabin, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
  margin: 0 0 0.15rem;
  text-align: center;
}

body.iblod-density-scope .funnel-page--inspiracion .funnel-inspiracion-header .funnel-coleccion-intro {
  font-size: calc(1.1rem * var(--iblod-density)) !important;
  margin-bottom: calc(0.15rem * var(--iblod-density)) !important;
}

.funnel-autoguardado-msg {
  font-size: 0.82rem;
  color: #44519e;
  margin-top: -0.35rem;
  margin-bottom: 0.75rem;
}

.funnel-seleccion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.funnel-page--inspiracion .funnel-inspiracion-header .funnel-seleccion-chips {
  margin-top: 1rem;
  padding-top: 0.65rem;
}

.funnel-seleccion-chip {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 62px;
  text-align: center;
}

.funnel-seleccion-chip-grupo {
  width: 72px;
}

.funnel-seleccion-chip-stack {
  position: relative;
  display: block;
  width: 62px;
  height: 46px;
  margin: 0 auto;
}

.funnel-seleccion-chip-stack-capa {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 2px solid #fdba74;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
}

.funnel-seleccion-chip-stack-capa--2 {
  transform: translate(4px, -4px) scale(0.97);
  z-index: 1;
}

.funnel-seleccion-chip-stack-capa--3 {
  transform: translate(8px, -8px) scale(0.94);
  z-index: 0;
  opacity: 0.92;
}

.funnel-seleccion-chip-stack img {
  position: relative;
  z-index: 2;
  display: block;
  width: 62px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ea580c;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
  cursor: pointer;
}

.funnel-seleccion-chip-count {
  display: block;
  margin-top: 0.2rem;
  font-family: Poppins-Medium, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ea580c;
  line-height: 1;
}

.funnel-seleccion-chip:not(.funnel-seleccion-chip-grupo) img {
  display: block;
  width: 62px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ea580c;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.funnel-seleccion-chip-label {
  display: block;
  margin-top: 0.25rem;
  font-family: Cabin, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: #566573;
  line-height: 1.2;
}

.funnel-btn-ver-proyecto[hidden] {
  display: none !important;
}

.funnel-btn-ver-proyecto {
  display: block;
  margin: 0.85rem auto 0;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: 1px dashed rgba(68, 81, 158, 0.35);
  background: rgba(255, 255, 255, 0.55);
  font-family: Cabin, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #44519e;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(68, 81, 158, 0.1);
}

.funnel-btn-ver-proyecto:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: #44519e;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(68, 81, 158, 0.18);
}

.funnel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.funnel-lightbox.abierto {
  display: flex;
}

.funnel-lightbox-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.funnel-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 8.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease;
}

.funnel-lightbox-img.cargando {
  opacity: 0.55;
}

.funnel-lightbox-cerrar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 301;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.funnel-lightbox-cerrar:hover {
  background: rgba(255, 255, 255, 0.28);
}

.funnel-lightbox-seleccionar {
  position: relative;
  z-index: 2;
  margin-top: -1.35rem;
  min-width: 168px;
  padding: 0.72rem 1.6rem;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: Cabin, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #44519e 0%, #5a6fd8 100%);
  box-shadow: 0 8px 20px rgba(68, 81, 158, 0.3);
  transition: all 0.3s ease;
}

.funnel-lightbox-check,
.funnel-lightbox-discard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.funnel-lightbox-discard {
  font-size: 1.25rem;
  margin-top: -0.05rem;
}

.funnel-lightbox-seleccionar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(68, 81, 158, 0.4);
}

.funnel-lightbox-seleccionar.activa {
  border-style: solid;
  border-color: rgba(234, 88, 12, 0.85);
  background: linear-gradient(
    135deg,
    rgba(234, 88, 12, 0.92) 0%,
    rgba(251, 146, 60, 0.78) 55%,
    rgba(255, 255, 255, 0.22) 100%
  );
  box-shadow:
    0 8px 22px rgba(234, 88, 12, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@media only screen and (max-width: 768px) {
  .funnel-page,
  .validation-container.funnel-page {
    justify-content: flex-start;
    padding: 2rem 1rem 1.5rem;
  }

  .funnel-page--inspiracion {
    padding: 2rem 1rem calc(10.5rem + env(safe-area-inset-bottom, 0px));
  }

  .funnel-categoria-block:last-child {
    margin-bottom: 0.5rem;
  }

  .validation-card.funnel-card {
    padding: 1.35rem 1.25rem 1.5rem;
    transform: translateY(-0.75rem);
  }

  .validation-card.funnel-card .validation-logo {
    margin-bottom: 0.4rem;
  }

  .validation-card.funnel-card .validation-title {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    line-height: 1.15;
  }

  .funnel-page--inspiracion .funnel-inspiracion-header .validation-title {
    margin-bottom: 1.25rem;
  }

  body.iblod-density-scope .funnel-page--inspiracion .funnel-inspiracion-header .validation-title {
    margin-bottom: calc(1.25rem * var(--iblod-density)) !important;
  }

  .funnel-page--inspiracion .funnel-inspiracion-header .funnel-seleccion-chips {
    margin-top: 0.85rem;
    padding-top: 0.5rem;
  }

  .validation-card.funnel-card .validation-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
  }

  .funnel-page--inspiracion .funnel-inspiracion-header .funnel-coleccion-intro {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    line-height: 1.25;
  }

  .validation-card.funnel-card .validation-logo img {
    width: 88px;
    height: 88px;
  }

  .funnel-button {
    font-size: 0.8rem;
    padding: 0.72rem 0.95rem;
  }

  .funnel-carousel-nav {
    display: none;
  }

  body.iblod-density-scope .funnel-page--inspiracion .funnel-inspiracion-wrap > .validation-card.funnel-card {
    transform: none;
    padding: 1.15rem 1rem 1.25rem;
  }
}
