/* ═══════════════════════════════════════════════════════════════════
   About — Sustainability Commitment
   Figma nodes: 1388:2041 (desktop), 658:2239 (mobile)

   Same component family as hydroforming-sustainability.css (badge pill,
   accordion mechanism, floating stat badges) — see the PHP header comment
   for why this got its own file instead of being parametrized from that one.
   ═══════════════════════════════════════════════════════════════════ */

.about-sustain {
  background-color: var(--color-dark, #252525);
}

.about-sustain__wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

/* ── Header ──────────────────────────────────────────────────────── */

.about-sustain__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  max-width: var(--header-max-width);
  width: 100%;
}

.about-sustain__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--color-green-bg);
  border: 1px solid var(--color-green);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-body-md);
  font-weight: 400;
  color: var(--color-green);
  line-height: normal;
}

.about-sustain__badge img {
  display: block;
  flex-shrink: 0;
}

.about-sustain__title {
  font-size: var(--font-size-h2);
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
  line-height: normal;
}

.about-sustain__sub {
  font-size: var(--font-size-body-lg);
  font-weight: 400;
  color: var(--color-white);
  margin: 0;
  line-height: normal;
}

/* ── Body: cards + photo ─────────────────────────────────────────── */

.about-sustain__body {
  display: flex;
  align-items: stretch;
  gap: 40px;
  width: 100%;
}

/* ── Cards ───────────────────────────────────────────────────────── */

.about-sustain__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1 1 0;
  align-content: flex-start;
}

.about-sustain__card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 1 236px;
  min-width: 236px;
  padding: 32px 16px;
  background-color: var(--color-bg);
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}


.about-sustain__card-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-sustain__card-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.about-sustain__card-icon img {
  display: block;
  width: 32px;
  height: 32px;
}

.about-sustain__card-title {
  font-size: 32px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-dark);
  margin: 0;
  flex: 1;
}

/* Chevron — hidden on desktop, shown in mobile accordion mode */
.about-sustain__card-chevron {
  display: none;
  flex-shrink: 0;
  color: var(--color-dark);
  transition: transform 0.25s ease;
}

.about-sustain__card-body {
  font-size: var(--font-size-body-md);
  font-weight: 400;
  line-height: normal;
  color: var(--color-dark);
  margin: 0;
}

/* ── Active card — green highlight ────────────────────────────────────
   Desktop: JS adds .is-active on hover (mouseleave reverts to card 1).
   Mobile accordion: JS adds .is-active on tap, single-select (opening one
   card closes any other). Same class drives the badge-swap in main.js. */

.about-sustain__card.is-active {
  background-color: var(--color-green-alt);
  border-color: transparent;
}

.about-sustain__card.is-active .about-sustain__card-title,
.about-sustain__card.is-active .about-sustain__card-body {
  color: var(--color-white);
}

.about-sustain__card.is-active .about-sustain__card-icon img {
  filter: brightness(0) invert(1);
}

/* ── Accordion mode (activated by JS on mobile) ─────────────────────── */

.about-sustain__cards--accordion .about-sustain__card {
  gap: 0;
  cursor: pointer;
}

.about-sustain__cards--accordion .about-sustain__card-header {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.about-sustain__cards--accordion .about-sustain__card-title {
  font-size: var(--font-size-h4);
  font-weight: 700;
}

.about-sustain__cards--accordion .about-sustain__card-chevron {
  display: block;
  margin-left: auto;
}

.about-sustain__cards--accordion .about-sustain__card-content {
  display: none;
  padding-top: 16px;
}

.about-sustain__cards--accordion .about-sustain__card.is-active .about-sustain__card-content {
  display: block;
}

.about-sustain__cards--accordion .about-sustain__card.is-active .about-sustain__card-chevron {
  transform: rotate(180deg);
  color: var(--color-white);
}

/* Photo + floating badges move inside the open card on mobile (see main.js) */
.about-sustain__cards--accordion .about-sustain__card-content .about-sustain__image-wrap {
  margin-top: 20px;
}

/* ── Photo + floating stat badges ───────────────────────────────────── */

.about-sustain__image-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 16px;
  overflow: visible;
}

.about-sustain__photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  border-radius: 16px;
}

.about-sustain__stat-badge {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 25px 25px rgba(0, 0, 0, 0.25);
}

.about-sustain__stat-value {
  font-size: 36px;
  font-weight: 600;
  line-height: normal;
  margin: 0;
  white-space: nowrap;
}

.about-sustain__stat-label {
  font-size: var(--font-size-body-md);
  font-weight: 400;
  line-height: normal;
  margin: 0;
  max-width: 160px;
}

/* Bottom-left — white bg, green border, green value */
.about-sustain__stat-badge--light {
  left: -20px;
  bottom: -20px;
  background-color: var(--color-white);
  border: 1px solid var(--color-green-alt);
}

.about-sustain__stat-badge--light .about-sustain__stat-value {
  color: var(--color-green-alt);
}

.about-sustain__stat-badge--light .about-sustain__stat-label {
  color: var(--color-dark);
}

/* Top-right — green bg, white text. Own shadow is stronger than the base
   badge's, since its solid green fill matches .is-active cards and the
   default shadow alone doesn't separate it from similarly-toned surroundings. */
.about-sustain__stat-badge--green {
  right: -20px;
  top: -20px;
  background-color: var(--color-green-alt);
  color: var(--color-white);
  box-shadow:
    0 12px 24px -6px rgba(0, 30, 10, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.25);
}

.about-sustain__stat-badge--green p {
  color: var(--color-white);
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .about-sustain__body {
    flex-direction: column;
  }

  .about-sustain__image-wrap {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .about-sustain__title {
    font-size: 32px;
  }

  .about-sustain__sub {
    font-weight: 300;
  }

  /* Match hydro-sustain__image-wrap's mobile treatment: fixed-height photo
     (no min-height floor) and same badge sizing/positioning. */
  .about-sustain__photo {
    height: 320px;
    min-height: 0;
  }

  .about-sustain__stat-badge {
    padding: 16px;
  }

  .about-sustain__stat-value {
    font-size: var(--font-size-h3);
  }

  .about-sustain__stat-badge--light {
    left: -10px;
    bottom: -10px;
  }

  .about-sustain__stat-badge--green {
    right: -10px;
    top: -10px;
  }
}