/* ===== SERVICIOS — mini video-hero + carrusel horizontal + modelo 3D ===== */

.services-ov {
  max-width: 1300px;
  margin: 0 auto;
  padding: 64px 40px 0;
}

/* ----- Mini video-hero ----- */
.services-ov__hero {
  position: relative;
  width: 100%;
  height: 56vh;
  min-height: 380px;
  overflow: hidden;
  background: #111111; /* se ve mientras carga o si falta el video real */
}

.services-ov__hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-ov__hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.services-ov__hero-cta {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #111111;
  border: none;
  border-radius: 100px;
  padding: 16px 26px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.services-ov__hero-cta:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateX(-50%) scale(1.04);
}

/* ----- Carrusel horizontal de especialidades (scroll-snap, sin pin/GSAP) ----- */
.services-ov__carousel-wrap {
  margin: 8px 0 48px;
}

/* ----- Cartas apiladas en abanico (mismo diseño en desktop y mobile,
   solo cambia el tamaño vía --card-w) — puramente visual, no abre nada al
   tocarlas; el detalle vive en la sección de después del modelo 3D. ----- */
.services-ov__carousel {
  --card-w: 240px;
  position: relative;
  height: 340px;
  max-width: 730px;
  margin: 0 auto;
}

.specialty-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--card-w);
  aspect-ratio: 3 / 4;
  margin-left: calc(var(--card-w) / -2);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transform-origin: bottom center;
  --ty: 0px;
  --scale: 1;
  transform: rotate(var(--rot)) translateX(var(--tx)) translateY(var(--ty)) scale(var(--scale));
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease;
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.35);
}

.specialty-card:hover {
  --ty: -16px;
  box-shadow: 0 28px 50px -20px rgba(0, 0, 0, 0.4);
}

.specialty-card:nth-child(1) { --rot: -16deg; --tx: -171px; z-index: 1; }
.specialty-card:nth-child(2) { --rot: -8deg;  --tx: -86px;  z-index: 2; }
.specialty-card:nth-child(3) { --rot: 0deg;   --tx: 0px;    z-index: 3; }
.specialty-card:nth-child(4) { --rot: 8deg;   --tx: 86px;   z-index: 2; }
.specialty-card:nth-child(5) { --rot: 16deg;  --tx: 171px;  z-index: 1; }

.specialty-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.specialty-card__grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.05) 100%);
}

.specialty-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #111111;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
}

.specialty-card__text {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #ffffff;
}

.specialty-card__text h4 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* ----- También atendemos: chips ----- */
.services-ov__chips {
  margin-bottom: 56px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1.5px solid rgba(17, 17, 17, 0.14);
  font-size: 0.88rem;
  font-weight: 600;
  color: #33332f;
}

.also-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.also-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  color: #33332f;
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.also-card:hover {
  border-color: var(--accent);
}

.also-card svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* ----- Diagnóstico y modelos 3D ----- */
.model3d {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  margin-bottom: 32px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.model3d__eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8a8a82;
  margin-bottom: 16px;
}

.model3d__title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111111;
  margin-bottom: 16px;
}

.model3d__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: #6f6f68;
  max-width: 420px;
}

.model3d__viewer-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: #f3ece0;
}

.model3d__viewer {
  width: 100%;
  height: 100%;
}

.model3d__hint {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(17, 17, 17, 0.75);
  color: #fff;
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.model3d__hint.is-hidden {
  opacity: 0;
}

/* ----- Alias genérico para reusar el nav final en cualquier overlay ----- */
.footer-nav {
  padding: 56px 0 88px;
}

/* ----- Descripción y beneficios (sección aparte, después del modelo 3D,
   opcional — el usuario elige si quiere leer el detalle) ----- */
.services-ov__details {
  padding: 8px 0 64px;
}

.services-ov__details-title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.details-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.details-tab {
  padding: 12px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(17, 17, 17, 0.16);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #33332f;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.details-tab:hover {
  border-color: var(--accent);
}

.details-tab.is-active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.details-panel {
  border-radius: 18px;
  background: #fafaf8;
  padding: 32px;
  min-height: 120px;
}

.details-panel__placeholder {
  display: block;
  font-size: 0.95rem;
  color: #8a8a82;
}

.details-panel.is-active .details-panel__placeholder {
  display: none;
}

.details-panel__content {
  display: none;
}

.details-panel.is-active .details-panel__content {
  display: block;
}

.details-panel__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #111;
  margin: 14px 0 16px;
}

.details-panel__intro {
  font-size: 1rem;
  line-height: 1.7;
  color: #33332f;
  white-space: pre-line;
  margin-bottom: 8px;
}

.details-panel__section {
  margin-top: 24px;
}

.details-panel__section.is-empty {
  display: none;
}

.details-panel__section h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.details-panel__section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.details-panel__section li {
  font-size: 0.94rem;
  line-height: 1.5;
  color: #33332f;
  padding-left: 22px;
  position: relative;
}

.details-panel__section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.details-panel__note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  font-size: 0.86rem;
  font-style: italic;
  color: #6f6f68;
}

.details-panel__note:empty {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .services-ov {
    padding: 56px 24px 0;
  }

  .services-ov__hero {
    height: 46vh;
    min-height: 320px;
  }

  .model3d {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .also-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ----- Fan de cartas más chico en tablet/mobile (mismo diseño,
     solo reduce --card-w y la altura del contenedor) ----- */
  .services-ov__carousel {
    --card-w: 175px;
    height: 260px;
    max-width: 490px;
  }

  .specialty-card:nth-child(1) { --tx: -117px; }
  .specialty-card:nth-child(2) { --tx: -58px; }
  .specialty-card:nth-child(4) { --tx: 58px; }
  .specialty-card:nth-child(5) { --tx: 117px; }

  .specialty-card__tag,
  .specialty-card__text {
    display: none;
  }
}

@media (max-width: 600px) {
  .services-ov {
    padding: 48px 20px 0;
  }

  .services-ov__hero {
    height: 42vh;
    min-height: 280px;
  }

  .services-ov__hero-cta {
    bottom: 24px;
    padding: 13px 20px;
    font-size: 0.9rem;
  }

  .services-ov__carousel {
    --card-w: 140px;
    height: 210px;
    max-width: 380px;
  }

  .specialty-card:nth-child(1) { --tx: -92px; }
  .specialty-card:nth-child(2) { --tx: -46px; }
  .specialty-card:nth-child(4) { --tx: 46px; }
  .specialty-card:nth-child(5) { --tx: 92px; }

  .details-tab {
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  .also-grid {
    grid-template-columns: 1fr;
  }

  .details-panel {
    padding: 22px;
  }

  .model3d__desc {
    max-width: none;
  }
}

.services-ov__hint { text-align: center; color: #54544e; font-size: .85rem; margin: 0 0 28px; }
@media (max-width: 1000px) {
  .specialty-card__text { display: block; left: 10px; right: 10px; bottom: 10px; }
  .specialty-card__text h4 { font-size: .85rem; margin: 0; }
  .services-ov__carousel:not(.is-spread) .specialty-card:nth-child(1) { --tx: clamp(-117px, -20vw, -50px); }
  .services-ov__carousel:not(.is-spread) .specialty-card:nth-child(2) { --tx: clamp(-58px, -10vw, -25px); }
  .services-ov__carousel:not(.is-spread) .specialty-card:nth-child(4) { --tx: clamp(25px, 10vw, 58px); }
  .services-ov__carousel:not(.is-spread) .specialty-card:nth-child(5) { --tx: clamp(50px, 20vw, 117px); }
  .services-ov__carousel.is-spread {
    display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; height: auto; max-width: 100%; padding: 12px 8px 30px;
  }
  .is-spread .specialty-card {
    position: relative; flex: 0 0 min(72vw, 240px); width: min(72vw, 240px);
    left: auto; top: auto; margin: 0; transform: none; scroll-snap-align: center;
  }
  .is-spread .specialty-card__img { transition: transform .3s ease; }
  .is-spread .specialty-card.is-zoomed .specialty-card__img { transform: scale(1.35); }
}
