/* ==========================================================================
   SECCIÓN SERVICIOS — Laura Álvarez Asesora Inmobiliaria
   Estilo Liquid Glass (Vidrio esmerilado, reflejos vivos, acentos dorados)
   Layout Equilibrado: Pestañas interactivas, 4 tarjetas dinámicas,
   proceso de 4 pasos numerados y banner final de llamada a la acción (CTA)
   ========================================================================== */

.services-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(90px, 9vh, 120px) clamp(70px, 7.5vw, 120px) clamp(80px, 8vh, 110px);
  background-color: #0E1622;
  background-image: url('../assets/images/hero-background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Fallback si no hay soporte WebP */
.no-webp .services-section {
  background-image: url('../assets/images/hero-background.webp');
}

/* Overlay nocturno con degradado de lujo coherente con toda la landing */
.services-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.96) 0%, rgba(12, 18, 28, 0.92) 50%, rgba(10, 15, 23, 0.96) 100%),
    radial-gradient(circle at 15% 30%, rgba(91, 140, 255, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 85% 70%, rgba(212, 162, 78, 0.08) 0%, transparent 60%);
}

/* Contenedor principal con max-width consistente (1670px) */
.services-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1670px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(34px, 4vh, 46px);
}

/* --------------------------------------------------------------------------
   1. ENCABEZADO DE SECCIÓN
   -------------------------------------------------------------------------- */
.services-header {
  margin-bottom: 4px;
}

.services-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: #D4A24E;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.services-eyebrow-line {
  width: 38px;
  height: 1.8px;
  background-color: #D4A24E;
  border-radius: 1px;
}

.services-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 12px 0;
}

.services-title span {
  display: block;
}

.services-subtitle {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.55;
  color: #C9CDD3;
  margin: 0;
  max-width: 780px;
}

/* --------------------------------------------------------------------------
   2. PESTAÑAS (TABS) FUNCIONALES
   -------------------------------------------------------------------------- */
.services-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.services-tabs-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.service-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  outline: none;

  /* Estado inactivo: vidrio esmerilado translúcido */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.service-tab-btn:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.38);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Estado activo: fondo dorado sólido ámbar */
.service-tab-btn.is-active {
  background: #D4A24E;
  border-color: #D4A24E;
  color: #0E1622;
  font-weight: 700;
  box-shadow:
    0 6px 20px -2px rgba(212, 162, 78, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.service-tab-btn svg {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.service-tab-btn:hover svg {
  transform: scale(1.1);
}

/* Línea decorativa delgada que rellena el espacio a la derecha */
.services-tabs-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 162, 78, 0.4) 0%, rgba(212, 162, 78, 0.15) 60%, transparent 100%);
  border-radius: 1px;
}

/* --------------------------------------------------------------------------
   3. GRILLA DE 4 TARJETAS DINÁMICAS
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  height: 475px;
  min-height: 475px;
  align-items: stretch;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Transición suave al cambiar de pestaña */
.services-grid.is-fading-out {
  opacity: 0;
  transform: translateY(8px);
}

.service-card {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  background: color-mix(in oklab, white 8%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 475px;
  min-height: 475px;
  box-sizing: border-box;
  isolation: isolate;

  /* Liquid Glass Frosted Card */
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.42),
    inset 0 -1px 1px rgba(0, 0, 0, 0.15),
    0 18px 40px -10px rgba(0, 0, 0, 0.5);

  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1),
    box-shadow 0.35s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(212, 162, 78, 0.45);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.65),
    0 24px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(212, 162, 78, 0.16);
}

/* 3.1 Imagen superior de la tarjeta */
.service-card-media {
  position: relative;
  width: 100%;
  height: 165px;
  flex-shrink: 0;
  overflow: hidden;
}

.service-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card-img {
  transform: scale(1.06);
}

.service-card-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 45%, rgba(10, 16, 25, 0.8) 100%);
}

/* 3.2 Cuerpo de la tarjeta */
.service-card-body {
  position: relative;
  flex: 1;
  padding: 36px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: rgba(10, 16, 24, 0.6);
  box-sizing: border-box;
}

/* Ícono circular superpuesto en el borde entre imagen y texto */
.service-card-icon-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(14, 22, 34, 0.95);
  border: 1.5px solid rgba(212, 162, 78, 0.55);
  color: #D4A24E;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(212, 162, 78, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.service-card:hover .service-card-icon-badge {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: #D4A24E;
  background: rgba(22, 32, 48, 0.98);
}

.service-card-icon-badge svg {
  width: 22px;
  height: 22px;
}

.service-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.25;
  text-align: center;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card-divider {
  width: 32px;
  height: 1.8px;
  background-color: #D4A24E;
  border-radius: 1px;
  margin: 0 auto 16px auto;
  flex-shrink: 0;
}

/* Formato Lista con Checks (✓) */
.service-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.service-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  line-height: 1.45;
  color: #C9CDD3;
}

.service-check-icon {
  width: 15px;
  height: 15px;
  color: #D4A24E;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Formato Párrafo Descriptivo Centrado */
.service-card-text {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  line-height: 1.55;
  color: #C9CDD3;
  margin: 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   4. BLOQUE "UN PROCESO CLARO Y TRANSPARENTE" (Estático)
   -------------------------------------------------------------------------- */
.services-process-block {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 28px 36px 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  background: color-mix(in oklab, white 7%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.38),
    0 20px 48px -12px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.process-header {
  margin-bottom: 22px;
}

.process-eyebrow {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #D4A24E;
  margin: 0;
}

.process-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 1 auto;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #D4A24E;
  background: rgba(14, 22, 34, 0.85);
  border: 1.5px solid rgba(212, 162, 78, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.process-step:hover .step-number {
  transform: scale(1.08);
  border-color: #D4A24E;
}

.process-step-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  text-align: left;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 0;
}

.step-desc {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 12.5px;
  color: #A4B1C2;
  line-height: 1.4;
  margin: 0;
}

/* Flecha punteada horizontal separadora entre pasos */
.process-step-divider {
  flex: 1 1 20px;
  min-width: 20px;
  max-width: 65px;
  height: 8px;
  display: flex;
  align-items: center;
  color: rgba(212, 162, 78, 0.5);
  pointer-events: none;
}

.connector-arrow-svg {
  width: 100%;
  height: 8px;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   5. BANNER FINAL CTA
   -------------------------------------------------------------------------- */
.services-cta-banner {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 28px;
  border-radius: 24px;

  /* Liquid Glass */
  background: rgba(255, 255, 255, 0.08);
  background: color-mix(in oklab, white 8%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45),
    inset 0 -1px 1px rgba(0, 0, 0, 0.15),
    0 24px 50px -12px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
}

.cta-banner-media {
  position: relative;
  width: 200px;
  height: 110px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.cta-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta-banner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 16, 25, 0.5) 100%);
}

.cta-banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.cta-banner-title {
  font-family: var(--font-serif);
  font-size: clamp(21px, 1.8vw, 26px);
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

.cta-banner-subtitle {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(14px, 1.1vw, 15.5px);
  color: #C9CDD3;
  margin: 0;
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Botón Sólido Dorado / WhatsApp */
.btn-services-cta-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: #D4A24E;
  color: #0E1622;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    0 8px 24px -3px rgba(212, 162, 78, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-services-cta-gold:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 12px 28px -3px rgba(212, 162, 78, 0.6),
    0 0 18px rgba(212, 162, 78, 0.28);
}

.btn-services-cta-gold .icon-whatsapp {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}

/* Botón Vidrio Secundario / Calendario */
.btn-services-cta-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    0 6px 18px -4px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-services-cta-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.btn-services-cta-glass svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #D4A24E;
}