/* FACTORIES PAGE / SECTION - scoped styles */
:root {
  --ih-factory-navy: #061746;
  --ih-factory-blue: #073f9f;
  --ih-factory-blue-2: #0b56cf;
  --ih-factory-green: #087b40;
  --ih-factory-text: #13224a;
  --ih-factory-muted: #5d6983;
  --ih-factory-border: #dfe7f3;
  --ih-factory-soft: #f6f9fd;
  --ih-factory-shadow: 0 18px 44px rgba(7, 28, 77, .10);
  --ih-factory-card-shadow: 0 12px 30px rgba(7, 28, 77, .09);
  --ih-factory-font: "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
}

.factories-preview-body {
  margin: 0;
  background: #f4f8ff;
  font-family: var(--ih-factory-font);
  color: var(--ih-factory-text);
}

.ih-factories,
.ih-factories * {
  box-sizing: border-box;
}

.ih-factories {
  width: min(calc(100% - 24px), 1360px);
  margin: 18px auto 36px;
  background: #fff;
  color: var(--ih-factory-text);
  font-family: var(--ih-factory-font);
  border: 1px solid #d8e2f0;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(11, 37, 87, .08);
}

.ih-factories a {
  color: inherit;
  text-decoration: none;
}

.ih-factory-hero {
  position: relative;
  min-height: 420px;
  background-image:
    linear-gradient(90deg,
      #fff 0%,
      #fff 18%,
      rgba(255, 255, 255, .94) 32%,
      rgba(255, 255, 255, .67) 47%,
      rgba(255, 255, 255, .22) 61%,
      rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 72%, #fff 100%),
    url("../assets/images/hero-factories.webp");
  background-size: cover;
  background-position: center right;
  isolation: isolate;
}

.ih-factory-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 95px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 72%);
  z-index: -1;
}

.ih-factory-hero__content {
  width: min(500px, 100%);
  padding: 112px 0 0 clamp(44px, 4.4vw, 62px);
}

.ih-factory-hero__content h1 {
  margin: 0 0 20px;
  color: var(--ih-factory-navy);
  font-size: clamp(54px, 7vw, 80px);
  line-height: .95;
  letter-spacing: -3.8px;
  font-weight: 800;
}

.ih-factory-hero__content p {
  margin: 0;
  color: var(--ih-factory-navy);
  font-size: 19px;
  line-height: 1.65;
  font-weight: 500;
  max-width: 382px;
}

.ih-factory-main {
  position: relative;
  z-index: 2;
  padding: 0 clamp(44px, 4.4vw, 62px) 30px;
  margin-top: -58px;
}

.ih-factory-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ih-factory-type {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr 28px;
  align-items: center;
  gap: 22px;
  min-height: 142px;
  padding: 22px 30px 25px;
  background: #fff;
  border: 1px solid var(--ih-factory-border);
  border-radius: 10px;
  box-shadow: var(--ih-factory-card-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ih-factory-type::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7px;
  background: var(--type-color, var(--ih-factory-blue));
  box-shadow: 0 -4px 14px color-mix(in srgb, var(--type-color, var(--ih-factory-blue)) 27%, transparent);
}

.ih-factory-type:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--type-color, var(--ih-factory-blue)) 42%, var(--ih-factory-border));
  box-shadow: 0 18px 45px rgba(7, 28, 77, .13);
}

.ih-factory-type--sale { --type-color: #0643a7; }
.ih-factory-type--let { --type-color: #087b40; }

.ih-factory-type__icon {
  width: 72px;
  height: 72px;
  display: block;
  filter: drop-shadow(0 7px 14px rgba(11, 52, 122, .18));
}

.ih-factory-type h2 {
  margin: 0 0 8px;
  color: var(--type-color, var(--ih-factory-blue));
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.45px;
}

.ih-factory-type p {
  margin: 0;
  color: #15224b;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
  max-width: 280px;
}

.ih-factory-type__arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--type-color, var(--ih-factory-blue));
}

.ih-factory-filter {
  margin-top: 32px;
  padding: 25px 28px 26px;
  background: #fff;
  border: 1px solid var(--ih-factory-border);
  border-radius: 10px;
  box-shadow: var(--ih-factory-card-shadow);
}

.ih-factory-filter__grid {
  display: grid;
  grid-template-columns: 1.35fr 1.05fr 1.05fr .95fr 190px;
  gap: 20px;
  align-items: end;
}

.ih-factory-field label {
  display: block;
  margin: 0 0 10px;
  color: var(--ih-factory-navy);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.ih-factory-control {
  position: relative;
  height: 44px;
  border: 1px solid #d8e2ee;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(7, 28, 77, .03);
}

.ih-factory-control svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #7a869b;
  pointer-events: none;
}

.ih-factory-control input,
.ih-factory-control select {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  border-radius: 5px;
  background: transparent;
  color: #6b7489;
  font: 600 14px/1 var(--ih-factory-font);
  appearance: none;
  padding: 0 37px 0 40px;
}

.ih-factory-control select {
  padding-left: 17px;
}

.ih-factory-control--with-icon select {
  padding-left: 40px;
}

.ih-factory-control::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #60708e;
  border-bottom: 2px solid #60708e;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.ih-factory-search-btn {
  height: 44px;
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #0b57d0, #073d9e);
  color: #fff;
  font: 800 13.5px/1 var(--ih-factory-font);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(6, 67, 167, .23);
}

.ih-factory-search-btn svg {
  width: 18px;
  height: 18px;
}

.ih-factory-more-filter {
  width: max-content;
  margin: 25px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ih-factory-blue);
  font-size: 14px;
  font-weight: 800;
}

.ih-factory-more-filter svg {
  width: 16px;
  height: 16px;
}

.ih-factory-listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 40px 0 22px;
}

.ih-factory-listing-head h2 {
  margin: 0;
  color: var(--ih-factory-navy);
  font-size: 29px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.65px;
}

.ih-factory-view-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ih-factory-blue);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.ih-factory-view-link svg {
  width: 17px;
  height: 17px;
}

.ih-factory-listings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 21px;
}

.ih-factory-card {
  background: #fff;
  border: 1px solid var(--ih-factory-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(7, 28, 77, .08);
  min-width: 0;
}

.ih-factory-card__media {
  position: relative;
  height: 174px;
  background: #eef3fb;
  overflow: hidden;
}

.ih-factory-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}

.ih-factory-card:hover .ih-factory-card__media img {
  transform: scale(1.04);
}

.ih-factory-badge {
  position: absolute;
  left: 13px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 6px 13px rgba(0,0,0,.12);
}

.ih-factory-badge--sale { background: #0643a7; }
.ih-factory-badge--let { background: #087b40; }

.ih-factory-heart {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #7b8ba6;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(7, 28, 77, .14);
}

.ih-factory-heart svg {
  width: 17px;
  height: 17px;
}

.ih-factory-card__body {
  padding: 15px 15px 16px;
}

.ih-factory-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #34425f;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.ih-factory-location svg {
  width: 14px;
  height: 14px;
  color: #6e7c95;
  flex: 0 0 auto;
}

.ih-factory-card h3 {
  min-height: 56px;
  margin: 0 0 10px;
  color: #081942;
  font-size: 18px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -.2px;
}

.ih-factory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 16px;
  color: #45536c;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.ih-factory-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ih-factory-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a9b4c9;
}

.ih-factory-amenities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
  min-height: 58px;
  margin-bottom: 18px;
}

.ih-factory-amenity {
  min-width: 0;
  text-align: center;
  color: #34425d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
}

.ih-factory-amenity svg {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 5px;
  color: #51617e;
  stroke-width: 1.7;
}

.ih-factory-price {
  margin: 0 0 5px;
  color: var(--ih-factory-blue);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.5px;
}

.ih-factory-price--green {
  color: var(--ih-factory-green);
  font-size: 20px;
}

.ih-factory-price-label {
  margin: 0 0 14px;
  color: #59667d;
  font-size: 12px;
  font-weight: 700;
}

.ih-factory-details-btn {
  width: 100%;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #0b56cf;
  border-radius: 5px;
  color: var(--ih-factory-blue);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.ih-factory-details-btn:hover {
  transform: translateY(-1px);
  background: var(--ih-factory-blue);
  color: #fff;
}

.ih-factory-benefits {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--ih-factory-border);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(7, 28, 77, .06);
  overflow: hidden;
}

.ih-factory-benefit {
  position: relative;
  min-height: 138px;
  padding: 24px 22px 22px;
  text-align: center;
}

.ih-factory-benefit:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: #dbe4f1;
}

.ih-factory-benefit__icon {
  width: 55px;
  height: 55px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef4ff, #dce9ff);
  color: #0a44a6;
}

.ih-factory-benefit__icon svg {
  width: 28px;
  height: 28px;
}

.ih-factory-benefit h3 {
  margin: 0 0 9px;
  color: var(--ih-factory-navy);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.ih-factory-benefit p {
  margin: 0 auto;
  max-width: 215px;
  color: #15244d;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.ih-factory-cta {
  position: relative;
  margin-top: 28px;
  min-height: 218px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
  background-image:
    linear-gradient(90deg,
      rgba(4, 48, 127, .98) 0%,
      rgba(5, 61, 150, .93) 39%,
      rgba(5, 55, 139, .76) 62%,
      rgba(5, 44, 110, .64) 100%),
    url("../assets/images/factory-cta-bg.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 18px 40px rgba(6, 39, 98, .18);
}

.ih-factory-cta__inner {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  padding: 36px 42px;
  max-width: 720px;
}

.ih-factory-cta__icon {
  width: 86px;
  height: 86px;
  display: block;
}

.ih-factory-cta h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 28px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.4px;
}

.ih-factory-cta p {
  margin: 0 0 26px;
  max-width: 500px;
  color: rgba(255,255,255,.92);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
}

.ih-factory-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.ih-factory-cta-btn {
  min-height: 44px;
  min-width: 182px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.88);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.ih-factory-cta-btn.ih-factory-cta-btn--primary {
  background: #fff;
  color: #0842a6;
  border-color: #fff;
}

.ih-factory-cta-btn svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 1080px) {
  .ih-factory-main { padding-inline: 28px; }
  .ih-factory-hero__content { padding-left: 34px; }
  .ih-factory-filter__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ih-factory-search-btn { width: 100%; }
  .ih-factory-listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ih-factory-card__media { height: 210px; }
}

@media (max-width: 820px) {
  .ih-factories { width: min(100% - 12px, 760px); }
  .ih-factory-hero { min-height: 365px; background-position: center right 28%; }
  .ih-factory-hero__content { padding: 64px 24px 0; }
  .ih-factory-hero__content h1 { font-size: 58px; letter-spacing: -2.2px; }
  .ih-factory-hero__content p { font-size: 17px; max-width: 330px; }
  .ih-factory-main { margin-top: -42px; padding: 0 22px 24px; }
  .ih-factory-types { grid-template-columns: 1fr; gap: 18px; }
  .ih-factory-type { min-height: 128px; }
  .ih-factory-benefits { grid-template-columns: repeat(2, 1fr); }
  .ih-factory-benefit:nth-child(2)::after { display: none; }
  .ih-factory-benefit:nth-child(-n+2) { border-bottom: 1px solid #dbe4f1; }
  .ih-factory-cta__inner { grid-template-columns: 72px 1fr; gap: 22px; padding: 30px 28px; }
  .ih-factory-cta__icon { width: 72px; height: 72px; }
}

@media (max-width: 620px) {
  .ih-factories { margin-top: 0; border-radius: 0; width: 100%; border-left: 0; border-right: 0; }
  .ih-factory-hero {
    min-height: 348px;
    background-image:
      linear-gradient(90deg, #fff 0%, rgba(255,255,255,.95) 32%, rgba(255,255,255,.46) 64%, rgba(255,255,255,.05) 100%),
      linear-gradient(180deg, rgba(255,255,255,0) 67%, #fff 100%),
      url("../assets/images/hero-factories.webp");
  }
  .ih-factory-hero__content h1 { font-size: 48px; letter-spacing: -1.8px; }
  .ih-factory-hero__content p { font-size: 15.5px; line-height: 1.55; width: 285px; }
  .ih-factory-main { padding-inline: 16px; margin-top: -36px; }
  .ih-factory-type { grid-template-columns: 68px 1fr 22px; gap: 16px; padding: 20px 18px 24px; }
  .ih-factory-type__icon { width: 62px; height: 62px; }
  .ih-factory-type h2 { font-size: 19px; }
  .ih-factory-type p { font-size: 13.5px; }
  .ih-factory-filter { padding: 20px 17px; }
  .ih-factory-filter__grid { grid-template-columns: 1fr; gap: 14px; }
  .ih-factory-listing-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ih-factory-listing-head h2 { font-size: 25px; }
  .ih-factory-listings { grid-template-columns: 1fr; gap: 18px; }
  .ih-factory-card__media { height: 225px; }
  .ih-factory-card h3 { min-height: 0; }
  .ih-factory-benefits { grid-template-columns: 1fr; }
  .ih-factory-benefit { min-height: auto; }
  .ih-factory-benefit:not(:last-child) { border-bottom: 1px solid #dbe4f1; }
  .ih-factory-benefit::after { display: none !important; }
  .ih-factory-cta { min-height: auto; }
  .ih-factory-cta__inner { grid-template-columns: 1fr; text-align: left; padding: 28px 22px; }
  .ih-factory-cta h2 { font-size: 23px; }
  .ih-factory-cta__buttons { flex-direction: column; }
  .ih-factory-cta-btn { width: 100%; }
}
