/* Romania–Bulgaria — programme territory page */

.robg-territory-page {
  background: #f7f7f2;
}

.robg-territory {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 30px 28px 64px;
  background:
    linear-gradient(180deg, #faf8f3 0%, #faf8f3 43%, #f4faf8 100%);
}

.robg-territory::before,
.robg-territory::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.robg-territory::before {
  top: 520px;
  left: -70px;
  width: 300px;
  height: 520px;
  background: url("../images/romania-bulgaria/territory/reeds.png") left bottom / contain no-repeat;
  opacity: .38;
}

.robg-territory::after {
  right: -40px;
  bottom: 420px;
  width: 300px;
  height: 450px;
  background: url("../images/romania-bulgaria/territory/plant-3.png") right bottom / contain no-repeat;
  opacity: .24;
}

.robg-territory-inner {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100% - 20px));
  margin: 0 auto;
}

.robg-territory-breadcrumbs {
  margin-bottom: 24px;
}

.robg-territory-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(500px, .97fr);
  align-items: stretch;
  gap: 34px;
  margin-bottom: 20px;
}

.robg-territory-copy {
  max-width: 790px;
  padding: 22px 0 8px;
}

.robg-territory-copy h1 {
  margin: 0 0 18px;
  color: #0d477e;
  font-size: clamp(44px, 4.3vw, 66px);
  line-height: 1;
  letter-spacing: -2px;
}

.robg-territory-copy > p {
  max-width: 760px;
  margin: 0 0 20px;
  color: #173c61;
  font-size: 18px;
  line-height: 1.55;
}

.robg-territory-focus {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 650px;
  padding: 16px 20px;
  border: 1px solid rgba(16, 80, 127, .12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(224, 243, 249, .93), rgba(241, 248, 247, .96));
  box-shadow: 0 12px 26px rgba(18, 70, 96, .08);
  color: #123d67;
  font-weight: 650;
  line-height: 1.45;
}

.robg-territory-focus img {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.robg-territory-hero {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border-radius: 0 0 0 86px;
}

.robg-territory-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250, 248, 243, .32), rgba(250, 248, 243, 0) 32%);
}

.robg-territory-hero > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.robg-territory-birds {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 30px;
  width: 120px;
  opacity: .48;
}

.robg-territory-facts {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(760px, 62%);
  margin: -62px 0 28px auto;
  padding: 18px 12px;
  border: 1px solid rgba(24, 71, 105, .12);
  border-radius: 24px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 16px 34px rgba(18, 65, 93, .14);
  backdrop-filter: blur(8px);
}

.robg-territory-facts article {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 18px;
}

.robg-territory-facts article + article {
  border-left: 1px solid rgba(31, 75, 103, .15);
}

.robg-territory-facts img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.robg-territory-facts strong,
.robg-territory-facts span {
  display: block;
}

.robg-territory-facts strong {
  color: #0f5186;
  font-size: 30px;
  line-height: 1;
}

.robg-territory-facts article:nth-child(2) strong {
  color: #3f8647;
}

.robg-territory-facts article:nth-child(3) strong {
  color: #cf8d00;
}

.robg-territory-facts span {
  margin-top: 5px;
  color: #29465d;
  font-size: 13px;
  line-height: 1.35;
}

.robg-territory-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 285px;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 26px;
}

.robg-region-panel {
  overflow: hidden;
  border: 1px solid rgba(33, 84, 83, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 28px rgba(22, 70, 88, .10);
}

.robg-region-panel-ro {
  background: linear-gradient(180deg, rgba(236, 247, 230, .98), rgba(255, 255, 255, .95));
}

.robg-region-panel-bg {
  background: linear-gradient(180deg, rgba(231, 244, 251, .98), rgba(255, 255, 255, .95));
}

.robg-region-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 12px;
}

.robg-region-panel-heading span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #5a9b42;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.robg-region-panel-bg .robg-region-panel-heading span {
  background: #2a80ba;
}

.robg-region-panel h2 {
  margin: 0;
  color: #24723f;
  font-size: 20px;
}

.robg-region-panel-bg h2 {
  color: #0e629d;
}

.robg-region-panel ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 14px 16px;
  list-style: none;
}

.robg-region-panel li {
  display: grid;
  grid-template-columns: 24px 1fr 42px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  border-top: 1px solid rgba(46, 87, 86, .10);
  color: #183e60;
  font-size: 15px;
  font-weight: 700;
}

.robg-region-panel li:first-child {
  border-top: 0;
}

.robg-pin {
  color: #4b9a52;
  font-size: 21px;
}

.robg-region-panel-bg .robg-pin {
  color: #287fba;
}

.robg-region-panel li img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.robg-territory-schema {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(31, 87, 108, .12);
  border-radius: 28px;
  background: #f6fbfa;
  box-shadow: 0 14px 32px rgba(21, 72, 94, .11);
}

.robg-schema-landscape {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  object-position: center;
}

.robg-territory-schema::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(243, 251, 247, .14) 0%, rgba(255,255,255,0) 36%, rgba(255,255,255,0) 68%, rgba(226, 243, 250, .18) 100%);
}

.robg-schema-label {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(17, 68, 91, .13);
  backdrop-filter: blur(6px);
}

.robg-schema-label strong,
.robg-schema-label small {
  display: block;
}

.robg-schema-label strong {
  font-size: 17px;
  letter-spacing: .8px;
}

.robg-schema-label small {
  font-size: 11px;
  font-weight: 700;
  opacity: .84;
}

.robg-schema-label-north {
  top: 20px;
  left: 24px;
  color: #296d32;
  background: rgba(236, 248, 226, .92);
}

.robg-schema-label-south {
  right: 24px;
  bottom: 46px;
  color: #0d639d;
  background: rgba(228, 243, 251, .92);
}

.robg-schema-river {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 53%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border: 1px solid rgba(33, 132, 176, .20);
  border-radius: 999px;
  background: rgba(224, 247, 252, .90);
  box-shadow: 0 9px 22px rgba(22, 105, 141, .15);
  color: #0c6e9c;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.robg-schema-river img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.robg-territory-schema figcaption {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: #536a77;
  font-size: 11px;
}

.robg-territory-explainer {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr 210px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  margin: 0 auto 28px;
  padding: 18px 24px;
  border: 1px solid rgba(24, 79, 103, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 12px 26px rgba(18, 68, 91, .09);
}

.robg-territory-explainer-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #e5f3f7;
  color: #0e5689;
  font-size: 34px;
}

.robg-territory-explainer h2 {
  margin: 0 0 6px;
  color: #0d477e;
  font-size: 21px;
}

.robg-territory-explainer p {
  margin: 0;
  color: #29475f;
  font-size: 15px;
  line-height: 1.5;
}

.robg-territory-explainer > img {
  width: 210px;
  height: 96px;
  object-fit: contain;
  object-position: right bottom;
}

.robg-territory-checks {
  padding: 20px 18px 14px;
  border: 1px solid rgba(87, 108, 73, .13);
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(252, 247, 236, .95), rgba(255, 255, 255, .97));
  box-shadow: 0 12px 28px rgba(68, 77, 58, .08);
}

.robg-territory-checks > h2 {
  margin: 0 0 18px;
  color: #183b55;
  font-size: 22px;
}

.robg-territory-check-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.robg-territory-check-grid article {
  min-width: 0;
  padding: 6px 16px 14px;
  border-left: 1px solid rgba(39, 73, 91, .13);
}

.robg-territory-check-grid article:first-child {
  border-left: 0;
}

.robg-territory-check-grid img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.robg-territory-check-grid h3 {
  min-height: 54px;
  margin: 7px 0 6px;
  color: #164a76;
  font-size: 15px;
  line-height: 1.3;
}

.robg-territory-check-grid p {
  margin: 0;
  color: #39546a;
  font-size: 12px;
  line-height: 1.45;
}

.robg-territory-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  overflow: hidden;
  margin-bottom: 0;
  border-radius: 0 0 24px 24px;
  background: #fff;
}

.robg-territory-gallery figure {
  position: relative;
  min-height: 175px;
  overflow: hidden;
  margin: 0;
}

.robg-territory-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.robg-territory-gallery figure:hover img {
  transform: scale(1.035);
}

.robg-territory-gallery figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(8, 51, 86, .76);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(4px);
}

.robg-territory-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 24px 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(22, 78, 114, .14);
  border-radius: 18px;
  background: #e8f4fa;
}

.robg-territory-note strong,
.robg-territory-note span {
  display: block;
}

.robg-territory-note strong {
  margin-bottom: 4px;
  color: #0e4d7d;
  font-size: 16px;
}

.robg-territory-note span {
  color: #38566d;
  font-size: 13px;
  line-height: 1.45;
}

.robg-territory-note a {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: #145c96;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.robg-territory-back {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin: 26px 0 8px;
}

.robg-territory-back a {
  color: #0e6298;
  font-weight: 800;
  text-decoration: none;
}

.robg-territory-back a:hover,
.robg-territory-note a:hover {
  opacity: .85;
}

@media (max-width: 1260px) {
  .robg-territory-intro {
    grid-template-columns: 1fr 470px;
  }

  .robg-territory-layout {
    grid-template-columns: 240px minmax(0, 1fr) 250px;
  }

  .robg-territory-check-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 0;
  }

  .robg-territory-check-grid article:nth-child(4) {
    border-left: 0;
  }
}

@media (max-width: 1020px) {
  .robg-territory-intro {
    grid-template-columns: 1fr;
  }

  .robg-territory-hero {
    min-height: 260px;
    border-radius: 28px;
  }

  .robg-territory-facts {
    width: 100%;
    margin: -40px 0 26px;
  }

  .robg-territory-layout {
    grid-template-columns: 1fr 1fr;
  }

  .robg-territory-schema {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 430px;
  }

  .robg-region-panel-ro,
  .robg-region-panel-bg {
    grid-row: 2;
  }

  .robg-territory-explainer {
    grid-template-columns: 68px 1fr;
  }

  .robg-territory-explainer > img {
    display: none;
  }

  .robg-territory-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .robg-territory-gallery figure:nth-child(4),
  .robg-territory-gallery figure:nth-child(5) {
    min-height: 150px;
  }
}

@media (max-width: 760px) {
  .robg-territory {
    padding: 24px 16px 46px;
  }

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

  .robg-territory-copy h1 {
    font-size: 43px;
    letter-spacing: -1.4px;
  }

  .robg-territory-copy > p {
    font-size: 16px;
  }

  .robg-territory-focus {
    align-items: flex-start;
  }

  .robg-territory-hero {
    min-height: 210px;
  }

  .robg-territory-facts {
    grid-template-columns: 1fr;
    margin-top: -24px;
  }

  .robg-territory-facts article {
    padding: 12px 16px;
  }

  .robg-territory-facts article + article {
    border-top: 1px solid rgba(31, 75, 103, .15);
    border-left: 0;
  }

  .robg-territory-layout {
    grid-template-columns: 1fr;
  }

  .robg-territory-schema,
  .robg-region-panel-ro,
  .robg-region-panel-bg {
    grid-column: auto;
    grid-row: auto;
  }

  .robg-territory-schema {
    min-height: 360px;
  }

  .robg-schema-landscape {
    min-height: 360px;
  }

  .robg-schema-river {
    max-width: calc(100% - 28px);
    white-space: normal;
    text-align: center;
  }

  .robg-schema-label {
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
  }

  .robg-schema-label-south {
    align-items: flex-end;
  }

  .robg-territory-explainer {
    grid-template-columns: 1fr;
  }

  .robg-territory-check-grid {
    grid-template-columns: 1fr;
  }

  .robg-territory-check-grid article,
  .robg-territory-check-grid article:nth-child(4) {
    border-top: 1px solid rgba(39, 73, 91, .13);
    border-left: 0;
  }

  .robg-territory-check-grid article:first-child {
    border-top: 0;
  }

  .robg-territory-check-grid h3 {
    min-height: 0;
  }

  .robg-territory-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .robg-territory-gallery figure {
    min-height: 160px;
  }

  .robg-territory-note {
    align-items: stretch;
    flex-direction: column;
  }

  .robg-territory-note a {
    text-align: center;
  }

  .robg-territory-back {
    align-items: center;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
/* =========================================================
   ROBG territory — compact desktop layout
   ========================================================= */

@media (min-width: 1261px) {
  .robg-territory {
    padding-top: 26px;
    padding-bottom: 52px;
  }

  .robg-territory-inner {
    width: min(1320px, calc(100% - 52px));
  }

  .robg-territory-breadcrumbs {
    margin-bottom: 18px;
  }

  .robg-territory-intro {
    grid-template-columns: minmax(0, 0.96fr) minmax(480px, 1.04fr);
    gap: 28px;
    margin-bottom: 14px;
  }

  .robg-territory-copy {
    max-width: 680px;
    padding-top: 16px;
  }

  .robg-territory-copy h1 {
    margin-bottom: 15px;
    font-size: clamp(46px, 3.8vw, 60px);
  }

  .robg-territory-copy > p {
    max-width: 670px;
    margin-bottom: 16px;
    font-size: 17px;
    line-height: 1.5;
  }

  .robg-territory-focus {
    max-width: 620px;
    padding: 14px 18px;
  }

  .robg-territory-focus img {
    width: 50px;
    height: 50px;
  }

  .robg-territory-hero {
    min-height: 270px;
  }

  .robg-territory-facts {
    width: 710px;
    margin: -54px 0 22px auto;
    padding: 14px 10px;
  }

  .robg-territory-facts article {
    grid-template-columns: 50px 1fr;
    padding: 0 14px;
  }

  .robg-territory-facts img {
    width: 48px;
    height: 48px;
  }

  .robg-territory-facts strong {
    font-size: 27px;
  }

  .robg-territory-layout {
    grid-template-columns: 230px minmax(0, 1fr) 240px;
    gap: 16px;
    margin-bottom: 22px;
  }

  .robg-region-panel-heading {
    padding: 15px 16px 10px;
  }

  .robg-region-panel h2 {
    font-size: 18px;
  }

  .robg-region-panel ul {
    padding: 0 12px 13px;
  }

  .robg-region-panel li {
    grid-template-columns: 20px 1fr 36px;
    min-height: 49px;
    font-size: 14px;
  }

  .robg-region-panel li img {
    width: 34px;
    height: 34px;
  }

  .robg-territory-schema,
  .robg-schema-landscape {
    min-height: 430px;
  }

  .robg-territory-explainer {
    grid-template-columns: 66px 1fr 180px;
    margin-bottom: 22px;
    padding: 15px 20px;
  }

  .robg-territory-explainer-icon {
    width: 56px;
    height: 56px;
    font-size: 29px;
  }

  .robg-territory-explainer > img {
    width: 180px;
    height: 82px;
  }

  .robg-territory-checks {
    padding: 17px 15px 12px;
  }

  .robg-territory-checks > h2 {
    margin-bottom: 14px;
    font-size: 20px;
  }

  .robg-territory-check-grid article {
    padding: 4px 12px 12px;
  }

  .robg-territory-check-grid img {
    width: 48px;
    height: 48px;
  }

  .robg-territory-check-grid h3 {
    min-height: 49px;
    margin-top: 5px;
    font-size: 14px;
  }

  .robg-territory-gallery figure {
    min-height: 155px;
  }

  .robg-territory-note {
    margin-top: 20px;
    margin-bottom: 14px;
    padding: 15px 18px;
  }

  .robg-territory-back {
    margin-top: 22px;
  }
}
/* =========================================================
   ROBG territory — final compact desktop composition
   ========================================================= */

@media (min-width: 1261px) {
  .robg-territory {
    padding-top: 22px;
    padding-bottom: 38px;
  }

  .robg-territory-inner {
    width: min(1460px, calc(100% - 40px));
  }

  .robg-territory-breadcrumbs {
    margin-bottom: 12px;
  }

  /* Горна част */
  .robg-territory-intro {
    grid-template-columns: minmax(0, 0.92fr) minmax(560px, 1.08fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 0;
  }

  .robg-territory-copy {
    max-width: 680px;
    padding-top: 6px;
  }

  .robg-territory-copy h1 {
    max-width: 590px;
    margin-bottom: 10px;
    font-size: clamp(44px, 3.2vw, 56px);
    line-height: 1;
  }

  .robg-territory-copy > p {
    max-width: 680px;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.42;
  }

  .robg-territory-focus {
    max-width: 620px;
    gap: 12px;
    padding: 11px 15px;
  }

  .robg-territory-focus img {
    width: 44px;
    height: 44px;
  }

  .robg-territory-hero {
    min-height: 230px;
  }

  /* Трите числа под снимката */
  .robg-territory-facts {
    width: 690px;
    margin: -46px 0 16px auto;
    padding: 10px 8px;
  }

  .robg-territory-facts article {
    grid-template-columns: 44px 1fr;
    gap: 9px;
    padding: 0 12px;
  }

  .robg-territory-facts img {
    width: 42px;
    height: 42px;
  }

  .robg-territory-facts strong {
    font-size: 25px;
  }

  .robg-territory-facts small {
    font-size: 11.5px;
    line-height: 1.3;
  }

  /* Окръзи + схема + области */
  .robg-territory-layout {
    grid-template-columns: 205px minmax(0, 1fr) 215px;
    gap: 12px;
    margin-bottom: 12px;
  }

  .robg-region-panel-heading {
    padding: 12px 12px 8px;
  }

  .robg-region-panel h2 {
    font-size: 17px;
  }

  .robg-region-panel ul {
    padding: 0 10px 10px;
  }

  .robg-region-panel li {
    grid-template-columns: 18px 1fr 32px;
    min-height: 41px;
    font-size: 13.5px;
  }

  .robg-region-panel li img {
    width: 30px;
    height: 30px;
  }

  .robg-territory-schema,
  .robg-schema-landscape {
    min-height: 360px;
    height: 360px;
  }

  /* Обяснителният панел */
  .robg-territory-explainer {
    grid-template-columns: 50px 1fr 140px;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
  }

  .robg-territory-explainer-icon {
    width: 46px;
    height: 46px;
    font-size: 25px;
  }

  .robg-territory-explainer h2 {
    margin-bottom: 3px;
    font-size: 18px;
  }

  .robg-territory-explainer p {
    font-size: 13.5px;
    line-height: 1.38;
  }

  .robg-territory-explainer > img {
    width: 140px;
    height: 62px;
  }

  /* Практически проверки */
  .robg-territory-checks {
    padding: 12px 12px 8px;
  }

  .robg-territory-checks > h2 {
    margin-bottom: 10px;
    font-size: 18px;
  }

  .robg-territory-check-grid article {
    padding: 0 10px 8px;
  }

  .robg-territory-check-grid img {
    width: 42px;
    height: 42px;
  }

  .robg-territory-check-grid h3 {
    min-height: 42px;
    margin-top: 3px;
    font-size: 13.5px;
    line-height: 1.25;
  }

  .robg-territory-check-grid p {
    font-size: 12px;
    line-height: 1.35;
  }

  /* Долната галерия */
  .robg-territory-gallery figure {
    min-height: 125px;
  }

  .robg-territory-gallery figure > img {
    height: 125px;
  }

  .robg-territory-gallery figcaption {
    font-size: 12px;
  }

  .robg-territory-note {
    margin-top: 14px;
    margin-bottom: 8px;
    padding: 12px 14px;
  }

  .robg-territory-back {
    margin-top: 14px;
  }
}