/* Romania–Bulgaria — programme budget page */

.robg-budget-page {
  background: #f8f7f2;
}

.robg-budget {
  padding: 28px 26px 46px;
  background:
    radial-gradient(circle at 83% 15%, rgba(90, 193, 199, .12), transparent 28%),
    linear-gradient(180deg, #faf8f3 0%, #f7faf8 100%);
}

.robg-budget-inner {
  width: min(1440px, calc(100% - 20px));
  margin: 0 auto;
}

.robg-budget-breadcrumbs {
  margin-bottom: 22px;
}

.robg-budget-panel {
  position: relative;
  overflow: hidden;
  padding: 34px 38px 28px;
  border: 1px solid #dce3e4;
  border-radius: 28px;
  background: rgba(255, 253, 249, .96);
  box-shadow: 0 18px 42px rgba(25, 65, 87, .10);
}

.robg-budget-panel::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 167, 178, .10), transparent 68%);
  pointer-events: none;
}

.robg-budget-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}

.robg-budget-logo {
  width: 118px;
  height: 64px;
  object-fit: contain;
  object-position: left center;
}

.robg-budget-header h1 {
  margin: 0 0 7px;
  color: #0c467e;
  font-size: clamp(38px, 3.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -1.6px;
}

.robg-budget-header p {
  max-width: 780px;
  margin: 0;
  color: #405f7c;
  font-size: 17px;
  line-height: 1.45;
}

.robg-budget-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(310px, .9fr) minmax(280px, .75fr) minmax(330px, .85fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 32px;
}

.robg-budget-total {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: start;
  column-gap: 11px;
  min-height: 128px;
  padding: 14px 4px;
}

.robg-budget-total strong {
  color: #0b3f75;
  font-size: clamp(54px, 5.1vw, 78px);
  line-height: .92;
  letter-spacing: -3px;
}

.robg-budget-total > span {
  align-self: end;
  padding-bottom: 8px;
  color: #0b3f75;
  font-size: 28px;
  font-weight: 800;
  white-space: nowrap;
}

.robg-budget-total small {
  grid-column: 1 / -1;
  margin-top: 9px;
  color: #536c83;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.robg-budget-source {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 20px 22px;
  border: 1px solid var(--source-border);
  border-radius: 20px;
  background: var(--source-bg);
  box-shadow: 0 10px 23px rgba(25, 65, 87, .06);
}

.robg-budget-source-eu {
  --source: #145b9d;
  --source-border: #c5d9ea;
  --source-bg: rgba(244, 249, 253, .92);
}

.robg-budget-source-national {
  --source: #2a817c;
  --source-border: #c8dfda;
  --source-bg: rgba(245, 251, 248, .94);
}

.robg-budget-source-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--source) 15%, white);
  color: var(--source);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .02em;
}

.robg-budget-source strong {
  display: block;
  color: var(--source);
  font-size: 29px;
  line-height: 1.05;
}

.robg-budget-source strong small {
  font-size: 16px;
  font-weight: 750;
}

.robg-budget-source div > span {
  display: block;
  margin-top: 7px;
  color: #46637a;
  font-size: 14px;
  line-height: 1.35;
}

.robg-budget-allocation {
  position: relative;
  z-index: 1;
}

.robg-budget-allocation h2 {
  margin: 0 0 14px;
  color: #355a79;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.robg-budget-bar {
  display: flex;
  width: 100%;
  min-height: 78px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 10px 22px rgba(29, 69, 92, .08);
}

.budget-segment {
  display: grid;
  place-items: center;
  flex: 0 0 var(--segment-width);
  min-width: 0;
  color: #fff;
  font-size: clamp(13px, 1.4vw, 19px);
  font-weight: 850;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.budget-segment + .budget-segment {
  border-left: 2px solid rgba(255,255,255,.76);
}

.budget-segment-connected { background: linear-gradient(135deg, #15558f, #1b6bab); }
.budget-segment-green { background: linear-gradient(135deg, #4d8e39, #70a84e); }
.budget-segment-educated { background: linear-gradient(135deg, #158b94, #37acae); }
.budget-segment-integrated { background: linear-gradient(135deg, #d99400, #efb52c); }

.robg-budget-priorities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.budget-priority {
  --priority: #0d5d93;
  --priority-border: #c9dbe9;
  position: relative;
  min-height: 155px;
  padding: 19px 20px 18px;
  border: 1px solid var(--priority-border);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 9px 20px rgba(25, 65, 87, .05);
}

.budget-priority-connected { --priority: #16599a; --priority-border: #c4d6e7; }
.budget-priority-green { --priority: #4d8e39; --priority-border: #cadfbd; }
.budget-priority-educated { --priority: #138b95; --priority-border: #c1dfe1; }
.budget-priority-integrated { --priority: #d59600; --priority-border: #ead7a5; }

.budget-priority-heading {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 48px;
  padding-bottom: 14px;
  border-bottom: 2px solid color-mix(in srgb, var(--priority) 78%, white);
}

.budget-priority-number {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--priority);
  color: #fff;
  font-size: 24px;
  font-weight: 850;
}

.budget-priority h3 {
  margin: 0;
  color: var(--priority);
  font-size: 18px;
  line-height: 1.15;
}

.budget-priority > strong {
  display: block;
  margin-top: 18px;
  color: var(--priority);
  font-size: 31px;
  line-height: 1;
}

.budget-priority > strong small {
  font-size: 15px;
  font-weight: 800;
}

.robg-budget-note {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  margin-top: 24px;
  padding: 17px 20px;
  border: 1px solid #cbdcea;
  border-radius: 18px;
  background: #eef6fb;
  color: #244d70;
}

.robg-budget-note-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #2169a4;
  border-radius: 50%;
  color: #155a96;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 700;
}

.robg-budget-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.robg-budget-note strong {
  color: #123f6e;
}

.robg-budget-source-link {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
  color: #6a7b88;
  font-size: 12.5px;
}

.robg-budget-source-link a {
  color: #0d5d93;
  font-weight: 750;
  text-decoration: none;
}

.robg-budget-source-link a:hover,
.robg-budget-source-link a:focus-visible {
  text-decoration: underline;
}

.robg-budget-back {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 22px;
}

.robg-budget-back a {
  color: #0d5d93;
  font-weight: 750;
  text-decoration: none;
}

.robg-budget-back a:hover,
.robg-budget-back a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 1120px) {
  .robg-budget-summary {
    grid-template-columns: 1fr 1fr;
  }

  .robg-budget-total {
    grid-column: 1 / -1;
    min-height: 100px;
  }

  .robg-budget-priorities {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .robg-budget {
    padding: 20px 14px 38px;
  }

  .robg-budget-inner {
    width: 100%;
  }

  .robg-budget-panel {
    padding: 24px 18px 22px;
    border-radius: 22px;
  }

  .robg-budget-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .robg-budget-logo {
    width: 104px;
    height: 54px;
  }

  .robg-budget-header h1 {
    font-size: 39px;
  }

  .robg-budget-summary {
    grid-template-columns: 1fr;
  }

  .robg-budget-total {
    grid-column: auto;
  }

  .robg-budget-source {
    min-height: 104px;
  }

  .robg-budget-bar {
    min-height: 62px;
    border-radius: 16px;
  }

  .budget-segment {
    font-size: 11px;
  }

  .robg-budget-priorities {
    grid-template-columns: 1fr;
  }

  .budget-priority {
    min-height: 132px;
  }

  .robg-budget-source-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .robg-budget-back {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 470px) {
  .robg-budget-total strong {
    font-size: 51px;
  }

  .robg-budget-total > span {
    font-size: 22px;
  }

  .budget-segment span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}
