.factory-hero {
  padding: 76px 0;
  background: linear-gradient(180deg, #f8fbfe 0%, #eef5fb 100%);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a { color: var(--blue); }

.factory-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.factory-hero h1,
.factory-heading h2,
.factory-cta h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.factory-hero h1 {
  font-size: clamp(44px, 5vw, 66px);
}

.factory-hero p,
.factory-heading p {
  color: var(--muted);
  max-width: 680px;
}

.factory-hero-image {
  height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
}

.factory-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.factory-section {
  padding: 92px 0;
}

.factory-soft {
  background: var(--paper);
}

.factory-heading {
  max-width: 760px;
  margin-bottom: 44px;
}

.factory-heading h2 {
  font-size: clamp(34px, 4vw, 52px);
}

.factory-heading p {
  margin-top: 16px;
}

.factory-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.factory-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  background: white;
}

.factory-gallery img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.factory-gallery figcaption {
  padding: 15px 18px;
  color: var(--blue-dark);
  font-weight: 700;
}

.capability-cards,
.testing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cap-card {
  min-height: 210px;
  padding: 25px;
  background: white;
  border: 1px solid var(--line);
}

.cap-card > span,
.testing-card > div > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.cap-card h3 {
  margin: 40px 0 10px;
  font-size: 20px;
}

.cap-card p,
.testing-card p {
  color: var(--muted);
  font-size: 14px;
}

.testing-card {
  border: 1px solid var(--line);
  background: white;
  overflow: hidden;
}

.testing-card > img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.testing-card > div {
  padding: 24px;
}

.testing-card h3 {
  margin: 9px 0 7px;
  font-size: 20px;
}

.testing-card p {
  margin: 0;
}

.qc-section {
  padding: 88px 0;
  background: var(--blue-deep);
  color: white;
}

.factory-heading.light h2 { color: white; }

.qc-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.qc-flow > div {
  min-height: 140px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
}

.qc-flow span {
  display: block;
  margin-bottom: 34px;
  color: #8fc5f0;
  font-size: 11px;
  font-weight: 700;
}

.qc-flow strong {
  font-size: 14px;
}

.factory-cta {
  padding: 76px 0;
  background: var(--blue);
  color: white;
}

.factory-cta h2 {
  font-size: clamp(34px, 4vw, 50px);
}

.factory-cta p {
  color: #d7e8f6;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: center;
}

.cta-button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 24px;
  align-items: center;
  background: white;
  color: var(--blue-dark);
  font-weight: 700;
  border-radius: 3px;
}

@media (max-width: 960px) {
  .factory-hero-grid,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .capability-cards,
  .testing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qc-flow {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .factory-gallery,
  .capability-cards,
  .testing-grid,
  .qc-flow {
    grid-template-columns: 1fr;
  }

  .factory-gallery img {
    height: 250px;
  }
}

/* Simplified Factory Page */


/* Manufacturing photos */

.simple-manufacturing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.simple-factory-image {
  height: 420px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

.simple-factory-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Testing photos */

.simple-testing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.simple-testing-image {
  height: 320px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

.simple-testing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Simple QC section */

.qc-simple {
  padding: 80px 0;
  background: var(--blue-deep);
  color: white;
  text-align: center;
}

.qc-simple h2 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.qc-simple p {
  max-width: 680px;
  margin: 18px auto 0;
  color: #afc4d4;
  font-size: 16px;
}


/* Responsive */

@media (max-width: 800px) {

  .simple-manufacturing-grid,
  .simple-testing-grid {
    grid-template-columns: 1fr;
  }

  .simple-factory-image,
  .simple-testing-image {
    height: 320px;
  }

}

.simple-manufacturing-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 22px;
  align-items: stretch;
}

.simple-factory-image {
  height: 460px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}

/* First horizontal image */
.simple-factory-image:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Second vertical image */
.simple-factory-image:nth-child(2) img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
