/* css/services-mobile.css
   Mobile-only overrides for the Services section.
   Loaded AFTER services.css to override desktop styles.
   ---------------------------------------------------- */

@media (max-width: 968px) {

  /* ── Section Reset ── */
  .services-sticky {
    height: auto !important;
  }

  .services-sticky__container {
    position: relative !important;
    height: auto !important;
  }

  .services-sticky__inner {
    flex-direction: column;
    padding: 2.5rem 1.5rem 1.75rem 1.5rem;
  }

  .services-sticky__left,
  .services-sticky__right {
    flex: 0 0 100%;
    width: 100%;
    padding: 0;
  }

  /* ── Card Grid ── */
  .service-details-stack {
    height: auto !important;
    position: relative !important;
    margin: 2rem 0;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  /* ── Card Reset (override desktop absolute + hidden) ── */
  .service-detail {
    position: relative !important;
    inset: auto !important;
    opacity: 0;                   /* GSAP will animate this */
    visibility: visible !important;
    transform: translateY(30px);  /* GSAP will animate this */
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    will-change: transform, opacity;
    margin-bottom: 0;

    /* Card visual — Performance: solid bg instead of backdrop-filter */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04);
  }

  /* 5th card spans full row */
  .service-detail:nth-child(5) {
    grid-column: 1 / -1;
  }

  /* Make the 5th card image taller to show the whole panoramic image */
  .service-detail:nth-child(5) .service-mobile-img {
    height: auto !important;
    max-height: 220px;
  }

  /* ── Hide desktop-only decorations ── */
  .service-index {
    display: none !important;
  }

  /* ── Label ── */
  .service-index-label {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    color: var(--accent-primary);
  }

  /* ── Embedded image (hidden on desktop) ── */
  .service-mobile-img {
    display: block;
    width: calc(100% + 1.5rem);
    margin-inline-start: -0.75rem;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    order: -1; /* Image always first */
  }

  /* ── Typography ── */
  .service-detail h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 800;
  }

  .service-detail p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
    padding-right: 0;
    border-right: none;
  }

  /* ── CTA Button ── */
  .services-sticky__cta {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .services-sticky__cta .btn--primary {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--accent-primary), #f97316);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .services-sticky__cta .btn--primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .services-sticky__cta .btn--primary:active {
    transform: scale(0.96);
    box-shadow: 0 5px 15px rgba(234, 88, 12, 0.2);
  }

  .services-sticky__cta .btn--primary:active::before {
    opacity: 1;
    animation: buttonRippleMobile 0.6s ease-out;
  }

  @keyframes buttonRippleMobile {
    0%   { transform: scale(0);   opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0;   }
  }

  /* ── Hide the desktop visual stage completely ── */
  .service-visual-stage {
    display: none !important;
  }
}

/* ── Extra-small tweaks ── */
@media (max-width: 480px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
}
