:root {
  --accent: #ed3333;
  --accent-dark: #c92a2a;
  --secondary: #2d3359;
  --text: #333333;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f7f7f9;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --maxw: 1170px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { color: var(--secondary); line-height: 1.25; font-weight: 700; margin: 0 0 0.6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6em 1.2em;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--secondary); }
.btn-light:hover { background: #f0f0f0; color: var(--secondary); }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}
.brand img { height: 40px; width: auto; display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--secondary); border-radius: 2px; }

.site-nav > ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius);
}
.site-nav a:hover { color: var(--accent); background: var(--bg-alt); }
.site-nav li.active > a { color: var(--accent); }

.nav-item { position: relative; }
.nav-item.has-children > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
}

.sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
}
.sub-menu a { font-weight: 500; white-space: nowrap; }

@media (min-width: 901px) {
  .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  /* Closed by default (opacity/visibility, not display) — hover reveals it. */
  .nav-item.has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; padding: 10px; gap: 0; }
  /* No hover on touch — submenus just show inline under their parent. */
  .sub-menu { padding-left: 16px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-slides { position: relative; height: 720px; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 0 -150px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(45, 51, 89, 0.92) 0%, rgba(45, 51, 89, 0.7) 55%, rgba(45, 51, 89, 0.4) 100%);
}
.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 560px;
  color: #fff;
}
.hero-content h1 { color: #fff; font-size: 2.6rem; }
.hero-content p { color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; }
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}
.hero-dot.is-active { background: #fff; }

@media (max-width: 700px) {
  .hero-slides { height: 630px; }
  .hero-content h1 { font-size: 1.9rem; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.bg-alt { background: var(--bg-alt); }
.section h2 { text-align: center; font-size: 1.8rem; }
.section-subtitle { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 2em; }

.feature-grid, .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 2em;
}
@media (max-width: 1000px) { .feature-grid, .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid, .product-grid { grid-template-columns: 1fr; } }

.feature-card, .product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--text);
}
.feature-card:hover, .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card h3, .product-card h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.feature-card p, .product-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }
.feature-card-image, .product-card-image {
  height: 140px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 14px;
}

.category-copy { margin-top: 3em; }
.product-category-block { margin-top: 3em; }
.category-heading { display: block; }
.category-heading h2 { text-align: left; border-bottom: 2px solid var(--accent); padding-bottom: 0.3em; display: inline-block; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 2em;
}
@media (max-width: 700px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.testimonial-stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 0.6em; }
.testimonial-quote { font-style: italic; color: var(--text); }
.testimonial-author { color: var(--muted); font-weight: 600; margin-bottom: 0; }

.clients-bar { padding: 36px 0; }
.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
}
.clients-row img { max-height: 130px; width: auto; filter: grayscale(100%); opacity: 0.75; }

/* ---------- Breadcrumb / product page ---------- */
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5em; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.product-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}
.product-media { position: sticky; top: 90px; }
.product-tagline { color: var(--muted); font-size: 1.05rem; margin-top: -0.4em; }

@media (max-width: 800px) {
  .product-layout { grid-template-columns: 1fr; }
  .product-media { position: static; max-width: 280px; margin: 0 auto 1.5em; }
}

/* ---------- Prose / converted WP content ---------- */
.prose, .product-body { font-size: 1rem; }
.prose table, .product-body table,
.prose .tablepress, .product-body .tablepress {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}
.prose table td, .prose table th,
.product-body table td, .product-body table th {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.prose table tr:nth-child(even),
.product-body table tr:nth-child(even) { background: var(--bg-alt); }

.row { display: flex; flex-wrap: wrap; gap: 24px; margin: 1.5em 0; }
/* Equal-width columns, ignoring any inline flex-basis percentage the
   converter wrote (percent basis + gap overflows 100% and wraps). */
.row .col { flex: 1 1 0 !important; min-width: 220px; }
.row .col img { margin: 0 auto; }

/* Product-page "Resources" grids: always one row, bold heading and
   every link on its own line, regardless of <br> tags in the source. */
.resource-row {
  flex-wrap: nowrap;
  gap: 12px;
}
.resource-col {
  flex: 1 1 0 !important;
  min-width: 0;
}
.resource-col > span {
  display: block;
  margin-bottom: 6px;
}
.resource-col > a {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  overflow-wrap: break-word;
}

figure.wp-caption { margin: 0 0 1.5em; max-width: 340px; }
figure.wp-caption.right { float: right; margin-left: 24px; }
figure.wp-caption.left { float: left; margin-right: 24px; }
figure.wp-caption img { border-radius: var(--radius); margin-bottom: 0.5em; }

img.alignleft { float: left; margin: 0 20px 10px 0; max-width: 45%; border-radius: var(--radius); }
img.alignright { float: right; margin: 0 0 10px 20px; max-width: 45%; border-radius: var(--radius); }
img.aligncenter { margin: 0 auto 1em; }

.specification-button {
  display: inline-block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin: 4px 0;
  font-size: 0.9rem;
}
.specification-button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: #1b1f33; color: #cfd2e3; margin-top: 40px; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 24px;
}
.footer-inner .brand,
.footer-inner .brand span { color: #fff; margin-bottom: 0.5em; font-size: 1.4rem; font-weight: 800; letter-spacing: 0.01em; }
.footer-inner a { color: #cfd2e3; }
.footer-inner a:hover { color: #fff; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 0.85rem;
  color: #8d91ab;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
