/* ==========================================================================
   AfterNow CREATIVE & MARKETING - Comprehensive Mobile & Responsive Engine
   Breakpoints:
   - Laptop / Tablet Landscape: max-width 1024px
   - Tablet Portrait: max-width 840px
   - Small Tablet / Phablet: max-width 768px
   - Mobile Phone Landscape: max-width 640px
   - Small Mobile Phone: max-width 400px
   ========================================================================== */

/* --- Global Base Mobile Rules --- */
html {
  overflow-x: hidden;
  width: 100%;
}
body {
  /* overflow-x: clip prevents horizontal scroll without creating a new scroll container
     (unlike overflow-x: hidden which breaks position: sticky on descendants) */
  overflow-x: clip;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* --- Breakpoint: 1024px (Laptops & Large Tablets) --- */
@media (max-width: 1024px) {
  .container {
    max-width: 960px;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .about-side-by-side-grid {
    gap: 3.5rem;
  }

  .pricing-grid {
    gap: 1.5rem;
  }
}

/* --- Breakpoint: 840px (Tablet Portrait) --- */
@media (max-width: 840px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .section {
    min-height: auto;
    padding: 4.5rem 0;
  }

  .full-viewport-about-section {
    min-height: auto;
    padding: 5rem 0;
  }

  .about-side-by-side-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-headline-text {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
  }

  .about-subheadline-text {
    font-size: clamp(1.5rem, 4.5vw, 2.25rem);
    margin-bottom: 1.25rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
    gap: 2rem;
  }

  .pricing-card.featured {
    transform: none;
  }
}

/* --- Breakpoint: 768px (Small Tablets & Mobile Devices) --- */
@media (max-width: 768px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .section-header {
    margin-bottom: 2.25rem;
  }

  /* TIMELINE PROCESS SECTION MOBILE ADAPTATION (Simple & Static Mobile Grid) */
  .skiper-timeline-section {
    height: auto !important;
    padding: 4.5rem 0 !important;
    background-color: #4D774E !important;
  }

  .timeline-sticky-inner {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  .timeline-header {
    margin-bottom: 2rem !important;
  }

  .timeline-title {
    font-size: clamp(1.75rem, 6.5vw, 2.5rem) !important;
  }

  .skiper-timeline-wrapper {
    gap: 0 !important;
  }

  /* Hide complex stage & progress bar on mobile */
  .timeline-visual-stage,
  .timeline-track-bar {
    display: none !important;
  }

  /* Simple, static 1-column cards grid on mobile */
  .timeline-content-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
  }

  .timeline-content-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 12px !important;
    padding: 1.75rem 1.5rem !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    cursor: default !important;
    transition: none !important;
  }

  .timeline-content-card:hover {
    opacity: 1 !important;
    transform: none !important;
  }

  .step-card-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    margin-bottom: 0.65rem !important;
    line-height: 1.25 !important;
  }

  .step-card-desc {
    font-size: 0.95rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    line-height: 1.55 !important;
    margin: 0 !important;
  }

  /* ROI SIMULATOR MOBILE ADAPTATION */
  .calculator-box {
    padding: 1.5rem 1.1rem !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .calc-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.75rem !important;
    width: 100% !important;
  }

  #budgetValueDisplay {
    font-size: clamp(2.2rem, 8vw, 2.75rem) !important;
  }

  .calc-result-card {
    padding: 1.5rem 1.1rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .calc-result-card .rec-price {
    font-size: clamp(2.2rem, 7vw, 2.85rem) !important;
  }

  #recPlanTitle {
    font-size: 1.6rem !important;
  }

  /* EDITORIAL GET IN TOUCH SECTION MOBILE */
  .get-in-touch-hero-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 7rem 1.25rem 5rem 1.25rem;
  }

  .get-in-touch-btn {
    padding: 0.65rem 1.6rem;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 2.5rem;
  }

  .editorial-get-in-touch-title {
    font-size: clamp(3.75rem, 15.5vw, 6.5rem);
    line-height: 0.92;
    margin-bottom: 3rem;
  }

  .get-in-touch-email-wrap {
    margin-bottom: 3.5rem;
  }

  .get-in-touch-email {
    font-size: clamp(1.2rem, 5.2vw, 2rem);
    word-break: break-all;
  }

  /* MODAL OVERLAY MOBILE ADAPTATION */
  .modal-overlay {
    padding: 0.75rem;
    align-items: flex-start;
  }

  .modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    margin-top: 1.5rem;
    border-radius: 16px;
  }

  .contact-split-card {
    grid-template-columns: 1fr;
  }

  .contact-card-left,
  .contact-card-right {
    padding: 2rem 1.25rem;
  }

  .contact-statement-title {
    font-size: 2rem;
  }

  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }

  /* FOOTER MOBILE */
  .site-footer {
    padding: 3.5rem 0 2rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    margin-bottom: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
  }
}

/* --- Breakpoint: 640px (Mobile Phones) --- */
@media (max-width: 640px) {
  /* NIKE CAPSULE PILL HEADER MOBILE */
  .nike-pill-header {
    width: calc(100% - 1.5rem);
    top: 0.85rem;
    height: 48px;
    padding: 0 1rem;
  }

  .hdr-sub {
    display: none !important; /* Hide Creative & Marketing text on small header pill */
  }

  .hdr-after, .hdr-now {
    font-size: 1.05rem;
  }

  .nike-menu-toggle {
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
  }

  .nike-drawer-card {
    width: calc(100% - 1.5rem);
    top: 4.25rem;
    padding: 2rem 1.25rem;
  }

  .nike-stack-link {
    font-size: clamp(1.85rem, 8.5vw, 2.5rem);
  }

  .nike-bottom-bar {
    width: calc(100% - 1.5rem);
    padding: 0 1.25rem;
  }

  /* HERO SECTION MOBILE TYPOGRAPHY */
  .minimal-brand-title {
    gap: 0.5rem;
  }

  .minimal-brand-title .brand-name {
    font-size: clamp(2.5rem, 11.5vw, 4.5rem);
  }

  .minimal-brand-title .brand-subtitle {
    font-size: clamp(1.15rem, 5.5vw, 2rem);
  }
}

/* --- Breakpoint: 400px (Very Small Phones like iPhone SE / Galaxy Z Flip) --- */
@media (max-width: 400px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .minimal-brand-title .brand-name {
    font-size: 2.35rem;
  }

  .minimal-brand-title .brand-subtitle {
    font-size: 1.1rem;
  }

  .calculator-box {
    padding: 1.25rem 0.85rem;
  }

  .calc-result-card {
    padding: 1.25rem 1rem;
  }

  .pricing-card {
    padding: 1.75rem 1.25rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}
