/* ============================
   Lazy Block: industry-hero-main
   ============================ */

@property --p {
  syntax: '<number>';
  initial-value: 0;
  inherits: true;
}
@property --pText {
  syntax: '<number>';
  initial-value: 0;
  inherits: true;
}

.industry-hero-main {
  position: relative;
  width: 100%;
  height: 130vh;
  background: #0d1117;
  color: #fff;
  --p: 0;
  --pText: 0;
}

@media (min-width: 768px) {
  .industry-hero-main {
    transition: --p 0.12s linear, --pText 0.12s linear;
  }
}

.industry-hero-main__stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0d1117;
}

/* === Видео-слой === */
.industry-hero-main__video-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translate3d(0, calc(var(--p) * -58vh), 0);
  will-change: transform;
}
.industry-hero-main__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: #000 url(../img/hero-poster-desktop.jpg) center / cover no-repeat;
}
.industry-hero-main__video--ready { opacity: 1; }
.industry-hero-main__video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,26,61,0.55) 0%, rgba(13,17,23,0.35) 48%, rgba(10,14,26,0.95) 100%),
    repeating-linear-gradient(45deg, transparent, transparent 22px, rgba(255,255,255,0.02) 22px, rgba(255,255,255,0.02) 23px);
}

/* === Контент hero === */
.industry-hero-main__content {
  position: absolute;
  box-sizing: border-box;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%) translateY(calc(var(--pText) * -60px));
  width: 100%;
  max-width: var(--container-max);
  padding: 136px var(--container-padding) 320px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: calc(1 - var(--pText));
  pointer-events: auto;
  will-change: opacity, transform;
}
.industry-hero-main__eyebrow {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--color-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 22px;
}
.industry-hero-main__title {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #fff;
  max-width: 900px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
.industry-hero-main__tagline {
  font-family: var(--font-body);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin: 0;
  max-width: 620px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* === Strip === */
.industry-hero-main__strip {
  position: absolute;
  box-sizing: border-box;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-max);
  padding: 0 var(--container-padding);
  z-index: 6;
}
.industry-hero-main__strip-head {
  text-align: center;
  margin-bottom: calc(var(--p) * 18px);
  max-height: calc(var(--p) * 80px);
  opacity: calc(var(--p) * 2.5 - 1);
  overflow: hidden;
}
.industry-hero-main__strip-head .section-title {
  color: #fff;
  margin: 0;
  white-space: nowrap;
  font-size: 32px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

/* === Grid === */
.industry-hero-main__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: calc(2px + var(--p) * 16px);
  align-items: stretch;
}

/* === Card === */
.industry-hero-main__card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--color-dark);
  overflow: hidden;
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
.industry-hero-main__card:hover {
  z-index: 2;
  box-shadow: 0 0 0 2px var(--color-accent), 0 16px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}
.industry-hero-main__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-accent);
  z-index: 3;
  transition: width 0.3s ease;
}
.industry-hero-main__card:hover::before { width: 6px; }
.industry-hero-main__card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 36px;
  height: 36px;
  border-top: 3px solid var(--color-accent);
  border-right: 3px solid var(--color-accent);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.industry-hero-main__card:hover::after { opacity: 1; }

.industry-hero-main__card-image {
  position: relative;
  height: calc(var(--p) * 200px);
  overflow: hidden;
  background-color: #1a1a2e;
  flex-shrink: 0;
}
.industry-hero-main__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.industry-hero-main__card-image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top,
    rgba(10, 10, 25, 0.85) 0%,
    rgba(10, 10, 25, 0.30) 60%,
    transparent 100%);
  z-index: 1;
}
.industry-hero-main__card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg,
    transparent, transparent 20px,
    rgba(255, 255, 255, 0.02) 20px,
    rgba(255, 255, 255, 0.02) 21px);
  z-index: 2;
  pointer-events: none;
}
.industry-hero-main__card-body {
  position: relative;
  padding: calc(12px + var(--p) * 12px) calc(14px + var(--p) * 10px);
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #0d1117, #141a24);
  border-top: 2px solid rgba(155, 21, 21, 0.4);
}
.industry-hero-main__card-body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.15) 70%,
    transparent 100%);
}
.industry-hero-main__card-title {
  font-family: var(--font-heading);
  font-size: calc(13px + var(--p) * 3px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 calc(var(--p) * 10px);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}
.industry-hero-main__card:hover .industry-hero-main__card-title { color: #ff4444; }
.industry-hero-main__card-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  line-height: var(--leading-normal);
  margin: 0 0 calc(var(--p) * 18px);
  max-height: calc(var(--p) * 80px);
  opacity: var(--p);
  overflow: hidden;
  flex: 1;
}
.industry-hero-main__card-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
  max-height: calc(var(--p) * 24px);
  opacity: var(--p);
  overflow: hidden;
  transition: gap 0.25s ease, color 0.25s ease;
}
.industry-hero-main__card-link svg { width: 16px; height: 16px; }
.industry-hero-main__card:hover .industry-hero-main__card-link { gap: var(--space-sm); color: #ff6666; }

/* Toggle card */
.industry-hero-main__card--toggle {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  background: linear-gradient(135deg, #0a275d 0%, #0d1117 100%);
  border-color: rgba(155, 21, 21, 0.3);
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 0;
  transition: background 0.25s ease, border-color 0.25s ease,
              box-shadow 0.35s ease, transform 0.35s ease, opacity 0.3s ease;
}
.industry-hero-main__card--toggle:hover {
  background: linear-gradient(135deg, #0d3175 0%, #1a2030 100%);
  border-color: var(--color-accent);
}
.industry-hero-main__card--toggle .industry-hero-main__card-image { background-color: transparent; }
.industry-hero-main__card--toggle .industry-hero-main__card-image::before,
.industry-hero-main__card--toggle .industry-hero-main__card-image::after { content: none; }
.industry-hero-main__card--toggle .industry-hero-main__card-body { background: transparent; }
.industry-hero-main__toggle-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: var(--p);
  transition: opacity 0.3s ease;
}
.industry-hero-main__toggle-glyph svg {
  width: calc(36px + var(--p) * 20px);
  height: calc(36px + var(--p) * 20px);
  color: rgba(255, 255, 255, 0.85);
}

.industry-hero-main--more-open .industry-hero-main__card--toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

/* "Все товары" card */
.industry-hero-main__card--all {
  background: linear-gradient(135deg, #0a275d 0%, #0d1117 100%);
  border-color: rgba(155, 21, 21, 0.3);
}
.industry-hero-main__card--all:hover {
  background: linear-gradient(135deg, #0d3175 0%, #1a2030 100%);
  border-color: var(--color-accent);
}
.industry-hero-main__card--all .industry-hero-main__card-image { background-color: transparent; }
.industry-hero-main__card--all .industry-hero-main__card-image::before,
.industry-hero-main__card--all .industry-hero-main__card-image::after { content: none; }
.industry-hero-main__card--all .industry-hero-main__card-body { background: transparent; }

/* Hidden products until toggle opens */
.industry-hero-main__card--extra { display: none; }
.industry-hero-main--more-open .industry-hero-main__card--extra {
  display: flex;
  animation: industry-hero-main-fade-in 0.4s ease both;
}
.industry-hero-main__card--extra-first {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}
@keyframes industry-hero-main-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bestseller badge */
.industry-hero-main__badge-hit {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--color-accent);
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  opacity: calc(var(--p) * 1.5 - 0.4);
}

@media (max-width: 1100px) {
  .industry-hero-main__title { font-size: 46px; }
  .industry-hero-main__strip-head .section-title { font-size: 26px; }
}

@media (max-width: 1023px) {
  .industry-hero-main__grid { grid-template-columns: repeat(2, 1fr); }
  .industry-hero-main__card--extra-first { grid-column: 1 / 2; grid-row: 1 / 2; }
}

@media (max-width: 900px) {
  .industry-hero-main__title { font-size: 32px; }
  .industry-hero-main__strip-head .section-title { font-size: 22px; }
  .industry-hero-main__strip { bottom: 30px; width: 100%; }
}

@media (max-width: 767px) {
  .industry-hero-main { height: auto; --p: 1; --pText: 1; }
  .industry-hero-main__stage { position: relative; height: auto; overflow: visible; }
  .industry-hero-main__video-layer { position: relative; height: 60vh; transform: none; }
  .industry-hero-main__content {
    position: relative;
    inset: auto;
    padding: 80px var(--container-padding-mobile) 40px;
    transform: none;
    opacity: 1;
    width: auto;
    max-width: unset;
  }
  .industry-hero-main__strip {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    padding: 40px var(--container-padding-mobile) 60px;
    width: auto;
    max-width: unset;
  }
  .industry-hero-main__strip-head .section-title { white-space: normal; font-size: 22px; }
  .industry-hero-main__grid { grid-template-columns: 1fr; }
  .industry-hero-main__card--toggle,
  .industry-hero-main__card--extra-first { grid-column: 1 / 2; grid-row: auto; }
}

@media (max-width: 640px) {
  .industry-hero-main__title { font-size: 28px; }
  .industry-hero-main__tagline { font-size: 15px; }
}

@media (max-width: 375px) {
  .industry-hero-main__title { font-size: 22px; line-height: 1.14; }
}
