@keyframes flag {
    0% {
        transform: translate(-50%,-50%);
        left: 60%;
    }
    100% {
        transform: translate(-50%,-50%);
        left: 40%;
    }
}
@keyframes back {
    0% {
        transform: translate(-50%,-50%);
        left: 55%;
    }
    100% {
        transform: translate(-50%,-50%);
        left: 45%;
    }
}

@font-face {
    font-family: "Bold";
    src: url("../fonts/stolzlBold.woff2") format("woff2"),
         url("../fonts/stolzlBold.otf") format("opentype");
    font-display: swap;
}
@font-face {
    font-family: "Regular";
    src: url("../fonts/stolzlRegular.woff2") format("woff2"),
         url("../fonts/stolzlRegular.otf") format("opentype");
    font-display: swap;
}
@font-face {
    font-family: "Thin";
    src: url("../fonts/gothamThin.woff2") format("woff2"),
         url("../fonts/gothamThin.otf") format("opentype");
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    color: white;
    box-sizing: content-box;
    font-family: 'Thin';
}

a {
    text-decoration: none;
}

html {
    overflow: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: #191919;
}

.row div, span {
    box-sizing: border-box !important;
}

.main-background {
    position: fixed;
    width: 110vw;
    height: 110vh;
    top: 50%;
    left: 50%;
    /*margin-right: -50%;
    transform: translate(-50%,-50%);*/
    background-image: url("../src/img/background.jpg");
    background-position: center;
    background-size: cover;
    transition: 1s;
    animation: back 10s ease-in-out infinite alternate;
    z-index: -20;
}

.main-background-blur {
    /* удалено вместе с режимом упрощённых эффектов */
    width: 100%;
    height: 100%;
    opacity: 0;
}

.flag {
    position: fixed;
    width: 130%;
    height: 130%;
    top: 50%;
    left: 50%;
    /*margin-right: -50%;
    transform: translate(-50%,-50%);*/
    background-image: url("../src/img/flag.png");
    background-position: center;
    background-size: cover;
    transition: 1s;
    z-index: -10;
    animation: flag 10s ease-in-out infinite alternate;
}

.flag-blur {
    /* удалено вместе с режимом упрощённых эффектов */
    width: 100%;
    height: 100%;
    opacity: 0;
}

.timer-main {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 980;
}
.timer-back {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.90;
    background-color: black;
    z-index: -10;
}
.timer {
    text-align: center;
    padding: 15px;
    margin: 0 !important;
}
.timer-line {
    display: inline;
    z-index: 980;
}
.timer-number {
    position: relative;
    font-family: 'Bold';
    font-size: 3vh;
    color: #e84444;
    z-index: 980;
}
.timer-word {
    position: relative;
    font-family: 'Thin';
    font-size: 1.5vh;
    margin-right: 1vw;
    color: #e84444;
    z-index: 980;
}

.nav-main {
    top:90%;
    position: fixed;
    z-index: 980;
    transition: 0.7s;
    width: 100%;
}

.nav-main ul {
    display: block;
    position: absolute;
    left: 0;
    list-style-type: none;
    padding: 18px;

}

.nav-main ul:nth-child(1) {
    right: 0;
    text-align: right;
    z-index: 0;
}

.nav-main ul li {
    display: inline-block;
}

.nav-main-link{
    position: relative;
    font-family: 'Bold';
    font-size: 2.5vh;
    color: #e84444;
    margin-right: 1vh;
    margin-left: 1vh;
    text-shadow: 0px 0px 10px black;
    transition: 0.2s;
}

.nav-main-link:hover{
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.nav-main-link::before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 0%;
    height: 5px;
    transition: 0.2s;
    background-color: #e84444;
}

.nav-main-link:hover:before {
    width: 100%;
    left: 0%;
}

.metr-toggle {
    position: fixed;
    top: 10%;
    right: 3%;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    z-index: 985;
    background-color: rgba(0, 0, 0, 0.55);
    border: 1.5px solid #e84444;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.5s ease, background-color 0.3s, border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.metr-toggle.is-dimmed {
    opacity: 0.35;
}

.metr-toggle.is-dimmed:hover,
.metr-toggle.is-dimmed:focus-visible {
    opacity: 1;
}

.metr-toggle:hover {
    background-color: rgba(232, 68, 68, 0.18);
    border-color: #ffffff;
}

.metr-toggle:focus {
    outline: none;
    border-color: #ffffff;
}

.metr-toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.metr-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #e84444;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: 0.3s;
    overflow: visible;
    color: #e84444;
}

.metr-toggle:hover .metr-icon {
    stroke: #ffffff;
    color: #ffffff;
    transition: 0.3s;
}

.metr-icon .metr-body {
    fill: currentColor;
    stroke: currentColor;
}

.metr-icon .metr-wave {
    opacity: 0;
    transition: opacity 0.25s;
}

.metr-icon .metr-slash {
    stroke-width: 1.8;
    opacity: 1;
    transition: opacity 0.25s;
}

.metr-toggle.is-on .metr-icon .metr-slash {
    opacity: 0;
}

.metr-toggle.is-on .metr-icon .metr-wave-1 {
    opacity: 0.9;
    animation: metr-pulse-1 1.6s ease-in-out infinite;
}

.metr-toggle.is-on .metr-icon .metr-wave-2 {
    opacity: 0.55;
    animation: metr-pulse-2 1.6s ease-in-out infinite;
}

@keyframes metr-pulse-1 {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.3; }
}

@keyframes metr-pulse-2 {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.15; }
}

/* ===== Лайтбокс-галерея ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

.lightbox-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 8vw 12vh;
    pointer-events: none;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.65);
    pointer-events: auto;
    cursor: default;
}

.lightbox-btn {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
    -webkit-appearance: none;
    appearance: none;
    z-index: 1;
}

.lightbox-btn svg {
    width: 60%;
    height: 60%;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
    background: rgba(232, 68, 68, 0.18);
    border-color: #e84444;
    color: #e84444;
    outline: none;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
}

.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }

.lightbox-prev:hover,
.lightbox-prev:focus-visible { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover,
.lightbox-next:focus-visible { transform: translateY(-50%) translateX(3px); }

.lightbox-close {
    top: 2.5vh;
    right: 2vw;
    width: 44px;
    height: 44px;
}

.lightbox-caption {
    position: absolute;
    left: 8vw;
    right: 8vw;
    bottom: 3vh;
    text-align: center;
    pointer-events: none;
    font-family: 'Thin', sans-serif;
    color: #ffffff;
    font-size: 1.8vh;
    line-height: 1.5;
}

.lightbox-title {
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 2vh;
}

.lightbox-caption-divider {
    width: 60px;
    height: 2px;
    margin: 8px auto 10px;
    background-color: #e84444;
    opacity: 0.85;
}

.lightbox-caption-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
}

.lightbox-counter {
    grid-column: 2;
    color: #e84444;
    font-family: 'Bold', sans-serif;
    letter-spacing: 0.5px;
}

.lightbox-allphotos {
    grid-column: 3;
    justify-self: end;
    font-family: 'Bold', sans-serif;
    color: #e84444;
    text-decoration: none;
    letter-spacing: 0.3px;
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.lightbox-allphotos:hover,
.lightbox-allphotos:focus-visible {
    color: #ffffff;
    outline: none;
    transform: translateX(2px);
}

html.lightbox-active,
html.lightbox-active body {
    overflow: hidden !important;
}

@media screen and (max-width: 1080px) {
    .lightbox-stage {
        padding: 8vh 4vw 12vh;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-close {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
    }
    .lightbox-caption {
        left: 4vw;
        right: 4vw;
        bottom: 2vh;
        font-size: 1.6vh;
    }
    .lightbox-title {
        font-size: 1.8vh;
    }
    .lightbox-caption-row {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }
    .lightbox-counter {
        grid-column: 1;
    }
    .lightbox-allphotos {
        grid-column: 1;
        justify-self: center;
    }
}

.remember-main {
    width: 100%;
    height: 100vh;
    margin-bottom: 50vh;
}

.remember-title {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%,-50%);
    font-family: 'Bold';
    font-size: 6vw;
    z-index: -15;
}

.remember-menu {
    position: relative;
    display: block;
    font-size: 2vw;
    color: #e84444;
    z-index: 20;
    text-align: center;
}

main {
    width: 100%;
    color: white;
    font-family: 'Thin';
    font-size: 2.5vh;
}

.main-section {
    margin-bottom: 25vh;
}

main > .main-section:last-of-type {
    margin-bottom: 18vh;
}

.main-title {
    position: relative;
    font-family: 'Bold';
    font-size:7vw;
    margin-left: 8vw;
    border-bottom: 5px solid #e84444;
    margin-bottom: 75px;
    z-index: 250;
}

.main-content {
    max-width: 50%;
    padding: 0vw 8vw;
}

.main-content-more {
    display: block;
    margin-top: 75px;
    text-transform: uppercase;
    font-family: 'Bold';
    color: #e84444;
}

.main-content-table {
    width: 100% !important;
    max-width: calc(100% - (8vw*2)) !important;
    margin-left: 0 !important;
}

.main-content-img {
    position: absolute;
    width: 35%;
    height: 100%;
    right: 0;
    margin-top: calc(-7vw - 75px);
    background-image: url("../src/img/main-content-1.jpg");
    background-position: center;
    background-size: cover;
    filter: grayscale(100%);
    box-shadow: #191919 0 0 25px;
}

.hero-name {
    margin-top: 200px;
    display: block;
    text-transform: uppercase;
    font-family: 'Bold';
    font-size: 5vh;
}
.hero-name-part {
    display: block;
    color: #e84444;
}

.hero-img {
    margin-top: 200px;
    border-radius: 350px;
    transform: translate(-500%);
    transition: 0.3s;
    margin-left: -30px;
}

.hero-birthday {
    display: block;
    font-size: 2vh;
    color: #aaa !important;
    margin: 25px 0px;
}

.history-img {
    position: relative;
    margin-top: 18px;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    filter: brightness(40%);
    transition: 0.5s;
}
.history-img:hover {
    z-index: 500;
    filter: brightness(100%);
    box-shadow: 0px 0px 55px black;
    transition: 0.5s;
    transform: scale(1.1);
}

video {
    margin-bottom: 0;
}

section:nth-of-type(even) .main-content-img{
    left: 0 !important;
}
section:nth-of-type(even) .main-title{
    text-align: right !important;
    margin-right: 8vw;
    margin-left: 0vw;
}
section:nth-of-type(even) .main-content {
    position: relative;
    margin-left: 35%;
}
section:nth-of-type(even) .main-content-more{
    text-align: right;
}

section:nth-of-type(3) .main-content-img {
    background-image: url("../src/img/main-content-2.jpg");
    filter: brightness(50%) grayscale(100%);
}

.col-lg-3 {
    margin-left: 0;
}

footer {
    position: relative;
    text-align: center;
    width: 100%;
    padding: 22px 15px 22px;
    background-color: rgba(0, 0, 0, 0.9);
    margin-top: 0;
}

footer .footer-links {
    display: block;
    padding: 4px 0 14px;
}

footer .footer-links a {
    font-size: 1.8vh;
}

footer .footer-divider {
    width: 60px;
    height: 2px;
    margin: 0 auto 16px;
    background-color: #e84444;
    opacity: 0.85;
}

footer .footer-timer {
    margin: 0 !important;
    padding: 0;
}

.performed {
    font-family: 'Thin' !important;
    font-size: 1vh !important;;
}

.load-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1950;
    background-color: black;
    top: 0;
    opacity: 1;
}

.load-line {
    width: 0%;
    height: 4px;
    position: absolute;
    top:50%;
    left:0%;
    background-color: #e84444;
}

.about-img {
    background-image: url("../src/img/main-content-3.jpg");
    filter: brightness(50%) grayscale(100%);
}

@media screen and (max-width: 1080px) {
    .timer-line {
        display: block;
    }
    .main-content {
        max-width: 100%;
    }
    .main-content-img {
        position: relative;
        width: 100%;
        height: 100vh;
        margin-top: 0;
        margin-bottom: 75px;
    }
    .hero-name {
        margin-top: 50px;
    }
    section:nth-of-type(even) .main-content {
        position: relative;
        margin-left: 0;
    }
    .nav-main ul:nth-child(1) {
        margin-top: -100px;
    }

    .metr-toggle {
        top: 17%;
        right: 3%;
        width: 38px;
        height: 38px;
    }
    .metr-icon {
        width: 18px;
        height: 18px;
    }
}

/* ===== видео на полный экран ===== */
.video-section {
  position: relative;
  width: 100vw;                   /* растягиваем секцию на ширину окна */
  margin-left: calc(-50vw + 50%); /* «выходим» за пределы обычного контейнера */
  padding: 0;                     /* сбрасываем отступы, если были */
  overflow: hidden;
}

.video-section .ratio {
  position: relative;
  height: calc(100vw * 9 / 16);   /* высота по соотношению сторон 16:9 */
}

.video-section iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.photo-link {
  display: block;
  width: fit-content;
  margin: 12px 2vw 0 auto; /* выравниваем по правому краю без float */
}
