/* ==========================================================================
   AgriculturalSoilLabs.com - Professional Agronomic Laboratory Design System
   Version: 2.0.0 (Visual Trust & Modern Agronomic Engineering Rollout - OPT-078)
   ========================================================================== */

:root {
  /* Industrial & Agronomic Color Palette */
  --primary: #0f2b5c;          /* Deep Industrial Navy */
  --primary-ag: #1b4332;       /* Agronomic Forest Green */
  --primary-hover: #0a1f42;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --accent: #b45309;           /* Deep Soil Amber / Harvest Gold */
  --accent-hover: #92400e;
  --accent-light: #fef3c7;
  --accent-border: #fde68a;

  --success: #15803d;          /* Verified Accreditation Green */
  --success-hover: #166534;
  --success-light: #dcfce7;
  --success-border: #bbf7d0;

  --info: #0284c7;             /* Technical Blue */
  --info-light: #e0f2fe;
  --info-border: #bae6fd;

  --dark: #0f172a;             /* Slate 900 */
  --gray-dark: #334155;        /* Slate 700 */
  --gray-medium: #64748b;      /* Slate 500 */
  --gray-light: #f8fafc;       /* Slate 50 */
  --border: #e2e8f0;           /* Slate 200 */
  --border-dark: #cbd5e1;      /* Slate 300 */
  --white: #ffffff;

  /* Elevated Multi-stop Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);

  /* Typography & Geometry */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background-color: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Top Authority Banner */
.authority-strip {
  background: #0b192c;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid #1e293b;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.authority-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.authority-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.authority-item svg {
  color: #38bdf8;
  flex-shrink: 0;
}

/* Header & Nav */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner, .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.01em;
}

.logo svg {
  color: var(--primary-ag);
  flex-shrink: 0;
}

.logo span {
  color: var(--primary);
}

nav, .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a, .nav-links a {
  color: var(--gray-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

nav a:hover, .nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  background-color: var(--primary);
  color: var(--white) !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.nav-cta:hover {
  background-color: var(--primary-hover);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.70) 0%, rgba(30, 41, 59, 0.78) 100%), url('/images/hero-ag-soil.jpg?v=20261121') center/cover no-repeat;
  padding: 3.75rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: rgba(255, 255, 255, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.hero-badge svg {
  color: #60a5fa;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.15rem;
  color: #e2e8f0;
  max-width: 840px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

/* Hero Proof / Metrics Grid */
.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-proof-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-proof-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-proof-stat {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 0.25rem;
  font-feature-settings: "tnum";
}

.hero-proof-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.hero-proof-sub {
  font-size: 0.75rem;
  color: var(--gray-medium);
  line-height: 1.3;
}

/* 4-Pillar Soil Testing Trust Framework */
.trust-framework-section {
  padding: 3.5rem 0 2rem;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--gray-medium);
  line-height: 1.5;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.pillar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}

.pillar-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.pillar-card:nth-child(1) .pillar-icon-box { background: #eff6ff; color: #1d4ed8; }
.pillar-card:nth-child(2) .pillar-icon-box { background: #fef3c7; color: #b45309; }
.pillar-card:nth-child(3) .pillar-icon-box { background: #dcfce7; color: #15803d; }
.pillar-card:nth-child(4) .pillar-icon-box { background: #f1f5f9; color: #0f172a; }

.pillar-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--gray-dark);
  line-height: 1.55;
  flex-grow: 1;
}

/* 4 Engineered Agronomic Testing Applications */
.use-cases-section {
  padding: 2.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.use-case-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.use-case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.use-case-card-header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.use-case-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.use-case-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.use-case-card-body {
  padding: 1rem 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.use-case-card p {
  font-size: 0.86rem;
  color: var(--gray-dark);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.use-case-specs {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.78rem;
  color: var(--gray-dark);
}

.use-case-spec-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.use-case-spec-row:last-child {
  margin-bottom: 0;
}

.use-case-spec-row strong {
  color: var(--gray-medium);
  text-transform: uppercase;
  font-size: 0.72rem;
}

.use-case-spec-row span {
  font-weight: 600;
  color: var(--dark);
}

/* Directory Section & Filters */
.directory-section {
  padding: 3rem 0;
}

.filter-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  align-items: flex-end;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  color: var(--dark);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 43, 92, 0.12);
}

.directory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toolbar-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
}

.contractor-count-badge {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.view-toggle-group {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-dark);
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.view-toggle-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Card Grid (Aliased for compatibility) */
.contractor-card-grid, .lab-card-grid, .lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contractor-card, .lab-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.contractor-card:hover, .lab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}

.lab-title, .contractor-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 0.35rem;
  display: block;
}

.lab-title:hover, .contractor-card-title:hover {
  text-decoration: underline;
}

.lab-location, .contractor-card-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--gray-medium);
  margin-bottom: 0.85rem;
}

.lab-location svg, .contractor-card-location svg {
  color: var(--gray-medium);
  flex-shrink: 0;
}

.lab-desc, .contractor-card-desc {
  font-size: 0.88rem;
  color: var(--gray-dark);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.badge-row, .contractor-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge svg {
  flex-shrink: 0;
}

.badge-verified {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-accred {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-state {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.badge-type {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.service-tag {
  background: #f1f5f9;
  color: #334155;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-block;
  border: 1px solid #e2e8f0;
}

/* Lab Specs Matrix */
.lab-specs-matrix {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1.15rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 0.85rem;
  font-size: 0.82rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-item-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gray-medium);
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.spec-item-value {
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-details-list {
  list-style: none;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.lab-details-list li {
  margin-bottom: 0.4rem;
  color: var(--gray-dark);
}

.lab-details-list li strong {
  color: var(--dark);
}

/* Actions */
.lab-actions, .contractor-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  min-height: 42px;
  box-sizing: border-box;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-call {
  background-color: #15803d;
  color: var(--white);
  border-color: #15803d;
}

.btn-call:hover {
  background-color: #166534;
  border-color: #166534;
}

.btn-outline {
  border-color: var(--border-dark);
  color: var(--gray-dark);
  background: var(--white);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
}

/* Comparison Table (Alternative Dual View) */
.table-responsive {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.data-table, .labs-table, .contractors-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .labs-table th, .contractors-table th {
  background: #f8fafc;
  color: var(--gray-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
}

.data-table td, .labs-table td, .contractors-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.88rem;
}

.data-table tr:hover, .labs-table tr:hover, .contractors-table tr:hover {
  background-color: #f8fafc;
}

/* State Hub Grid */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.state-hub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-decoration: none;
  color: var(--dark);
  display: block;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.state-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-border);
}

.state-hub-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.state-hub-count {
  font-size: 0.8rem;
  color: var(--gray-medium);
  margin-top: 0.25rem;
}

/* Detail & Guide Layout */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-medium);
  margin: 1.5rem 0 1rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.guide-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  line-height: 1.7;
  font-size: 0.98rem;
  color: var(--dark);
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.guide-body h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin: 2rem 0 1rem;
}

.guide-body h3 {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 1.5rem 0 0.75rem;
}

.guide-body p {
  margin-bottom: 1.25rem;
}

/* Footer */
footer {
  background: #0b1727;
  color: #94a3b8;
  padding: 4rem 0 2.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.98rem;
  margin-bottom: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-col p {
  line-height: 1.6;
  font-size: 0.88rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid #1e293b;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.6;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillar-grid, .use-case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .filter-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .authority-strip {
    display: none;
  }

  .hero {
    padding: 1.5rem 0 1.25rem;
  }

  .hero h1 {
    font-size: 1.65rem;
    margin-bottom: 0.5rem;
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  .header-inner, .nav-container {
    height: auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  nav, .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--border);
  }

  nav.active, .nav-links.active {
    display: flex;
  }

  nav a, .nav-links a {
    margin: 0;
    font-size: 0.95rem;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    min-height: 46px;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .hero-proof-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .pillar-grid, .use-case-grid {
    grid-template-columns: 1fr;
  }

  .contractor-card-grid, .lab-card-grid, .lab-grid {
    grid-template-columns: 1fr;
  }

  .lab-actions, .contractor-card-actions {
    grid-template-columns: 1fr;
  }

  .filter-card {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .btn {
    min-height: 46px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .lab-specs-matrix {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SPRINT 1 MOBILE RESPONSIVENESS OVERRIDES (375px, 390px, 430px)
   ========================================================================== */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
  }

  .filter-card {
    grid-template-columns: 1fr !important;
    padding: 1.15rem 1rem !important;
    gap: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-control, .form-field select, .form-field input, select, input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Grid & Cards */
  .contractor-card-grid, .lab-card-grid, .lab-grid {
    grid-template-columns: 100% !important;
    gap: 1.15rem !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .contractor-card, .lab-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 1.15rem !important;
    box-sizing: border-box !important;
  }

  .lab-header, .lab-title-area, .badge-strip {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
  }

  .lab-title-area h3 {
    font-size: 1.15rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .lab-specs-matrix {
    grid-template-columns: 100% !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .spec-item {
    width: 100% !important;
    min-width: 0 !important;
  }

  .spec-value, .spec-item-value {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .badge-strip, .badge-row {
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }

  .lab-actions, .contractor-card-actions {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

