/* ============================================================
   SERVICES-01 — Selector interactivo COMPACTO
   Lista izquierda + Panel detalle derecho
   Fondo primary 80%  |  Activo resaltado en primary
   ============================================================ */

.services-grid-section {
  padding: 80px 24px;
  background: color-mix(in srgb, var(--primary) 80%, var(--bg));
  position: relative;
  overflow: hidden;
}

/* Decoración fondo */
.services-grid-section::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  top: -180px;
  right: -120px;
  background: color-mix(in srgb, var(--secondary) 5%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.services-grid-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.services-header {
  text-align: center;
  margin-bottom: 48px;
}

.services-header .sub-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--primary) 8%, transparent);
}

.services-header h2 {
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--primary-text, var(--bg));
  font-weight: 800;
  margin: 0 0 12px 0;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.services-header p {
  color: color-mix(in srgb, var(--primary-text, var(--bg)) 80%, transparent);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 500px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT: Lista + Panel — proporcional, no en px fijos
   ════════════════════════════════════════════════════════════ */
.services-interactive {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 16px;
  align-items: start;
}

/* ── Lista compacta ── */
.svc-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  overflow-y: auto;
  max-height: 540px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.svc-list::-webkit-scrollbar {
  display: none;
}

/* ── Item de lista ── */
.svc-list-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
  user-select: none;
  margin: 6px 8px;
  border-radius: 10px;
}

.svc-list-item:hover {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-color: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* ── ITEM ACTIVO — resaltado en primary ── */
.svc-list-item.active {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-color: var(--primary);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--primary) 12%, transparent);
}

.svc-list-item.active::before { display: none; }

/* ── Ícono mini ── */
.svc-list-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-alt);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.svc-list-item.active .svc-list-icon {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
}

.svc-list-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  display: block;
}

/* ── Texto ── */
.svc-list-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.svc-list-num {
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--muted);
  display: block;
  transition: color 0.2s;
}

.svc-list-item.active .svc-list-num {
  color: var(--primary);
  opacity: 0.7;
}

.svc-list-name {
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--title);
  line-height: 1.25;
  transition: color 0.2s;
  white-space: normal;
  word-break: break-word;
}

.svc-list-item.active .svc-list-name {
  color: var(--primary);
}

.svc-list-item:hover:not(.active) .svc-list-name {
  color: var(--title);
}

/* ── Precio mini ── */
.svc-list-price {
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}

.svc-list-item.active .svc-list-price {
  color: var(--primary);
}

/* ── Flecha ── */
.svc-list-arrow {
  color: var(--muted);
  flex-shrink: 0;
  line-height: 0;
  transition: color 0.2s, transform 0.2s;
}

.svc-list-item.active .svc-list-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.svc-list-item:hover:not(.active) .svc-list-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.svc-list-arrow svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Panel de detalle — compacto ── */
.svc-detail-panel {
  background: var(--bg);
  border-radius: 16px;
  padding: 36px 36px 32px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px -16px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Número decorativo de fondo */
.svc-detail-bg-num {
  position: absolute;
  bottom: -16px;
  right: 20px;
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: 8rem;
  font-weight: 900;
  color: color-mix(in srgb, var(--primary) 5%, transparent);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -6px;
}

.svc-detail-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Ícono grande */
.svc-detail-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.svc-detail-icon svg {
  width: 24px; height: 24px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.svc-detail-num {
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary);
  opacity: 0.45;
  display: block;
  margin-bottom: 8px;
}

.svc-detail-title {
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--title);
  margin: 0 0 12px 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.svc-detail-desc {
  color: var(--text, #4a4a4a);
  font-size: 0.93rem;
  line-height: 1.7;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

/* Tags de características */
.svc-detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.svc-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: var(--bg-alt, #f5f5f5);
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text, #4a4a4a);
  border: 1px solid var(--border, #e0e0e0);
}

.svc-feature-tag svg {
  width: 10px; height: 10px;
  stroke: var(--primary); fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Footer */
.svc-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border, #e0e0e0);
  margin-top: auto;
  flex-wrap: wrap;
  gap: 12px;
}

.svc-detail-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.svc-detail-price-label {
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.svc-detail-price {
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--title);
  letter-spacing: -0.8px;
  line-height: 1;
}

.svc-detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--primary-text, var(--bg));
  font-family: var(--font-title, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 22px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.22s, transform 0.22s, box-shadow 0.22s;
  white-space: nowrap;
}

.svc-detail-cta:hover {
  background: var(--button-primary-hover, #ce1949);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--primary) 45%, transparent);
}

.svc-detail-cta svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
}

.svc-detail-cta:hover svg { transform: translateX(3px); }

/* ── Botón cerrar panel flotante (solo visible en mobile overlay) ── */
.svc-detail-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: none;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  align-items: center;
  justify-content: center;
}

.svc-detail-close:hover {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
}

/* ── Animación de transición ── */
.svc-detail-panel.is-transitioning .svc-detail-content {
  animation: svc-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes svc-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .services-interactive {
    grid-template-columns: 1.5fr 2fr;
    gap: 12px;
  }
  .svc-list-price { display: none; }
  .svc-detail-panel { padding: 28px 24px; min-height: 420px; }
}

@media (max-width: 768px) {
  .services-grid-section {
    padding: 24px 16px;
  }
  .services-header { margin-bottom: 16px; }
  .services-header .sub-title { margin-bottom: 10px; font-size: 0.65rem; }
  .services-header h2 { font-size: clamp(1.3rem, 4vw, 1.6rem); margin-bottom: 6px; }
  .services-header p { font-size: 0.85rem; }
  .services-interactive {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .svc-list {
    border-radius: 12px;
  }

  /* Panel → bottom sheet flotante, no pantalla completa */
  .svc-detail-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px 20px 0 0;
    padding: 48px 24px 24px;
    min-height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 40px color-mix(in srgb, var(--primary) 15%, transparent);
  }

  .svc-detail-panel.is-open {
    transform: translateY(0);
  }

  .svc-detail-close {
    display: flex;
  }

  .svc-detail-bg-num { font-size: 5rem; }
  .svc-list-item { margin: 4px 6px; padding: 10px 12px; }
  .svc-detail-icon { margin-bottom: 12px; width: 44px; height: 44px; border-radius: 10px; }
  .svc-detail-icon svg { width: 20px; height: 20px; }
  .svc-detail-title { margin-bottom: 8px; }
  .svc-detail-desc { margin-bottom: 14px; }
  .svc-detail-features { margin-bottom: 16px; gap: 4px; }
  .svc-feature-tag { padding: 3px 8px; font-size: 0.72rem; }
  .svc-detail-footer { padding-top: 14px; margin-top: auto; }
}

@media (max-width: 480px) {
  .svc-list-item { grid-template-columns: 28px 1fr auto; gap: 8px; padding: 8px 10px; margin: 3px 4px; }
  .svc-list-icon { width: 28px; height: 28px; border-radius: 6px; }
  .svc-list-icon svg { width: 14px; height: 14px; }
  .svc-list-name { font-size: 0.8rem; }
  .svc-list-arrow { display: none; }
  .svc-detail-panel { padding: 44px 16px 18px; }
  .svc-detail-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .svc-detail-cta { width: 100%; justify-content: center; padding: 10px 18px; font-size: 0.84rem; }
  .svc-detail-price { font-size: 1.4rem; }
}
