/* UnyxLab service pages: compact, consistent phone layout. Desktop styles stay untouched. */
@media (max-width: 640px) {
  body.unyx-service-page {
    overflow-x: clip;
  }

  body.unyx-service-page :is(.container, .wide, .faq-wrap) {
    width: calc(100% - 36px) !important;
    max-width: 80rem;
    margin-inline: auto;
  }

  body.unyx-service-page :is(.section, .pad, .section-sm) {
    padding-block: clamp(3.25rem, 10vw, 4rem) !important;
  }

  body.unyx-service-page :is(.final, .cta) {
    padding-block: clamp(3.5rem, 12vw, 4.5rem) !important;
  }

  body.unyx-service-page .hero:not(.optimization-hero) {
    min-height: auto !important;
    padding-top: 5.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  body.unyx-service-development .hero:not(.optimization-hero) {
    padding-top: 4.5rem !important;
  }

  body.unyx-service-development .hero-grid {
    gap: 1.75rem;
    padding: 2rem 1rem 2.5rem;
  }

  body.unyx-service-page .optimization-hero {
    min-height: auto !important;
    padding-top: 5.25rem !important;
    padding-bottom: 2.5rem !important;
  }

  body.unyx-service-page .hero h1 {
    font-size: clamp(2.45rem, 11.5vw, 3.9rem) !important;
    line-height: 1.03 !important;
    letter-spacing: -.045em;
    overflow-wrap: normal;
  }

  body.unyx-service-page .hero h1 .subline {
    margin-left: 0;
    font-size: clamp(1.7rem, 8.5vw, 2.8rem);
    line-height: 1.08;
  }

  body.unyx-service-page .hero :is(.lead, .hero-intro, .hero-copy > p) {
    max-width: 42rem;
    margin-top: 1.25rem;
    font-size: 1rem;
    line-height: 1.72;
  }

  body.unyx-service-page :is(.hero-bottom, .hero-meta, .pillars-head, .capabilities-head) {
    gap: 1.25rem;
  }

  body.unyx-service-page .hero-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  body.unyx-service-page :is(.hero-actions, .cta-row) {
    width: 100%;
    align-items: stretch;
    gap: .75rem;
  }

  body.unyx-service-page .cta-row {
    flex-direction: column;
  }

  body.unyx-service-page :is(.hero-actions .btn, .cta-row .btn, .cta .btn, .final .btn, #contacto .btn) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  body.unyx-service-page :is(.cta h2, .final h2) {
    font-size: clamp(2.35rem, 10.5vw, 3.8rem);
    line-height: 1.04;
    letter-spacing: -.045em;
  }

  body.unyx-service-page :is(.cta p, .final .serif) {
    margin-top: 1.15rem;
    font-size: clamp(1.05rem, 5vw, 1.28rem);
    line-height: 1.6;
  }

  body.unyx-service-page :is(.stat-row, .proof-grid, .metric-row, .brand-line,
    .problem-grid, .capabilities, .tech-grid, .tech-stack, .quality, .related,
    .grid-cards, .deliver-grid, .checklist, .case-grid, .trust-wall, .split,
    .showcase-wrap, .hero-bottom, .pillars, .browser-screen, .grid2, .grid3) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.unyx-service-page :is(.pillar, .capability, .problem-card, .quality-item) {
    min-height: 0;
    padding: 1.4rem;
  }

  body.unyx-service-page :is(.pillar-icon, .capability svg) {
    margin-top: 2rem;
  }

  body.unyx-service-page :is(.pillar h3, .capability h3, .problem-card h3) {
    margin-top: 1.5rem;
  }

  body.unyx-service-page #contacto.container {
    padding: 3.75rem 18px !important;
  }

  body.unyx-service-page .stat,
  body.unyx-service-page .metric {
    padding: 1.1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft, rgba(255,255,255,.1));
  }

  body.unyx-service-page :is(.stat, .metric):last-child {
    border-bottom: 0;
  }

  body.unyx-service-page .brand-line span {
    min-height: 4.25rem;
    border-right: 0;
    border-top: 1px solid var(--border-soft, rgba(255,255,255,.1));
  }

  body.unyx-service-page .brand-line span:first-child {
    border-top: 0;
  }

  body.unyx-service-page .browser {
    transform: none;
  }
}

@media (max-width: 390px) {
  body.unyx-service-page :is(.container, .wide, .faq-wrap) {
    width: calc(100% - 32px) !important;
  }

  body.unyx-service-page .hero h1 {
    font-size: clamp(2.25rem, 11vw, 3rem) !important;
  }

  body.unyx-service-page :is(.cta h2, .final h2) {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }
}

@media (max-width: 640px) and (max-height: 560px) {
  body.unyx-service-page :is(.section, .pad, .section-sm, .final, .cta) {
    padding-block: 2.75rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.unyx-service-page *, body.unyx-service-page *::before, body.unyx-service-page *::after {
    scroll-behavior: auto !important;
  }
}
