/* ── Universal touch & tap reset ─────────────────────────── */
*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── Minimum tap target size (WCAG 2.5.5) ────────────────── */
a,
button,
[role="button"],
input[type="submit"],
input[type="button"],
label[for],
.slot-btn,
.nav-mobile-btn,
.nav-mobile-close,
.filter-tab,
.pay-tab-btn {
  min-height: 44px;
}

/* ── Prevent zoom on iOS form inputs ─────────────────────── */
select,
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="email"],
input[type="text"],
input[type="search"],
textarea {
  font-size: 1rem !important;
}

/* ── Focus visible ────────────────────────────────────────── */
.nav-mobile-links a:focus-visible,
.btn:focus-visible,
.slot-btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.nav-link:focus-visible,
.footer-social a:focus-visible,
.card-link:focus-visible,
.nav-cta:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* ── Safe-area insets (notch devices) ────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  .quick-contact-fab {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .whatsapp-fab {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
  .nav-mobile-menu {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .site-footer .footer-bottom {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* ── Scrollbar hide on mobile menus ──────────────────────── */
.nav-mobile-menu::-webkit-scrollbar { display: none; }
.nav-mobile-menu { scrollbar-width: none; }

/* ============================================================
   MOBILE BASE (< 480px) — the TRUE default. Most customers are
   on phones, so every rule below is the baseline; larger
   breakpoints only ADD columns, they never fix cramping.
   ============================================================ */

/* Hero ─────────────────────────────────────────────────────── */
.hero-headline {
  font-size: clamp(2.25rem, 11vw, 2.75rem);
  line-height: 1.08;
}

.hero-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.hero-actions .btn,
.hero-actions .btn-text-link {
  width: 100%;
  justify-content: center;
  min-height: 54px;
}

/* System status card — full width on mobile */
.system-status-card {
  width: 100%;
  animation: none; /* no float animation on small screens */
}

/* CTA actions ──────────────────────────────────────────────── */
.cta-actions {
  flex-direction: column;
  width: 100%;
  gap: 12px;
}

.cta-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Outcomes strip — 2-col on mobile */
.outcomes-strip-inner {
  grid-template-columns: 1fr 1fr !important;
}

.outcome-item {
  padding: 22px 16px;
}

/* Page hero headings */
.page-hero h1 {
  font-size: clamp(1.75rem, 8vw, 2.125rem);
}

.page-hero--photo {
  min-height: 340px;
}

/* Booking */
.booking-layout {
  grid-template-columns: 1fr !important;
}

.booking-col:first-child {
  border-right: none !important;
  border-bottom: 1px solid var(--border);
}

.booking-col {
  padding: 24px 20px !important;
}

.slot-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Mobile menu width */
.nav-mobile-menu {
  width: min(288px, 90vw);
}

/* Announcement bar */
.announcement-bar {
  font-size: 0.75rem;
  padding: 9px 44px 9px 14px;
}

.announcement-bar__inner {
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow: hidden;
}

.announcement-bar__text {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer social */
.footer-social a {
  width: 44px;
  height: 44px;
}

/* FABs */
.whatsapp-fab {
  bottom: 80px;
  right: 12px;
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

.quick-contact-fab {
  bottom: 16px;
  right: 12px;
  height: 48px;
  font-size: 0.8125rem;
  padding: 0 16px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.75rem;
  gap: 6px;
}

/* ── Trust row: grid on mobile ── */
.trust-row {
  margin-left: 0;
  margin-right: 0;
  border-radius: var(--radius);
  -webkit-mask-image: none;
  mask-image: none;
}

.trust-row-track {
  animation: none;
}

.trust-item {
  width: auto;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
}


/* Buttons minimum size */
.btn {
  min-height: 52px;
}

.btn-sm {
  min-height: 44px;
}

/* Forms */
.form-input,
.form-select {
  min-height: 52px;
}

.form-textarea {
  font-size: 1rem;
}

.slot-btn {
  min-height: 52px;
}

/* Product detail — single col */
.product-detail-layout {
  grid-template-columns: 1fr !important;
}

/* Section headers — left-align on mobile for readability */
.section-header--center {
  text-align: left;
}

.section-header--center .section-subtitle {
  margin-left: 0;
}

/* Quote layout — single col */
.quote-layout {
  grid-template-columns: 1fr !important;
}

/* Contact grid — single col */
.contact-grid {
  grid-template-columns: 1fr !important;
}

/* About grid — single col */
.about-grid {
  grid-template-columns: 1fr !important;
}

/* Booking layout — single col */
.booking-layout {
  grid-template-columns: 1fr !important;
}

/* Blog layout — single col */
.blog-layout {
  grid-template-columns: 1fr !important;
}

/* Blog sidebar — hidden on mobile (appears at bottom) */
.blog-sidebar {
  position: static !important;
  top: auto !important;
}

/* Process grid — single col */
.process-grid {
  grid-template-columns: 1fr !important;
}

.process-step {
  border-right: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-direction: row !important;
  gap: 16px;
}

.process-step:last-child { border-bottom: none; }

/* Founder / team grid — single col, generous gap */
.founder-grid,
.team-grid {
  grid-template-columns: 1fr !important;
  gap: 20px;
}

.founder-placeholder {
  margin: 0 auto !important;
  max-width: 116px !important;
  width: 116px !important;
  height: 116px !important;
}

/* Stack grid — single col */
.stack-grid {
  grid-template-columns: 1fr !important;
}

.stack-category {
  border-right: none !important;
  border-bottom: 1px solid var(--border);
}

.stack-category:last-child { border-bottom: none !important; }

/* Methodology grid — single col */
.methodology-grid {
  grid-template-columns: 1fr !important;
}

/* ============================================================
   PORTFOLIO — 2-column responsive grid on mobile
   (No horizontal scroll; keep vertical browsing.)
   ============================================================ */
.portfolio-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  overflow-x: visible;
  margin: 0;
  padding: 0;
  gap: 16px !important;
}

.portfolio-card {
  flex: initial;
  max-width: none;
  scroll-snap-align: none;
}

.portfolio-card .portfolio-thumb {
  aspect-ratio: 16 / 9;
}

.portfolio-card .portfolio-meta {
  padding: 14px !important;
}

.portfolio-card .portfolio-meta h3 {
  font-size: 0.975rem !important;
  margin-bottom: 6px !important;
}

.portfolio-card .portfolio-meta p {
  font-size: 0.82rem !important;
  margin-bottom: 10px !important;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portfolio-card .portfolio-cat {
  font-size: 0.625rem !important;
  margin-bottom: 6px !important;
}

.portfolio-card .card-link {
  font-size: 0.75rem !important;
}


/* "Swipe" hint label shown only at this breakpoint */
.scroll-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Product grid — single col */
.product-grid {
  grid-template-columns: 1fr !important;
}

/* Services grid — single col */
.services-grid {
  grid-template-columns: 1fr !important;
}

/* About pillars — stack to 1-col under 380px, else 2-col (set below) */
.about-pillars {
  grid-template-columns: 1fr 1fr;
}

/* ── Filter bar / category tabs (catalog + portfolio): edge-bleed scroll ── */
.catalog-filter-inner {
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.filter-search {
  width: 100%;
}

.filter-search .form-input {
  min-height: 46px;
  width: 100%;
}

.filter-search .btn {
  min-height: 46px;
  flex-shrink: 0;
}

/* Portfolio page uses an inline flex tab row, not .catalog-tabs-scroll —
   give it the same edge-bleed scroll treatment so chips never wrap/cramp */
[role="tablist"] {
  display: flex;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 10px;
  margin: 0 calc(-1 * clamp(20px, 6vw, 48px)) 4px;
  padding: 2px clamp(20px, 6vw, 48px) 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}

[role="tablist"]::-webkit-scrollbar { display: none; }

[role="tablist"] .btn-sm {
  flex-shrink: 0;
}

/* Slot active feedback */
.slot-btn:active {
  background: var(--brand);
  color: var(--text-light);
  transform: scale(0.97);
}

/* Footer bottom — stacked */
.footer-bottom {
  flex-direction: column !important;
  text-align: center;
  gap: 6px;
}

/* CTA block — stacked */
.cta-block {
  flex-direction: column !important;
  gap: 22px;
}

/* Footer top — stacked, more vertical room between groups */
.footer-top {
  grid-template-columns: 1fr !important;
  gap: 32px;
}

/* ============================================================
   380px+ — about-pillars / outcomes get slightly more air
   ============================================================ */
@media (min-width: 380px) {
  .trust-item { width: 136px; }
}

/* ============================================================
   480px+ — 2-col grids emerge
   ============================================================ */
@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .slot-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .outcomes-strip-inner {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Trust row can stop auto-scrolling once there's enough width to lay flat */
  .trust-row {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .trust-row-track {
    animation: none;
    transform: none;
    width: 100%;
    display: flex;
  }

  .trust-item {
    flex: 1;
    width: auto;
  }

  .hero-grid {
    gap: 32px;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .hero-actions .btn,
  .hero-actions .btn-text-link {
    width: auto;
  }

  .cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }

  .cta-actions .btn {
    width: auto;
  }

  /* Portfolio cards a touch narrower once there's more viewport to play with */
  .portfolio-card {
    flex: 0 0 62%;
  }
}

/* ============================================================
   600px+ — 2-col card grids. Portfolio reverts from horizontal
   scroll row back to a normal stacked grid at this width.
   ============================================================ */
@media (min-width: 600px) {
  .portfolio-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible;
    margin: 0;
    padding: 0;
    scroll-snap-type: none;
  }

  .portfolio-card {
    flex: initial;
    max-width: none;
    scroll-snap-align: none;
  }

  .portfolio-card .portfolio-thumb {
    aspect-ratio: 16 / 9;
  }

  .portfolio-card .portfolio-meta {
    padding: clamp(20px, 4vw, 24px) !important;
  }

  .portfolio-card .portfolio-meta h3 {
    font-size: 1.0625rem !important;
  }

  .portfolio-card .portfolio-meta p {
    font-size: 0.9rem !important;
    -webkit-line-clamp: unset;
    display: block;
  }

  .scroll-hint {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .methodology-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .process-step {
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-direction: column !important;
    gap: 14px;
  }

  .process-step:nth-child(even) { border-right: none; }
  .process-step:nth-last-child(-n+2) { border-bottom: none; }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .stack-category {
    border-bottom: 1px solid var(--border);
  }

  .stack-category:nth-child(odd) {
    border-right: 1px solid var(--border) !important;
  }

  .stack-category:nth-last-child(-n+2) {
    border-bottom: none !important;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr !important;
  }

  .about-pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .work-item {
    grid-template-columns: auto auto 1fr auto auto;
  }

  .work-item-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .work-item-thumb {
    display: block;
  }
}

/* ============================================================
   768px+ — Desktop nav, two-col layouts
   ============================================================ */
@media (min-width: 768px) {
  .nav-left,
  .nav-right {
    display: flex;
    align-items: center;
  }

  .nav-mobile-btn { display: none; }

  /* Hero goes side-by-side */
  .hero-grid {
    flex-direction: row;
    align-items: center;
    gap: 44px;
  }

  .hero-text {
    flex: 1;
    max-width: 600px;
  }

  .hero-aside {
    flex: 1;
    max-width: none;
    margin: 0;
  }

  .system-status-card {
    animation: float 6s ease-in-out infinite;
  }

  /* Booking */
  .booking-layout {
    grid-template-columns: 1fr 1fr !important;
  }

  .booking-col:first-child {
    border-bottom: none !important;
    border-right: 1px solid var(--border) !important;
  }

  .booking-col {
    padding: 36px !important;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr 1fr !important;
    align-items: start;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Founder */
  .founder-grid {
    grid-template-columns: auto 1fr !important;
    align-items: start;
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .founder-placeholder {
    margin: 0 !important;
    max-width: 152px !important;
    width: 152px !important;
    height: 152px !important;
  }

  /* Product detail */
  .product-detail-layout {
    grid-template-columns: 1fr 340px !important;
    gap: 56px;
  }

  /* Quote layout */
  .quote-layout {
    grid-template-columns: 1fr 360px !important;
  }

  /* Blog layout */
  .blog-layout {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: row !important;
    justify-content: space-between;
    text-align: left;
  }

  /* CTA block side-by-side */
  .cta-block {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
  }

  .cta-text {
    flex: 1;
    max-width: 520px;
  }

  .cta-actions {
    flex-shrink: 0;
    flex-direction: row;
    width: auto;
  }

  .cta-actions .btn {
    width: auto;
  }

  /* Catalog filter */
  .catalog-filter-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .filter-search {
    width: auto;
  }

  /* Section header center */
  .section-header--center {
    text-align: center;
  }

  .section-header--center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  /* Trust strip */
  .trust-strip-inner {
    min-width: unset;
  }

  .trust-strip-item {
    white-space: normal;
  }

  [role="tablist"] {
    margin: 0 0 4px;
    padding: 2px 0 10px;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* ============================================================
   960px+ — Blog gets sidebar
   ============================================================ */
@media (min-width: 960px) {
  .blog-layout {
    grid-template-columns: 1fr 300px !important;
  }

  .blog-sidebar {
    position: sticky !important;
    top: calc(var(--nav-h) + 24px) !important;
  }
}

/* ============================================================
   1024px+ — 3-col grids, 4-col process
   ============================================================ */
@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .methodology-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .process-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .process-step {
    flex-direction: column !important;
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: none !important;
  }

  .process-step:last-child { border-right: none !important; }

  .process-step:nth-child(even) {
    border-right: 1px solid rgba(255,255,255,0.1);
  }

  .stack-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .stack-category {
    border-right: 1px solid var(--border) !important;
    border-bottom: none !important;
  }

  .stack-category:last-child { border-right: none !important; }
  .stack-category:nth-child(odd) { border-right: 1px solid var(--border) !important; }

  .outcomes-strip-inner {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .footer-top {
    grid-template-columns: 2fr 1fr 1fr 1.25fr !important;
  }

  .team-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .work-item-thumb {
    width: 80px;
    height: 52px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
  }

  .work-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ============================================================
   1280px+ — larger thumbnails
   ============================================================ */
@media (min-width: 1280px) {
  .work-item-thumb {
    width: 100px;
    height: 64px;
  }
}

/* ============================================================
   HOVER — only on genuine pointer devices
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }

  .btn-primary:hover {
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .btn-outline:hover {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--border-strong) !important;
    transform: none !important;
  }

  .portfolio-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .portfolio-card:hover .portfolio-thumb img {
    transform: none !important;
  }

  .product-block:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .work-item:hover {
    background: var(--bg-alt) !important;
    padding-left: clamp(18px, 4vw, 26px) !important;
  }

  .system-status-card {
    animation: none !important;
  }

  .service-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .stat-card:hover {
    transform: none !important;
  }

  .team-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .theme-toggle:hover {
    transform: none !important;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .nav-mobile-menu {
    transition: none !important;
  }

  @keyframes float {
    from { transform: none; }
    to   { transform: none; }
  }

  .system-status-card {
    animation: none !important;
  }

  .trust-row-track {
    animation: none !important;
    transform: none !important;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .navbar,
  .site-footer,
  .announcement-bar,
  .whatsapp-fab,
  .quick-contact-fab,
  .receipt-actions,
  .nav-mobile-btn,
  .nav-mobile-overlay,
  .nav-mobile-menu {
    display: none !important;
  }

  body {
    padding-top: 0 !important;
    background: white !important;
    color: black !important;
  }

  .receipt-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  a[href]::after { content: none !important; }
}

/* ============================================================
   EXTRA MOBILE POLISH
   ============================================================ */

/* Nav mobile menu shouldn't be too wide on small phones */
@media (max-width: 360px) {
  .nav-mobile-menu {
    width: 92vw;
  }

  .hero-headline {
    font-size: 1.875rem;
  }

  .outcome-value {
    font-size: clamp(1.5rem, 8vw, 2.75rem);
  }

  .about-pillars {
    grid-template-columns: 1fr;
  }

  .portfolio-card {
    flex: 0 0 86%;
  }
}

/* Make tables horizontally scrollable on mobile */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Project detail 2-col sidebar → stacked, sticky → static, results → stack */
@media (max-width: 767px) {
  [style*="position:sticky"] {
    position: static !important;
    top: auto !important;
  }

  [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns:repeat(3,1fr); gap:0"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  [style*="grid-template-columns:repeat(3,1fr); gap:24px"] {
    grid-template-columns: 1fr !important;
  }

  .booking-col { padding: 24px 20px !important; }

  [style*="max-width: 680px"],
  [style*="max-width:680px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  [style*="max-width: 520px"],
  [style*="max-width:520px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Generic: any inline 2-col or 3-col grid in section-inner collapses to 1-col on mobile */
@media (max-width: 767px) {
  .section-inner > div[style*="grid-template-columns"],
  .section-inner > article[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Exception: keep 2-col for about-pillars & trust rows */
  .about-pillars {
    grid-template-columns: 1fr 1fr !important;
  }

  [style*="gap:80px"] {
    gap: 32px !important;
  }

  [style*="gap:64px"] {
    gap: 28px !important;
  }

  [style*="position:sticky; top:calc(var(--nav-h)"] {
    position: static !important;
    top: auto !important;
  }

  #view-mobile,
  #view-card {
    padding: 0;
  }

  .slot-btn:active {
    background: var(--brand);
    color: var(--text-light);
  }
}

/* ── Combo packages special case ─────────────────────────── */
@media (max-width: 900px) {
  .section-inner [style*="grid-template-columns:repeat(3,1fr); gap:0; border"] {
    grid-template-columns: 1fr !important;
    border-radius: var(--radius-md) !important;
  }
}

/* ── Gallery thumbnail count on mobile ───────────────────── */
@media (max-width: 600px) {
  [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns:repeat(6,1fr)"] {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
}

/* ── Work list item on mobile ────────────────────────────── */
@media (max-width: 599px) {
  .work-item {
    grid-template-columns: 1fr auto !important;
    gap: 10px;
  }

  .work-item-meta { display: none !important; }
  .work-item-thumb { display: none !important; }
}

/* ── Hero industries: wraps, no scroll ───────────────────── */
.hero-industries-inner {
  flex-wrap: wrap !important;
}

/* ── Catalog search row ──────────────────────────────────── */
@media (max-width: 767px) {
  .filter-search {
    width: 100%;
  }

  .filter-search input[type="search"] {
    flex: 1;
  }
}

/* ── Form rows collapse on small screens ────────────────── */
@media (max-width: 479px) {
  .form-row {
    grid-template-columns: 1fr !important;
  }
}

/* ── Process step on mobile — row layout ─────────────────── */
@media (max-width: 599px) {
  .process-step {
    flex-direction: row !important;
    gap: 16px;
    padding: clamp(20px, 5vw, 26px);
  }

  .process-num {
    font-size: 1.25rem;
    padding-top: 0;
    min-width: 2rem;
    flex-shrink: 0;
  }
}

/* ── Quote sidebar visible on mobile (below form) ───────── */
@media (max-width: 767px) {
  .quote-sidebar {
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    border: 1px solid var(--border) !important;
  }
}

/* ── Built-for banner on mobile ──────────────────────────── */
@media (max-width: 599px) {
  .built-for-chips {
    gap: 8px;
  }

  .built-for-chip {
    padding: 8px 14px;
    font-size: 0.75rem;
  }
}

/* ── Admin theme mobile tweaks ───────────────────────────── */
@media (max-width: 768px) {
  .stat-card { padding: 14px !important; }
  thead th   { font-size: 0.625rem; padding: 9px 12px; }
  tbody td   { font-size: 0.8125rem; padding: 9px 12px; }
}