/* ==========================================================================
   Sezione 5b — Carbon Manager, il software ESG (Figma 1070:4483)
   Card scura con titolo in gradiente, chips e screenshot dashboard su tablet;
   barra early-bird verde in fondo con countdown e CTA.
   ========================================================================== */

.carbon { background: var(--color-surface); padding-bottom: var(--space-section); }

.carbon__card { display: flex; flex-direction: column; }

/* ---- Pannello scuro ---- */
.carbon__panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-card);
  border-radius: 36px 36px 0 0;
  color: #fff;
}
.carbon__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(92.35deg, rgba(12, 14, 15, 0) 26.86%, #0d1f1a 49.77%),
    url("../../img/carbon/texture.webp") center / cover no-repeat,
    #0e1112;
}
/* attenua la texture (Figma: opacity 8%) */
.carbon__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(14, 17, 18, 0.92);
}
.carbon__panel::before { z-index: -1; }
.carbon__panel > * { position: relative; }

.carbon__copy {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.carbon__head { display: flex; flex-direction: column; gap: 8px; }

.carbon__title {
  font-size: clamp(2.5rem, 1.8rem + 2.4vw, 4rem); /* 64px */
  font-weight: var(--fw-medium);
  line-height: 1.2;
  background: linear-gradient(177deg, #5ee38d 0%, #00a86b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.carbon__subtitle {
  font-size: var(--fs-h3); /* 32px */
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
  color: #fff;
}

/* chips scure: riusa .sol-chip con override */
.carbon .sol-card__list { align-items: flex-start; }
.carbon .sol-chip {
  width: auto;
  border-color: #fff;
  color: #fff;
}

.carbon__media {
  flex-shrink: 0;
  width: 45%;
  max-width: 620px;
}
.carbon__media img { display: block; width: 100%; height: auto; }

/* ---- Barra early-bird verde ---- */
.carbon__earlybird {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 49px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 40px 40px;
  background: linear-gradient(178.48deg, #5ee38d 0%, #00a86b 100%);
  color: #fff;
}
.carbon__earlybird .earlybird__gift { width: 32px; height: 32px; flex-shrink: 0; }
.carbon__eb-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}
.carbon__eb-text { max-width: 316px; }
.carbon__eb-caption { font-size: var(--fs-body); line-height: 1.2; }
.carbon__eb-title { font-size: var(--fs-p20); font-weight: var(--fw-bold); line-height: 1.2; }
.carbon__eb-right { display: flex; align-items: center; gap: 40px; flex-shrink: 0; }
.carbon__eb-offer { display: flex; align-items: center; gap: 40px; }
.carbon__eb-validity { font-size: var(--fs-body); line-height: 1.2; text-align: center; white-space: nowrap; }
.carbon__eb-validity strong { font-weight: var(--fw-bold); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .carbon__panel { flex-direction: column; align-items: flex-start; }
  .carbon__media { width: 100%; max-width: 620px; align-self: center; }
  .carbon__eb-main { flex-direction: column; align-items: center; text-align: center; }
  .carbon__eb-text { max-width: none; }
  .carbon__earlybird { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
  .carbon__eb-right { flex-direction: column; gap: 16px; }
  .carbon__eb-offer { flex-direction: column; gap: 8px; }
  .carbon__eb-validity { white-space: normal; }
}

@media (max-width: 720px) {
  .carbon__panel { padding: 24px; gap: 32px; }
  .carbon__copy { gap: 32px; }
  .carbon__earlybird { padding: 16px 24px; }
  .carbon__eb-caption,
  .carbon__eb-title { line-height: 1.35; }
  .carbon .sol-chip { font-size: var(--fs-body); line-height: 1.35; }
}
