/* =============================================
   OPTIMUS MACHINERY — Unified Theme
   #B40019 Red  |  #111 Black  |  #fff White
   Bebas Neue (headings)  |  Inter (body)
   ============================================= */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
:root { --nav-height: 62px; }
@media (max-width: 768px) { :root { --nav-height: 56px; } }
body  { font-family: 'Inter', sans-serif; color: #111; background: #fff; overflow-x: hidden; padding-top: 0; }
img   { display: block; max-width: 100%; }
a, button { transition: all 0.3s ease; text-decoration: none; }
::selection { background: #B40019; color: #fff; }

.font-bebas  { font-family: 'Bebas Neue', sans-serif; }
.font-oswald { font-family: 'Oswald', sans-serif; }
.font-inter  { font-family: 'Inter', sans-serif; }

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #B40019; }

/* =============================================
   SCROLL PROGRESS
   ============================================= */
#scroll-progress { transition: width 0.1s linear; }

/* =============================================
   LOADER
   ============================================= */
#loader { transition: opacity 0.6s ease, visibility 0.6s ease; }
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-img  { animation: ldFade 0.8s ease forwards 0.3s; opacity: 0; }
.loader-fill { width: 0; animation: ldBar 1.8s cubic-bezier(.4,0,.2,1) forwards 0.5s; }
@keyframes ldFade { to { opacity: 1; } }
@keyframes ldBar  { to { width: 100%; } }

/* =============================================
   NAVIGATION
   Transparent over hero → white on scroll
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 999;
  height: 62px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  transition: box-shadow 0.3s ease;
}

/* Slightly stronger shadow on scroll */
#navbar.scrolled {
  box-shadow: 0 2px 18px rgba(0,0,0,0.11);
}

/* Logo */
.nav-logo-img {
  height: 36px;
  width: auto;
  mix-blend-mode: multiply;
  display: block;
}

/* Nav links — full height to allow bottom underline flush with navbar border */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #333333;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 12px;
  height: 62px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #B40019;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active-nav::after { transform: scaleX(1); }
.nav-link:hover       { color: #B40019 !important; }
.nav-link.active-nav  { color: #B40019 !important; }

/* Products link with chevron */
.nav-link-drop { gap: 5px; }
.nav-chevron   { width: 10px; height: 10px; flex-shrink: 0; }

/* Get Quote button */
.quote-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: #B40019;
  color: #fff !important;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid #B40019;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.quote-btn:hover { background: #850014; border-color: #850014; }

/* Dropdown */
.nav-item-dropdown:hover .nav-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}
.dropdown-item {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.dropdown-item:hover { color: #B40019; padding-left: 24px; }

/* Hamburger — always dark on white nav */
.ham-line {
  display: block;
  height: 2px;
  background: #111;
  border-radius: 1px;
  transition: all 0.3s ease;
}
#menu-toggle.active .ham-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #fff;
}
#menu-toggle.active .ham-line:nth-child(2) { opacity: 0; }
#menu-toggle.active .ham-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #fff;
}

/* Mobile overlay */
#mobile-menu { transition: opacity 0.4s ease, visibility 0.4s ease; }
#mobile-menu.open { opacity: 1 !important; visibility: visible !important; }
.mobile-link { transition: color 0.3s ease, transform 0.3s ease; }
.mobile-link:hover { color: #B40019; transform: translateX(10px); }
.mobile-nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mobile-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.mobile-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}
.mobile-nav-group.open .mobile-chevron {
  transform: rotate(180deg);
}
.mobile-submenu {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  margin-bottom: 4px;
}
.mobile-nav-group.open .mobile-submenu {
  display: flex;
}
.mobile-sub-link {
  color: #d8d8d8;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.25s ease, transform 0.25s ease;
}
.mobile-sub-link:hover {
  color: #B40019;
  transform: translateX(8px);
}

@media (max-width: 768px) {
  #navbar { height: 56px; }
  .nav-logo-img { height: 30px; }
}
#hero {
  background: #111;
  /* Reserve space for fixed navbar and fill remaining viewport */
  min-height: calc(100vh - var(--nav-height));
  /* Fallback for older mobile browsers where 100vh can be unreliable */
  min-height: 320px;
  max-height: none;
  overflow: hidden;
  position: relative;
  z-index: 500; /* below navbar (1000) but above regular content */
}

@media (min-width: 768px) {
  #hero {
    aspect-ratio: unset;
    height: calc(100vh - var(--nav-height));
    min-height: 460px;
    max-height: none;
  }
}

/* ── SLIDE WRAPPER — needed for translate animation ── */
.hero-slides-wrap {
  position: absolute;
  inset: 0;
  /* width is n-slides × 100% but we move with translateX on each slide */
  height: 100%;
}

/* Each slide is absolute, full size, starts off-screen */
.hero-slide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* slide animation instead of fade */
  transition: transform 0.75s cubic-bezier(0.77, 0, 0.175, 1),
              opacity   0.75s ease;
  transform: translateX(100%);   /* off-screen right by default */
  opacity: 0;
  height: 100%;
}

/* Active slide: centre stage */
.hero-slide.active {
  transform: translateX(0) !important;
  opacity: 1 !important;
  pointer-events: auto;
}

/* Slide exiting to the LEFT (next was clicked — current slides out left) */
.hero-slide.slide-out-left {
  transform: translateX(-100%) !important;
  opacity: 0;
}

/* Slide entering from the LEFT (prev was clicked — new slide comes from left) */
.hero-slide.slide-in-left {
  transform: translateX(-100%);
  opacity: 0;
}

/* ── IMAGE display ── */
/* Mobile: cover to fill frame edge-to-edge */
.slide-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Ensure hero sits below the fixed navbar and does not get hidden on mobile */
#navbar { z-index: 1000; }
#hero { z-index: 1; }

/* Desktop: contain — full image visible, dark background fills letterbox */
@media (min-width: 768px) {
  .slide-bg-img {
    object-fit: contain;
    background: #111;
  }
}

/* Ken-Burns on active slide — desktop only */
@media (min-width: 768px) {
  .hero-slide.active .slide-bg-img {
    animation: kenBurns 9s ease-in-out forwards;
  }
}
@keyframes kenBurns {
  from { transform: scale(1.0); }
  to   { transform: scale(1.03); }
}

/* Arrows */
.hero-arrow {
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.40);
  border: 1px solid rgba(255,255,255,0.28) !important;
  border-radius: 0 !important;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}
.hero-arrow:hover {
  background: #B40019 !important;
  border-color: #B40019 !important;
  transform: translateY(-50%) scale(1.06);
}

/* Dots */
.hero-dot {
  display: block;
  height: 3px;
  width: 10px;
  background: rgba(255,255,255,0.30);
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 0;
  transition: width 0.4s ease, background 0.4s ease;
}
.hero-dot.active { width: 28px; background: #B40019; }


/* =============================================
   SECTION HEADERS — Shared Style
   Every section uses this label + heading combo
   ============================================= */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: #B40019;
  flex-shrink: 0;
}
.section-label span {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #B40019;
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* =============================================
   PRODUCT CARDS
   ============================================= */
.product-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.10);
  border-color: #B40019 !important;
}

/* Product specifications table - consistent alignment and spacing */
.product-specs-table th,
.product-specs-table td {
  vertical-align: middle;
  padding: 14px 16px;
  border-collapse: collapse;
}

.product-specs-table thead th {
  padding-top: 18px;
  padding-bottom: 18px;
}

.product-specs-table tbody td {
  white-space: normal;
}

/* Left group label styling */
.product-specs-table.has-groups td:first-child {
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  color: #222;
  text-transform: none;
}

/* Make table responsive and ensure consistent column widths */
@media (min-width: 1024px) {
  .product-specs-table th:nth-last-child(-n+2),
  .product-specs-table td:nth-last-child(-n+2) { /* last two columns */
    width: 16%;
  }
  .product-specs-table th:nth-child(2),
  .product-specs-table td:nth-child(2) { /* specification name */
    width: 42%;
  }
  .product-specs-table th:nth-child(3),
  .product-specs-table td:nth-child(3) { /* unit column */
    width: 7%;
    text-align: center;
  }
}

/* Tighten horizontal padding and center unit values */
.product-specs-table th:nth-child(3),
.product-specs-table td:nth-child(3) {
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

@media (max-width: 1023px) {
  .product-specs-table th:nth-child(3),
  .product-specs-table td:nth-child(3) {
    padding-left: 4px;
    padding-right: 4px;
    width: 9%;
    text-align: center;
  }
}

/* =============================================
   INDUSTRY CARDS
   ============================================= */
.industry-card { overflow: hidden; cursor: pointer; }

/* =============================================
   ABOUT / IMAGE BLOCK
   ============================================= */
.why-image-block::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(180,0,25,0.18);
  pointer-events: none;
  z-index: 20;
}

/* =============================================
   STATISTICS
   ============================================= */
.stats-bg-overlay {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23B40019' fill-opacity='0.25'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.stat-item { position: relative; }
.stat-item.counted::after {
  content: '';
  position: absolute;
  bottom: -16px; left: 0;
  width: 48px; height: 2px;
  background: #B40019;
}

/* =============================================
   SERVICE CARDS
   ============================================= */
.service-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.09);
}

/* =============================================
   NEWS CARDS
   ============================================= */
.news-card { transition: transform 0.35s ease; }
.news-card:hover { transform: translateY(-5px); }

/* =============================================
   FOOTER LINKS
   ============================================= */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  transition: color 0.25s ease, gap 0.25s ease;
}
.footer-link::before {
  content: '›';
  opacity: 0;
  font-size: 14px;
  color: #B40019;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.footer-link:hover { color: #B40019 !important; gap: 6px; }
.footer-link:hover::before { opacity: 1; transform: translateX(0); }

/* =============================================
   LAZY IMAGES
   ============================================= */
img[loading="lazy"] { opacity: 0; transition: opacity 0.5s ease; }
img[loading="lazy"].loaded { opacity: 1; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .why-image-block::before { display: none; }
}
@media (max-width: 768px) {
  #navbar { height: 64px; }
  #navbar.scrolled { height: 58px; }
  .nav-logo-img { height: 34px; }
  #navbar.scrolled .nav-logo-img { height: 30px; }
}
@media (max-width: 480px) {
  .hero-arrow { width: 38px !important; height: 38px !important; }
}

/* =============================================
   HERO SLIDER — Mobile-first responsive
