.tabs {
  display: flex;
  margin: 20px 0;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-weight: 700;
  flex-wrap: wrap;
}

.tab-button {
  color: #2e2e2e;
  display: inline-block;
  max-width: 250px;
  padding: 20px 10px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  position: relative;
  background-color: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-transform: none;
}

.tab-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #fff;
}

.mtsj {
  background-color: #ff9bb8;
}

.mtdj {
  background-color: #8bb8ee;
}

.mtd {
  background-color: #d4e3be;
}

.pjpi {
  background-color: #ffc588;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.tab-button.mtsj.active::after {
  background-color: #ff9bb8;
}

.tab-button.mtdj.active::after {
  background-color: #8bb8ee;
}

.tab-button.mtd.active::after {
  background-color: #d4e3be;
}

.tab-button.pjpi.active::after {
  background-color: #ffc588;
}

.tab-content-jud {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  padding: 20px;
  border-radius: 10px;
  /* background-color: #f5f5f5; */
  margin-top: 50px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  pointer-events: none;
  position: relative;
}

.tab-content-jud.active-tab {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.title-magistraturas {
  text-align: center;
  margin-bottom: 40px;
  padding: 1em;
  line-height: 1.3;
  border-radius: 8px;
  word-wrap: break-word;
}

.mtsj-gradient {
  background: linear-gradient(
    to right,
    transparent,
    #ff9bb8 30%,
    #ff9bb8 70%,
    transparent
  );
}

.mtdj-gradient {
  background: linear-gradient(
    to right,
    transparent,
    #8bb8ee 30%,
    #8bb8ee 70%,
    transparent
  );
}

.mtd-gradient {
  background: linear-gradient(
    to right,
    transparent,
    #d4e3be 30%,
    #d4e3be 70%,
    transparent
  );
}

.pjpi-gradient {
  background: linear-gradient(
    to right,
    transparent,
    #ffc588 30%,
    #ffc588 70%,
    transparent
  );
}

.info-box-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-box {
  width: 75%;
  background-color: #f9f9f9;
  border-left: 4px solid #7e3f97;
  padding: 15px 20px;
  margin-top: 50px;
  font-size: 16px;
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: 6px;
  text-align: right;
}

.info-box span.label {
  font-weight: bold;
  color: #000;
}

/* RESPONSIVIDAD */
@media (min-width: 768px) {
  .tab-button.active::after {
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 5px;
  }
}

@media (max-width: 767px) {
  .tabs {
    display: flex;
    flex-direction: column;
  }

  .tab-button.active::after {
    top: 0;
    left: -10px;
    width: 5px;
    height: 100%;
  }

  .title-magistraturas {
    font-size: 1.4rem;
    padding: 0.8em;
  }
}