/* ============================================================
   AQS Infotech — Mobile & UI refinements
   Loaded AFTER styles.css to override the design defaults.
   Keeps assets/styles.css faithful to the imported design.
   ============================================================ */

/* anchor links (e.g. /services#mobile, #culture) clear the fixed header */
html { scroll-padding-top: 90px; }

/* never allow embeds/media to force horizontal scroll on phones */
img, svg, iframe, video { max-width: 100%; }

/* ============================================================
   MOBILE NAV — smaller, tighter menu (was 26px, felt oversized)
   ============================================================ */
@media (max-width: 980px) {
  .site-header { padding-block: 14px; }
  .site-header.scrolled { padding-block: 10px; }
  .brand--logo img { height: 36px; }
  .site-header.scrolled .brand--logo img { height: 32px; }

  /* hamburger toggle — clean, evenly-stacked bars + smooth X on open */
  .nav-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; width: 46px; height: 46px; border-radius: 13px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-sm);
    padding: 0; cursor: pointer; transition: background .25s, border-color .25s, box-shadow .25s;
  }
  .nav-toggle:hover { box-shadow: var(--sh-md); }
  .nav-toggle span {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink);
    transition: transform .3s var(--ease), opacity .2s var(--ease), background .25s;
  }
  /* open state: turns into an X on a brand-gradient button */
  body.menu-open .nav-toggle { background: var(--grad-brand); border-color: transparent; box-shadow: var(--sh-glow); }
  body.menu-open .nav-toggle span { background: #fff; }
  body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-menu { padding: 88px var(--gutter) 36px; gap: 2px; }
  .mobile-menu a { font-size: 19px; padding: 11px 0; }
  .mobile-menu a.sub { font-size: 14.5px; padding-left: 14px; }
  .mobile-menu .btn { margin-top: 20px; width: 100%; font-size: 16px; padding: 15px 24px; }
}

@media (max-width: 420px) {
  .mobile-menu a { font-size: 18px; padding: 10px 0; }
  .mobile-menu a.sub { font-size: 14px; }
}

/* ============================================================
   TABLET POLISH
   ============================================================ */
@media (max-width: 760px) {
  /* keep generous section padding from getting cramped headers */
  .page-hero { padding-top: clamp(120px, 22vw, 150px); }
  /* about: vision/mission watermark number shouldn't overflow card */
  .vm-card { padding: 30px; }
  .vm-num { font-size: 3.6rem; top: 18px; right: 22px; }
  /* about philosophy panel */
  .philosophy { padding: 32px 24px; }
}

/* ============================================================
   PHONE POLISH (<= 600px)
   ============================================================ */
@media (max-width: 600px) {
  /* home hero: balance heading + stats on small screens */
  .hero { padding-top: 104px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.7rem); }
  .hero p.lead { max-width: 100%; }
  .hero-meta { gap: 18px 22px; }
  .hero-meta b { font-size: 22px; }

  /* CTA band: heading + buttons fit cleanly */
  .cta-band .display { font-size: clamp(1.8rem, 8vw, 2.3rem); }
  .cta-band [style*="display:flex"] { flex-direction: column; }
  .cta-band [style*="display:flex"] .btn { width: 100%; }

  /* services: number tag + heading stack comfortably */
  .svc-tag { font-size: 11.5px; }
  .svc-nav { gap: 8px; }
  .svc-nav a { padding: 9px 14px; font-size: 13.5px; }
  .svc-visual .icon-big { width: 54px; height: 54px; }
  .svc-visual .icon-big svg { width: 26px; height: 26px; }

  /* gallery / work / portfolio cards: image height a touch shorter */
  .gal-item .ph, .work-card .ph { height: 200px; }
  .work-card::before { height: 200px; }
  .work-card::after { top: 88px; }
  .gal-item::before { height: 200px; }
  .gal-item::after { top: 92px; }

  /* open-roles: keep the icon + title + toggle from crowding on phones */
  .role { margin-bottom: 14px; }
  .role-head { align-items: flex-start; gap: 13px; padding: 18px 16px; }
  .role-head .ic { width: 40px; height: 40px; }
  .role-head .ic svg { width: 20px; height: 20px; }
  /* the (unclassed) middle block takes remaining width so the title wraps cleanly */
  .role-head > div:not([class]) { flex: 1 1 auto; min-width: 0; }
  .role-head h3 { font-size: 1.02rem; line-height: 1.25; }
  .role-meta { gap: 5px 10px; margin-top: 8px; font-size: 11.5px; }
  .role-toggle { width: 34px; height: 34px; margin-top: 2px; }
  .role-toggle svg { width: 18px; height: 18px; }
  .role-inner { padding: 4px 16px 22px; }
  .role-inner h4 { margin: 18px 0 10px; }
  .role.open .role-body { max-height: 1000px; }

  /* filter chips: tidy, wrap nicely */
  .filter-bar { gap: 8px; margin-bottom: 26px; }
  .filter-bar button { padding: 9px 15px; font-size: 13.5px; }

  /* contact: cards + form padding */
  .info-card { padding: 18px; }
  .form-card { padding: 24px; }

  /* testimonials: smaller decorative quote so it doesn't bleed */
  .tcarousel::before { font-size: 140px; top: -44px; }
  .tnav button { width: 44px; height: 44px; }

  /* footer: tidy social row + columns */
  .footer { padding-block: 56px 28px; }
  .footer-grid { gap: 28px; }
}

/* ============================================================
   VERY SMALL PHONES (<= 380px)
   ============================================================ */
@media (max-width: 380px) {
  .hero h1 { font-size: 1.95rem; }
  .hero-meta { gap: 14px 18px; }
  .hero-meta b { font-size: 20px; }
  .btn, .btn-lg { font-size: 15px; padding: 14px 20px; }
  .chip { font-size: 13px; padding: 7px 12px; }
  .vm-num { display: none; }
}
