/* ============================================================
   manufacturing.css
   Uses styles.css variables directly — no redefinition, no conflict.
   Scoped to .eng-* classes only.
   ============================================================ */

/* ── Page background (inherits from styles.css --bg-page) ── */
body {
  background: var(--bg-page);
}

/* ── Inner wrapper — full 1440px container with tighter side padding ── */
.eng-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px; /* matches navbar/footer page-px exactly */
}

/* ── Shared dark CTA button ── */
.eng-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: fit-content;
  padding: 16px 30px;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.15s;
  cursor: pointer;
}
.eng-btn:hover {
  background: #333;
  transform: translateY(-1px);
}
.eng-btn img {
  width: 24px;
  height: 24px;
}

/* ── Scroll fade-up ── */
.eng-fade {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.eng-fade--in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Active mega-item in dropdown ── */
.mega-item--active {
  background: #f5f5f5;
}
.mega-item--active .mega-item__title {
  color: var(--color-orange);
}

/* ── Active footer link ── */
.footer__link--active {
  color: var(--color-orange) !important;
}

/* ===========================================================
   SECTION 1 — HERO
   Layout: text left (max 563px) + image absolute right (686px)
   Total page width = container-max = 1280px
=========================================================== */
.eng-hero {
  position: relative;
  min-height: 714px;
  background: var(--bg-page);
  overflow: hidden;
}

.eng-hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  min-height: 714px;
  display: flex;
  align-items: start;
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

.eng-hero__content {
  max-width: 583px;
  padding: 90px 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
  z-index: 2;
}

.eng-hero__title {
  font-family: var(--font-main);
  max-width: 563px;
  font-size: 44px;
  font-weight: 600;
  line-height: 60px;
  letter-spacing: -0.22px;
  color: #333;
  margin-bottom: 10px;
}

.eng-hero__desc {
  font-family: var(--font-main);
  font-size: 28px;
  font-weight: 500;
  line-height: 48px;
  color: var(--color-muted);
}

/* Image — absolute, bleeds flush to right viewport edge */
.eng-hero__image-wrap {
  position: absolute;
  right: 0;
  top: 50px;
  width: 600px;
  height: 570px;
  border-radius: 30px 0 0 30px;
  overflow: hidden;
  z-index: 1;
}
.eng-hero__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.eng-hero__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(36, 36, 36, 0) 37%,
    rgba(39, 39, 39, 0.8) 100%
  );
  border-radius: 30px 0 0 30px;
}

/* ===========================================================
   SECTION 2 — WE UNDERSTAND OPERATIONS
=========================================================== */
.eng-ops {
  padding: 20px 0 64px;
  background: var(--bg-page);
}

.eng-ops__heading {
  font-family: var(--font-main);
  font-size: 42px;
  font-weight: 600;
  line-height: 64px;
  letter-spacing: -0.22px;
  color: var(--color-heading);
  margin-bottom: 16px;
}
.eng-ops__heading span {
  color: var(--color-orange);
}

.eng-ops__subtext {
  font-family: var(--font-main);
  font-size: 21px;
  font-weight: 500;
  line-height: 38px;
  color: var(--color-muted);
  max-width: 93%;
  margin-bottom: 40px;
}

/* 3-col × 2-row grid, full container width */
.eng-ops__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.eng-ops__card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 28px 12px 30px 30px;
  transition: box-shadow 0.2s;
}
.eng-ops__card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.eng-ops__card-title {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 10px;
}

.eng-ops__card-desc {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--color-muted);
}

/* ===========================================================
   SECTION 3 — OPERATIONAL CHALLENGES
=========================================================== */
.eng-challenges {
  padding: 80px 0 0;
  background: var(--bg-page);
}

.eng-challenges__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}

.eng-challenges__heading {
  font-family: var(--font-main);
  font-size: 44px;
  font-weight: 400;
  line-height: 66px;
  letter-spacing: -0.22px;
  color: #4e4e4e;
  max-width: 511px;
}
.eng-challenges__heading em {
  font-style: italic;
  font-weight: 600;
  color: var(--color-orange);
}

.eng-challenges__right {
  max-width: 551px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 8px;
}

.eng-challenges__sub {
  font-family: var(--font-main);
  font-size: 28px;
  font-weight: 500;
  line-height: 48px;
  color: var(--color-muted);
}

/* Scrollable cards */
.eng-challenges__carousel-wrap {
  position: relative;
  overflow: hidden;
}

.eng-challenges__cards {
  display: flex;
  gap: 27px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
  scrollbar-width: none;
}
.eng-challenges__cards::-webkit-scrollbar {
  display: none;
}

.eng-challenges__card {
  flex: 0 0 501px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  scroll-snap-align: start;
}

.eng-challenges__card-img-wrap {
  position: relative;
  height: 201px;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.eng-challenges__card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.eng-challenges__card:hover .eng-challenges__card-img-wrap img {
  transform: scale(1.04);
}
.eng-challenges__card-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(217, 217, 217, 0) 32%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
}

.eng-challenges__card-body {
  padding: 20px 20px 24px;
}

.eng-challenges__card-title {
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.12px;
  color: var(--color-heading);
}

/* Dots */
.eng-challenges__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.eng-dot {
  height: 13px;
  border-radius: 10px;
  cursor: pointer;
  transition:
    width 0.3s ease,
    background 0.3s ease;
}
.eng-dot--active {
  width: 75px;
  background: #ff9b48;
}
.eng-dot--sm {
  width: 20px;
  background: #d6d6d6;
}

/* ===========================================================
   SECTION 4 — CTA BANNER
=========================================================== */
.eng-cta-banner {
  padding: 64px 0 80px;
  background: var(--bg-page);
}

.eng-cta-banner__box {
  max-width: 1440px;
  margin: 0 auto;
  background: #f1f1f1;
  border-radius: var(--radius-card);
  padding: 80px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.eng-cta-banner__title {
  font-family: var(--font-main);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.22px;
  color: var(--color-heading);
}

.eng-cta-banner__desc {
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 400;
  line-height: 36px;
  letter-spacing: -0.12px;
  color: var(--color-subtle);
  max-width: 970px;
}

/* ===========================================================
   RESPONSIVE — TABLET  ≤ 1100px
   (mirrors your styles.css @1024 breakpoint pattern)
=========================================================== */
@media (max-width: 1100px) {
  .eng-inner,
  .eng-hero__inner {
    padding: 0 40px;
  }

  /* Hero */
  .eng-hero__image-wrap {
    width: 48%;
  }
  .eng-hero__content {
    max-width: 50%;
  }
  .eng-hero__title {
    font-size: 34px;
    line-height: 50px;
  }
  .eng-hero__desc {
    font-size: 20px;
    line-height: 34px;
  }

  /* Ops */
  .eng-ops__heading {
    font-size: 34px;
    line-height: 50px;
  }
  .eng-ops__subtext {
    font-size: 18px;
    line-height: 30px;
  }
  .eng-ops__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Challenges */
  .eng-challenges__heading {
    font-size: 34px;
    line-height: 50px;
  }
  .eng-challenges__sub {
    font-size: 20px;
    line-height: 36px;
  }
  .eng-challenges__card {
    flex: 0 0 400px;
  }

  /* CTA */
  .eng-cta-banner__title {
    font-size: 34px;
  }
  .eng-cta-banner__desc {
    font-size: 20px;
  }
}

/* ===========================================================
   RESPONSIVE — MOBILE  ≤ 768px
=========================================================== */
@media (max-width: 768px) {
  .eng-inner,
  .eng-hero__inner {
    padding: 0 24px;
  }

  /* Hero: stacks vertically */
  .eng-hero {
    min-height: auto;
  }
  .eng-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
  }
  .eng-hero__content {
    max-width: 100%;
    padding: 40px 0 28px;
  }
  .eng-hero__title {
    font-size: 28px;
    line-height: 40px;
  }
  .eng-hero__desc {
    font-size: 17px;
    line-height: 28px;
  }

  /* Image fills full bleed below text */
  .eng-hero__image-wrap {
    position: relative;
    top: auto;
    right: auto;
    width: 100vw;
    margin-left: -24px;
    height: 260px;
    border-radius: 0;
  }
  .eng-hero__image-overlay {
    border-radius: 0;
  }

  /* Ops */
  .eng-ops {
    padding: 56px 0 40px;
  }
  .eng-ops__heading {
    font-size: 26px;
    line-height: 38px;
  }
  .eng-ops__subtext {
    font-size: 16px;
    line-height: 26px;
  }
  .eng-ops__grid {
    grid-template-columns: 1fr;
  }
  .eng-ops__card {
    padding: 20px;
  }
  .eng-ops__card-title {
    font-size: 18px;
  }

  /* Challenges */
  .eng-challenges {
    padding: 56px 0 0;
  }
  .eng-challenges__top {
    flex-direction: column;
    gap: 20px;
  }
  .eng-challenges__heading {
    font-size: 26px;
    line-height: 40px;
    max-width: 100%;
  }
  .eng-challenges__sub {
    font-size: 18px;
    line-height: 30px;
  }
  .eng-challenges__card {
    flex: 0 0 calc(100vw - 48px);
  }

  /* CTA */
  .eng-cta-banner {
    padding: 40px 0 60px;
  }
  .eng-cta-banner__box {
    padding: 48px 24px;
    gap: 24px;
  }
  .eng-cta-banner__title {
    font-size: 26px;
  }
  .eng-cta-banner__desc {
    font-size: 17px;
    line-height: 28px;
  }
}

/* ===========================================================
   RESPONSIVE — SMALL MOBILE  ≤ 480px
=========================================================== */
@media (max-width: 480px) {
  .eng-inner,
  .eng-hero__inner {
    padding: 0 20px;
  }

  .eng-hero__image-wrap {
    margin-left: -20px;
  }

  .eng-hero__title {
    font-size: 24px;
    line-height: 34px;
  }
  .eng-hero__desc {
    font-size: 15px;
  }

  .eng-btn {
    font-size: 15px;
    padding: 14px 22px;
  }
  .eng-btn img {
    width: 20px;
    height: 20px;
  }

  .eng-ops__heading {
    font-size: 22px;
  }

  .eng-challenges__card {
    flex: 0 0 calc(100vw - 40px);
  }
  .eng-challenges__heading {
    font-size: 22px;
  }

  .eng-cta-banner__title {
    font-size: 22px;
  }
  .eng-cta-banner__desc {
    font-size: 15px;
  }
}
