/* ============================================
   RAW MATERIALS PAGE — raw-materials.css
   Підключати ПІСЛЯ style.css
============================================ */

/* ── Page Hero ────────────────────────── */
.raw-hero {
  position: relative;
  height: clamp(260px, 35vw, 420px);
  margin-top: 72px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.raw-hero__bg {
  position: absolute;
  inset: 0;
}

.raw-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/raw-hero.jpg');
  background-size: cover;
  background-position: center;
}

.raw-hero__bg-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.65) 0%,
    rgba(0,0,0,.2) 60%,
    transparent 100%
  );
}

.raw-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.65) 0%,
    rgba(0,0,0,.2) 60%,
    transparent 100%
  );
}

.raw-hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: 2.5rem;
}

.raw-hero__tag {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-200);
  display: block;
  margin-bottom: .6rem;
}

.raw-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: .6rem;
}

.raw-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,.78);
}

/* ── Intro section ────────────────────── */
.raw-intro { background: var(--white); }

.raw-intro__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

/* Text side */
.raw-text {
  font-size: .97rem;
  color: var(--gray-600);
  line-height: 1.78;
  margin-bottom: 1.1rem;
}
.raw-text strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Key facts row */
.raw-facts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.raw-fact {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.raw-fact__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.raw-fact__icon svg { width: 40px; height: 40px; }

.raw-fact__val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-600);
  line-height: 1.1;
}
.raw-fact__lbl {
  font-size: .8rem;
  color: var(--gray-500);
  margin-top: .1rem;
}

/* Process steps side */
.raw-steps__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--green-100);
}

.raw-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.raw-step {
  display: flex;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}
.raw-step:last-child { border-bottom: none; }

/* Connecting line between steps */
.raw-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 2.8rem;
  bottom: -1px;
  width: 2px;
  background: var(--green-100);
}
.raw-step:last-child::before { display: none; }

.raw-step__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-600);
  color: var(--white);
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.raw-step__name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .3rem;
}

.raw-step__desc {
  font-size: .85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ── Polymers grid ────────────────────── */
.raw-polymers { background: var(--gray-50); }

.polymers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.polymer-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
  position: relative;
  overflow: hidden;
}

.polymer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green-600);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
  transform-origin: left;
}

.polymer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-200);
}
.polymer-card:hover::before { transform: scaleX(1); }

.polymer-card__code {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green-600);
  letter-spacing: .03em;
  margin-bottom: .4rem;
  line-height: 1;
}

.polymer-card__name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .5rem;
  line-height: 1.4;
}

.polymer-card__examples {
  font-size: .78rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ── Gallery ──────────────────────────── */
.raw-gallery { background: var(--white); padding-bottom: 0; }

.raw-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, clamp(180px, 22vw, 280px));
  gap: 4px;
  margin-top: 2.5rem;
}

.raw-gallery__item {
  overflow: hidden;
  position: relative;
}

/* Lightbox */
.raw-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.raw-lightbox.active { display: flex; }
.raw-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}
.raw-lightbox__inner {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1;
  width: min(900px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.raw-lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 18px 35px rgba(0,0,0,0.45);
}
.raw-lightbox__caption {
  margin-top: .7rem;
  color: white;
  opacity: .9;
  font-size: .95rem;
  text-align: center;
  max-width: 90vw;
}
.raw-lightbox__close {
  position: absolute;
  top: -.6rem;
  right: -.6rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.raw-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.raw-gallery__item:hover img { transform: scale(1.06); }

.raw-gallery__placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: var(--gray-400);
  font-size: 1.8rem;
  transition: background .2s;
}
.raw-gallery__placeholder:hover { background: var(--gray-200); }
.raw-gallery__placeholder small { font-size: .72rem; }

/* ── CTA Banner ───────────────────────── */
.raw-cta {
  background: var(--green-600);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.raw-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.raw-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: .4rem;
}

.raw-cta__sub {
  font-size: .97rem;
  color: var(--green-100);
  max-width: 520px;
}

.btn--white-green {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  background: var(--white);
  color: var(--green-700);
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all .22s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn--white-green:hover {
  background: var(--green-50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}

/* ── Responsive ───────────────────────── */
@media (max-width: 900px) {
  .raw-intro__grid { grid-template-columns: 1fr; }
  .polymers-grid   { grid-template-columns: repeat(2, 1fr); }
  .raw-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, clamp(150px, 30vw, 220px));
  }
}

@media (max-width: 600px) {
  .polymers-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .raw-gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, clamp(130px, 40vw, 200px));
  }
  .raw-cta__inner { flex-direction: column; align-items: flex-start; }
  .btn--white-green { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .polymers-grid { grid-template-columns: 1fr; }
}
