/* ==========================================================================
   Balkan Candidate — Page specific blocks
   ========================================================================== */

/* --------------------------------------------------------------------------
   Homepage: problem cards
   -------------------------------------------------------------------------- */

.problem-card {
  border-top: 3px solid var(--color-yellow);
}

.problem-card .card-icon {
  margin-bottom: var(--space-1);
}

/* --------------------------------------------------------------------------
   Category cards (candidate categories)
   -------------------------------------------------------------------------- */

.category-card {
  gap: var(--space-4);
}

.category-card .category-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.category-card .category-roles span {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-blue);
}

/* --------------------------------------------------------------------------
   Profession / industry list grid
   -------------------------------------------------------------------------- */

.list-group {
  margin-top: var(--space-6);
}

.list-group h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}

.link-tile {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid rgba(209, 221, 236, 0.92);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-navy);
  transition: border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.profession-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f8ff, var(--color-blue-soft));
  color: var(--color-blue);
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.profession-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profession-icon--care {
  background: var(--color-yellow-soft);
  color: #9a7007;
}

.link-tile::after {
  content: "\2192";
  margin-left: auto;
  color: var(--color-blue);
  transition: transform var(--transition);
}

.link-tile > .info-box-icon {
  margin-right: 0.05rem;
}

.related-item > .info-box-icon {
  margin-bottom: var(--space-3);
}

.link-tile:hover {
  border-color: var(--color-blue-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  color: var(--color-navy);
}

.link-tile:hover .profession-icon {
  color: var(--color-white);
  background: var(--color-blue);
  transform: scale(1.04);
}

.link-tile:hover .profession-icon--care {
  color: var(--color-navy);
  background: var(--color-yellow);
}

.link-tile:focus-visible {
  border-color: var(--color-blue-bright);
  box-shadow: var(--shadow-card);
}

.link-tile:hover::after {
  transform: translateX(3px);
}

.link-tile[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Specialized resources (cross-domain)
   -------------------------------------------------------------------------- */

.specialized-panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface-blue);
  border: 1px solid var(--color-border);
}

.specialized-panel h2 {
  font-size: var(--fs-lg);
}

.specialized-list {
  display: grid;
  gap: var(--space-3);
}

.specialized-list a {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}

.specialized-list a:hover {
  text-decoration: underline;
}

.specialized-list .domain-note {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Platform / process panel
   -------------------------------------------------------------------------- */

.process-panel {
  background:
    radial-gradient(circle at 85% 18%, rgba(40, 100, 199, 0.5), transparent 26%),
    var(--color-navy);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-9));
  color: var(--color-text-light);
  position: relative;
  overflow: hidden;
}

.process-panel::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -45%;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(40, 100, 199, 0.5),
    rgba(16, 42, 86, 0) 70%
  );
}

.process-panel > * {
  position: relative;
}

.process-panel h2 {
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Comparison block (platform vs agency)
   -------------------------------------------------------------------------- */

.compare-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.compare-col {
  background: var(--color-surface);
  border: 1px solid rgba(209, 221, 236, 0.9);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.compare-col--highlight {
  border-color: rgba(247, 201, 72, 0.6);
  box-shadow: var(--shadow-card);
}

.compare-col h3 {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   Guide cards
   -------------------------------------------------------------------------- */

.guide-card {
  gap: var(--space-3);
}

.guide-card .guide-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   Country page
   -------------------------------------------------------------------------- */

.fact-list {
  display: grid;
  gap: var(--space-4);
}

.fact-item {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.fact-item > .info-box-icon {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  width: 34px;
  height: 34px;
}

.fact-item > .info-box-icon svg {
  width: 18px;
  height: 18px;
}

.fact-item dt,
.fact-item dd {
  padding-left: 48px;
}

.fact-item dt {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.fact-item dd {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  box-shadow: var(--shadow-card);
}

.contact-aside {
  display: grid;
  gap: var(--space-5);
}

.contact-detail {
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--color-surface-blue);
  border: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.contact-detail h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-2);
}

.contact-detail address {
  font-style: normal;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Legal pages
   -------------------------------------------------------------------------- */

.legal-body {
  max-width: 76ch;
}

.legal-body h2 {
  margin-top: var(--space-8);
}

.legal-body h3 {
  margin-top: var(--space-5);
}

.legal-meta {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   Site map / all categories index
   -------------------------------------------------------------------------- */

.index-columns {
  columns: 240px 3;
  column-gap: var(--space-6);
}

.index-columns li {
  break-inside: avoid;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Homepage: country origin panel
   -------------------------------------------------------------------------- */

.country-origin-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 50%, rgba(36, 104, 213, 0.10), transparent 25rem),
    linear-gradient(110deg, #f9fbff 0%, #f1f6ff 100%);
}

.country-origin-section .container {
  position: relative;
}

.country-origin-section .section-head {
  margin-bottom: var(--space-6);
}

.section-kicker {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--color-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.country-origin-section .section-head::before {
  width: 56px;
  height: 5px;
  margin-bottom: var(--space-3);
  background: linear-gradient(90deg, #f7c948, #ff9f1c);
}

.country-origin-section .checklist {
  gap: 0.78rem;
}

.country-origin-section .checklist li {
  padding: 0.7rem 0.8rem 0.7rem 2.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(183, 207, 242, 0.58);
}

.country-origin-section .checklist li::before {
  left: 0.8rem;
  top: 0.85rem;
}

.country-origin-section .checklist li::after {
  left: 1.14rem;
  top: 1.12rem;
}

.country-origin-link {
  margin-top: var(--space-5) !important;
}

.country-origin-cards {
  display: grid;
  gap: 1rem;
  align-content: center;
}

.country-origin-card {
  position: relative;
  display: flex;
  min-height: 176px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.25rem;
  border-radius: 18px;
  color: var(--color-white);
  isolation: isolate;
  box-shadow: 0 16px 36px rgba(16, 42, 86, 0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}

.country-origin-card::before,
.country-origin-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.country-origin-card::before {
  width: 170px;
  height: 170px;
  top: -78px;
  right: -30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.country-origin-card::after {
  right: -6px;
  bottom: -42px;
  width: 158px;
  height: 102px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-28deg);
}

.country-origin-card--bosnia {
  background: linear-gradient(125deg, #0648a8 0%, #0b63cf 100%);
}

.country-origin-card--serbia {
  background: linear-gradient(125deg, #b91e38 0%, #d5354e 48%, #173d80 160%);
}

.country-origin-card:hover {
  color: var(--color-white);
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(16, 42, 86, 0.24);
}

.country-origin-card:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 4px;
}

.country-origin-card__top,
.country-origin-card__body {
  display: flex;
  align-items: center;
}

.country-origin-card__top {
  gap: 0.7rem;
}

.country-origin-card__eyebrow,
.country-origin-card__label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.country-origin-card__eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.country-origin-card__body {
  justify-content: space-between;
  gap: var(--space-4);
}

.country-origin-card__body strong {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.country-origin-card__arrow {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.2rem;
  transition: transform var(--transition), background var(--transition);
}

.country-origin-card:hover .country-origin-card__arrow {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(4px);
}

.country-origin-card__label {
  color: rgba(255, 255, 255, 0.8);
}

.country-flag {
  display: block;
  width: 2.75rem;
  height: 1.85rem;
  flex: 0 0 auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(5, 21, 52, 0.2);
}

@media (max-width: 899px) {
  .country-origin-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .country-origin-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .country-origin-card {
    min-height: 158px;
  }
}

/* --------------------------------------------------------------------------
   Country pages: flag and map hero
   -------------------------------------------------------------------------- */

.country-page-hero .page-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(238px, 0.78fr);
  align-items: center;
  gap: clamp(var(--space-5), 5vw, var(--space-9));
  min-height: 360px;
}

.country-page-hero .page-hero-inner {
  max-width: 660px;
}

.country-hero-visual {
  position: relative;
  display: grid;
  width: min(100%, 300px);
  aspect-ratio: 1 / 1;
  margin: 0 0 0 auto;
  place-items: center;
  isolation: isolate;
}

.country-hero-visual::before,
.country-hero-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
}

.country-hero-visual::before {
  inset: 4%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 42px rgba(3, 17, 44, 0.3);
}

.country-hero-visual::after {
  width: 106%;
  height: 106%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.country-hero-map {
  display: block;
  width: 79%;
  height: 79%;
  object-fit: contain;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: #dce8fa;
  box-shadow: 0 14px 26px rgba(3, 17, 44, 0.26);
  filter: grayscale(1) sepia(1) saturate(3) hue-rotate(165deg) brightness(0.9) contrast(1.08);
}

.country-hero-visual--bosnia .country-hero-map,
.country-hero-visual--north-macedonia .country-hero-map,
.country-hero-visual--albania .country-hero-map {
  transform: rotate(-4deg);
}

.country-hero-visual--serbia .country-hero-map,
.country-hero-visual--kosovo .country-hero-map,
.country-hero-visual--montenegro .country-hero-map {
  transform: rotate(4deg);
}

.country-hero-flag {
  position: absolute;
  top: 4%;
  left: -5%;
  display: block;
  width: clamp(4.5rem, 9vw, 5.6rem);
  padding: 0.33rem;
  border-radius: 9px;
  background: var(--color-white);
  box-shadow: 0 10px 20px rgba(3, 17, 44, 0.28);
  transform: rotate(-8deg);
}

.country-hero-flag img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.country-hero-visual--bosnia::before {
  background: rgba(48, 120, 230, 0.22);
}

.country-hero-visual--serbia::before {
  background: rgba(209, 57, 80, 0.19);
}

.country-hero-visual--north-macedonia::before {
  background: rgba(248, 201, 37, 0.2);
}

.country-hero-visual--kosovo::before {
  background: rgba(47, 117, 218, 0.22);
}

.country-hero-visual--albania::before {
  background: rgba(210, 57, 68, 0.2);
}

.country-hero-visual--montenegro::before {
  background: rgba(190, 43, 49, 0.2);
}

@media (max-width: 720px) {
  .country-page-hero .page-hero-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .country-hero-visual {
    width: min(100%, 260px);
    margin: 0 auto var(--space-7);
  }
}

/* --------------------------------------------------------------------------
   Western Balkans hub — futuristic map watermark behind the country grid
   -------------------------------------------------------------------------- */

.section--wb-map {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Inline interactive map, anchored right, behind the tiles */
.wb-map-figure {
  position: absolute;
  top: 50%;
  right: -3%;
  transform: translateY(-50%);
  width: min(560px, 52%);
  aspect-ratio: 93 / 84;
  opacity: 0.92;
  z-index: 0;
  pointer-events: none;               /* only the country shapes opt back in */
}

.wb-map-figure svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Heading + tiles sit above the map */
.section--wb-map .section-head,
.section--wb-map .country-grid {
  position: relative;
  z-index: 1;
}

/* Hover a country tile -> light its node on the map (needs :has support) */
.section--wb-map:has(.country-tile[data-country="ba"]:hover) .wb-country[data-c="ba"] .wb-node { fill: #f7c948; }
.section--wb-map:has(.country-tile[data-country="rs"]:hover) .wb-country[data-c="rs"] .wb-node { fill: #f7c948; }
.section--wb-map:has(.country-tile[data-country="mk"]:hover) .wb-country[data-c="mk"] .wb-node { fill: #f7c948; }
.section--wb-map:has(.country-tile[data-country="xk"]:hover) .wb-country[data-c="xk"] .wb-node { fill: #f7c948; }
.section--wb-map:has(.country-tile[data-country="al"]:hover) .wb-country[data-c="al"] .wb-node { fill: #f7c948; }
.section--wb-map:has(.country-tile[data-country="me"]:hover) .wb-country[data-c="me"] .wb-node { fill: #f7c948; }
.section--wb-map:has(.country-tile[data-country="hr"]:hover) .wb-country[data-c="hr"] .wb-node { fill: #f7c948; }

.section--wb-map:has(.country-tile[data-country="ba"]:hover) .wb-country[data-c="ba"] .wb-ring,
.section--wb-map:has(.country-tile[data-country="rs"]:hover) .wb-country[data-c="rs"] .wb-ring,
.section--wb-map:has(.country-tile[data-country="mk"]:hover) .wb-country[data-c="mk"] .wb-ring,
.section--wb-map:has(.country-tile[data-country="xk"]:hover) .wb-country[data-c="xk"] .wb-ring,
.section--wb-map:has(.country-tile[data-country="al"]:hover) .wb-country[data-c="al"] .wb-ring,
.section--wb-map:has(.country-tile[data-country="me"]:hover) .wb-country[data-c="me"] .wb-ring,
.section--wb-map:has(.country-tile[data-country="hr"]:hover) .wb-country[data-c="hr"] .wb-ring {
  stroke: #f7c948;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .wb-map-figure {
    width: 78%;
    right: -12%;
    opacity: 0.4;
  }
}
