/* ==========================================================================
   Crelosia — Clinic Platform (media.css)
   Centralized responsive rules across all pages & breakpoints.
   ========================================================================== */

/* Large Tablets & Small Desktops (<= 1120px) */
@media (max-width: 1120px) {
  .container-shell {
    padding-inline: 1.25rem;
  }

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

  .footer-col-contact {
    grid-column: 1 / -1;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-line);
  }
}

/* Tablets & Mobile Navigation Switch (<= 960px) */
@media (max-width: 960px) {
  :root {
    --header-height: 70px;
  }

  .nav-links,
  .header-desktop-cta {
    display: none;
  }

  .mobile-toggle-btn {
    display: inline-flex;
  }

  .section-pad {
    padding-block: 3.75rem;
  }

  .sticky-panel {
    position: static;
  }

  .split-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 2.25rem !important;
  }

  .split-reverse-mobile > :first-child {
    order: 2;
  }

  .split-reverse-mobile > :last-child {
    order: 1;
  }

  .bento-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tab-header-bar {
    flex-direction: column;
    align-items: stretch !important;
  }

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

/* Small Tablets & Large Phones (<= 680px) */
@media (max-width: 680px) {
  .container-shell {
    padding-inline: 1rem;
  }

  .section-pad {
    padding-block: 3rem;
  }

  .bento-grid-3,
  .stats-grid-4,
  .cards-grid-2,
  .team-grid-4 {
    grid-template-columns: 1fr !important;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .hero-cta-row > a,
  .hero-cta-row > button {
    width: 100%;
  }

  .tab-bar-scroll {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }

  .tab-bar-scroll::-webkit-scrollbar {
    display: none;
  }

  .tab-bar-scroll > button {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .home-tab-panel,
  .feature-tab-pane {
    padding: 1.35rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .crelosia-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* Very Small Phones (<= 420px) */
@media (max-width: 420px) {
  .brand-title {
    font-size: 1.2rem;
  }

  .brand-sub {
    display: none;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .illus-frame {
    padding: 0.75rem;
    border-radius: 1.25rem;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  [data-scroll-bar] {
    width: var(--bar-target, 80%) !important;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .mobile-drawer,
  .scroll-progress-bar,
  .no-print {
    display: none !important;
  }

  body {
    background: var(--color-surface);
  }
}
