/*
  Industry-solution pages — scoped to `.rec-*`, loaded only on the industry
  solution detail pages (/rishennya/* and /en/solutions/*) via
  pages/solution_detail.py head_extra. The recycling page uses the hero +
  products + panel blocks; every other industry page reuses the same hero and
  product-card system plus the generic blocks lower in this file (agreed-grid,
  note, final CTA) — the recycling page does not use those classes, so it is
  unaffected. Light premium B2B styling using the site's own tokens; no global
  stylesheet and no other page type is affected.
*/

/* ---- Hero: compact two columns (text + real recycling photo + panel) ---- */
.rec-hero {
  padding-block: var(--space-lg) var(--space-2xl);
}

.rec-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.rec-hero__content {
  min-width: 0;
}

.rec-hero__title {
  margin: var(--space-xs) 0 var(--space-md);
  font-size: clamp(2.25rem, 3vw + 1rem, 3.25rem);
  line-height: 1.06;
  overflow-wrap: normal;
  word-break: normal;
}

.rec-hero__lede {
  max-width: 35rem;
  margin: 0 0 var(--space-lg);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--graphite-900);
}

.rec-hero__points {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.rec-hero__points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--graphite-900);
}

.rec-hero__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-accent);
}

.rec-hero__visual {
  position: relative;
  min-width: 0;
}

.rec-hero__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: var(--hairline) solid var(--border-hairline);
  box-shadow: var(--shadow-sm);
}

.rec-hero__panel {
  position: absolute;
  left: var(--space-md);
  bottom: var(--space-md);
  max-width: calc(100% - var(--space-md) * 2);
  display: flex;
  flex-direction: column;
  padding: var(--space-sm) var(--space-md);
  background: var(--brand-accent);
  color: var(--accent-contrast);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.rec-hero__panel-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
}

.rec-hero__panel-label {
  margin-top: 2px;
  font-size: var(--text-sm);
  opacity: 0.95;
}

.rec-hero__panel-caption {
  margin-top: var(--space-2xs);
  font-size: var(--text-xs);
  opacity: 0.85;
}

/* ---- Recommended products ---- */
.rec-products {
  padding-block: 0 var(--space-2xl);
  scroll-margin-top: calc(var(--mobile-header-height) + 16px);
}

.rec-products__head {
  max-width: 46rem;
  margin-bottom: var(--space-lg);
}

.rec-products__title {
  margin: var(--space-2xs) 0 var(--space-sm);
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
  line-height: var(--leading-snug);
}

.rec-products__intro {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--graphite-900);
}

.rec-products__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.rec-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-card);
  border: var(--hairline) solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rec-card:hover {
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.rec-card:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.rec-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--warm-white-50);
}

.rec-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-card__media--glyph {
  display: grid;
  place-items: center;
}

.rec-card__media--glyph svg {
  width: 64%;
  height: 64%;
}

.rec-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  flex: 1 1 auto;
  padding: var(--space-md);
}

.rec-card__num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--brand-accent);
  letter-spacing: 0.04em;
}

.rec-card__cat {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--graphite-700);
}

.rec-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.2;
  color: var(--graphite-950);
}

.rec-card__desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--graphite-700);
  flex: 1 1 auto;
}

.rec-card__link {
  margin-top: var(--space-2xs);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-weight: 600;
  color: var(--brand-accent);
}

.rec-card:hover .rec-card__link span {
  transform: translateX(3px);
}

.rec-card__link span {
  transition: transform 0.15s ease;
}

.rec-products__note {
  margin: var(--space-lg) 0 0;
  padding: var(--space-md) var(--space-lg);
  max-width: 52rem;
  background: rgba(47, 111, 94, 0.06);
  border-left: 3px solid var(--brand-accent);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite-900);
}

.rec-products__cta {
  margin-top: var(--space-lg);
}

/* ==========================================================================
   Generic industry-solution blocks — used by every industry page EXCEPT the
   bespoke recycling page (which has no elements with these classes, so it is
   completely unaffected). Same tokens / rhythm as the blocks above.
   ========================================================================== */

/* "What is usually agreed" — neutral parameter grid (no invented numbers). */
.rec-agreed {
  padding-block: 0 var(--space-2xl);
}

.rec-agreed__head {
  max-width: 46rem;
  margin-bottom: var(--space-lg);
}

.rec-agreed__title {
  margin: var(--space-2xs) 0 var(--space-sm);
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
  line-height: var(--leading-snug);
}

.rec-agreed__intro {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--graphite-900);
}

.rec-agreed__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm) var(--space-md);
}

.rec-agreed__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding: 1.25rem;
  background: var(--surface-card);
  border: var(--hairline) solid var(--metal-300);
  border-radius: var(--radius-md);
}

.rec-agreed__label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--graphite-950);
}

.rec-agreed__note {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--graphite-900);
}

/* Honest industry note — only rendered when the industry data has one. */
.rec-note {
  padding-block: 0 var(--space-2xl);
}

.rec-note__box {
  max-width: 52rem;
  padding: var(--space-md) var(--space-lg);
  background: rgba(47, 111, 94, 0.06);
  border-left: 3px solid var(--brand-accent);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite-900);
}

/* Final CTA band. */
.rec-final-cta {
  padding-block: 0 var(--space-2xl);
}

.rec-final-cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
  padding: var(--space-xl);
  background: rgba(47, 111, 94, 0.06);
  border: var(--hairline) solid var(--border-hairline);
  border-radius: var(--radius-lg);
}

.rec-final-cta__text {
  flex: 1 1 320px;
  min-width: 0;
}

.rec-final-cta .eyebrow {
  color: var(--brand-accent);
}

.rec-final-cta__title {
  margin: var(--space-2xs) 0 var(--space-2xs);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: var(--leading-snug);
}

.rec-final-cta__body {
  margin: 0;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite-700);
}

.rec-final-cta__actions {
  flex: 0 0 auto;
}

/* ---- Tablet: stack hero; products 3 -> 2 ---- */
@media (max-width: 1023px) {
  .rec-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .rec-hero__lede {
    max-width: none;
  }
  .rec-hero__visual {
    max-width: 560px;
  }
  .rec-products__grid,
  .rec-agreed__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Mobile: single column, comfortable targets ---- */
@media (max-width: 767px) {
  .rec-hero {
    padding-block: var(--space-sm) var(--space-xl);
  }
  .rec-hero__title {
    font-size: clamp(2.125rem, 8vw, 2.5rem);
  }
  .rec-hero .cta-row {
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-sm);
  }
  .rec-hero .cta-row .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
  /* Panel moves out of the image overlay to a calm static card below it. */
  .rec-hero__panel {
    position: static;
    max-width: none;
    margin-top: var(--space-sm);
  }
  .rec-products__grid,
  .rec-agreed__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .rec-products__cta .btn {
    width: 100%;
    justify-content: center;
  }
  .rec-final-cta__box {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-lg);
  }
  .rec-final-cta__actions {
    width: 100%;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-sm);
  }
  .rec-final-cta__actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }
}
