/* HardBoxIran v3.15.0 — Section 04: Brand / Manufacturing capability story */

#factory.factory {
  --hbi-ruby: #9f1627;
  --hbi-gold: #c9a55b;
  --hbi-ink: #0b0d10;
  --hbi-muted: #a9adb4;
  position: relative;
  overflow: clip;
  padding: clamp(56px, 6.5vw, 92px) 24px;
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(159,22,39,.13), transparent 62%),
    linear-gradient(180deg, #090a0c 0%, #0d0f12 100%);
  isolation: isolate;
}
#factory.factory::before {
  content: "HARDBOX / MANUFACTURING";
  position: absolute;
  inset-inline-start: max(24px, calc((100vw - 1180px)/2));
  top: 25px;
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
  color: rgba(255,255,255,.32);
  direction: ltr;
}
#factory.factory::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent 8%, var(--hbi-ruby) 40%, var(--hbi-gold) 72%, transparent 94%);
  opacity: .9;
}
#factory .factory__container {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
  gap: clamp(42px, 6vw, 82px);
  align-items: center;
}
#factory .factory__media {
  position: relative;
  min-height: 475px;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
  box-shadow: none;
}
#factory .factory__media::before {
  content: "خط تولید / تهران";
  position: absolute;
  z-index: 2;
  top: 18px;
  inset-inline-start: 18px;
  padding: 7px 10px;
  background: rgba(8,9,11,.78);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: 10px;
  letter-spacing: .03em;
  backdrop-filter: blur(5px);
}
#factory .factory__media::after {
  content: "V-CUT  •  GLUING  •  FORMING  •  FINISHING";
  position: absolute;
  z-index: 2;
  inset-inline: 18px;
  bottom: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.82);
  font: 600 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  direction: ltr;
  text-align: left;
}
#factory .factory__media img {
  width: 100%;
  height: 100%;
  min-height: 475px;
  object-fit: cover;
  transform: scale(1.015);
  filter: saturate(.86) contrast(1.05);
}
#factory .factory__content { padding: 0; }
#factory .factory__content::before {
  content: "تولیدکننده تخصصی جعبه سخت";
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: #d9b66e;
  font-size: 12px;
  font-weight: 700;
}
#factory .factory__content::before { border-inline-start: 22px solid var(--hbi-ruby); padding-inline-start: 9px; }
#factory .factory__content h2 {
  margin: 0;
  max-width: 620px;
  color: #fff;
  font-size: clamp(31px, 3.25vw, 48px);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.035em;
}
#factory .factory__lead {
  max-width: 610px;
  margin: 20px 0 0;
  color: #c1c4c9;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 2.05;
}
#factory .factory__features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#factory .factory__features li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 76px;
  gap: 11px;
  padding: 13px 0;
  color: #f2f3f4;
  font-size: 12px;
  line-height: 1.7;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#factory .factory__features li:nth-child(odd) { padding-inline-end: 18px; border-inline-end: 1px solid rgba(255,255,255,.08); }
#factory .factory__features li:nth-child(even) { padding-inline-start: 18px; }
#factory .factory__features li:nth-last-child(-n+2) { border-bottom: 0; }
#factory .factory__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #d4b36d;
  background: transparent;
  border: 1px solid rgba(212,179,109,.35);
  border-radius: 50%;
}
#factory .factory__icon svg { width: 17px; height: 17px; fill: currentColor; }
#factory .factory__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 45px;
  margin-top: 26px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 3px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
#factory .factory__button:hover { background: #fff; color: #111; border-color: #fff; transform: translateY(-1px); }
#factory .factory__button:focus-visible { outline: 3px solid rgba(201,165,91,.42); outline-offset: 3px; }

/* The why-us block is deliberately connected to the factory story instead of behaving as a second generic section. */
#why-us.why-us {
  position: relative;
  padding: 48px 24px 58px;
  background: #f5f4f1;
  color: #15171a;
}
#why-us .why-us__container { width: min(1180px,100%); margin: 0 auto; }
#why-us .why-us__header {
  display: grid;
  grid-template-columns: minmax(260px,.8fr) minmax(320px,1.2fr);
  gap: 36px;
  align-items: end;
  margin: 0 0 31px;
  text-align: right;
}
#why-us .why-us__header h2 {
  margin: 0;
  color: #111316;
  font-size: clamp(25px,2.3vw,34px);
  line-height: 1.38;
  letter-spacing: -.025em;
}
#why-us .why-us__header p {
  position: relative;
  margin: 0;
  padding-inline-start: 22px;
  border-inline-start: 1px solid #cbc6bb;
  color: #686b70;
  font-size: 13px;
  line-height: 1.9;
}
#why-us .why-us__grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  border-top: 1px solid #d7d3ca;
  border-bottom: 1px solid #d7d3ca;
}
#why-us .why-us__item {
  min-height: 178px;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 13px;
  align-content: center;
  margin: 0;
  padding: 25px clamp(16px,2vw,25px);
  text-align: right;
  border-inline-end: 1px solid #d7d3ca;
}
#why-us .why-us__item:last-child { border-inline-end: 0; }
#why-us .why-us__item::after { display:none !important; }
#why-us .why-us__icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  color: #9d2634;
  background: transparent;
}
#why-us .why-us__icon svg { width: 36px; height: 36px; fill:none; stroke: currentColor; stroke-width: 2; }
#why-us .why-us__item h3 {
  margin: 1px 0 7px;
  color: #17191c;
  font-size: 14px;
  font-weight: 820;
}
#why-us .why-us__item p {
  margin: 0;
  color: #6a6d71;
  font-size: 11.5px;
  line-height: 1.85;
}

@media (max-width: 900px) {
  #factory.factory { padding: 55px 22px 54px; }
  #factory .factory__container { grid-template-columns: 1fr; gap: 30px; }
  #factory .factory__content { order: 1; }
  #factory .factory__media { order: 2; min-height: 330px; }
  #factory .factory__media img { min-height: 330px; }
  #why-us .why-us__header { grid-template-columns: 1fr 1.25fr; }
  #why-us .why-us__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #why-us .why-us__item:nth-child(3) { border-top: 1px solid #d7d3ca; }
  #why-us .why-us__item:nth-child(4) { border-top: 1px solid #d7d3ca; }
  #why-us .why-us__item:nth-child(2) { border-inline-end: 0; }
}

@media (max-width: 640px) {
  #factory.factory { padding: 46px 17px 40px; }
  #factory.factory::before { top: 17px; inset-inline-start: 18px; font-size: 8px; }
  #factory.factory::after { width: 2px; }
  #factory .factory__container { gap: 23px; }
  #factory .factory__content::before { margin-bottom: 11px; font-size: 10px; border-inline-start-width: 16px; }
  #factory .factory__content h2 { font-size: 27px; line-height: 1.32; }
  #factory .factory__lead { margin-top: 13px; font-size: 12px; line-height: 1.9; }
  #factory .factory__features { margin-top: 20px; grid-template-columns: 1fr; }
  #factory .factory__features li,
  #factory .factory__features li:nth-child(odd),
  #factory .factory__features li:nth-child(even) {
    min-height: 52px;
    grid-template-columns: 28px 1fr;
    padding: 8px 0;
    border-inline-end: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 10.5px;
  }
  #factory .factory__features li:nth-last-child(2) { border-bottom: 1px solid rgba(255,255,255,.08); }
  #factory .factory__features li:last-child { border-bottom: 0; }
  #factory .factory__icon { width: 28px; height: 28px; }
  #factory .factory__icon svg { width: 15px; height: 15px; }
  #factory .factory__button { width: 100%; min-height: 43px; margin-top: 18px; }
  #factory .factory__media { min-height: 218px; border-radius: 3px; }
  #factory .factory__media img { min-height: 218px; }
  #factory .factory__media::before { top: 11px; inset-inline-start: 11px; padding: 5px 7px; font-size: 8px; }
  #factory .factory__media::after { inset-inline: 11px; bottom: 11px; padding-top: 8px; font-size: 7px; }

  #why-us.why-us { padding: 31px 17px 34px; }
  #why-us .why-us__header { display:block; margin-bottom: 21px; }
  #why-us .why-us__header h2 { font-size: 22px; }
  #why-us .why-us__header p { margin-top: 9px; padding-inline-start: 0; border: 0; font-size: 10.5px; line-height: 1.75; }
  #why-us .why-us__grid { grid-template-columns: 1fr; border-bottom: 0; }
  #why-us .why-us__item,
  #why-us .why-us__item:nth-child(3),
  #why-us .why-us__item:nth-child(4) {
    min-height: 0;
    grid-template-columns: 35px 1fr;
    padding: 13px 0;
    border: 0;
    border-bottom: 1px solid #ddd9d0;
  }
  #why-us .why-us__item:last-child { border-bottom: 1px solid #ddd9d0; }
  #why-us .why-us__icon { width: 35px; height: 35px; }
  #why-us .why-us__icon svg { width: 29px; height: 29px; }
  #why-us .why-us__item h3 { margin: 0 0 2px; font-size: 12.5px; }
  #why-us .why-us__item p { font-size: 10px; line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  #factory .factory__button { transition: none; }
}
