.wp-core-organograma-v2 {
  margin: 0;
}

.wp-core-organograma-v2__title {
  text-align: center;
  margin: 0 0 36px;
  color: var(--color-primary, #30529c);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wp-core-org-chip {
  position: relative;
  z-index: 2;
  border: 1.5px solid color-mix(in srgb, var(--color-primary, #30529c) 40%, white);
  border-radius: 999px;
  background: var(--surface, #f6f7f9);
  color: var(--color-secondary, #111529);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  line-height: 1.2;
  text-align: center;
  font-size: 15px;
}

.wp-core-org-chip.is-primary {
  background: var(--color-primary, #30529c);
  border-color: var(--color-primary, #30529c);
  color: var(--color-white, #fffefc);
  font-weight: 700;
  font-size: 18px;
  padding: 13px 22px;
}

.wp-core-org-chip.is-sub {
  font-size: 14px;
  min-height: 56px;
}

.wp-core-org-header {
  display: grid;
  gap: 18px;
  margin-bottom: 48px;
  position: relative;
}

.wp-core-org-header__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  gap: 14px;
  padding-top: 8px;
  align-items: center;
}

.wp-core-org-header__row::before {
  content: "";
  position: absolute;
  top: calc(50% + 4px);
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--color-primary, #30529c);
  transform: translateY(-50%);
  z-index: 0;
}

.wp-core-org-header__row > .wp-core-org-chip {
  min-width: 300px;
}

.wp-core-org-header__row > .wp-core-org-chip:nth-child(2) {
  min-width: 380px;
}

.wp-core-org-chip.is-top,
.wp-core-org-chip.is-bottom {
  width: min(420px, 100%);
  justify-self: center;
}

.wp-core-org-chip.is-top {
  position: relative;
}

.wp-core-org-chip.is-top::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 28px;
  background: var(--color-primary, #30529c);
  transform: translateX(-50%);
}

.wp-core-org-chip.is-bottom {
  position: relative;
}

.wp-core-org-chip.is-bottom::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 2px;
  height: 22px;
  background: var(--color-primary, #30529c);
  transform: translateX(-50%);
}

.wp-core-org-sections {
  display: grid;
  gap: 56px;
}

.wp-core-org-section {
  position: relative;
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.wp-core-org-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -49px;
  width: 2px;
  height: 62px;
  background: var(--color-primary, #30529c);
  transform: translateX(-50%);
}

.wp-core-org-section__center {
  width: min(360px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.wp-core-org-section__center::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 20px;
  background: var(--color-primary, #30529c);
  transform: translateX(-50%);
}

.wp-core-org-section__branches {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-top: 30px;
  width: min(100%, var(--org-branches-width, 1030px));
  margin: 0 auto;
}

.wp-core-org-section__branches::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--color-primary, #30529c);
  z-index: 0;
}

.wp-core-org-section__branches .wp-core-org-chip {
  position: relative;
  z-index: 1;
  flex: 0 1 240px;
  min-width: 190px;
  max-width: 320px;
}

@media (max-width: 1180px) {
  .wp-core-org-header__row {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  .wp-core-org-header__row::before {
    display: none;
  }

  .wp-core-org-header__row > .wp-core-org-chip,
  .wp-core-org-header__row > .wp-core-org-chip:nth-child(2) {
    min-width: 0;
    width: 100%;
  }

  .wp-core-org-section {
    gap: 10px;
  }

  .wp-core-org-section::before,
  .wp-core-org-section__center::after,
  .wp-core-org-section__branches::before {
    display: none;
  }

  .wp-core-org-section__branches {
    gap: 10px;
    padding-top: 0;
    width: 100%;
  }

  .wp-core-org-section__branches .wp-core-org-chip {
    flex-basis: 100%;
    max-width: 100%;
  }
}
