:root {
    --nav-h: 80px;
    --bg-dark: #000000;
    --bg-anthracite: #1a1a1a;
    --white: #ffffff;
    --pt-serif: "PT Serif", serif;
    --satoshi: 'Satoshi', sans-serif;
    --cubic: cubic-bezier(0.23, 1, 0.32, 1);
    --container-w: 1200px;
    --side-gutter: 25px;
}

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

body,
html {
    width: 100%;
    background-color: var(--bg-dark);
    color: var(--white);
    font-family: var(--satoshi);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 10000;
    display: flex;
    align-items: center;
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--side-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 35px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.6;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 1;
}


/* Состояние активной ссылки */
.nav-links a.active {
    opacity: 1;
    position: relative;
}

/* Линия под текстом */
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    /* Расстояние от текста до линии */
    left: 0;
    width: 100%;
    height: 2px;
    /* Толщина линии */
    background-color: var(--white);
}

/* Burger Button */
.burger-btn {
    display: none;
    /* По умолчанию скрыт на десктопе */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10001;
    padding: 10px;
}

.burger-btn span {
    width: 28px;
    height: 2px;
    background-color: var(--white);
    transition: 0.4s var(--cubic);
}

/* Состояние крестика */
.burger-btn.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-btn.is-active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: right 0.6s var(--cubic);
}

.mobile-menu.is-active {
    right: 0;
}

.mobile-menu a {
    font-family: var(--pt-serif);
    font-size: 32px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s var(--cubic);
}

/* Анимация появления ссылок в меню */
.mobile-menu.is-active a {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 991px) {
    .nav-links {
        display: none;
        /* Прячем обычные ссылки */
    }

    .burger-btn {
        display: flex;
        /* Показываем бургер */
    }
}

/* ===== COMPACT LUXURY FOOTER ===== */
.footer {
    background-color: var(--bg-anthracite);
    color: var(--white);
    padding: 60px 0 30px;
    /* Уменьшенные вертикальные отступы */
    font-family: var(--satoshi);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 var(--side-gutter);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

/* Левый блок */
.footer-logo {
    display: block;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    width: auto;
}

.footer-address {
    font-style: normal;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 20px;
}

.footer-contacts-links {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 0.05em;
    opacity: 0.8;
    transition: opacity 0.3s var(--cubic);
}

.footer-link:hover {
    opacity: 1;
}

/* Правый блок (Навигация) */
.footer-nav-wrapper ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.footer-nav-wrapper a {
    color: var(--white);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: 0.3s var(--cubic);
}

.footer-nav-wrapper a:hover {
    opacity: 1;
}

/* Разделитель и Копирайт */
.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Социальные иконки */
.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-socials img {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: opacity 0.3s var(--cubic), transform 0.3s var(--cubic);
}

.footer-socials a:hover img {
    opacity: 1;
    transform: translateY(-2px);
}

/* Адаптив для мобилок */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 40px;
    }

    .footer-nav-wrapper ul {
        flex-direction: column;
        gap: 12px;
    }

    .footer-contacts-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}



/* ==========================================================================
   ACADEMY PAGE STYLES
   ========================================================================== */

.academy-page {
    background-color: var(--bg-dark);
    min-height: 100vh;
    color: #fff;
    padding-bottom: 100px;
}

/* 1. Заголовок страницы */
.academy-header {
    padding: 120px 0 60px; /* Отступ сверху с учетом nav */
    text-align: center;
}

.page-title-center {
    font-family: var(--pt-serif);
    font-size: clamp(40px, 8vw, 64px); /* Адаптивный размер */
    text-transform: uppercase;
    letter-spacing: 8px;
    margin: 0;
    color: #fff;
}

/* 2. Сетка списка уроков */
.academy-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.academy-item {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Ровное деление 50/50 */
    gap: 60px;
    margin-bottom: 80px;
    align-items: center; /* Центрируем текст по вертикали относительно видео */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 80px;
}

.academy-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* 3. Медиа блоки (Имитаторы видео) */
.boss-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #111;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.boss-static-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.boss-media:hover .boss-static-img {
    transform: scale(1.05);
}

/* Кнопка Play */
.play-overlay-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-overlay-btn svg {
    width: 20px;
    fill: #fff;
   
}

.boss-media:hover .play-overlay-btn {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.boss-media:hover .play-overlay-btn svg {
    fill: #000;
}

/* 4. Инфо-блоки */
.boss-info h2 {
    font-family: var(--pt-serif);
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.description-block p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   VIDEO POPUP (ОДИН НА ВСЕ)
   ========================================================================== */

.video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none; /* JS ilə idarə olunur */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(15px);
}


/* Класс для активации через JS */
.video-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.popup-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    height: auto; /* Контент подстраивается под высоту видео */
    background: transparent; /* Убираем фон, чтобы не было лишних рамок */
}
.video-popup-overlay.active .popup-content {
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
}

.close-popup:hover {
    opacity: 0.7;
}

 #videoFrameContainer {
    position: relative;
    width: 100%;
    height: auto; /* Убираем фиксированную высоту */
    padding-bottom: 0 !important; /* Убиваем 16:9 принудительно */
    display: flex;
    justify-content: center;
     align-items: center;
}

/* Само видео */
#videoFrameContainer video {
    width: 100%;
    max-width: 100%;
    height: auto; /* Позволяет видео определять свою высоту */
    max-height: 85vh; /* Чтобы видео не уходило за пределы экрана по вертикали */
    display: block;
    object-fit: contain; /* Гарантирует, что видео впишется без обрезки */
    background: #000;
}




/* Popapın mobil versiyası üçün təkmilləşdirmə */
@media (max-width: 768px) {
    .popup-content {
        width: 95%; /* Mobil ekranlarda kənarlardan çox boşluq qalmasın */
        max-width: 100%;
        margin: 0 10px;
    }

    .close-popup {
        top: -60px; /* Bağlama düyməsini bir az aşağı çəkirik */
        right: 10px;
        font-size: 24px;
    }

    #videoFrameContainer {
    position: relative;
    width: 100%;
    height: auto; /* Убираем фиксированную высоту */
    padding-bottom: 0 !important; /* Убиваем 16:9 принудительно */
    display: flex;
    justify-content: center;
    align-items: center;
}
}

/* Səhifənin sürüşməsini tam dayandırmaq üçün */
body.no-scroll {
    position: fixed;
    width: 100%;
    overflow: hidden;
}




/* ===== ACADEMY MOBILE ADAPTIVE ===== */
@media (max-width: 768px) {
    /* Уменьшаем отступы в шапке страницы */
    .academy-header {
        padding: 100px 0 40px;
    }

    .page-title-center {
        font-size: 32px; /* Уменьшаем шрифт заголовка */
        letter-spacing: 4px; /* Немного сужаем межсимвольный интервал */
    }

    /* Перестраиваем сетку уроков в одну колонку */
    .academy-item {
        grid-template-columns: 1fr; /* Одна колонка вместо двух */
        gap: 25px; /* Уменьшаем расстояние между видео и текстом */
        margin-bottom: 50px;
        padding-bottom: 50px;
    }

    /* Центрируем текстовую информацию для мобильных */
    .boss-info {
        text-align: center;
    }

    .boss-info h2 {
        font-size: 20px; /* Уменьшаем размер заголовка урока */
        margin-bottom: 12px;
    }

    .description-block p {
        font-size: 14px; /* Более читабельный размер для мобайла */
        padding: 0 10px;
    }

    /* Оптимизируем кнопку Play для пальца */
    .play-overlay-btn {
        width: 40px;
        height: 40px;
    }

    /* Убираем лишние контейнерные отступы, если нужно */
    .academy-list {
        padding: 0 15px;
    }
}

/* Дополнительная правка для совсем маленьких экранов (iPhone SE и т.д.) */
@media (max-width: 480px) {
    .page-title-center {
        font-size: 28px;
    }
    
    .boss-media {
        border-radius: 4px; /* Легкое скругление для мягкости дизайна */
    }
}