/*
  Поява блоків при прокрутці — як у Weblium: блок проявляється з прозорості
  й підлітає на 100 px за 1 с (крива ease — заміряно на живому сайті). Напрямок — з data-animation
  блоку (fade-in-bottom / top / left / right / center).

  Рух — окремою властивістю translate, а не transform: transform у вільних
  блоках уже зайнятий масштабом (--scale), і анімація збила б його.
*/
.ibja-reveal:not(.ibja-shown) { opacity: 0; visibility: hidden; }
.ibja-reveal.ibja-shown {
  animation-duration: 1s;
  animation-timing-function: ease;
  animation-fill-mode: backwards;
}
.ibja-shown[data-animation^="fade-in-bottom"] { animation-name: ibja-in-bottom; }
.ibja-shown[data-animation^="fade-in-top"] { animation-name: ibja-in-top; }
.ibja-shown[data-animation^="fade-in-left"] { animation-name: ibja-in-left; }
.ibja-shown[data-animation^="fade-in-right"] { animation-name: ibja-in-right; }
.ibja-shown[data-animation^="fade-in-center"] { animation-name: ibja-in-center; }
.ibja-shown[data-animation*=" fast_"] { animation-duration: .5s; }
.ibja-shown[data-animation*=" slow_"] { animation-duration: 2s; }
@keyframes ibja-in-bottom { from { opacity: 0; translate: 0 100px; } to { opacity: 1; translate: none; } }
@keyframes ibja-in-top { from { opacity: 0; translate: 0 -100px; } to { opacity: 1; translate: none; } }
@keyframes ibja-in-left { from { opacity: 0; translate: -100px 0; } to { opacity: 1; translate: none; } }
@keyframes ibja-in-right { from { opacity: 0; translate: 100px 0; } to { opacity: 1; translate: none; } }
@keyframes ibja-in-center { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ibja-reveal.ibja-shown { animation: none; } }

/* Картинки Weblium ховає, доки їх не «підвантажить» його скрипт. src уже в розмітці. */
.w-picture img[src] { visibility: visible !important; }

/* Вікна: Weblium показував їх інлайн-стилем зі свого скрипта. */
[data-ibja-popup]:not([hidden]) { display: block !important; position: fixed; inset: 0; overflow-y: auto; }

/*
  Розкладка Weblium «вільна»: кожен абзац стоїть на фіксованій позиції.
  Chrome на Android збільшує текст за системним розміром шрифту — і тоді
  абзаци наїжджають один на одного й на кнопки. Тримаємо задуманий розмір.
*/
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/*
  Перемикач мов. Плаваюча кнопка в лівому нижньому куті — шапку Weblium
  не чіпаємо, а на телефоні праворуч угорі вже живе меню-бургер.
  Кольори — з палітри сайту: темно-синій #2b334e, золото #e9b35c.
*/
.ibja-lang { position: fixed; left: 16px; bottom: 16px; z-index: 900; font: 500 14px/1.2 Montserrat, system-ui, sans-serif; }
.ibja-lang__btn {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  border: 1px solid rgba(233, 179, 92, .7); border-radius: 999px;
  background: rgba(43, 51, 78, .92); color: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 20, 33, .25); backdrop-filter: blur(6px);
}
.ibja-lang__btn:hover { border-color: #e9b35c; }
.ibja-lang__btn:focus-visible, .ibja-lang__list a:focus-visible { outline: 2px solid #e9b35c; outline-offset: 2px; }
.ibja-lang__btn img, .ibja-lang__list img { border-radius: 2px; flex: none; }
.ibja-lang__caret { color: #e9b35c; font-size: 12px; }
.ibja-lang__list {
  position: absolute; left: 0; bottom: calc(100% + 8px); margin: 0; padding: 6px;
  list-style: none; width: 220px; max-height: min(70vh, 520px); overflow-y: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(16, 20, 33, .28);
}
.ibja-lang__list[hidden] { display: none; }
.ibja-lang__list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #2b334e; text-decoration: none; }
.ibja-lang__list a:hover { background: #fdf4e6; }
.ibja-lang__list a[aria-current="true"] { background: #2b334e; color: #fff; }
@media (max-width: 767px) {
  .ibja-lang { left: 12px; bottom: 12px; }
  .ibja-lang__btn span:not(.ibja-lang__caret) { display: none; } /* на телефоні — лише прапор */
  .ibja-lang__list { width: min(240px, calc(100vw - 24px)); }
}

/*
  Шапка сайту. Темно-синя смуга з золотом — палітра самого сайту
  (#2b334e, #e9b35c); знак академії, назва шрифтом заголовків сайту,
  розділи, мова й кнопка заявки. Прилипає до верху; при прокрутці
  ущільнюється й отримує тінь.
*/
/*
  Шапка закріплена (fixed), а не sticky: стилі Weblium ставлять overflow
  на сторінку, і sticky мовчки перестає липнути. Місце під неї тримає
  порожній блок тієї ж висоти, щоб перший екран не ховався під шапкою.
*/
.ibja-header { position: fixed; top: 0; left: 0; right: 0; z-index: 950; font-family: Montserrat, system-ui, sans-serif; }
.ibja-header-spacer { height: 76px; }
.ibja-header__bar {
  display: flex; align-items: center; gap: 28px;
  height: 76px; padding: 0 clamp(16px, 4vw, 48px);
  background: #2b334e; border-bottom: 1px solid rgba(233, 179, 92, .28);
  transition: height .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.ibja-header--scrolled .ibja-header__bar {
  height: 64px; background: rgba(43, 51, 78, .94); backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(14, 18, 31, .35);
}
.ibja-header__brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; flex: none; }
.ibja-header__brand img { display: block; }
.ibja-header__name { display: flex; flex-direction: column; line-height: 1; }
.ibja-header__name b { font: 400 26px/1 "Bebas Neue Cyrillic", "Bebas Neue", Impact, sans-serif; letter-spacing: .08em; color: #e9b35c; }
.ibja-header__name small { margin-top: 3px; font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.ibja-header__nav { display: flex; align-items: center; gap: 26px; margin-inline: auto; }
.ibja-header__nav a {
  position: relative; padding: 6px 0; font-size: 14px; font-weight: 600; letter-spacing: .04em;
  color: rgba(255, 255, 255, .86); text-decoration: none; white-space: nowrap;
}
.ibja-header__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: #e9b35c; transform: scaleX(0); transition: transform .2s ease;
}
.ibja-header__nav a:hover { color: #fff; }
.ibja-header__nav a:hover::after { transform: scaleX(1); }
.ibja-header__tools { display: flex; align-items: center; gap: 12px; flex: none; margin-inline-start: auto; }
.ibja-header__nav + .ibja-header__tools { margin-inline-start: 0; }
.ibja-header__cta {
  display: inline-flex; align-items: center; height: 42px; padding: 0 22px; border-radius: 10px;
  background: linear-gradient(135deg, #b27a2c, #e9b35c); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 4px 0 #8a5a1c; transition: transform .15s ease, box-shadow .15s ease;
  max-width: 340px; overflow: hidden; text-overflow: ellipsis;
}
.ibja-header__cta:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #8a5a1c; }
.ibja-header__cta:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a5a1c; }
.ibja-header a:focus-visible, .ibja-header button:focus-visible { outline: 2px solid #e9b35c; outline-offset: 3px; border-radius: 6px; }

/* Перемикач мов усередині шапки: компактний, список відкривається донизу. */
.ibja-lang--inline { position: relative; left: auto; bottom: auto; }
.ibja-lang--inline .ibja-lang__btn { padding: 8px 12px; box-shadow: none; background: transparent; }
.ibja-lang--inline .ibja-lang__list { top: calc(100% + 10px); bottom: auto; left: auto; inset-inline-end: 0; }

.ibja-header__burger { display: none; width: 44px; height: 44px; padding: 11px 10px; border: 0; background: none; cursor: pointer; }
.ibja-header__burger span { display: block; height: 2px; margin: 4px 0; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.ibja-header--open .ibja-header__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ibja-header--open .ibja-header__burger span:nth-child(2) { opacity: 0; }
.ibja-header--open .ibja-header__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.ibja-header__panel {
  position: fixed; inset: 76px 0 0; padding: 28px 24px 32px; overflow-y: auto;
  background: #2b334e; display: flex; flex-direction: column; gap: 28px;
}
.ibja-header__panel[hidden] { display: none; }
.ibja-header--scrolled .ibja-header__panel { top: 64px; }
.ibja-header__panel nav { display: flex; flex-direction: column; }
.ibja-header__panel nav a {
  padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #fff; text-decoration: none; font-size: 17px; font-weight: 500;
}
#ibja-apply { scroll-margin-top: 80px; }

/* Вужче — спершу прибираємо дрібний підпис, далі розділи йдуть у меню. */
@media (max-width: 1279px) { .ibja-header__name small { display: none; } }
@media (max-width: 1099px) {
  .ibja-header__nav { display: none; }
  .ibja-header__burger { display: block; }
}
@media (max-width: 767px) {
  .ibja-header__bar, .ibja-header--scrolled .ibja-header__bar { height: 64px; gap: 12px; }
  .ibja-header__name small { display: none; }
  .ibja-header__name b { font-size: 24px; }
  .ibja-header__brand img { width: 32px; height: auto; }
  .ibja-header__tools { gap: 6px; }
  .ibja-header-spacer { height: 64px; }
  .ibja-header__panel { top: 64px; }
  /* Довгі підписи («Soumettre une candidature») — у два рядки, а не за край. */
  .ibja-header__tools .ibja-header__cta {
    height: auto; min-height: 38px; max-width: 150px; padding: 5px 12px;
    font-size: 11px; line-height: 1.15; letter-spacing: .03em; text-align: center;
    white-space: normal; text-overflow: clip; box-shadow: 0 3px 0 #8a5a1c;
  }
  .ibja-lang--inline .ibja-lang__btn { padding: 8px 10px; }
  /*
    На телефоні прапор стоїть ліворуч, і список, що відкривається від
    нього, виходив за лівий край. Тут це панель на всю ширину під
    шапкою, у дві колонки — 19 мов видно без прокрутки.
  */
  .ibja-lang--inline .ibja-lang__list {
    position: fixed; top: 72px; left: 12px; right: 12px; width: auto;
    max-height: calc(100dvh - 88px); display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  }
  .ibja-lang--inline .ibja-lang__list[hidden] { display: none; }
  .ibja-lang--inline .ibja-lang__list a { padding: 10px 8px; font-size: 14px; }
}
/* Вузький телефон: місце для кнопки заявки важливіше за слово поруч зі знаком. */
@media (max-width: 439px) { .ibja-header__name { display: none; } }
@media (max-width: 359px) {
  .ibja-header__tools .ibja-header__cta { max-width: 124px; padding: 5px 9px; letter-spacing: .02em; }
  .ibja-header__burger { width: 40px; padding-inline: 8px; }
  .ibja-lang--inline .ibja-lang__caret { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ibja-header__bar, .ibja-header__cta, .ibja-header__burger span, .ibja-header__nav a::after { transition: none; }
}

/*
  Декоративні плями й фото Weblium виходять за правий край. overflow на
  html/body телефон не завжди слухає — сторінку можна було тягнути вбік.
  clip обрізає без смуги прокрутки й не ламає закріплення шапки.
*/
.page { overflow-x: clip; }


/*
  Арабська й іврит: тексти Weblium стоять у блоках зліва направо, тож
  крапка в кінці речення опинялась на початку рядка («.تبدأ…»). Кожен
  абзац сам визначає напрям за першою «сильною» літерою.
*/
html[lang="ar"] [data-t], html[lang="he"] [data-t] { unicode-bidi: plaintext; }
