body.page-template-page-gallery #content > .ast-container,
body.page-template-page-gallery .site-content > .ast-container,
body.single-iff_gallery_year #content > .ast-container,
body.single-iff_gallery_year .site-content > .ast-container { max-width: none; padding: 0; display: block; }
.iff38-gallery { --navy: #071a3d; --coral: #f04b47; --margin: clamp(20px, 4.5vw, 80px); --gutter: 24px; font-family: Jost, Heebo, sans-serif; color: var(--navy); }
.iff38-gallery *, .iff38-gallery *::before, .iff38-gallery *::after { box-sizing: border-box; }
.iff38-gallery__hero { position: sticky; top: 76px; z-index: 20; background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.iff38-gallery__hero-inner { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 80px var(--margin) 64px; transition: padding .4s ease; }
.iff38-gallery__hero h1 { margin: 0; font: 800 clamp(48px, 5.6vw, 96px)/.95 Poppins, Heebo, sans-serif; color: #fff; transition: font-size .4s ease; }
.iff38-gallery__hero p { margin: 24px 0 0; font-size: 20px; color: #c9d1df; line-height: 1.6; max-width: 56ch; transition: opacity .25s ease; }
.iff38-gallery__hero-link { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border: 1px solid #fff; border-radius: 30px; color: #fff; text-decoration: none; font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.iff38-gallery__hero-link:hover { background: #fff; color: var(--navy); }
.iff38-gallery__hero.is-compact .iff38-gallery__hero-inner { padding-top: 12px; padding-bottom: 12px; align-items: center; }
.iff38-gallery__hero.is-compact h1 { font-size: 34px; }
.iff38-gallery__hero.is-compact p { display: none; }
.iff38-gallery__content { background: #eceef2; min-height: 55vh; }
.iff38-gallery__wrap { padding: 48px var(--margin) 96px; }
.iff38-gallery__tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.iff38-gallery__tabs button { border: 1px solid #b9c0cc; border-radius: 30px; background: transparent; color: var(--navy); height: 48px; padding: 0 24px !important; font: 800 16px Jost, Heebo, sans-serif; letter-spacing: .04em; cursor: pointer; }
.iff38-gallery__tabs button[aria-selected="true"]{ background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important; }
.iff38-gallery__tabs button:hover { color: var(--navy); border-color: var(--navy); }
.iff38-gallery [hidden] { display: none !important; }
.iff38-gallery .label-mobile { display: none; }
.iff38-gallery__years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.iff38-gallery__year { position: relative; display: block; aspect-ratio: 3/2; border-radius: 5px; overflow: hidden; color: #fff; background: var(--navy); text-decoration: none; }
.iff38-gallery__year > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .5s ease; }
.iff38-gallery__year:hover > img { transform: scale(1.06); }
.iff38-gallery__year-gradient { position: absolute; inset: 0; background: linear-gradient(0deg,rgba(2,6,17,.85),rgba(2,6,17,.15) 55%,transparent); pointer-events: none; }
.iff38-gallery__year-caption { position: absolute; left: 24px; right: 24px; bottom: 20px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.iff38-gallery__year-caption > div { display: flex; flex-direction: column; gap: 4px; }
.iff38-gallery__year-caption strong { font: 800 clamp(36px,3.2vw,56px)/1 Poppins,Heebo,sans-serif; color: #fff; }
.iff38-gallery__year:hover .iff38-gallery__year-caption strong{background: linear-gradient(100deg, rgb(239, 128, 20) 0%, rgb(235, 101, 27) 14%, rgb(216, 138, 40) 30%, rgb(143, 167, 120) 46%, rgb(58, 153, 156) 63%, rgb(78, 109, 166) 81%, rgb(117, 88, 149) 100%) text;-webkit-text-fill-color: transparent;}
.iff38-gallery__year-caption span { font-size: 16px; font-weight: 600; color: #dfe4ec; }
.iff38-gallery__camera { width: 40px; height: 40px; border: 1px solid #ffffffda; border-radius: 50%; display: grid; place-items: center; flex: none; }
.iff38-gallery__year:hover .iff38-gallery__camera { background: var(--coral); border-color: var(--coral); }
.iff38-gallery__posters { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: var(--gutter); }
.iff38-gallery__photos { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gutter); }
.iff38-gallery__poster, .iff38-gallery__photo { position: relative; overflow: hidden; border-radius: 5px; margin: 0; cursor: zoom-in; background: #fff; min-width: 0; }
.iff38-gallery__poster { aspect-ratio: 2/3; }
.iff38-gallery__photo { aspect-ratio: 4/3; }
.iff38-gallery__poster img, .iff38-gallery__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.iff38-gallery__poster:hover img, .iff38-gallery__photo:hover img { transform: scale(1.05); }
.iff38-gallery__poster figcaption, .iff38-gallery__photo figcaption { position: absolute; inset: auto 0 0; padding: 60px 16px 16px; background: linear-gradient(0deg,rgba(2,6,17,.88),transparent); color: #fff; display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .3s ease; }
.iff38-gallery__poster:hover figcaption, .iff38-gallery__photo:hover figcaption, .iff38-gallery__poster:focus figcaption, .iff38-gallery__photo:focus figcaption { opacity: 1; }
.iff38-gallery__poster figcaption strong, .iff38-gallery__photo figcaption strong { color: #fff; font: 800 16px Poppins, sans-serif; }
.iff38-gallery__poster figcaption small, .iff38-gallery__photo figcaption small { color: #dfe4ec; font-size: 13px; }
.iff38-gallery__zoom { position: absolute; right: 12px; bottom: 10px; font-size: 24px; }
.iff38-gallery__placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; background: #0f2853; color: #b6c3da; font: 600 14px 'JetBrains Mono',monospace; }
.iff38-gallery__empty { padding: 70px 20px; text-align: center; font-size: 18px; }
.iff38-gallery__year-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.iff38-gallery__year-nav a { display: inline-flex; height: 40px; align-items: center; padding: 0 16px; border: 1px solid #b9c0cc; border-radius: 30px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 15px; }
.iff38-gallery__year-nav a[aria-current="page"], .iff38-gallery__year-nav a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.iff38-gallery__lightbox { position: fixed; z-index: 99999; inset: 0; background: rgba(2,6,17,.97); display: flex; justify-content: center; align-items: center; padding: 50px 78px; }
.iff38-gallery__lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.iff38-gallery__lightbox img { max-height: min(78vh,900px); max-width: 100%; object-fit: contain; }
.iff38-gallery__lightbox figcaption { display: flex; align-items: center; gap: 12px; color: #fff; padding-top: 14px; font-size: 15px; }
.iff38-gallery__lightbox figcaption strong { color: #fff; }
.iff38-gallery__lightbox button { position: absolute; z-index: 2; border: 1px solid #ffffff70; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; background: #071a3d; color: #fff; font-size: 28px; cursor: pointer; padding: 0; }
.iff38-gallery__lightbox-close { top: 24px; right: 24px; }
.iff38-gallery__lightbox-prev { left: 22px; top: 50%; }
.iff38-gallery__lightbox-next { right: 22px; top: 50%; }
body.iff38-gallery-modal-open { overflow: hidden; }
@media(max-width:1100px) { .iff38-gallery__posters { grid-template-columns: repeat(4,minmax(0,1fr)); } .iff38-gallery__photos { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:767px) {
	.iff38-gallery__hero { top: 66px; }
	.iff38-gallery__hero-inner { padding: 40px 20px; flex-direction: column; align-items: flex-start; }
	.iff38-gallery__hero h1 { font-size: 48px; }
	.iff38-gallery__hero p { font-size: 16px; margin-top: 16px; }
	.iff38-gallery__wrap { padding: 24px 20px 60px; }
	.iff38-gallery .label-mobile { display: inline; }
	.iff38-gallery .label-desktop { display: none; }
	.iff38-gallery__tabs{z-index: 1;gap:20px;position: sticky;top: 135px;padding: 15px 10px;background: #eceef2;margin: -24px -20px 30px;border-bottom: 1px solid #cfcfcf;}
	.iff38-gallery__tabs button { font-size: 12px; padding: 0 16px; height: 36px; }
	.iff38-gallery__years { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
	.iff38-gallery__year-caption { left: 14px; right: 14px; bottom: 12px; }
	.iff38-gallery__year-caption strong { font-size: 32px; }
	.iff38-gallery__year-caption span { font-size: 12px; }
	.iff38-gallery__camera { width: 32px; height: 32px; }
	.iff38-gallery__posters { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
	.iff38-gallery__photos { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
	.iff38-gallery__lightbox { padding: 50px 18px; } .iff38-gallery__lightbox-prev { left: 8px; }
	.iff38-gallery__lightbox-next { right: 8px; }
}
@media(max-width:480px) { .iff38-gallery__years { grid-template-columns: 1fr; } .iff38-gallery__posters { grid-template-columns: repeat(2,minmax(0,1fr)); } .iff38-gallery__photos { grid-template-columns: repeat(2,minmax(0,1fr)); } .iff38-gallery__lightbox figcaption { flex-wrap: wrap; justify-content: center; } }
@media(hover:none) { .iff38-gallery__poster figcaption, .iff38-gallery__photo figcaption { opacity: 1; } }

/* Gallery V3: original poster overlays, bilingual captions and shared fullscreen viewer. */
.iff38-gallery__poster figcaption,
.iff38-gallery__photo figcaption {
    padding: 72px 16px 18px;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
}
.iff38-gallery__poster:hover figcaption,
.iff38-gallery__photo:hover figcaption,
.iff38-gallery__poster:focus-within figcaption,
.iff38-gallery__photo:focus-within figcaption {
    opacity: 1;
    pointer-events: auto;
}
.iff38-gallery__image-caption .iff38-gallery__description {
    color: #fff;
    font: 600 14px/1.5 Jost, Heebo, sans-serif;
    white-space: pre-line;
}
.iff38-gallery__image-caption strong {
    font: 700 13px/1.45 Jost, Heebo, sans-serif !important;
}
.iff38-gallery__languages {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 30px;
    background: rgba(2,6,17,.42);
    pointer-events: auto;
}
.iff38-gallery__languages button{
  border: 0;
  border-radius: 24px;
  padding: 5px 11px !important;
  background: transparent;
  color: #fff;
  font: 800 13px/1 Jost,Heebo,sans-serif;
  cursor: pointer;
  width: auto;
  height: auto;
  display: block;
  position: inherit;
}
.iff38-gallery__languages button.is-active {
    background: #fff;
    color: #071a3d;
}
.iff38-gallery__image-caption [hidden],
.iff38-gallery__lightbox-caption [hidden] {
    display: none !important;
}
.iff38-gallery__lightbox {
    background: rgba(1,7,22,.94);
    padding: 70px 74px 72px;
}
.iff38-gallery__lightbox-figure {
    display: block !important;
    position: relative;
    width: max-content;
    max-width: min(100%,1100px);
    max-height: calc(100vh - 150px);
    overflow: hidden;
    margin: auto;
}
.iff38-gallery__lightbox-figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
}
.iff38-gallery__lightbox figcaption.iff38-gallery__lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 55px 26px 24px;
    background: linear-gradient(0deg,rgba(2,6,17,.92),transparent);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}
.iff38-gallery__lightbox-caption strong {
    font: 700 15px/1.4 Jost,Heebo,sans-serif;
    color: #fff;
}
.iff38-gallery__lightbox-description {
    color: #fff;
    white-space: pre-line;
    font-weight: 600;
}
.iff38-gallery__lightbox-pagination {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #fff;
    min-width: 130px;
}
.iff38-gallery__lightbox-progress {
    display: block;
    width: 130px;
    height: 2px;
    background: rgba(255,255,255,.3);
}
.iff38-gallery__lightbox-progress > span {
    display: block;
    height: 100%;
    background: #f04b47;
    transition: width .2s ease;
}
.iff38-gallery__lightbox-close {
    position: fixed !important;
    right: 20px !important;
    top: 15px !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 38px !important;
}
.iff38-gallery__lightbox-prev,
.iff38-gallery__lightbox-next {
    background: transparent !important;
}
.hyinia_kvadrat{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: rgba(2,6,17,.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 1;
  transition: opacity .45s ease,background .5s,border-color .5s;
}
figure:hover > .hyinia_kvadrat{opacity: 1;}
@media (max-width: 767px) {
    .iff38-gallery__lightbox { padding: 65px 35px 72px; }
    .iff38-gallery__lightbox-figure { max-height: calc(100vh - 160px); }
    .iff38-gallery__lightbox-figure img { max-height: calc(100vh - 160px); }
    .iff38-gallery__lightbox figcaption.iff38-gallery__lightbox-caption { padding: 55px 14px 12px;}
    .iff38-gallery__lightbox-prev { left: 3px; }
    .iff38-gallery__lightbox-next { right: 3px; }
    .iff38-gallery__posters .iff38-gallery__description,
    .iff38-gallery__photos .iff38-gallery__description { font-size: 12px; }
	.iff38-gallery__poster figcaption.iff38-gallery__image-caption, .iff38-gallery__poster figcaption, .iff38-gallery__photo figcaption{display: none;}
	.header_title .header_title_inner .btn_jo {text-align: center;line-height: 1.1;}
	
	.iff38-gallery__year-nav{z-index: 1;position: sticky;top: 135px;padding: 15px 10px;background: #eceef2;margin: -24px -20px 20px;border-bottom: 1px solid #cfcfcf;}
}
@media (hover: none) {
    .iff38-gallery__poster figcaption,
    .iff38-gallery__photo figcaption { opacity: 1; pointer-events: auto; }
}
