/* ─────────────────────────────────────────
   SERVICES.CSS — Sección servicios
   Opción C: hover expand desktop / click accordion mobile
   MNSM · Playground Agency
───────────────────────────────────────── */

#services {
  background: var(--cream);
  color: var(--black);
  padding: var(--section-pad-v) var(--section-pad-h);
}

/* ─── LAYOUT PRINCIPAL — dos columnas ─── */
/* Columna izquierda: título + filas. Columna derecha: vídeo sticky */
.services-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.services-left-col {}

/* Cabecera: título + intro */
.services-header {
  margin-bottom: 60px;
}
.services-header .section-title { color: var(--black); }

.services-intro {
  font-size: 15px;
  font-weight: 300;
  color: var(--grey);
  line-height: 1.75;
  max-width: 380px;
}

/* Columna derecha: vídeo sticky */
.services-right-col {
  position: sticky;
  top: 80px;
  align-self: start;
}

.services-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.services-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #e8e0d5 0%, #d5c9bc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.services-photo-placeholder span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.2);
}

/* ─── VÍDEO SERVICIOS ─── */
.services-video-wrap {
  position: relative;
  width: 100%;
  height: 600px; /* altura fija — ajustar si hace falta */
  overflow: hidden;
  background: #1a1510;
}

.services-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

/* Placeholder visible mientras no hay vídeo */
.services-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(160deg, #2a2018 0%, #1a1510 100%);
  pointer-events: none;
}

/* Se oculta cuando el vídeo tiene src válido */
.services-video[src]:not([src=""]) ~ .services-video-placeholder {
  display: none;
}

.services-video-icon {
  font-size: 28px;
  color: var(--coral);
  opacity: 0.6;
}
.services-video-placeholder p {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

/* ─── LISTA DE SERVICIOS ─── */
.services-list {
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* Wrapper de cada servicio */
.service-row {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.service-row.is-active {
  border-color: rgba(240,107,90,0.3);
}

/* ─── CABECERA CLICKABLE ─── */
.service-header {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  cursor: pointer;
  user-select: none;
}

.service-left-col {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.service-num {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--grey);
  min-width: 24px;
  transition: color 0.25s ease;
}
.service-row.is-active .service-num,
.service-row:hover .service-num { color: var(--coral); }

.service-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 300;
  color: var(--black);
  transition: font-size 0.4s cubic-bezier(0.16,1,0.3,1),
              color 0.25s ease;
}

/* Desktop: el título crece al hover/active */
@media (hover: hover) {
  .service-row:hover .service-name,
  .service-row.is-active .service-name {
    font-size: clamp(34px, 4vw, 50px);
    color: var(--black);
  }
}

.service-desc-short {
  font-size: 13px;
  font-weight: 300;
  color: var(--grey);
  line-height: 1.65;
  transition: opacity 0.2s ease;
}
.service-row.is-active .service-desc-short {
  opacity: 0;
  pointer-events: none;
}

/* Botón + que rota a × */
.service-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
  color: var(--black);
  transition: background 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease,
              transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.service-row.is-active .service-toggle {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
  transform: rotate(45deg);
}

/* ─── CUERPO EXPANDIDO ─── */
/* Trick: grid-template-rows 0fr → 1fr para animar altura */
.service-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.16,1,0.3,1);
}
.service-row.is-active .service-body {
  grid-template-rows: 1fr;
}

.service-body-inner {
  overflow: hidden;
}

.service-body-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 8px 0 44px;
  align-items: center;
}

/* Bloque de texto */
.service-body-tagline {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  color: var(--coral);
  margin-bottom: 14px;
}

.service-body-desc {
  font-size: 14px;
  font-weight: 300;
  color: #555;
  line-height: 1.85;
  margin-bottom: 22px;
}

.service-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.service-items li {
  font-size: 13px;
  font-weight: 300;
  color: var(--black);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}
.service-items li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--coral);
  font-size: 11px;
  top: 1px;
}

/* Ilustración SVG */
.service-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  min-height: 200px;
}
.service-illustration svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

/* ─── FRANJA INFERIOR ─── */
.services-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--black);
  border-left: 3px solid var(--coral);
  padding: 28px var(--section-pad-h);
  margin: 80px calc(-1 * var(--section-pad-h)) calc(-1 * var(--section-pad-v));
}

.services-footer-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--white);
}
.services-footer-text em {
  font-style: italic;
  color: var(--coral);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .services-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Orden: 1 título, 2 vídeo, 3 servicios */
  .services-header      { order: 1; margin-bottom: 32px; }
  .services-right-col   { order: 2; position: static; }
  .services-list        { order: 3; }
  .services-left-col    { display: contents; } /* deja que los hijos se ordenen independientemente */

  /* Vídeo 9:16 en móvil */
  .services-video-wrap {
    height: auto;
    aspect-ratio: 9 / 16;
  }

  /* En móvil: header a 2 columnas, sin descripción corta */
  .service-header {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }
  .service-desc-short { display: none; }

  /* Cuerpo expandido en 1 columna */
  .service-body-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .service-illustration { display: none; }

  .services-footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    margin: 48px calc(-1 * var(--section-pad-h)) calc(-1 * var(--section-pad-v));
  }
}
