:root {
  --navy-900: #0f2230;
  --navy-500: #294c60;
  --navy-panel: #1a3343;
  --navy-muted: #c3ced6;
  --gold-500: #e2bd6a;
  --gold-700: #8a6420;
  --gold-100: #f8f0dc;
  --light-gray: #f4f6f7;
  --gray-border: #d3dbe0;
  --border-strong: #7a8c99;
  --white: #fff;
  --ink: #14232e;
  --ink-muted: #4b5c68;
  --header-height: 109px;
  color: var(--ink);
  background: var(--light-gray);
  font: 400 17px/1.6 Manrope, system-ui, sans-serif;
}

body { margin: 0; }
.standard-header-page { --header-height: 79px; }
.standard-header {
  position: sticky;
  top: 0;
  z-index: 10;
  color: var(--white);
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.standard-header :where(.header-inner) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
}
.standard-header :where(.site-logo) {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.standard-header :where(.site-logo > img) { display: block; width: auto; height: 48px; }
.standard-header :where(.main-nav) {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px 32px;
  font-size: 16px;
  font-weight: 600;
}
.standard-header :where(.main-nav > a) {
  padding: 10px 0;
  color: var(--navy-muted);
  text-decoration: none;
}
.standard-header :where(.main-nav > a[aria-current="page"]) {
  color: var(--white);
  border-bottom: 2px solid var(--gold-500);
}
.standard-header :where(.header-actions) { display: flex; align-items: center; gap: 16px; }
.standard-header :where(.header-actions > select) {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 14px;
}
.standard-header :where(.header-actions option) { color: var(--ink); }
.standard-header :where(.header-contact) {
  display: flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 12px 38px 12px 22px;
  background: var(--gold-500);
  color: var(--navy-900);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
}

[hidden] { display: none !important; }
:target { scroll-margin-top: var(--header-height); }
a { color: var(--gold-700); }
a[href]:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { max-width: 100%; }
button:not(:disabled), select:not(:disabled) { cursor: pointer; }
button:disabled { cursor: wait; }
svg, .nav-arrow { flex-shrink: 0; }
a[data-pending-link] { cursor: default; }
:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 3px; }
:is(.site-header, #top, .family-panel, .hungary-panel, .contact-card, #contact, .site-footer) :focus-visible {
  outline-color: var(--gold-500);
}
.angled-control:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 5px var(--navy-900);
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 8px 16px;
  background: var(--white);
  clip-path: inset(50%);
}
.skip-link:focus { clip-path: none; }

.visually-hidden, .spam-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.menu-languages {
  position: relative;
  padding: 24px 16px 0;
}

.menu-languages > p {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-muted);
}

.menu-languages > div,
.menu-contacts > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.menu-languages > div > a[aria-current] {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--navy-900);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

.menu-languages > div > a:not([aria-current]) {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  box-sizing: border-box;
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.menu-contacts {
  position: relative;
  margin-top: auto;
  padding: 24px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-contacts > a:nth-of-type(1) {
  background: var(--gold-500);
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  padding: 15px 44px 15px 24px;
  min-height: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
}

.menu-contacts > a:nth-of-type(2) {
  color: var(--white);
  text-decoration: none;
  font-size: 26px;
  font-weight: 800;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.menu-contacts > div > a:nth-of-type(1),
.menu-contacts > div > a:nth-of-type(2),
.menu-contacts > div > a:nth-of-type(3) {
  text-align: center;
  border: 1px solid var(--border-strong);
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 4px;
  min-height: 44px;
  box-sizing: border-box;
}

.mobile-controls, .menu-languages, .menu-contacts, .nav-arrow, .menu-close-icon { display: none; }

.gateway-layout { display: grid; gap: 40px; }
.gateway-intro { min-width: 0; }
.hungary-route { min-width: 0; }
.hungary-route > span:nth-of-type(2) { min-width: 0; }
.country-grid, .services-grid, .insights-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

@media (min-width: 1024px) {
  .gateway-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 24px 48px;
  }
  .gateway-intro { grid-area: 1 / 1; }
  .gateway-intro > h2 { font-size: clamp(36px, 3vw, 43px); margin-bottom: 18px; }
  .gateway-intro > p:nth-of-type(2) { margin-bottom: 22px; }
  .gateway-photo {
    grid-area: 2 / 1;
    height: clamp(210px, 17vw, 246px);
    align-self: end;
    clip-path: polygon(90px 0, 100% 0, 100% 100%, 0 100%);
  }
  .hungary-panel {
    grid-area: 1 / 2 / 3;
    display: flex;
    flex-direction: column;
    padding: 32px 32px 16px;
  }
  .hungary-panel > h3 { margin-bottom: 20px; }
  .hungary-route {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(128px, 0.65fr) minmax(0, 1fr);
    align-content: center;
    gap: 8px 20px;
  }
}

.insight-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--ink);
  background: var(--light-gray);
  text-decoration: none;
}
.insight-cover {
  height: 200px;
  overflow: hidden;
  background: var(--gray-border);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 70px, 100% 100%, 0 100%);
}
.insight-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.insight-body { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 28px; }
.insight-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-700);
  font-size: 14px;
  font-weight: 700;
}
.insight-date::before {
  width: 16px;
  height: 12px;
  background: url("assets/icons/marker-vv.svg") center / contain no-repeat;
  content: "";
}
.insight-card h3 { margin: 0; font-size: 20px; line-height: 1.35; }
.insight-excerpt { margin: 0; color: var(--ink-muted); font-size: 15px; }
.insights-more { min-height: 44px; box-sizing: border-box; }

.turnstile-slot { min-width: 0; width: 100%; }
.form-status { grid-column: 1 / -1; width: 100%; margin: 0; font-size: 14px; font-weight: 700; }
.form-status:empty { display: none; }
.form-status[data-state="error"] { color: #96271e; }
.form-status[data-state="success"] { color: #205a41; }
#contact .form-status[data-state="error"] { color: #ffd9d4; }
#contact .form-status[data-state="success"] { color: #c0f3d4; }
.contact-form, .callback-form { min-width: 0; }
.contact-form label, .callback-form label { min-width: 0; }

@media (min-width: 901px) and (max-width: 1160px) {
  .hero-copy { flex-basis: 440px; }
  .hero-inner { gap: 32px; }
  .callback-form { box-sizing: border-box; flex-basis: 350px; }
  .hero-copy > h1 { font-size: clamp(48px, 5.2vw, 64px); }
}

@media (min-width: 901px) {
  .site-header .main-nav { justify-content: flex-end; }

  :is(html[lang="ru"], html[lang="hu"]) .site-header .header-inner {
    flex-wrap: nowrap;
    column-gap: clamp(12px, 2.2vw, 32px);
  }

  :is(html[lang="ru"], html[lang="hu"]) .site-header .main-nav {
    flex-basis: 0;
    min-width: 0;
    column-gap: clamp(12px, 2vw, 28px);
  }

  :is(html[lang="ru"], html[lang="hu"]) .header-contact { white-space: nowrap; }
}

@media (min-width: 901px) and (max-width: 1240px) {
  :is(html[lang="ru"], html[lang="hu"]) .site-header .header-inner { column-gap: 12px; }
  :is(html[lang="ru"], html[lang="hu"]) .site-header .site-logo > img { height: 36px; }
  :is(html[lang="ru"], html[lang="hu"]) .site-header .main-nav { column-gap: 14px; font-size: 14px; }
  :is(html[lang="ru"], html[lang="hu"]) .site-header .header-actions { gap: 8px; }
  :is(html[lang="ru"], html[lang="hu"]) .site-header .header-contact { padding-inline: 14px 26px; }
}

:is(html[lang="ru"], html[lang="hu"]) main :is(h1, h2, h3, .service-card-grid, .program-fee) {
  overflow-wrap: anywhere;
  hyphens: auto;
}

:is(html[lang="ru"], html[lang="hu"]) :is(.program-fee, .hungary-fees-list > div) > span:nth-of-type(2) {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1150px) {
  .standard-header :where(.header-inner) { gap: 12px 24px; }
  .standard-header :where(.main-nav) { gap: 4px 18px; }
}

@media (max-width: 900px) {
  :root { --header-height: 81px; font-size: 16px; }

  .main-nav, .header-actions, .hero-scrim { display: none; }
  .standard-header-page { --header-height: 73px; }
  .standard-header :where(.header-inner) {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
  }
  .standard-header :where(.main-nav, .header-actions) { display: none; }
  .mobile-controls { display: flex; align-items: center; gap: 8px; }
  .icon-control {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--white);
  }
  .menu-toggle { border: 0; background: var(--gold-500); color: var(--navy-900); }
  .header-phone img, .menu-close-icon { filter: brightness(0) invert(1); }
  .site-logo { min-width: 0; }
  .site-logo img { max-width: 100%; object-fit: contain; object-position: left; }

  body.menu-open { overflow: hidden; padding-top: var(--header-height); }
  .site-header[data-menu-open] {
    position: fixed;
    inset: 0;
    height: 100dvh;
    overflow-y: auto;
    background: var(--navy-900);
  }
  .site-header[data-menu-open]::before {
    position: fixed;
    right: -130px;
    bottom: 150px;
    width: 380px;
    aspect-ratio: 1;
    background: url("assets/logos/wbc-icon.svg") center / contain no-repeat;
    opacity: .06;
    pointer-events: none;
    content: "";
  }
  .site-header[data-menu-open] .header-inner {
    position: relative;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100%;
    box-sizing: border-box;
    gap: 0;
    padding: 0;
  }
  .site-header[data-menu-open] .site-logo {
    align-self: flex-start;
    max-width: calc(100% - 85px);
    margin: 10px 16px;
  }
  .site-header[data-menu-open] .mobile-controls { position: absolute; right: 16px; top: 18px; }
  .site-header[data-menu-open] .header-phone,
  .site-header[data-menu-open] .menu-open-icon { display: none; }
  .site-header[data-menu-open] .menu-toggle { border: 1px solid var(--border-strong); background: transparent; }
  .site-header[data-menu-open] .menu-close-icon { display: block; }
  .site-header[data-menu-open] .main-nav {
    display: flex;
    flex-direction: column;
    flex: none;
    padding: 16px 16px 0;
    border-top: 1px solid rgba(255,255,255,.08);
    gap: 0;
  }
  .site-header[data-menu-open] .main-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(255,255,255,.14);
    color: var(--white);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
  }
  .site-header[data-menu-open] .nav-arrow {
    display: block;
    filter: brightness(0) saturate(100%) invert(81%) sepia(67%) saturate(400%) hue-rotate(344deg);
  }
  .site-header[data-menu-open] .menu-languages,
  .site-header[data-menu-open] .menu-contacts { display: flex; flex-direction: column; }

  .hero-image { width: 100%; }
  .hero-inner { display: block; min-height: 0; padding: 0 16px 40px; }
  .hero-copy { max-width: none; padding: 32px 0 40px; }
  .callback-form { margin: 0; }
  .flagship-grid { grid-template-columns: minmax(0, 1fr); }
  .flagship-card > svg { width: 22px; }

  .gateway-inner { padding: 0; gap: 0; }
  .gateway-layout { gap: 0; }
  .gateway-intro { margin-bottom: 40px; }
  .hungary-route { flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 0; }
  .hungary-route > span:nth-of-type(2) { flex: initial; }
  .country-grid { grid-template-columns: minmax(0, 1fr); }

  .family-container { display: contents; }
  .family-intro { flex-direction: column; align-items: stretch; gap: 40px; }
  .family-copy, .partner-card { flex: initial; max-width: none; }
  .family-panel { display: flex; gap: 40px; padding: 0; overflow: visible; background: transparent; }
  .family-watermark { z-index: 0; }
  .family-services { display: block; }

  .services-inner, .why-inner, .insights-inner { padding: 0; }
  .services-intro { display: block; margin-bottom: 36px; }
  .services-intro > div, .services-intro > p { max-width: none; }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .why-inner { display: block; }
  .contact-inner { display: block; }
  .contact-copy { margin-bottom: 28px; }
  .contact-actions { align-items: stretch; flex-direction: column; gap: 16px; }

  .insights-inner { display: flex; flex-direction: column; }
  .insights-heading { display: contents; }
  .insights-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .insights-more { order: 1; align-self: flex-start; }
  .insight-cover {
    height: 150px;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 60px, 100% 100%, 0 100%);
  }
  .insight-body { gap: 8px; padding: 18px 20px 22px; }
  .insight-card h3 { font-size: 18px; }
  .insight-date { font-size: 13px; }
  .insight-excerpt { display: none; }
  .footer-columns { grid-template-columns: minmax(0, 1fr); }
}@media (max-width: 900px) {
  .benefit {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: start;
    gap: 0 14px;
    padding-top: 16px;
  }
  .benefit > svg { grid-row: span 2; width: 26px; height: 26px; }
  .benefit > h3 { font-size: 18px; margin: 0 0 6px; }
  .benefit > p { font-size: 15px; }
}

@media (max-width: 540px) {
  .standard-header-page { --header-height: 65px; }
  .standard-header :where(.header-inner) { padding: 10px 16px; }
  .standard-header :where(.site-logo > img) { height: 42px; }
}
