/* Shared device layouts, loaded after the visual theme. */
:root{ --nav-h:76px; }
body{ overflow-wrap:break-word; }
.row > *, .footer-brand > div{ min-width:0; }
img{ max-width:100%; }
iframe{ max-width:100%; }
.footer-sas a, .contact-card a{ overflow-wrap:anywhere; }
.map-frame{ height:clamp(320px,35vw,420px); }
.map-frame + .contact-card{ height:auto; }
.btn{ white-space:normal; }
.section-heading-row, .gallery-heading-row, .technical-visual-heading{ flex-wrap:wrap; }
.section-heading-row > a, .gallery-heading-row > a{ white-space:normal; }
.application-search input{ min-width:0; }
.table-responsive{ max-width:100%; overscroll-behavior-x:contain; }
.hero-content-slider{ display:grid; }
#heroSlider .hero-content-block,
#heroSlider .hero-content-block:not(.is-active){
  grid-area:1 / 1;
  position:relative;
  width:100%;
  min-width:0;
}
.new-hero{ padding-top:calc(var(--nav-h) + 80px); }
.hero-slide-dots{ position:relative; inset:auto; margin-top:28px; }
.hero-slide-dots button{ min-width:44px; height:24px; background:transparent; position:relative; }
.hero-slide-dots button::before{ content:""; position:absolute; inset:10px 0; background:rgba(255,255,255,.45); }
.hero-slide-dots button.active{ background:transparent; }
.hero-slide-dots button.active::before{ background:var(--sas-gold); }
.filter-pills .btn, .social-dot{ min-height:44px; }
.social-dot{ min-width:44px; }

@media (max-width:1199.98px){
  .container-xl > .row{ --bs-gutter-x:2rem; }
  .navbar-sas .navbar-collapse{
    max-height:calc(100vh - 140px);
    max-height:calc(100dvh - 140px);
    overscroll-behavior:contain;
  }
  .navbar-sas .navbar-toggler{ min-width:44px; min-height:44px; margin-block:16px; }
  .navbar-sas .navbar-nav{ align-items:stretch; }
  .navbar-sas .nav-link, .navbar-sas .dropdown-item{ white-space:normal; min-height:44px; }
  .navbar-sas .dropdown-menu{ min-width:0; max-width:100%; }
}

@media (max-width:991.98px){
  .section-modern, .solutions-section, .applications-section, .technology-section,
  .product-expertise-section, .technical-visual-section, .homepage-gallery-section{ padding-block:60px; }
  .section-heading-row, .gallery-heading-row, .technical-visual-heading{ align-items:flex-start; gap:20px; }
  .activity-bento{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .technical-visual-grid-expanded{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .testimonial-card{ min-height:0 !important; }
  .cta-inner{ padding:32px; }
}

@media (max-width:767.98px){
  .container-xl{ padding-inline:20px; }
  .new-hero{ min-height:0 !important; padding:calc(var(--nav-h) + 64px) 0 48px; }
  .new-hero h1{ font-size:clamp(2.25rem,8.5vw,3.5rem) !important; line-height:1.06; letter-spacing:-.8px !important; }
  .new-hero .hero-copy{ font-size:1rem; line-height:1.75; }
  .hero-actions{ flex-wrap:wrap; gap:16px; margin-top:24px; }
  .hero-trust{ margin-top:28px; }
  .hero-eyebrow{ line-height:1.65; }
  .about-modern{ padding-block:44px; }
  .hero-scroll-cue{ display:none; }
  .page-header h1{ font-size:clamp(2rem,7.5vw,3rem); }
  .page-header p{ font-size:1rem; }
  .section-modern, .solutions-section, .applications-section, .technology-section,
  .product-expertise-section, .technical-visual-section, .homepage-gallery-section{ padding-block:44px; }
  .section-head{ margin-bottom:28px; }
  .section-heading-row, .gallery-heading-row, .technical-visual-heading{ flex-direction:column; }
  .activity-bento, .product-showcase, .tech-tree-grid{ grid-template-columns:minmax(0,1fr); }
  .activity-bento > .activity-card{ grid-column:auto !important; }
  .activity-card{ min-height:0 !important; padding:24px !important; }
  .tech-tree-cat{ min-width:0; width:100%; }
  .stat-modern{ padding:18px 10px !important; border-bottom:1px solid rgba(255,255,255,.16); }
  .stat-modern:nth-child(2n){ border-right:0 !important; }
  .stat-modern small{ letter-spacing:.6px !important; }
  .contact-card, .cert-card, .project-card, .team-card{ padding:24px; }
  .testimonial-card{ padding:24px !important; }
  .form-control, .form-select, .application-search input{ font-size:16px; }
  .map-frame iframe{ width:100%; height:320px; }
  .cta-banner, .cta-inner{ padding:28px 22px; }
  .footer-sas{ padding-bottom:100px; }
  .footer-sas .footer-brand{ align-items:flex-start; }
  .footer-sas .footer-brand img{ flex-shrink:0; }
  .whatsapp-float{ right:max(12px,env(safe-area-inset-right)); bottom:calc(72px + env(safe-area-inset-bottom)); }
  .back-to-top{ right:max(14px,env(safe-area-inset-right)); bottom:calc(16px + env(safe-area-inset-bottom)); width:44px; height:44px; }
}

@media (max-width:575.98px){
  .technical-visual-grid-expanded, .fire-gallery-grid,
  .homepage-gallery-grid{ grid-template-columns:minmax(0,1fr); }
  .technical-visual-grid-expanded > figure, .home-gallery-card.home-gallery-large{ grid-column:auto; grid-row:auto; }
  .homepage-gallery-grid{ grid-template-rows:none; grid-auto-rows:220px; }
  .image-stack{ height:330px; }
  .shot-frame-main{ height:280px; }
  .shot-frame-small{ height:150px; }
  .hero-actions{ align-items:stretch; }
  .hero-actions .btn, .cta-inner > .btn{ width:100%; }
  .hero-text-link{ padding-block:8px; }
  .filter-pills .btn{ flex:1 1 auto; }
  .tech-tree-card{ padding:22px 18px !important; }
  .application-pills span{ max-width:100%; }
}

/* What We Build: compact two-column cards on phones. */
@media (max-width:767.98px){
  .navbar-sas .navbar-brand-sas{ flex:1 1 0; width:auto; justify-content:flex-start; margin-right:10px; }
  .navbar-sas .navbar-brand-sas::before{ left:38px; width:150px; height:100px; }
  .navbar-sas .navbar-brand-sas img{ left:4px; top:8px; width:64px; height:80px; }
  .navbar-sas .navbar-brand-sas .brand-text{ display:block; margin-left:auto; padding-left:80px; padding-right:4px; text-align:right; }
  .navbar-sas .navbar-brand-sas .brand-text strong{ display:block; max-width:150px; white-space:normal; font-size:16px; line-height:1.15; letter-spacing:.2px; color:#007bbd !important; }
  .navbar-sas .navbar-brand-sas .brand-text::after{ content:""; display:block; width:42px; height:3px; margin:5px 0 0 auto; border-radius:3px; background:linear-gradient(90deg,#00a4de 0 30%,#f2c200 30% 80%,#f36a29 80%); }
  .navbar-sas .navbar-toggler{ flex-shrink:0; }
}

.panel-geo-section .panel-showcase-grid{
  display:grid; grid-template-columns:none; grid-auto-flow:column;
  grid-auto-columns:min(calc((100% - 12px) / 2), 260px); gap:12px;
  overflow-x:auto; scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain; padding:4px 4px 10px;
  scroll-padding-inline:4px; scrollbar-width:none;
}
.panel-geo-section .panel-showcase-grid::-webkit-scrollbar{ display:none; }
.panel-geo-section .panel-showcase-grid.is-sliding{ scroll-snap-type:none; scroll-behavior:auto; }
.panel-geo-section .panel-showcase-card{ min-width:0; scroll-snap-align:start; }
.panel-geo-section .panel-showcase-card:focus-visible{ outline:2px solid var(--amber-400); outline-offset:2px; }
.panel-geo-section .panel-showcase-media{ height:110px; }
.panel-geo-section .panel-showcase-body{ padding:12px 10px 4px; }
.panel-geo-section .panel-showcase-body h3{ font-size:.95rem; line-height:1.3; }
.panel-geo-section .panel-showcase-detail{ font-size:.78rem; line-height:1.5; color:rgba(255,255,255,.9); }
.panel-geo-section .panel-showcase-more{ margin:10px; font-size:.65rem; flex-wrap:wrap; }

/* Touch devices use swipeable cards instead of the pinned 3D scene. */
@media (hover:none), (max-height:600px), (prefers-reduced-motion:reduce){
  .panel-geo-pinned{ display:none; }
  .panel-showcase-mobile{ display:block !important; }
}
@media (hover:none){
  .service-card:hover, .project-card:hover, .cert-card:hover,
  .activity-card:hover, .product-tile:hover, .tech-tree-card:hover,
  .panel-showcase-card:hover{ transform:none !important; }
}
