.cbc-pie-chart {
  font-family: var(--text-font-family, "Space Grotesk", sans-serif);
}

.cbc-pie-chart__container {
  display: flex;
  flex-direction: column;
  gap: var(--space-l, 40px);
}

.cbc-pie-chart__general-title {
  font-family: var(--heading-font-family, var(--text-font-family, "Space Grotesk", sans-serif));
  font-size: 54px;
  font-weight: 500;
  line-height: 64px;
  max-width: 846px;
  text-align: center;
  align-self: center;
  margin: 0 0 calc(120px - var(--space-l, 40px)) 0;
}

.cbc-pie-chart__title {
  font-family: var(--heading-font-family, var(--text-font-family, "Space Grotesk", sans-serif));
  font-size: 32px;
  font-weight: 500;
  line-height: 1.375;
  margin: 0;
}

.cbc-pie-chart__grid {
  display: flex;
  flex-direction: row;
  gap: var(--space-xl, 80px);
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* LEFT: Chart Area */
.cbc-pie-chart__left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.cbc-pie-chart__figure-wrapper {
  width: 382px;
  height: 382px;
  position: relative;
}

.cbc-pie-chart__figure {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
}

.cbc-pie-chart__borders-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.cbc-pie-chart__slice-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.2;
  z-index: 2;
}

.cbc-pie-chart__legend {
  display: flex;
  flex-direction: row;
  gap: 40px;
  justify-content: center;
  align-items: center;
}

.cbc-pie-chart__legend-item {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.cbc-pie-chart__legend-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.cbc-pie-chart__legend-text {
  font-size: 24px;
  font-weight: 500;
  line-height: 36px;
}

/* RIGHT: Cards Area */
.cbc-pie-chart__cards {
  display: grid;
  grid-template-columns: repeat(2, 225px);
  gap: 32px 32px;
  justify-content: center;
  align-content: start;
}

.cbc-pie-chart__card {
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: center;
}

/* Tercera tarjeta centrada en su propia fila */
.cbc-pie-chart__card--full-row {
  grid-column: 1 / -1;
  max-width: 225px;
  justify-self: center;
}

.cbc-pie-chart__card-top {
  font-size: var(--text-l, 16px);
  font-weight: 500;
  line-height: 24px;
  text-transform: uppercase;
}

.cbc-pie-chart__card-value {
  font-size: 64px;
  font-weight: 700;
  line-height: 72px;
}

.cbc-pie-chart__card-unit {
  font-size: var(--text-l, 16px);
  font-weight: 500;
  line-height: 24px;
}

/* RESPONSIVE - MOBILE */
@media (max-width: 991px) {
  .cbc-pie-chart__general-title {
    font-size: 32px;
    line-height: 44px;
    margin: 0 0 calc(40px - var(--space-l, 40px)) 0;
  }

  .cbc-pie-chart__grid {
    flex-direction: column;
    gap: 40px;
  }
  
	.cbc-pie-chart__title {
	  font-size: 20px;
	  line-height: 1.2;
	}

  .cbc-pie-chart__figure-wrapper {
    width: 335px;
    height: 335px;
  }
  
  .cbc-pie-chart__slice-label {
    font-size: 32px;
    font-weight: 700;
  }

  .cbc-pie-chart__legend {
    gap: 16px;
    justify-content: space-between;
    width: 100%;
  }

  .cbc-pie-chart__legend-text {
    font-size: 20px;
    line-height: 28px;
  }

	.cbc-pie-chart__cards {
	  grid-template-columns: 1fr;
	  width: 100%;
	  gap: 16px;
	}

  .cbc-pie-chart__card {
    width: 100%;
    max-width: 100%;
  }

  .cbc-pie-chart__card--full-row {
    max-width: 100%;
  }
}
