/* ===== БАЗА ===== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f2f2f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Бокові фонові фото університету (десктоп) */
@media (min-width: 1200px) {
    body::before,
    body::after {
        content: "";
        position: fixed;
        top: 108px;
        bottom: 16px;
        width: clamp(170px, 22vw, 420px);
        border-radius: 10px;
        pointer-events: none;
        z-index: 0;
        background-repeat: no-repeat;
        background-size: cover;
        background-color: #d9deea;
    }

    body::before {
        left: 16px;
        background-image: linear-gradient(rgba(10, 24, 45, 0.30), rgba(10, 24, 45, 0.30)), url("assets/images/left.jpg"), url("assets/university_logo.png");
        background-position: left center;
    }

    body::after {
        right: 16px;
        background-image: linear-gradient(rgba(10, 24, 45, 0.30), rgba(10, 24, 45, 0.30)), url("assets/images/right.jpg"), url("assets/university_logo.png");
        background-position: right center;
    }

    .top-bar,
    main,
    .site-footer {
        position: relative;
        z-index: 1;
    }
}

a {
    color: #003366;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

main {
    flex: 1 0 auto;
}

/* ===== ВЕРХНЯ ПАНЕЛЬ ===== */

.top-bar {
    background-color: #002244;
    color: #ffffff;
    border-bottom: 3px solid #ffcc33;
    /* Математичний візерунок поверх */
    background-image: url("assets/header_pattern.svg");
    background-repeat: repeat-x;
    background-position: center bottom;
    background-size: auto 120px;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    column-gap: 16px;
    row-gap: 8px;
    flex-wrap: nowrap; /* десктоп: все в один рядок */
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-logo {
    width: 36px;          /* трошки менше, щоб меню мало більше місця */
    height: auto;
    border-radius: 50%;   /* робимо його гарним кругом */
    background-color: transparent; /* фон прозорий, без білого квадрата */
}

.top-site-name {
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap; /*Забороняємо перенос назви */
}

.top-nav {
    display: flex;
    flex-wrap: nowrap; /* Щоб не переносилось у 2 рядки */
    gap: 18px;         /* Було 10px + wrap → тепер менше */
    justify-content: center;
    align-items: center;
    flex: 1 1 auto;
    font-size: 0.88rem; /* Трохи менший шрифт */
}

.top-nav a {
    color: #ffffff;
    padding: 2px 4px;   /* Менші внутрішні відступи */
    border-radius: 4px;
    white-space: nowrap; /* Не дозволяємо кожному пункту переноситись */
}

.top-nav a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}
.top-lang {
    display: flex;
    gap: 4px;
    align-items: center;
    white-space: nowrap; /* UA | EN не переноситься */
    flex: 0 0 auto;
    font-size: 0.9rem;
}

.top-lang a {
    color: #ffdd66;
}

.active-lang {
    font-weight: 600;
}

/* ===== БАНЕР СТОРІНКИ ===== */

.page-banner {
    background-color: #003366;
    color: #ffffff;
    padding: 22px 0;
    border-bottom: 1px solid #00172b;
}

.page-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.banner-main {
    max-width: 720px;
}

.banner-acronym {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
    color: #ffdd66;
}

.banner-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
}

.banner-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

.banner-side {
    text-align: right;
    min-width: 140px;
}

.banner-date {
    font-weight: 600;
}

.banner-place {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== ЛЕЙАУТ КОНТЕНТУ ===== */

.page-layout {
    padding: 20px 0 32px;
}

.page-content {
    max-width: 780px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 20px 22px 28px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}


/* Links inside content should look like standard links */
.page-content a{
    color: #0b57d0;
    text-decoration: underline;
}
.page-content a:hover{
    text-decoration: underline;
}

.page-content a.link-button{
    color: #ffffff;
    text-decoration: none;
}

/* ===== СЕКЦІЇ ===== */

.page-section + .page-section {
    margin-top: 20px;
    border-top: 1px solid #e3e3ec;
    padding-top: 18px;
}

.page-section h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #002244;
}

.page-section h3 {
    font-size: 1.05rem;
    margin-top: 12px;
    margin-bottom: 4px;
    color: #003366;
}

.page-section p {
    margin-bottom: 8px;
}

.page-section ul {
    margin-left: 1.2em;
    margin-bottom: 8px;
}

.dates-list {
    list-style: none;
    margin-left: 0;
}

.dates-list li {
    margin-bottom: 4px;
}

/* ===== КНОПКИ-ПОСИЛАННЯ ===== */

.link-button {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px 0;
    background-color: #003366;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #002244;
}

.link-button:hover {
    background-color: #004c99;
    text-decoration: none;
}

.note {
    font-size: 0.8rem;
    color: #666666;
}

/* ===== ФУТЕР ===== */

.site-footer {
    background-color: #00172b;
    color: #ffffff;
    padding: 10px 0;
    margin-top: 8px;
}

.footer-inner {
    font-size: 0.85rem;
    text-align: center;
}

.participants-frame {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow-x: auto;
  overflow-y: visible;
}

.participants-container {
  width: calc(100vw - 32px);
  max-width: none;
}

.participants-frame iframe {
  display: block;
  min-width: 100%;
}

@media (min-width: 1200px) {
  .participants-container {
    --side-photo-width: clamp(170px, 22vw, 420px);
    width: calc(100vw - 64px - var(--side-photo-width) - var(--side-photo-width));
  }
}

@media (max-width: 768px) {
  .participants-frame iframe {
    min-width: 720px;
  }
}
.note {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1.2rem;
}
/* ===== АДАПТИВ ===== */

@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: wrap; /* на мобілці дозволяємо перенос */
    }

    .top-nav {
        justify-content: flex-start;
        width: 100%;
    }

    .top-lang {
        align-self: flex-end;
        margin-top: 4px;
    }

    .page-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .banner-side {
        text-align: left;
    }

    .page-content {
        padding: 16px 14px 22px;
    }
}







/* ===== NAV FIXES (desktop wrap + centered) ===== */
.top-bar{
  position: sticky;
  top: 0;
  z-index: 2000;
}

.top-bar-inner{
  justify-content: space-between;
  gap: 16px;
}

/* center nav and allow wrap on mid screens */
.top-nav{
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;      /* allow 2 rows when needed */
  white-space: normal;  /* container can wrap */
}

.top-nav a{
  white-space: nowrap;  /* each item stays in one piece */
}

/* burger button (mobile only) */
.nav-toggle{
  display: none;
  margin-left: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1;
}

/* avoid anchor hidden under sticky header */
.page-section{
  scroll-margin-top: 92px;
}

/* link styling in content */
.page-content a{
  text-decoration: underline;
}

@media (max-width: 768px){
  .nav-toggle{ display: inline-flex; align-items:center; justify-content:center; }
  /* hide nav until opened */
  .top-nav{
    display: none;
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0 6px;
  }
  .top-bar.nav-open .top-nav{
    display: flex;
  }
  .top-bar-inner{
    flex-wrap: wrap;
  }
  .top-lang{
    margin-left: auto;
  }
}

/* ===== ГАЛЕРЕЯ ЖИТОМИРА ===== */
.city-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.city-gallery-item {
  margin: 0;
  border: 1px solid #d9deea;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fbff;
}

.city-gallery-item img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #eef3fb;
}

.city-gallery-item figcaption {
  padding: 8px 10px;
  font-size: 0.9rem;
  color: #334;
}


.no-scroll {
  overflow: hidden;
}

.zoomable-image {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 15, 30, 0.86);
  z-index: 4000;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 56px);
  margin: 0 auto;
  border-radius: 8px;
  background: #0e1d31;
}

.lightbox-figure figcaption {
  margin-top: 10px;
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
}


.credit-link {
    font-size: 0.82em;
    margin-left: 6px;
    text-decoration: underline;
    white-space: nowrap;
}
