/* CalClean multi-page styles — mobile-first, accessible, light theme */
:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --brand: #222d63;
  --brand-dark: #1a2350;
  --brand-light: #3a4a8a;
  --accent: #7cb341;
  --accent-dark: #6ba035;
  --accent-light: #8fc455;
  --focus: #f59e0b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border: #e2e8f0;
  --border-light: #f1f5f9;
}

/* NOTE: dark mode support was removed — site will remain on the light theme */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.section {
  padding: 3rem 0;
  background: var(--bg);
}

.section.alt {
  background: var(--bg-alt);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  line-height: 0;
}

.brand-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.brand-link:focus-visible {
  outline: 2px dashed var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}

.brand .logo {
  width: auto;
  height: 48px;
  max-width: 200px;
  display: block;
  object-fit: contain;
}

.site-nav ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  outline: none;
  background: rgba(34, 45, 99, 0.1);
  color: var(--brand);
}

.site-nav a.active {
  background: var(--brand);
  color: white;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.5rem 0.6rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  background: var(--bg-alt);
  border-color: var(--brand);
  color: var(--brand);
}

/* Improve touch targets on mobile */
.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.hero {
  padding: 3rem 0;
  background: linear-gradient(135deg, rgba(34, 45, 99, 0.06) 0%, rgba(124, 179, 65, 0.04) 100%), var(--bg);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
}

.hero-media {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hero-media:hover {
  transform: scale(1.01);
}

.hero-media:hover .backstory-hover-title {
  opacity: 1;
  transform: translateY(0);
}

.hero-media img {
  width: 580px;
  height: auto;
  max-height: 800px;
  max-width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.backstory-hover-title {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(34, 45, 99, 0.9);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.hero-text h1 {
  font-size: 2rem;
  margin: 0.2rem 0 1rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.hero-text p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem 0;
}

.hero-highlights li {
  margin: 0.5rem 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-highlights li i {
  color: var(--accent);
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.btn:hover,
.btn:focus-visible {
  background: var(--brand-dark);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.btn.cta {
  box-shadow: var(--shadow-lg);
}

.btn.cta:hover {
  box-shadow: 0 12px 20px -3px rgba(34, 45, 99, 0.3), 0 4px 6px -2px rgba(34, 45, 99, 0.2);
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.img-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

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

/* Allow backstory hover/title to work on .img-card as well as .hero-media */
.img-card:hover .backstory-hover-title {
  opacity: 1;
  transform: translateY(0);
}

.img-card img {
  width: 100%;
  height: auto;
  max-height: 400px;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

/* Ensure all images fit within containers */
img {
  max-width: 100%;
  height: auto;
}

.img-card figcaption {
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  padding-left: 1.5rem;
  position: relative;
  margin: 0.75rem 0;
  color: var(--ink);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
}

.rate-grid-wrapper {
  background: #f5f5f5 !important;
  padding: 2.5rem !important;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(34, 45, 99, 0.1);
  border: 1px solid rgba(34, 45, 99, 0.08);
  margin: 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

.rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(34, 45, 99, 0.2), 0 4px 8px rgba(34, 45, 99, 0.1);
  background: #ffffff;
  position: relative;
  width: 100%;
}

/* Desktop: no horizontal scrollbar on rate schedule */
@media (min-width: 800px) {
  .rate-grid-wrapper,
  .rate-grid {
    overflow: visible;
  }
}

.rate-grid::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 1rem;
  z-index: -1;
  opacity: 0.1;
}

.rate-row {
  display: contents;
}

.rate-head span {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  font-weight: 700;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.rate-head span:first-child {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.rate-head span:nth-child(2) {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
}

.rate-head span:nth-child(3) {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.rate-head span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
}

.rate-grid span {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(34, 45, 99, 0.1);
  background: white;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  white-space: normal;
  word-break: break-word;
}

.rate-grid .rate-row:not(.rate-head):hover span {
  background: rgba(34, 45, 99, 0.05);
  transform: scale(1.02);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(34, 45, 99, 0.1);
}

.rate-grid .rate-row:not(.rate-head) span:first-child {
  font-weight: 700;
  color: var(--brand);
  background: rgba(34, 45, 99, 0.02);
  font-size: 1.05rem;
}

.rate-grid .rate-row:not(.rate-head):hover span:first-child {
  background: rgba(34, 45, 99, 0.06);
  color: var(--brand-dark);
}

.rate-grid .rate-row:not(.rate-head) span[data-type="net30"] {
  font-weight: 600;
  color: var(--brand);
  font-size: 1.05rem;
}

.rate-grid .rate-row:not(.rate-head) span[data-type="pwp"] {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.05rem;
}

.rate-grid .rate-row:nth-child(even):not(.rate-head) span {
  background: rgba(34, 45, 99, 0.02);
}

.rate-grid .rate-row:nth-child(even):not(.rate-head) span:first-child {
  background: rgba(34, 45, 99, 0.04);
}

.rate-grid .rate-row:nth-child(even):not(.rate-head):hover span {
  background: rgba(34, 45, 99, 0.06);
}

.rate-grid .rate-row span:not(:nth-child(3n)) {
  border-right: 1px solid rgba(34, 45, 99, 0.12);
}

.rate-grid .rate-row:last-child span {
  border-bottom: none;
}

.rate-grid .rate-row.hidden {
  display: none;
}

.rate-grid .rate-row span.hidden {
  display: none;
}

/* (Removed) previous rule forcing Net30/PWP white; data-row styling now handles appearance */

/* Data rows: remove fill/background but keep clear borders and readable text */
.rate-grid .rate-row:not(.rate-head) span {
  background: transparent !important;
  color: var(--ink) !important;
  border-bottom: 1px solid rgba(34, 45, 99, 0.14);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: inset 0 -1px 0 rgba(34,45,99,0.02);
}

/* Stronger horizontal lines for clarity */
.rate-grid .rate-row:not(.rate-head) span:not(:last-child) {
  border-right: 1px solid rgba(34, 45, 99, 0.14);
}

/* Ensure header keeps its column background and title styling */
.rate-grid > .rate-row.rate-head span {
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Themed coloring for rate columns (Net30 and PWP) */
.rate-grid .rate-row:not(.rate-head) span:nth-child(2) {
  color: var(--brand) !important;
  font-weight: 700;
}
.rate-grid .rate-row:not(.rate-head) span:nth-child(3) {
  color: var(--accent) !important;
  font-weight: 700;
}

/* Make numeric values slightly larger for emphasis */
.rate-grid .rate-row:not(.rate-head) span:nth-child(2),
.rate-grid .rate-row:not(.rate-head) span:nth-child(3) {
  font-size: 1.06rem;
}

.rate-details {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

/* Rates header with right-aligned action */
.rates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.rates-header .btn {
  white-space: nowrap;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
}

.rate-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.rate-details summary:hover {
  color: var(--brand);
}

.rate-details ul {
  margin-top: 0.75rem;
  padding-left: 1.5rem;
  color: var(--muted);
}

.cards {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.card h2 {
  color: var(--brand);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Credentials cards */
.credentials-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.credential-card h3 {
  margin: 0 0 0.5rem 0;
  color: var(--brand);
}

.credential-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* Card layout: body left, actions right */
.credential-card {
  /* match .card behavior (block) so appearance matches other cards */
  display: block;
  position: relative;
  padding-right: 3rem; /* space for download icon */
}
.credential-body {
  display: block;
}
.credential-download {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--brand);
  border-radius: 6px;
  padding: 0.25rem;
  text-decoration: none;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.credential-download:hover {
  color: var(--brand-dark);
}

/* Make download icon easier to tap on mobile */
.credential-download {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  box-sizing: content-box;
  touch-action: manipulation;
}

/* US map section */
.us-map-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
}
.us-map-container {
  max-width: 960px;
  margin: 1rem auto;
}

/* SVG state default and hover styles */
.us-map-container svg { width: 100%; height: auto; display: block; }
.us-map-container .state {
  /* default: deep blue fill for states without equipment */
  fill: var(--brand) !important;
  transition: fill 220ms ease, filter 220ms ease, stroke 220ms ease;
  stroke: rgba(34,45,99,0.12) !important;
  stroke-width: 0.9px !important;
  cursor: pointer;
}
.us-map-container .state.storage {
  /* states with stored equipment: green */
  fill: var(--accent) !important;
}
.us-map-container .state:hover,
.us-map-container .state:focus {
  /* subtle glow on hover/focus (less intense) */
  filter: drop-shadow(0 8px 20px rgba(124,179,65,0.30));
  stroke: rgba(34,45,99,0.16) !important;
  stroke-width: 1.2px !important;
  transform-origin: center;
  transform: translateZ(0);
  outline: none;
}
.us-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(34,45,99,0.95);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 4000;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}
.us-tooltip.visible { opacity: 1; transform: translate(-50%, -140%); }

/* Legend */
.map-legend {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.5rem;
}
.map-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 600;
}
.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.06);
}
.legend-storage { background: var(--accent); }
.legend-none { background: var(--brand); }

/* Pulse animation for storage states (brighter) */
@keyframes usPulse {
  0% {
    filter: drop-shadow(0 7px 20px rgba(124,179,65,0.28));
    transform: translateZ(0) scale(1);
  }
  50% {
    /* moderate glow */
    filter: drop-shadow(0 20px 48px rgba(124,179,65,0.45));
    transform: translateZ(0) scale(1.02);
  }
  100% {
    filter: drop-shadow(0 7px 20px rgba(124,179,65,0.28));
    transform: translateZ(0) scale(1);
  }
}
.us-map-container .state.storage {
  /* moderate pulse */
  animation: usPulse 3s ease-in-out infinite;
  will-change: transform, filter;
  /* ensure storage states render above others when possible */
  isolation: isolate;
  position: relative;
  z-index: 2;
}

/* Modal preview */
.credential-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
}

.credential-modal[aria-hidden="false"] {
  display: flex;
}

.credential-modal-inner {
  background: white;
  /* Use large fixed width for presentation preview but constrain on small screens */
  width: 1640px;
  max-width: 95%;
  height: 80vh;
  max-height: 90vh;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.credential-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.credential-preview {
  flex: 1 1 auto;
  min-height: 60vh;
  background: #fafafa;
  overflow: auto;
}

.credential-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Mobile-specific adjustments for credential modal and embeds */
@media (max-width: 799px) {
  .credential-modal-inner {
    width: 95% !important;
    height: 90vh !important;
    max-width: 95%;
    border-radius: 0.5rem;
  }
  .credential-preview {
    min-height: 56vh;
  }
  .credential-preview iframe {
    height: 56vh;
  }
  /* Slightly smaller map on narrow devices */
  .map-embed iframe {
    height: 240px;
  }
  /* Ensure large fixed-width elements don't overflow */
  .hero-media img, .img-card img {
    max-width: 100%;
    height: auto;
  }
}

.credential-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
}

.case {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.case:hover {
  transform: translateY(-6px);
  box-shadow:
    0 10px 30px rgba(34,45,99,0.12),
    0 4px 12px rgba(34,45,99,0.08),
    0 0 24px rgba(124,179,65,0.12); /* subtle green glow */
  border-color: var(--accent-light);
  transition: transform 260ms cubic-bezier(.2,.9,.2,1), box-shadow 260ms ease, border-color 260ms ease;
}

/* Focus-visible for accessibility (keyboard) */
.case:focus-within,
.case:focus {
  outline: 3px solid rgba(124,179,65,0.12);
  outline-offset: 6px;
}

/* Apply same tasteful hover glow to credential cards (they reuse .case markup) */
.credential-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 10px 30px rgba(34,45,99,0.12),
    0 4px 12px rgba(34,45,99,0.08),
    0 0 24px rgba(124,179,65,0.12);
  border-color: var(--accent-light);
  transition: transform 260ms cubic-bezier(.2,.9,.2,1), box-shadow 260ms ease, border-color 260ms ease;
}

.case h2 {
  color: var(--brand);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.case ul {
  color: var(--muted);
  padding-left: 1.5rem;
}

/* Ensure credential cards use same visual style as case study cards */
.credentials-list {
  display: block;
  margin: 0;
  padding: 0;
}
.credential-card {
  margin-bottom: 1.5rem;
}
.credential-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.credential-card ul {
  color: var(--muted);
  padding-left: 1.5rem;
}
.credential-download {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--brand);
  font-size: 1.25rem;
}

.map-placeholder {
  min-height: 220px;
  border: 2px dashed var(--border);
  border-radius: 1rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--bg-alt);
}

.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-info {
  display: block;
}

.contact-heading h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--brand);
  font-weight: 700;
  padding: 0 0 1rem 0;
}

.contact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 0.5rem;
}

@media (min-width: 800px) {
  .contact-grid {
    /* Two-column layout: fixed comfortable form width + map column */
    grid-template-columns: 520px 360px;
    gap: 2rem;
    align-items: start;
    justify-content: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
  .contact-heading {
    grid-column: 1 / 2;
    grid-row: 1;
    align-self: start;
    padding: 0;
  }

  .contact-heading h1 {
    margin-bottom: 0.75rem;
  }

  .contact-form {
    grid-column: 1 / 2;
    grid-row: 2;
    max-width: 520px;
    padding-top: 0;
  }

  /* Place address+map to the right of the form (align with form top) */
  .contact-info {
    grid-column: 2 / 3;
    grid-row: 2 / 3; /* align with the form row */
    padding-left: 1rem;
    padding-top: 32px;
    align-self: start;
  }

  .contact-info address {
    font-style: normal;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }

  .map-embed {
    max-width: 360px;
    height: 256px;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
  }
}

.rfq .form-row {
  display: flex;
  flex-direction: column;
  margin: 1rem 0;
}

.rfq label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}

.rfq input,
.rfq textarea {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

/* Map embed styling */
.map-embed {
  margin-top: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 100%;
}
.map-embed iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.rfq input:focus-visible,
.rfq textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-color: var(--brand);
}

.rfq input:hover,
.rfq textarea:hover {
  border-color: var(--accent-light);
}

#rfq-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

#rfq-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

#rfq-status.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.help {
  color: var(--muted);
  font-size: 0.95rem;
}

.note {
  color: var(--muted);
  font-style: italic;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  margin-top: 3rem;
}

.site-footer .container {
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  background: var(--brand-dark);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: 0.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--brand);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  border: none;
  cursor: pointer;
}

.back-to-top i {
  color: white;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -3px rgba(34, 45, 99, 0.3);
}

/* Toast notification */
.cc-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: rgba(34,45,99,0.95);
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  z-index: 3500;
  font-weight: 600;
}
.cc-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Statistics and Testimonials Combined Section */
.section.stats-testimonials-section {
  background: var(--bg) !important;
  padding: 4rem 0 !important;
}

.stats-testimonials-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Statistics Section */
.stats-column {
  display: grid;
  /* prevent creating a 4th column by increasing the min width */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background: var(--brand);
  border-radius: 0;
  margin-bottom: 2rem;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50% + 1rem);
  padding-right: calc(50vw - 50% + 1rem);
  width: 100vw;
  max-width: 100vw;
}

.stat-item {
  padding: 0;
  text-align: center;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  cursor: pointer;
}

.stat-item.animate {
  animation: fadeInUp 0.8s ease forwards;
}

.stat-item:nth-child(1).animate {
  animation-delay: 0.1s;
}

.stat-item:nth-child(2).animate {
  animation-delay: 0.2s;
}

.stat-item:nth-child(3).animate {
  animation-delay: 0.3s;
}

.stat-item:nth-child(4).animate {
  /* removed - only up to 3 stats required; leftover rule kept harmless */
  animation-delay: 0.4s;
}

.stat-item:hover {
  transform: translateY(-5px) scale(1.05);
}

.stat-item:hover .stat-number,
.stat-item:hover .stat-label {
  color: var(--accent);
}

.stat-number {
    font-size: 5.5rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
  transition: none;
}

.stat-label {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.95;
}

/* Testimonials Section */
.testimonials-column {
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}

.testimonials-heading {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--brand);
  font-size: 2.25rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease 0.5s forwards;
  padding: 0 calc(50vw - 50% + 1rem);
}

.testimonials-list {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  list-style: none;
  padding: 1rem calc(50vw - 50% + 1rem);
  margin: 0;
  overflow: hidden; /* use transform-based animation instead of native scroll */
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2rem;
  width: 100%;
}

.testimonials-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Track wrapper for transform-based seamless scrolling */
.testimonials-track {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  will-change: transform;
}

/* Ensure cloned tracks sit inline and don't wrap */
.testimonials-list > .testimonials-track {
  flex: 0 0 auto;
}

.testimonial-card {
  background: white;
  border: none;
  border-left: 4px solid var(--brand);
  padding: 2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(20px);
  animation: fadeInRight 0.5s ease forwards;
  box-shadow: 0 2px 8px rgba(34, 45, 99, 0.1);
  min-width: 350px;
  max-width: 400px;
  flex-shrink: 0;
  height: auto;
}

.testimonial-card:nth-child(1) {
  animation-delay: 0.6s;
}

.testimonial-card:nth-child(2) {
  animation-delay: 0.7s;
}

.testimonial-card:nth-child(3) {
  animation-delay: 0.8s;
}

.testimonial-card:nth-child(4) {
  animation-delay: 0.9s;
}

.testimonial-card:nth-child(5) {
  animation-delay: 1.0s;
}

.testimonial-card:nth-child(6) {
  animation-delay: 1.1s;
}

.testimonial-card:nth-child(7) {
  animation-delay: 1.2s;
}

.testimonial-card:nth-child(8) {
  animation-delay: 1.3s;
}

.testimonial-card:nth-child(9) {
  animation-delay: 1.4s;
}

.testimonial-card:nth-child(10) {
  animation-delay: 1.5s;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(34, 45, 99, 0.15);
  border-left-color: var(--accent);
}

.testimonial-quote {
  margin-bottom: 1.5rem;
  position: relative;
  padding: 0;
  flex: 1;
}

.testimonial-quote::before {
  content: '"';
  font-size: 4rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.15;
  font-family: Georgia, serif;
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  font-weight: normal;
}

.testimonial-quote p {
  color: var(--ink);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(34, 45, 99, 0.1);
  margin-top: auto;
}

.testimonial-author i {
  color: var(--brand);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: color 0.3s ease;
  background: rgba(34, 45, 99, 0.05);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.testimonial-card:hover .testimonial-author i {
  color: white;
  background: var(--accent);
}

.testimonial-author > div {
  flex: 1;
}

.testimonial-author strong {
  color: var(--brand);
  font-weight: 600;
  display: block;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  margin-bottom: 0.25rem;
}

.testimonial-card:hover .testimonial-author strong {
  color: var(--accent);
}

.testimonial-author span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  display: block;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Call to Action Section */
.section.cta-section {
  padding: 3.5rem 0 !important;
  background: var(--accent) !important;
  color: white !important;
}

.cta-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-content h2 {
  color: white;
  font-size: 1.75rem;
  margin: 0;
  font-weight: 500;
  flex: 1;
}

.cta-btn {
  background: var(--brand);
  border: 2px solid var(--brand);
  color: white;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cta-btn:hover {
  background: var(--brand-dark);
  color: white;
  border-color: var(--brand-dark);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 45, 99, 0.3);
}

@media (min-width: 800px) {
  .hero-text h1 {
    font-size: 2.75rem;
  }
  
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    position: relative;
  }
  
  .hero-media {
    position: relative;
    margin-left: -1rem;
    max-width: 50vw;
  }
  
  .hero-media img {
    width: 580px;
    height: auto;
    max-height: 600px;
    max-width: 100%;
  }
  
  .img-card img {
    max-height: 350px;
    max-width: 100%;
  }
  
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
  
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .contact {
    grid-template-columns: 1fr 1fr;
  }
  
  .stats-column {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
  
  .stat-number {
    font-size: 4.5rem;
  }
  
  .testimonials-heading {
    font-size: 2.5rem;
  }
  
  .testimonial-card {
    min-width: 380px;
    max-width: 420px;
  }
  
  .testimonial-card:hover {
    transform: translateY(-4px);
  }
  
  .cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  
  .cta-content h2 {
    margin-bottom: 0;
    flex: 1;
    font-size: 2rem;
  }
  
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 799px) {
  .brand .logo {
    height: 40px;
    max-width: 160px;
  }
  
  .stats-column {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .testimonials-heading {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }
  
  .testimonials-list {
    gap: 1.25rem;
  }
  
  .testimonial-card {
    min-width: 300px;
    max-width: 340px;
    padding: 1.5rem;
  }
  
  .testimonial-quote::before {
    font-size: 3rem;
    top: -0.3rem;
    left: -0.3rem;
  }
  
  .testimonial-quote p {
    font-size: 0.9rem;
  }
  
  .testimonial-author {
    padding-top: 1rem;
  }
  
  .testimonial-author i {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .testimonial-author strong {
    font-size: 0.9rem;
  }
  
  .testimonial-author span {
    font-size: 0.8rem;
  }
  
  .testimonial-card:hover {
    transform: translateY(-3px);
  }
  
  .cta-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .cta-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  
  .cta-btn {
    width: 100%;
    max-width: 300px;
  }
  
  .nav-toggle {
    display: inline-flex;
  }
  
  .site-nav {
    display: none;
  }
  
  .site-nav.open {
    display: block;
    position: absolute;
    right: 1rem;
    top: 64px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
  }
  
  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem;
  }
  
  .site-nav a {
    display: block;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
  
  /* Show three columns on narrow screens by switching back to grid layout,
     but use compact spacing so all three columns fit. */
  /* expand the rate grid to full-bleed on small screens so columns have more horizontal room */
  /* Keep the rate grid inside the page wrapper on mobile so columns don't overflow */
  .rate-grid-wrapper {
    width: 100%;
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin: 0 auto 1rem;
    max-width: 1100px;
    /* allow horizontal scrolling inside the wrapper only when the grid is wider */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .rate-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 0.5rem;
    border: none;
    box-shadow: none;
    background: transparent;
    /* let the grid expand naturally; wrapper will scroll only if needed */
    width: -moz-max-content;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  /* Keep each .rate-row using its three spans as grid cells */
  .rate-row {
    display: contents;
  }

  /* Visible header row on mobile (same structure as desktop) */
  .rate-head {
    display: contents;
  }
  .rate-head span {
    display: block;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white;
    font-weight: 700;
    padding: 0.5rem 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    border-radius: 0.45rem;
    margin-bottom: 0.25rem;
  }
  .rate-head span:nth-child(2) {
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  }
  .rate-head span:nth-child(3) {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  }

  .rate-grid .rate-row span {
    display: block;
    /* reduce vertical padding and use more horizontal space */
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border-light);
    background: #fff;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.1;
    border-radius: 0.45rem;
    min-height: 40px;
    white-space: nowrap; /* prefer single-line where possible */
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rate-grid .rate-row span + span {
    margin-top: 0.25rem;
  }

  /* Slightly emphasize numeric columns */
  .rate-grid .rate-row span:nth-child(2),
  .rate-grid .rate-row span:nth-child(3) {
    font-weight: 700;
    color: var(--brand);
  }

  .rate-grid .rate-row span:nth-child(3) {
    color: var(--accent);
  }

  .rate-filter {
    flex-direction: column;
  }
  
  .rate-filter-btn {
    width: 100%;
  }
}

/* Backstory Interactive Menu - removed toggle button, whole image is clickable */

.backstory-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 0;
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: 0 -4px 20px rgba(34, 45, 99, 0.2);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(100%);
  transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease, padding 0.4s ease;
  z-index: 20;
  pointer-events: none;
}

.backstory-content[aria-hidden="false"] {
  max-height: 600px;
  padding: 2rem;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.backstory-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.backstory-close:hover {
  background: var(--bg-alt);
  color: var(--brand);
}

.backstory-content h3 {
  margin: 0 0 1rem 0;
  color: var(--brand);
  font-size: 1.5rem;
  padding-right: 3rem;
}

.backstory-content p {
  margin: 0 0 1rem 0;
  color: var(--ink);
  line-height: 1.6;
}

.backstory-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 799px) {
  .backstory-toggle {
    bottom: 1rem;
    right: 1rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .backstory-content {
    padding: 0;
  }
  
  .backstory-content[aria-hidden="false"] {
    padding: 1.5rem;
  }
  
  .backstory-content h3 {
    font-size: 1.25rem;
    padding-right: 2.5rem;
  }
}

/* Print styles: hide navigation and simplify rate grid for printing */
@media print {
  .site-header,
  .nav-toggle,
  .site-nav,
  .back-to-top {
    display: none !important;
  }

  /* Make rate grid print-friendly: remove background and cell decorations */
  .rate-grid,
  .rate-grid span,
  .rate-row,
  .rate-grid .rate-row span {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #000 !important;
  }

  /* Ensure testimonials and other interactive elements don't show overflow */
  .testimonials-list {
    overflow: visible !important;
  }

  body {
    background: #fff !important;
  }
}
