/* ══════════════════════════════════════
   RESPONSIVE — ALL BREAKPOINTS (CLEAN)
   ══════════════════════════════════════ */

/* ── 1280px ── */
@media (max-width:1280px) {
  .footer__grid { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap: 40px; }
}

/* ── 1024px ── */
@media (max-width:1024px) {
  .nav__links, .nav__phone, .nav__cta { display: none; }
  .nav__burger { display: flex !important; cursor: pointer; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; padding: 80px 0 60px; }
  .hero__visual { display: flex; justify-content: center; width: 100%; }
  .hero__img-wrap { max-width: 500px; width: 100%; position: relative; overflow: visible; margin-bottom: 20px; }
  .hero__img { aspect-ratio: 4/3; width: 100%; object-fit: cover; border-radius: var(--radius-lg); display: block; }
  .hero__img-badge { bottom: -14px; left: -10px; }
  .hero { min-height: auto; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__stat-grid { max-width: 500px; }
  .services__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .products__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .applications__layout { grid-template-columns: 1fr; gap: 48px; }
  .applications__layout > div:first-child { max-width: 520px; position: relative; }
  .applications__img-float { display: none; }
  .whyus__layout { grid-template-columns: 1fr; gap: 48px; }
  .whyus__img { display: none; }
  .gallery__grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .gallery-item:first-child { grid-row: auto; grid-column: 1 / -1; }
  .gallery-item:first-child img { aspect-ratio: 16/7; }
  .contact__layout { grid-template-columns: 1fr; gap: 48px; }
  .footer__grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 40px; }
  .cta-strip__inner { flex-direction: column; text-align: center; }
  .nav__item { display: none; }
  /* Catalog page */
  .catalog-hero__grid { grid-template-columns: 1fr; gap: 42px; }
  .catalog-panel { max-width: 620px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-band { grid-template-columns: 1fr; }
}

/* ── 900px (process / clients) ── */
@media (max-width:900px) {
  .process__steps { grid-template-columns: 1fr; gap: 32px; }
  .process__connector { width: 2px; height: 24px; margin: 0 auto; }
  .clients__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ── 768px ── */
@media (max-width:768px) {
  /* ── Nav height ── */
  :root { --nav-h: 58px; }
  html, html.has-ticker { scroll-padding-top: calc(var(--nav-h) + 8px); }

  /* ── TICKER: show on mobile, smaller height ── */
  .ticker {
    display: flex !important;
    height: 28px;
    position: relative;
  }
  .ticker__track { animation-duration: 28s; }
  .ticker__item { font-size: 10px; padding: 0 24px; }

  /* ── TOPBAR: show on mobile, stacked layout ── */
  .topbar {
    display: flex !important;
    height: auto;
    padding: 8px 0;
    border-bottom: 1px solid rgba(42,103,128,0.14);
  }
  .topbar__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .topbar__left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: 100%;
  }
  .topbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .topbar__item {
    white-space: normal;
    font-size: 11px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-height: 32px;
  }
  .topbar__badge {
    font-size: 9px;
    padding: 3px 8px;
  }

  /* ── NAV: sticky top:0, tighter ── */
  .nav {
    position: sticky;
    top: 0;
    height: auto;
    min-height: var(--nav-h);
    padding: 6px 0;
  }
  .nav__logo-name { font-size: 15px; }
  .nav__logo-sub  { font-size: 8px; letter-spacing: 0.08em; }
  .nav__logo-icon { width: 36px; height: 36px; }
  .nav__logo-icon svg { width: 22px; height: 22px; }

  /* ── DRAWER: full-width, tight text, scrollable ── */
  /* ── DRAWER: 78% right-slide, clean mobile layout ── */
  .nav__drawer {
    width: 78%;
    max-width: 300px;
    height: 100dvh;
    height: 100vh;
    border-radius: 0 0 0 16px;
    padding: calc(var(--nav-h) + 16px) 10px 24px;
    gap: 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav__overlay { display: block; }
  .nav__drawer-link {
    font-size: 16px !important;
    padding: 14px 16px !important;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    margin: 0 0 2px 0 !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    min-height: 48px;
    letter-spacing: 0.05em;
  }
  .nav__drawer-link:hover { transform: none; }
  .nav__drawer-actions {
    padding: 14px 0 16px;
    gap: 10px;
    margin-top: 14px;
  }
  .nav__drawer-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 14px;
  }

  /* ── Hero ── */
  .hero { min-height: auto; }
  .hero__inner { padding: 56px 0 48px; gap: 24px; }
  .hero__title { font-size: clamp(36px, 9vw, 56px); }
  .hero__desc { font-size: 15px; line-height: 1.7; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__stats { gap: 0; }
  .hero__visual { justify-content: center; display: flex; width: 100%; }
  .hero__img-wrap { max-width: 100%; width: 100%; position: relative; overflow: visible; margin-bottom: 28px; }
  .hero__img { aspect-ratio: 4/3; width: 100%; border-radius: 14px; object-fit: cover; object-position: center; display: block; min-height: 200px; }
  .hero__img-badge { bottom: -14px; left: 10px; padding: 10px 14px; }
  .hero__img-badge-num { font-size: 26px; }

  /* ── Grids ── */
  .services__grid { grid-template-columns: 1fr; }
  .products__grid { grid-template-columns: 1fr !important; gap: 16px; }
  .whyus__points { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery-item:first-child { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .contact__map { height: 220px; }
  .testi-grid { grid-template-columns: 1fr; }

  /* ── Section title/desc ── */
  .section-title { font-size: clamp(26px, 7vw, 42px) !important; }
  .section-desc { font-size: 14px; line-height: 1.7; }

  /* ── Product cards ── */
  .product-card { display: flex; flex-direction: column; width: 100%; height: 100%; }
  .product-card__img-wrap { overflow: hidden; border-radius: 12px 12px 0 0; }
  .product-card__img { aspect-ratio: 16/9 !important; width: 100%; object-fit: cover; object-position: center; display: block; }
  .product-card__body { padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .product-card__brand { font-size: 10px; }
  .product-card__title { font-size: 17px; line-height: 1.2; }
  .product-card__desc { font-size: 13px; line-height: 1.65; display: block !important; overflow: visible !important; -webkit-line-clamp: unset !important; }
  .product-card__specs { padding: 12px 10px; gap: 8px; border-radius: 10px; margin-bottom: 12px; }
  .product-spec { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2px; }
  .product-spec__key { font-size: 10px; }
  .product-spec__val { font-size: 12px; text-align: right; max-width: 58%; word-break: break-word; }
  .product-card__badge { font-size: 9px; padding: 4px 10px; top: 10px; left: 10px; }
  .btn--full { width: 100% !important; justify-content: center !important; padding: 12px 20px; font-size: 13px; }

  /* ── Image fixes ── */
  .product-card__img { aspect-ratio: 16/9; object-position: center; }
  .catalog-card__media img { aspect-ratio: 16/9; object-fit: cover; object-position: center; }
  .catalog-panel__image img { aspect-ratio: 16/9; object-fit: cover; }
  .applications__img-main { aspect-ratio: auto; height: clamp(220px, 55vw, 340px); }
  .whyus__img { aspect-ratio: auto; height: clamp(220px, 50vw, 340px); }
  .gallery-item img { border-radius: 12px; }
  .gallery-item:first-child img { border-radius: 12px; aspect-ratio: 16/9; }
  .hero__img { box-shadow: 0 6px 20px rgba(42,103,128,0.12); }

  /* ── Reduced shadows (GPU performance) ── */
  .stat-card--plain,.service-card,.product-card,.why-point,.clients__card,.testi-card,.contact__form-box,.faq__item { box-shadow: 0 4px 14px rgba(42,103,128,0.08); }
  .catalog-panel { box-shadow: 0 6px 18px rgba(42,103,128,0.10); }
  .catalog-band { box-shadow: 0 4px 14px rgba(42,103,128,0.14); }

  /* ── FLOATING BUTTONS: stay floating column on mobile (NOT bottom dock) ── */
  body { padding-bottom: 0; }
  .footer { padding-bottom: var(--sp-16); }
  .quick-actions {
    position: fixed;
    right: 16px;
    bottom: 24px;
    right: max(16px, env(safe-area-inset-right, 16px));
    bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
    left: auto;
    top: auto;
    flex-direction: column;
    gap: 12px;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    z-index: var(--z-dock);
    align-items: flex-end;
    justify-content: flex-end;
    width: auto;
  }
  .quick-action {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px;
    min-height: 52px;
    border-radius: 50% !important;
    flex: none;
    flex-direction: row;
    position: relative !important;
    transform: translateZ(0);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
    border: 1px solid rgba(255,255,255,0.72) !important;
  }
  .quick-action svg { width: 22px; height: 22px; flex-shrink: 0; }
  /* Hide labels on mobile floating ── keep icons only, clean look */
  .quick-action span { display: none !important; }
  .quick-action:hover { transform: translateZ(0) !important; box-shadow: 0 6px 20px rgba(0,0,0,0.22) !important; }
  /* Active press animation */
  .quick-action:active { transform: scale(0.93) translateZ(0) !important; }

  /* ── WCAG 44px tap targets ── */
  /* nav__drawer-link min-height handled in drawer block above */
  .footer__link { min-height: 44px; display: inline-flex; align-items: center; }
  .testi-dot { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

  /* ── Catalog page mobile ── */
  .catalog-hero { padding: 56px 0 40px; }
  .catalog-hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .catalog-hero__title { font-size: clamp(38px, 10vw, 72px); margin: 16px 0 14px; }
  .catalog-hero__desc { font-size: 16px; line-height: 1.7; }
  .catalog-hero__actions { flex-direction: column; gap: 10px; }
  .catalog-hero__actions .btn { width: 100%; justify-content: center; }
  .catalog-hero__eyebrow { font-size: 11px; padding: 6px 13px; }
  .catalog-panel { padding: 16px; border-radius: 14px; max-width: 100%; }
  .catalog-panel__stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
  .catalog-panel__stat { padding: 12px 10px; border-radius: 10px; }
  .catalog-panel__num { font-size: 28px; }
  .catalog-panel__label { font-size: 10px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 16px; }
  .catalog-card { border-radius: 12px; }
  .catalog-card__body { padding: 18px; gap: 10px; }
  .catalog-card__title { font-size: 20px; }
  .catalog-card__desc { font-size: 14px; line-height: 1.65; }
  .catalog-card__list li { font-size: 13px; }
  .catalog-band { grid-template-columns: 1fr; padding: 24px 18px; gap: 18px; border-radius: 14px; text-align: center; }
  .catalog-band h2 { font-size: clamp(26px, 7vw, 44px); }
  .catalog-band p { font-size: 14px; }
  .catalog-band__actions { flex-direction: column; gap: 10px; }
  .catalog-band__actions .btn { width: 100%; justify-content: center; }
  .catalog-section { padding: 48px 0; }
  .catalog-band { padding: 24px 18px; }
  .catalog-band__actions .btn { width: 100%; justify-content: center; }
}

/* ── 480px ── */
@media (max-width:480px) {
  /* Topbar: single column, phone numbers prominent */
  .topbar__left { flex-direction: column; gap: 4px; }
  .topbar__right { display: none; }   /* hide GST on very small screens */
  .topbar__item  { font-size: 11px; min-height: 28px; }

  /* Ticker: even smaller */
  .ticker__item { font-size: 9px; padding: 0 16px; }

  /* Drawer links: tight on 320–480px */
  .nav__drawer-link { font-size: 15px !important; padding: 11px 14px !important; }

  .hero__stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero__stat:last-child { border-right: none; padding-left: 0; padding-top: 16px; grid-column: 1 / -1; }
  .hero__stat-num { font-size: 34px; }
  .about__stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: auto; }
  .gallery-item:first-child img { aspect-ratio: 4/3; }
  .brands__item { font-size: 18px; }
  .cta-strip__actions { flex-direction: column; width: 100%; }
  .cta-strip__actions .btn { justify-content: center; }
  .nav__drawer-link { font-size: 20px; }
  .contact__form-box { padding: 28px 20px; }
  .clients__grid { grid-template-columns: 1fr; }
  .applications__img-float { display: none; }
  .hero__scroll { display: none; }
  /* Product cards */
  .product-card__body { padding: 14px 12px 12px; }
  .product-card__title { font-size: 16px; }
  .product-spec__val { max-width: 55%; font-size: 11px; }
  /* Catalog */
  .catalog-hero { padding: 44px 0 32px; }
  .catalog-hero__title { font-size: clamp(34px, 9vw, 54px); }
  .catalog-panel__stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-grid { gap: 12px; }
  .catalog-card__body { padding: 14px; }
  .catalog-card__title { font-size: 18px; }
  /* Floating icons slightly smaller on small phones */
  .quick-action { width: 48px !important; height: 48px !important; min-width: 48px !important; min-height: 48px !important; }
  .quick-action svg { width: 20px; height: 20px; }
  .quick-actions { right: 12px; bottom: 20px; gap: 10px; }
}

/* ── 380px (very small phones: iPhone SE, Galaxy A01) ── */
@media (max-width:380px) {
  :root { --text-4xl: clamp(32px, 9vw, 56px); --text-3xl: clamp(26px, 7vw, 40px); }
  .hero__title { font-size: clamp(30px, 9vw, 44px); line-height: 1.02; }
  .hero__inner { padding-bottom: 56px; }
  .nav__logo-name { font-size: 13px; }
  .nav__logo-sub { display: none; }
  .nav__logo-icon { width: 32px; height: 32px; }
  .topbar__item { font-size: 10px; }
  .nav__drawer-link { font-size: 14px !important; padding: 10px 12px !important; }
  .section-title { font-size: clamp(22px, 7vw, 32px) !important; }
  .cta-strip__title { font-size: clamp(24px, 7vw, 38px); }
  .catalog-band h2 { font-size: clamp(22px, 7vw, 32px); }
  .product-card__body { padding: 12px 10px; }
  .product-card__title { font-size: 15px; }
  .product-spec__val { max-width: 50%; font-size: 11px; }
}

/* ═══════════════════════════════════════════════
   DESKTOP MIN-WIDTH GUARDS
   ═══════════════════════════════════════════════ */
@media (min-width:769px) {
  body { padding-bottom: 0; }
}
@media (min-width:1025px) {
  .nav__links, .nav__phone, .nav__cta { display: flex; visibility: visible; opacity: 1; }
}

/* ═══════════════════════════════════════════════
   TESTIMONIAL SLIDER
   ═══════════════════════════════════════════════ */
.about, .testimonials { overflow: visible !important; }
.testi-slider-wrap { position: relative; overflow: hidden; }
.testi-slider { display: flex; gap: 24px; overflow: visible; -webkit-overflow-scrolling: touch; }
.testi-slider .testi-card { flex: 0 0 100%; min-width: 0; }
@media (min-width:769px) {
  .testi-slider .testi-card { flex: 0 0 calc(33.333% - 16px); }
}
@media (min-width:769px) and (max-width:1024px) {
  .testi-slider .testi-card { flex: 0 0 calc(50% - 12px); }
}
.testi-slider-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.testi-slider-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: #EAF5F3; border: 1.5px solid rgba(42,103,128,0.18);
  color: #2A6780; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; flex-shrink: 0;
}
@media (hover:hover) {
  .testi-slider-btn:hover { background: #E87522; color: #fff; border-color: #E87522; }
}
.testi-slider-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.testi-slider-dots { display: flex; gap: 8px; align-items: center; }
.testi-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(42,103,128,0.22); cursor: pointer; transition: background 0.2s, transform 0.2s; border: none; padding: 0; }
.testi-dot.active { background: #E87522; transform: scale(1.3); }

/* ═══════════════════════════════════════════════
   HOVER — DESKTOP ONLY (touch devices excluded)
   ═══════════════════════════════════════════════ */
@media (hover:none) {
  .product-card:hover .product-card__img { transform: none !important; }
  .catalog-card:hover .catalog-card__media img { transform: none !important; }
  .gallery-item:hover img { transform: none !important; }
  .service-card:hover,.product-card:hover,.why-point:hover,.clients__card:hover,.testi-card:hover { box-shadow: 0 4px 14px rgba(42,103,128,0.08); }
}

/* ═══════════════════════════════════════════════
   KEYBOARD OPEN / DOCK HIDDEN (JS-toggled)
   ═══════════════════════════════════════════════ */
body.keyboard-open .quick-actions { opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.dock-hidden .quick-actions { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.15s ease !important; }

/* ═══════════════════════════════════════════════
   GRID CHILDREN — prevent overflow
   ═══════════════════════════════════════════════ */
.products__grid > *, .services__grid > *, .catalog-grid > *,
.about__grid > *, .whyus__points > *, .clients__grid > *,
.testi-grid > *, .gallery__grid > *, .footer__grid > *,
.catalog-panel__stats > * { min-width: 0; overflow-wrap: break-word; word-break: break-word; }

/* ═══════════════════════════════════════════════
   FULL-HEIGHT HERO — iOS address bar fix
   ═══════════════════════════════════════════════ */
@supports (height: 100dvh) {
  @media (min-width:769px) {
    .hero { min-height: 100dvh; }
  }
}

/* ═══════════════════════════════════════════════
   iOS FIXED JITTER PREVENTION
   ═══════════════════════════════════════════════ */
@supports (-webkit-touch-callout: none) {
  .quick-actions, .nav { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION — ticker hidden
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ticker { display: none; }
}

/* ═══════════════════════════════════════════════
   AUTOPREFIXER — flex gap fallback iOS < 14.5
   ═══════════════════════════════════════════════ */
@supports not (gap: 1px) {
  .nav__links { gap: 0; }
  .nav__links > * + * { margin-left: 24px; }
}
