/* ==========================================================================
   Keene Industrial Solutions - Pixel-Accurate 1:1 Design System
   ========================================================================== */

:root {
  --primary-blue: #2a78be;
  --primary-blue-hover: #1b5c96;
  --accent-blue: #007bff;
  --navy-dark: #232f3e;
  --card-bg-blue: #d8e6f3;
  --body-bg: #ffffff;
  --header-bg: #f0f0f0;
  --footer-bg: #2a78be;
  --footer-border: rgba(255, 255, 255, 0.2);
  --text-dark: #212529;
  --text-muted: #58647d;
  --border-light: #e7e7e7;
  --font-stack: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

body {
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--body-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 76.8px;
}

/* ==========================================================================
   Header & Navigation (Exact 100.8px height, #f0f0f0 bg)
   ========================================================================== */

.site-header {
  background-color: var(--header-bg);
  height: 101px;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.brand-logo img {
  width: 185.55px;
  height: auto;
  object-fit: contain;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  gap: 2px;
}

.nav-item {
  position: static;
}

.nav-link {
  font-family: var(--font-stack);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link .caret {
  width: 9px;
  height: 5px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
  color: #707070;
}

.nav-item:hover .caret {
  transform: rotate(180deg);
  color: #707070;
}

/* ==========================================================================
   Full-Width Mega-Menu Dropdown Panel
   ========================================================================== */

.megamenu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.nav-item:hover .megamenu-panel,
.nav-item:focus-within .megamenu-panel,
.nav-item.menu-open .megamenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.megamenu-container {
  width: 100%;
  max-width: 1650px;
  margin: 0 auto;
  padding: 40px 76.8px;
}

/* Mega Menu Headings & Lists */
.mega-heading {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 16px;
}

.mega-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: #333333;
  line-height: 1.4;
}

.mega-list li a {
  color: #333333;
  transition: color 0.2s ease;
}

.mega-list li a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.mega-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr;
  gap: 35px;
  align-items: start;
}

.mega-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.3fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.mega-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.mega-center-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.mega-center-title {
  color: var(--primary-blue);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.mega-center-sub {
  color: var(--primary-blue);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}

.mega-parts-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-blue);
}

.mega-parts-items a {
  color: var(--primary-blue);
  transition: color 0.2s ease;
}

.mega-parts-items a:hover {
  color: var(--primary-blue-hover);
  text-decoration: underline;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--primary-blue);
  border-radius: 2px;
}

/* ==========================================================================
   Hero Section (Left Slider ~1073px, Right Cards ~437px)
   ========================================================================== */

.hero-section {
  padding-top: 0;
  padding-bottom: 20px;
  margin-top: 0;
}

.hero-grid {
  display: flex;
  gap: 15px;
  align-items: stretch;
}

.hero-slider-container {
  flex: 1 1 71%;
  height: 580px;
  position: relative;
  overflow: hidden;
  background-color: #232f3e;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.35) 75%, rgba(0, 0, 0, 0.75) 100%);
  display: flex;
  align-items: flex-end;
  padding: 35px 40px;
}

.hero-slide-content {
  color: #ffffff;
  max-width: 900px;
}

.hero-slide-title {
  font-family: var(--font-stack);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.hero-slide-desc {
  font-size: 15px;
  font-style: italic;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  padding: 12px;
  z-index: 10;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.slider-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}

.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000000;
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot.active {
  background: #000000;
  opacity: 1;
  width: 6px;
  border-radius: 50%;
}

/* Hero Right Side Cards */
.hero-side-cards {
  width: 29%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.side-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-gearbox {
  height: 310px;
  background-color: #6e7173;
  background-image: url('https://www.keeneindustrialsolutions.com/wp-content/uploads/2023/07/processed-DB44904F-FD4B-4A7A-8444-0A343811FAEE-3579B9F9-673C-416D-A8CC-F9D5C7500102.jpeg.jpeg');
  background-size: cover;
  background-position: center;
}

.card-gearbox::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(45, 52, 60, 0.28);
}

.card-rotating {
  height: 255px;
  background-color: #494c4e;
  background-image: url('https://www.keeneindustrialsolutions.com/wp-content/uploads/2023/07/processed-C179888D-B931-49D7-9636-50B7D18782A8-C6727E79-8970-44A3-8509-D6E48E610370.jpeg.jpeg');
  background-size: cover;
  background-position: center;
}

.card-rotating::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.side-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.btn-click-here {
  display: inline-block;
  background-color: var(--primary-blue);
  color: #ffffff;
  font-size: 19px;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 3px;
  margin-bottom: 16px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-click-here:hover {
  background-color: var(--primary-blue-hover);
  transform: translateY(-1px);
}

.side-card-title {
  font-size: 23px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.card-divider {
  width: 100px;
  height: 1.5px;
  background-color: rgba(255, 255, 255, 0.75);
  margin: 12px auto 0;
}

/* ==========================================================================
   Main Body: Sidebar (399.65px) & Content (1110px)
   ========================================================================== */

.main-content-section {
  padding: 20px 0 60px 0;
}

.main-grid {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Left Sidebar */
.sidebar-col {
  width: 399.65px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-top-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  max-height: 295.65px;
  object-fit: cover;
  border: 1px solid #eaeaea;
}

.sidebar-caption-box {
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: #212529;
  margin: 15px 0 18px 0;
}

.sidebar-title-dont-see {
  font-size: 22px;
  font-weight: 500;
  color: #050505;
  margin-bottom: 12px;
}

.sidebar-plane-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #333333;
  line-height: 1.4;
}

.sidebar-plane-icon {
  color: var(--primary-blue);
  font-size: 20px;
  flex-shrink: 0;
}

/* Sidebar Contact Form */
.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-input {
  width: 100%;
  height: 50px;
  background-color: #f7f7f7;
  border: 0.8px solid #e7e7e7;
  border-radius: 2px;
  padding: 0 20px;
  font-size: 16px;
  font-family: inherit;
  color: #58647d;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--primary-blue);
}

.btn-send-main {
  width: 100%;
  height: 48px;
  background-color: var(--accent-blue);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-send-main:hover {
  background-color: var(--primary-blue-hover);
}

/* Sidebar Contact Us */
.sidebar-contact-section {
  margin-top: 25px;
}

.sidebar-contact-heading {
  font-size: 22px;
  font-weight: 500;
  color: #050505;
  border-left: 3px solid var(--primary-blue);
  padding-left: 8px;
  margin-bottom: 18px;
}

.sidebar-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15px;
  line-height: 24px;
  color: #212529;
}

.sidebar-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sidebar-contact-item .icon {
  color: var(--primary-blue);
  font-size: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.sidebar-contact-item a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

/* Right Content: Promo Banner + Featured Products */
.products-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.promo-banner {
  width: 100%;
  height: 62px;
  background-color: #232f3e;
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.promo-banner-badge {
  background-color: #2a78be;
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 52px 0 28px;
  clip-path: polygon(0 0, calc(100% - 50px) 0, 100% 100%, 0 100%);
  flex-shrink: 0;
  white-space: nowrap;
}

.promo-banner-text {
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding-left: 36px;
  white-space: nowrap;
}

.featured-heading {
  font-size: 22px;
  font-weight: 500;
  color: #050505;
  border-left: 3px solid var(--primary-blue);
  padding-left: 8px;
  margin-bottom: 25px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Product Card (Exact 541px x 298px) */
.card {
  width: 100%;
  height: 298px;
  background-color: #ffffff;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  overflow: hidden;
  border: none;
  border-radius: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.22);
}

.card-left-box {
  width: 179.71px;
  height: 298px;
  background-color: #d8e6f3;
  padding: 20px 14px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.card-main-img-wrap {
  width: 147.71px;
  height: 196.95px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.card-thumbs {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: flex-start;
  overflow-x: auto;
  padding-bottom: 4px;
}

.card-thumb {
  width: 42.66px;
  height: 32px;
  object-fit: cover;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.card-thumb:hover, .card-thumb.active {
  opacity: 0.8;
  transform: scale(1.06);
}

.card-right-info {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-qty {
  font-size: 16px;
  font-weight: 400;
  color: var(--accent-blue);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
  color: #212529;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 16px;
  color: #212529;
  margin-bottom: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-size: 22px;
  font-weight: 500;
  color: var(--accent-blue);
  text-align: right;
  margin-top: 15px;
}

/* ==========================================================================
   Footer Section (Exact #2a78be bg, 3 columns, copyright)
   ========================================================================== */

.site-footer {
  background-color: var(--footer-bg);
  padding-top: 70px;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-title {
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.industries-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  font-size: 15px;
  line-height: 26px;
  color: #f0f0f0;
}

.footer-buy-callout {
  margin-top: 25px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.footer-legal-link {
  display: inline-block;
  color: #ffffff;
  text-decoration: underline;
  font-size: 15px;
  margin-top: 15px;
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15px;
  line-height: 24px;
  color: #f0f0f0;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-contact-item svg {
  color: #ffffff;
  fill: currentColor;
  margin-top: 4px;
  flex-shrink: 0;
}

.footer-contact-item a:hover {
  text-decoration: underline;
}

.footer-map-wrap {
  width: 100%;
  height: 180px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.footer-map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-download-link {
  display: block;
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  margin-top: 18px;
  letter-spacing: 1px;
}

.btn-download-link:hover {
  text-decoration: underline;
}

.footer-bottom-bar {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 30px 0;
}

.bottom-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: #f0f0f0;
}

.bottom-bar-inner a {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   Toast Notification for Form Submission
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
}

.toast {
  background: #232f3e;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--primary-blue);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1350px) {
  .container {
    padding: 0 30px;
  }
  .hero-slider-container {
    height: 480px;
  }
  .hero-side-cards {
    width: 360px;
  }
  .card-gearbox { height: 260px; }
  .card-rotating { height: 205px; }
  .main-grid {
    gap: 20px;
  }
  .sidebar-col {
    width: 320px;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .card {
    height: auto;
    min-height: 250px;
  }
}

@media (max-width: 992px) {
  .site-header {
    height: 80px;
  }
  .menu-toggle {
    display: flex;
  }
  .main-navigation {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 300px;
    height: calc(100vh - 80px);
    background: #ffffff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px;
    transition: right 0.3s ease;
    z-index: 1001;
  }
  .main-navigation.open {
    right: 0;
  }
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
  }
  .hero-grid {
    flex-direction: column;
  }
  .hero-side-cards {
    width: 100%;
    flex-direction: row;
  }
  .card-gearbox, .card-rotating {
    flex: 1;
    height: 240px;
  }
  .main-grid {
    flex-direction: column;
  }
  .sidebar-col {
    width: 100%;
  }
  .sidebar-top-img {
    max-width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .bottom-bar-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
  .hero-side-cards {
    flex-direction: column;
  }
  .promo-banner {
    height: auto;
    padding: 15px;
  }
  .card {
    flex-direction: column;
    height: auto;
  }
  .card-left-box {
    width: 100%;
    height: auto;
  }
  .industries-subgrid {
    grid-template-columns: 1fr;
  }
}
