/* ==========================================================================
   FishCloud Flow — Responsive Rules (360px / 390px / 768px / 1024px / 1440px / 1920px)
   ========================================================================== */

@media (max-width: 1120px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topology-stage-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-grid,
  .finder-shell,
  .feature-row,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .feature-row.is-reversed .feature-copy,
  .feature-row.is-reversed .feature-art {
    order: initial;
  }

  .article-sidebar {
    position: static;
  }

  .bento-span-7,
  .bento-span-5,
  .bento-span-4,
  .bento-span-6 {
    grid-column: span 6;
  }

  .steps-track,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-card.is-featured {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  :root {
    --fc-header-h: 66px;
  }

  .header-actions .header-cta-desktop {
    display: none;
  }

  .overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .bento-span-7,
  .bento-span-5,
  .bento-span-4,
  .bento-span-6,
  .article-card,
  .article-card.is-featured {
    grid-column: span 12;
  }

  .topology-stage-bar {
    grid-template-columns: 1fr 1fr;
  }

  .finder-metrics {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-actions .cta-button {
    width: 100%;
  }

  /* Smart Mobile Bottom CTA — automatically hidden near FAQ & Footer via JS */
  .mobile-sticky-cta {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: var(--fc-z-mobile-cta);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem 0.65rem 1rem;
    border-radius: var(--fc-radius-pill);
    background: rgba(16, 32, 57, 0.94);
    backdrop-filter: blur(12px);
    color: #FFFFFF;
    box-shadow: 0 16px 36px rgba(16, 32, 57, 0.28);
    transform: translateY(130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 280ms var(--fc-ease), opacity 240ms ease;
  }

  .mobile-sticky-cta.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-sticky-text {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
  }

  .mobile-sticky-cta .cta-button {
    min-height: 40px;
    padding: 0.48rem 1rem;
    font-size: 0.84rem;
    flex-shrink: 0;
  }
}

@media (max-width: 400px) {
  .container {
    width: min(100% - 1.4rem, var(--fc-container));
  }

  .overview-strip,
  .topology-stage-bar {
    grid-template-columns: 1fr;
  }

  .plan-meta-grid {
    grid-template-columns: 1fr;
  }
}
