/* ==========================================================================
   Responsive breakpoints – loaded after style.css
   ========================================================================== */

/* ---------- large desktop: 3 / 4 column grids ---------- */
@media (min-width: 1081px) {
  .g3-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- ≤ 1180 px ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 20px; }
  .nav-item > a { padding: 0 11px; font-size: 13.5px; }
  .hdr-in { gap: 12px; }
  .hero-copy { max-width: 580px; }
  .ccards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .certs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cert { --cert-h: 215px; }
  .certs-grid .cert { --cert-h: 310px; }
}

/* ---------- ≤ 1080 px: tablet – drawer replaces the nav ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .hdr-in { display: flex; }              /* without the centred capsule: logo left, actions right */
  .hdr-burger { display: grid; }
  .hdr-cta { display: none; }
  .hdr-actions { margin-left: auto; }
  .sec { padding: 64px 0; }
  .sec-404 { padding: 90px 0; }

  /* minmax(0, 1fr): a column may not be widened by its content (a table with long words would
     otherwise push the page out of the screen on phones) */
  .about-grid, .em-grid, .factory-grid, .sol-hero, .sol-rfq, .two-col, .about-page,
  .jp-body, .post-body, .contact-grid, .inquiry-grid, .partners-band { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .about-grid, .em-grid { gap: 56px; }
  .about-sub { left: 20px; bottom: -30px; width: 32%; }
  .about-badge { right: 12px; top: -16px; }
  .em-sub { right: 16px; bottom: -26px; width: 36%; }
  .about-media { margin-bottom: 26px; }
  .em-media { margin-bottom: 26px; }

  .ctiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctile { min-height: 280px; }
  .carousel-track { grid-auto-columns: calc((100% - 48px) / 3); }
  .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs-panel { grid-template-columns: 1fr; gap: 28px; }
  .sol-row, .sol-row-rev { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .sol-row-rev .sol-row-ph { order: 0; }
  .g3, .g4, .g2-md { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jgrid { grid-template-columns: 1fr; }
  .jgrid .jcard { flex-direction: row; }
  .jgrid .jcard-ph { flex: 0 0 46%; }
  .jgrid .jcard-ph .ph { height: 100%; aspect-ratio: auto; }
  .cat-layout { grid-template-columns: 220px 1fr; gap: 32px; }
  .pd-grid { grid-template-columns: 1fr; gap: 36px; }
  .pd-gallery { position: static; }
  .pd-rfq { grid-template-columns: 1fr; gap: 28px; }
  .stats { margin-top: 64px; }
  .flow-5, .flow-6, .flow-7, .flow-8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sol-steps { grid-template-columns: 1fr; }
  .factory-photos { gap: 10px; }
  .cta-in { flex-direction: column; align-items: flex-start; gap: 26px; }
  .ftr-grid { grid-template-columns: 1fr 1fr; gap: 36px 32px; padding: 56px var(--gutter) 40px; }
  .ftr-brand { grid-column: 1 / -1; }
  .about-link { min-height: 200px; }
  .about-link > span { min-height: 200px; }
}

/* ---------- ≤ 820 px: large phone / small tablet ---------- */
@media (max-width: 820px) {
  :root { --gutter: 18px; --hdr: 68px; --hero-h: clamp(580px, 92svh, 760px); }
  .hdr-hours { display: none; }
  .hdr-top-links { gap: 14px; }
  .logo-text b { font-size: 22px; }

  .hero-media img { object-position: 68% 50%; }
  .hero-split .hero-media { width: 100%; left: 0; right: 0; }
  .hero-shade, .hero-split .hero-shade { background: linear-gradient(180deg, rgba(6, 18, 37, .72) 0%, rgba(6, 18, 37, .4) 96px, rgba(6, 18, 37, 0) 210px), linear-gradient(0deg, rgba(6, 18, 37, .97) 0%, rgba(6, 18, 37, .88) 48%, rgba(6, 18, 37, .4) 100%); }
  .hero-in { align-items: flex-end; }
  .hero-copy { padding-top: 90px; padding-bottom: 66px; max-width: 100%; }
  .hero-lead { margin: 12px 0 20px; }
  .hero-points { margin-top: 18px; gap: 6px 16px; font-size: 13px; }
  .hero-ui { bottom: 18px; justify-content: center; }
  .hero-nav { display: none; }
  .hero-dots { justify-content: center; }
  .hero-dot { height: 28px; padding: 0 3px; }
  .hero-dot:not(.is-active) i { width: 10px; }
  .hero-dot.is-active i { width: 36px; }

  .trustbar-in { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 18px; padding-bottom: 18px; }
  .trustbar ul { gap: 8px 18px; font-size: 13px; }
  .sec { padding: 52px 0; }
  .sec-head { margin-bottom: 30px; }
  .sec-lead { font-size: 15.5px; }
  .about-sub { bottom: -24px; width: 30%; border-width: 4px; }
  .about-media { margin-bottom: 22px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .stat { padding: 20px 14px 14px; border-bottom: 1px solid var(--line); border-right: 0 !important; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line) !important; padding-left: 0; }
  .stat:nth-child(n + 3) { padding-bottom: 4px; }
  .stat-l { font-size: 12.5px; }

  .ctiles { gap: 12px; }
  .ctile { min-height: 220px; }
  .ctile-name { font-size: 20px; }
  .ctile-arrow { width: 34px; height: 34px; top: 12px; right: 12px; }
  .ctile-body { padding: 16px; }
  .ctile-ico { width: 36px; height: 36px; }
  .ccards, .ccards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ccard { grid-template-columns: 52px 1fr; padding: 10px; gap: 10px; }
  .ccard-name { font-size: 13.5px; }

  .carousel-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .adv-grid { grid-template-columns: 1fr; }
  .cmp th, .cmp td { padding: 9px 8px; font-size: 12.5px; }
  .sol-steps { grid-template-columns: 1fr; }
  .partners { gap: 14px 22px; }
  .partners-big .partners-logo img { max-width: 170px; }
  .certs, .certs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cert, .certs-grid .cert { --cert-h: 250px; }
  .g3, .g4, .g2-md { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pcard-title { font-size: 18px; }
  .pcard-sum { -webkit-line-clamp: 2; font-size: 13px; }
  .pcard-body { padding: 12px 14px 6px; }
  .pcard-foot { padding: 8px 14px 12px; }
  .pcard-more { font-size: 10.5px; }
  .pcard-add { width: 32px; height: 32px; }
  .jgrid .jcard { flex-direction: column; }
  .jgrid .jcard-ph { flex: none; }
  .jgrid .jcard-ph .ph { aspect-ratio: 16 / 10; }
  .factory-grid { gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-feature-list { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .kpis-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero { padding: 24px 0 52px; }
  .pd-grid { padding-top: 32px; }
}

/* ---------- ≤ 600 px: phone ---------- */
@media (max-width: 600px) {
  :root { --gutter: 16px; --hero-h: clamp(600px, 94svh, 780px); }
  .hdr-top-links span { display: none; }
  .hdr-top-links a .ico { width: 18px; height: 18px; }
  .lang-full { display: none; }                    /* the language button shows the short name */
  .lang-short { display: inline; }
  .logo-text small { font-size: 8.5px; letter-spacing: .14em; }
  .logo-mark { width: 38px; height: 38px; }
  .hero-btns .btn { flex: 1 1 100%; }
  .hero-points { font-size: 12.5px; }
  .trustbar-label { display: none; }
  .btn-lg { height: 50px; padding: 0 20px; font-size: 12.5px; }
  /* a long label (the translated versions have longer texts) wraps instead of sticking out of the screen */
  .btn, .btn-lg { white-space: normal; height: auto; padding: 10px 16px; line-height: 1.35; text-align: center; }
  .btn { min-height: 46px; }
  .btn-lg { min-height: 50px; }
  /* a comparison table that is wider than the screen scrolls inside its own box */
  .cmp { display: block; overflow-x: auto; }

  .g2, .g3, .g4, .g2-md { grid-template-columns: minmax(0, 1fr); }
  .ccards, .ccards-grid { grid-template-columns: 1fr; gap: 10px; }
  .ccard { grid-template-columns: 64px 1fr; padding: 10px 12px; gap: 14px; }
  .ccard-name { font-size: 14.5px; }
  .ctiles { grid-template-columns: 1fr; }
  .ctile { min-height: 190px; }
  .ctile-name { font-size: 22px; }
  .carousel-track { grid-auto-columns: 86%; }
  .carousel-ui { justify-content: space-between; }
  .pcard-title { font-size: 20px; }
  .pcard-sum { -webkit-line-clamp: 3; font-size: 13.5px; }
  .about-main { aspect-ratio: 16 / 11; }
  .about-sub { width: 38%; bottom: -22px; }
  .em-sub { width: 42%; bottom: -22px; }
  .em-main { aspect-ratio: 4 / 5; }
  .sec-em { padding-bottom: 76px; }

  .cat-layout { grid-template-columns: 1fr; gap: 24px; }
  .cat-side { position: static; }
  .side-nav { display: none; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { justify-content: flex-start; text-align: left; }
  .pn a span { font-size: 16px; }
  .pd-thumbs { grid-template-columns: repeat(4, 1fr); }
  .pd-actions .btn { flex: 1 1 100%; }
  .pd-sec { padding: 32px 0; }
  .pd-subnav a { padding: 11px 14px; }
  /* breadcrumbs: one line on phones – home, the direct parent and the current page */
  .crumbs ol { flex-wrap: nowrap; gap: 6px; }
  .crumbs li:not(:first-child):not(:nth-last-child(2)):not(:last-child) { display: none; }
  .crumbs li:last-child { flex: 1 1 auto; }
  .crumbs [aria-current] { max-width: 100%; }
  /* the section tabs scroll sideways – fade the edge so that is visible */
  .pd-subnav .wrap { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
  .spec th, .spec td { padding: 11px 12px; font-size: 13.5px; }
  .spec th { width: 40%; }
  .pd-rfq { padding-bottom: 40px; }
  .pd-subnav { margin-top: 40px; }
  .jp-thumbs { grid-template-columns: repeat(3, 1fr); }
  .jp-main { aspect-ratio: 16 / 10; }
  .jp-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
  .flow, .flow-5, .flow-6, .flow-7, .flow-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sel-grid { grid-template-columns: 1fr; }
  .kpis-row { grid-template-columns: 1fr 1fr; }
  .kpi-n { font-size: 42px; }
  .uni-list { grid-template-columns: 1fr; }
  .rfq-grid { grid-template-columns: 1fr; }
  .rfq-foot { flex-direction: column; align-items: stretch; }
  .rfq-btns .btn { flex: 1 1 100%; }
  .contact-cards { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr; gap: 28px; }
  .post-side { position: static; }
  .contact-form { padding: 22px 18px; }
  .sol-rfq-form .rfq { padding: 22px 18px; }
  .map { height: 300px; }
  .steps3 { grid-template-columns: 1fr; }
  .faq-body { padding-left: 40px; }
  .dl { grid-template-columns: 48px 1fr; }
  .dl-ico { width: 48px; height: 48px; }
  .dl-btn { grid-column: 1 / -1; justify-content: center; }
  .factory-photos { grid-template-columns: 1fr 1fr; gap: 8px; }
  .post-gallery { grid-template-columns: 1fr 1fr; }
  .post-hero img { aspect-ratio: 16 / 10; }
  .search { padding: 66px 12px 20px; }
  .search-form input { font-size: 16px; }
  .fab-wa { height: 52px; width: 52px; padding: 0; }
  .fab-wa span { display: none; }
  .fab-top { bottom: 84px; }
  .ftr-bar-in { padding-right: 84px; }              /* the round WhatsApp button is 52 px wide, 22 px from the edge */
  .lightbox { padding: 76px 12px 86px; }
  .lightbox-prev { left: auto; right: 76px; top: auto; bottom: 20px; transform: none; }
  .lightbox-next { right: 18px; top: auto; bottom: 20px; transform: none; }
  .lightbox-cap { bottom: 78px; padding: 0 24px; }
  .nf-code { -webkit-text-stroke-width: 1px; }
}

/* ---------- ≤ 380 px ---------- */
@media (max-width: 380px) {
  .logo-text small { display: none; }
  .ccards, .ccards-grid { grid-template-columns: 1fr; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
}
