/* ==========================================================================
   responsive.css — Media Queries
   Huawai Vexis Inc Official Website

   Breakpoints:
   - max-width: 1280px (Large laptop)
   - max-width: 1024px (Tablet landscape)
   - max-width: 768px  (Tablet portrait / large mobile)
   - max-width: 480px  (Mobile phones)

   Overrides applied on top of base, components, and pages CSS.
   ========================================================================== */

/* ==========================================================================
   BREAKPOINT: max-width 1280px — Large Laptop
   ========================================================================== */

@media (max-width: 1280px) {
  :root {
    --grid-gap: 1.5rem;
  }

  .section {
    padding-block: var(--space-6);
  }

  .hero__title {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  }

  .about-story {
    gap: var(--space-4);
  }
}

/* ==========================================================================
   BREAKPOINT: max-width 1024px — Tablet Landscape
   ========================================================================== */

@media (max-width: 1024px) {
  /* Navbar: hide desktop links, show hamburger */
  .navbar__links {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }

  /* Services grid: 3 cols → 2 cols */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Compliance grid: 3 cols → 2 cols */
  .compliance-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Medical systems grid: 5 cols → 3 cols */
  .medical-systems__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Who we serve grid: 4 cols → 2 cols */
  .who-we-serve__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Tech stack: 3 categories → stacked or 2 cols */
  .tech-stack__grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-inline: auto;
  }

  .tech-arch__layer {
    padding: var(--space-3) var(--space-4);
  }

  /* Case preview grid: 3 cols → 2 cols */
  .case-preview__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Case studies grid: 3 cols → 2 cols */
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Core values: 4 cols → 2 cols */
  .core-values__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  /* About values: 4 cols → 2 cols */
  .about-values__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Why Us: alternating → stacked */
  .why-us__item {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .why-us__item--reverse .why-us__content {
    order: 0;
  }

  .why-us__visual {
    max-width: 400px;
    margin-inline: auto;
  }

  /* Service detail: 2 cols → stacked */
  .service-detail {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .service-detail--reverse .service-detail__content {
    order: 0;
  }

  .service-detail__visual {
    max-width: 400px;
    margin-inline: auto;
    order: -1;
  }

  /* About story: 2 cols → stacked */
  .about-story {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .about-story__visual {
    max-width: 400px;
    margin-inline: auto;
    order: -1;
  }

  /* Hero: reduce visual size */
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    align-items: center;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    display: none;
  }

  /* Contact layout: 2 cols → stacked */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  /* Footer: 4 cols → 2 cols */
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .footer__column--brand {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   BREAKPOINT: max-width 768px — Tablet Portrait / Large Mobile
   ========================================================================== */

@media (max-width: 768px) {
  /* Reduce section padding */
  .section {
    padding-block: var(--space-5);
  }

  .cta-section {
    padding-block: var(--space-5);
  }

  /* Hero: reduce height, stack content */
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + var(--space-4));
    padding-bottom: var(--space-6);
  }

  .hero__title {
    font-size: clamp(2rem, 6vw, 2.75rem);
  }

  /* Stats: 4 cols → 2x2 grid */
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stats__item:not(:last-child)::after {
    display: none;
  }

  /* Services grid: → single column */
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Tech stack: single column */
  .tech-stack__grid {
    grid-template-columns: 1fr;
  }

  .tech-arch__layer {
    padding: var(--space-3);
  }

  .tech-arch__node {
    font-size: 0.8125rem;
    padding: 0.25rem 0.625rem;
  }

  /* Case preview: single column */
  .case-preview__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Case studies: single column */
  .case-studies-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Core values: 2 cols → single column */
  .core-values__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About values: 2 cols → single column */
  .about-values__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Section header: reduce margins */
  .section-header {
    margin-bottom: var(--space-4);
  }

  /* CTA actions: full width stacked */
  .cta-section__actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .cta-section__actions .btn {
    width: 100%;
  }

  /* Contact form wrapper: reduce padding */
  .contact-form-wrapper {
    padding: var(--space-3);
  }

  /* Footer: 2 cols → stacked */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  /* Filter bar: horizontal scroll */
  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .filter-bar::-webkit-scrollbar {
    height: 4px;
  }

  /* Page hero: reduce padding */
  .page-hero {
    padding-top: calc(var(--navbar-height) + var(--space-4));
    padding-bottom: var(--space-5);
  }

  .page-hero__title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  /* Stats numbers: smaller */
  .stats__number,
  .stats__number--infinity {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }

  /* Compliance grid: 3 cols → 1 col */
  .compliance-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Medical systems grid: → 2 cols */
  .medical-systems__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Who we serve grid: 4 cols → 1 col */
  .who-we-serve__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Service detail section padding */
  .service-detail {
    padding-block: var(--space-4);
  }

  /* Reduce navbar height on mobile */
  :root {
    --navbar-height: 64px;
  }
}

/* ==========================================================================
   BREAKPOINT: max-width 480px — Mobile Phones
   ========================================================================== */

@media (max-width: 480px) {
  /* Reduce font sizes */
  :root {
    --fs-hero: 1.875rem;
    --fs-h2: 1.625rem;
    --fs-h3: 1.125rem;
    --space-7: 3.5rem;
  }

  .section {
    padding-block: var(--space-6);
  }

  /* Hero title */
  .hero__title {
    font-size: 1.875rem;
  }

  /* Hero actions: full width */
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  /* Page hero title */
  .page-hero__title {
    font-size: 1.75rem;
  }

  /* Stats: single column */
  .stats {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* Core values: single column */
  .core-values__grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
  }

  /* Medical systems grid: keep 2 cols on smallest screens */
  .medical-systems__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Who we serve grid: single column */
  .who-we-serve__grid {
    grid-template-columns: 1fr;
  }

  /* Card padding reduction */
  .card,
  .case-card,
  .case-study-card,
  .about-value-card {
    padding: var(--space-3);
  }

  /* Contact form wrapper */
  .contact-form-wrapper {
    padding: var(--space-3);
  }

  .contact-info {
    padding: var(--space-3);
  }

  /* Buttons: full width on mobile */
  .btn {
    width: 100%;
  }

  .btn--ghost {
    width: auto;
  }

  .navbar__link--cta {
    width: auto;
  }

  /* Container padding reduction */
  .container {
    padding-inline: 1rem;
  }

  :root {
    --container-padding: 1rem;
  }

  /* CTA section */
  .cta-section__title {
    font-size: 1.5rem;
  }

  /* Filter buttons: smaller */
  .filter-btn {
    padding: 0.375rem 0.875rem;
    font-size: var(--fs-xs);
  }

  /* Back to top: position adjustment */
  .back-to-top {
    bottom: var(--space-3);
    right: var(--space-3);
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   PRINT STYLES (Basic)
   ========================================================================== */

@media print {
  .navbar,
  .footer,
  .back-to-top,
  .mobile-menu,
  .mobile-menu__overlay,
  .navbar__toggle {
    display: none !important;
  }

  .hero {
    min-height: auto;
    background: white;
    color: black;
  }

  .hero__bg,
  .hero__visual {
    display: none;
  }

  .section {
    padding-block: var(--space-3);
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }

  body {
    background: white;
    color: black;
  }
}
