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

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "SF Pro Display", sans-serif;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.9) 0%, rgba(15, 15, 15, 0) 100%);
    backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 5px;
}

/* ------------ Navigation Menu ------------ */
.header__left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav__menu {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
}

.nav__menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    /*line-height: 24px;*/
    font-weight: 400;
    transition: opacity 0.2s;
    padding: 8px 16px;
}

.nav__menu a:hover {
    opacity: 0.7;
}

/* ------------ Actions ------------ */

.nav__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ------------ Button: Login ------------ */

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 12px 20px;
    background: #1842F0;
    border-radius: 60px;
    border: none;

    font-weight: 500;
    font-size: 18px;
    color: white;
    cursor: pointer;
}

.btn-login__img{
    width: 17px;
    height: 19px;
}

/* ------------ Language Selector ------------ */

.lang-select {
    position: relative;
}

.lang-select__btn {
    padding: 12px 20px;
    border-radius: 60px;
    border: 1px solid #E4E4E4;

    font-weight: 500;
    font-size: 18px;
    background: white;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-select__list {
    display: none;
    position: absolute;

    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    margin-top: 8px;

    background: white;
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    list-style: none;

    white-space: nowrap;
    z-index: 10;
}

.lang-select__list li {
    padding: 10px 20px;
    cursor: pointer;
}

.lang-select__list li:hover {
    background: #f0f0f0;
}

.lang-select.active .lang-select__list {
    display: block;
}

.lang-select__btn img {
    transition: transform 0.3s ease;
}

.lang-select.active .lang-select__btn img {
    transform: rotate(180deg);
}

.insta img {
    width: 32px;
    height: 32px;
}

/* ---------- BURGER ---------- */

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;

    width: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 4px;
    transition: 0.3s;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1000;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

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

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

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

/*----------------------------HERO-----------------------------------*/
.hero {
    position: relative;
    width: 100%;
    height: 107vh;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 70px 20px 40px;
}

.hero__video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: #1842F0B2; /* синее затемнение как в макете */
    z-index: -1;
}


.hero__content {
    position: relative;
    max-width: 940px;
    color: #fff;
}

.hero__content-title{
    font-size: 100px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero__content-text {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 32px;
    line-height: 36px;
}

/*sliders block*/
.slider-section {
    position: relative;
    padding: 20px 0;
    background: linear-gradient(180deg, rgba(24, 66, 240, 0) 0%, #1842F0 6.29%, #1842F0 49.52%, #1842F0 80%, rgba(24, 66, 240, 0) 100%);
    overflow: hidden;
    margin-top: -60px;
}

/* Градиенты */
.gradient-left,
.gradient-right {
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 3;
}

.gradient-left {
    left: 0;
    background: linear-gradient(to right, #003cff, transparent);
}

.gradient-right {
    right: 0;
    background: linear-gradient(to left, #003cff, transparent);
}

/* Контейнер для 4 слайдеров */
.sliders {
    display: grid;
    gap: 20px;
}

/* Каждая строка */
.slider-row {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.slider-row img {
    width: 352px;
    height: 240px;
    object-fit: cover;
    border-radius: 20px;
}

/* Бесконечная лента */
.slide-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 30s linear infinite;
    will-change: transform;
}

.reverse .slide-track {
    animation-direction: reverse;
}

/* Анимация движения */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Белый текст */
.slider-text {
    position: absolute;
    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: 100%;
    max-width: 1380px;
    background: #fff;
    padding: 48px;
    border-radius: 30px;

    font-family: "Inter", sans-serif;
    font-size: 40px;
    line-height: 44px;
    font-weight: 600;
    color: #1842F0;

    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 5;
}



/*values*/
.values {
    padding: 100px 10px;
    overflow: hidden;
}

.values__container {
    max-width: 1600px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 520px 1fr;
    gap: 32px;
    align-items: center;
}

/* Левая карточка */
.values__main-card {
    position: relative;
    background: linear-gradient(180deg, #1842F0 0%, rgba(24, 66, 240, 0.4) 100%);
    border-radius: 32px;
    color: white;
    /*overflow: hidden;*/
}

.values__main-card h2 {
    font-family: "SF Pro Display", sans-serif;
    margin: 48px 0 0 48px;
    font-size: 72px;
    line-height: 78px;
    font-weight: 700;

    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;

    /*font-size: clamp(40px, 5vw, 72px);*/
}

.lang-kz .values__main-card h2 {
    font-size: 48px;
}

.values__image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 32px;
}

/* Сердце поверх */
.values__heart {
    position: absolute;
    top: -120px;
    right: -90px;
    width: 267px;
    pointer-events: none;
}

/* Правая сетка карточек */
.values__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.value-card {
    background: #F3F3F3;
    border-radius: 32px;
    padding: 32px;
    position: relative;
    min-height: 300px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.value-card__text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 32px;
    line-height: 36px;
    margin: 15px 0 0;
}

.value-card__number {
    position: absolute;
    bottom: 20px;
    right: 25px;
    font-size: 16px;
    color: #C0C0C0;
}


/*---------------------stats------------------------*/
.stats {
    padding: 120px 10px;
    position: relative;
    overflow: hidden;
}

/* Контейнер */
.stats__container {
    max-width: 1600px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 520px 1fr;
    align-items: start;
    gap: 32px;
}

/* Заголовок */
.stats__title h2 {
    font-size: 72px;
    font-weight: 700;
    margin: 0;
}

.stats__title .blue {
    color: #1842F0;
}

/* Волна */
.stats__wave {
    position: absolute;
    left: 0;
    top: 10%;
    width: 100%;
    z-index: 1;
    opacity: 0.9;
    pointer-events: none;
}

/* Сетка карточек */
.stats__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 5;
}

/* Glass-карточки */
/* --- APPLE GLASS CARD --- */
.stats-card {
    position: relative;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
            inset 0 0 40px rgba(255, 255, 255, 0.25),
            0 8px 25px rgba(0, 0, 0, 0.08);

    overflow: hidden;

        padding: 48px;
        border-radius: 32px;

        background: #FFFFFF14;
        text-align: center;

    transition:
            transform 0.5s cubic-bezier(.22,1,.36,1),
            box-shadow 0.5s cubic-bezier(.22,1,.36,1),
            background-color 0.4s ease;
    will-change: transform;

    &:hover {
        /*background: #1842F0;*/
        /*color: #fff;*/

        .stats-card__number, .stats-card__text{
            color: #fff;
        }

        transform: translateY(-12px) scale(1.015);

        background: rgba(24, 66, 240, 0.9);

        box-shadow:
                inset 0 0 60px rgba(255,255,255,0.25),
                0 30px 60px rgba(0,0,0,0.25);
    }
}

.stats-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;

    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0.15) 100%
    );

    mix-blend-mode: overlay;
    pointer-events: none;
}

.stats-card__number {
    font-size: 56px;
    font-weight: 700;
    color: #1842F0;

    font-variant-numeric: tabular-nums; /* Цифры одной ширины, не дергается ширина блока */
    will-change: transform;
}

.stats-card__text {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    color: #232323;
    margin-top: 12px;
}



.stats-card__number,
.stats-card__text {
    transition:
            color 0.3s ease,
            transform 0.4s cubic-bezier(.22,1,.36,1);
}

.stats-card:hover .stats-card__number {
    transform: translateY(-2px);
}

.stats-card:hover .stats-card__text {
    transform: translateY(2px);
}


@media (hover: none) {
    .stats-card:hover {
        transform: none;
        background: rgba(255,255,255,0.22);
        box-shadow:
                inset 0 0 40px rgba(255,255,255,0.25),
                0 8px 25px rgba(0,0,0,0.08);
    }

    .stats-card:hover::before {
        transform: none;
        opacity: 0.6;
    }
}


/*GSAP photo*/
.all-photos-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
    margin: 200px 0;
}
.photos-section {
    position: relative;
    max-width: 90%;
    margin: 0 auto;
    padding: 10px 0;
    min-height: 100vh;
    overflow: visible;
}

.photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 200px;
    width: 100%;
}

.photo {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 48px;
    display: block;
}

.photo:nth-child(even) {
    margin-top: 150px;
}
.photos-overlay {
    position: sticky;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    visibility: visible;

    will-change: transform, opacity;
}
.photos-overlay__content {
    /*background: #F3F3F3;*/
    /*padding: 80px 36px;*/
    /*border-radius: 28px;*/
    /*max-width: 820px;*/
    /*text-align: center;*/
    /*!*box-shadow: 0 20px 50px rgba(0,0,0,0.15);*!*/
    /*pointer-events: auto;*/

    background: #F3F3F3;
    width: 100%;
    max-width: 820px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 40px 36px;

    border-radius: 28px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    pointer-events: auto;

    transition: min-height 0.3s ease;
}

.photos-overlay__title{
    font-size: 40px;
    font-weight: 700;
    color: #1842F0;
    margin-bottom: 12px;
}

.photos-overlay__text{
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    line-height: 22px;
    color: #232323;
}

.photos-overlay--shared {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

/*CTA-SECTION*/
.cta-section {
    display: flex;
    justify-content: center;
    padding: 150px 0;
}

.cta-container {
    background: #F6F6F6;
    border-radius: 60px;
    max-width: 1600px;
    width: 100%;
    padding: 80px;

    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    position: relative;
}

.cta-title {
    font-size: 88px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 32px;
    /*background: linear-gradient(90deg, #2D55F3 0%, #FF9345 50%, #8453D8 100%);*/
    background: linear-gradient(272.28deg, #1842F0 48.46%, #FF893F 71.5%, #1842F0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-btn {
    background: #1B4BFF;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 16px 28px;

    font-size: 18px;
    font-weight: 600;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s ease;
}

.cta-btn:hover {
    background: #0036E0;
    transform: translateY(-2px);
}

.cta-image-wrapper {
    display: flex;
    justify-content: flex-end;
}

.cta-image {
    /*width: 500px;*/
    object-fit: contain;
    position: absolute;
    bottom: 0;
    right: 80px;
}


/*-------------COURSES--------------------*/
.courses{
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 120px 0;
}
.courses-title {
    font-size: 72px;
}

.courses__header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 10px 40px 10px;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.courses-card {
    min-width: 330px;
    max-width: 330px;
    background: #F3F3F3;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    will-change: transform;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.courses-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.courses-card__img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
}

.courses-card__title {
    font-family: 'SF Pro Display', sans-serif;
    font-weight: 700;
    font-size: 24px;
    margin: 32px 32px 12px 32px;
}

.courses-card__text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 1px;
    color: #A4A4A4;
    margin: 0 32px 32px 32px;
}

.carousel-btn{
    position: absolute;
    bottom: -65px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
}

.courses-nav {
    border: none;
    background: none;
    cursor: pointer;
    transition: 0.2s;
}

.courses-nav:hover {
}

.prev { left: 0; }
.next { right: 0; }

/*-------------------how-study-----------------*/
.how-study {
    max-width: 1600px;
    margin: 0 auto;
    padding: 120px 5px;
}

.how-study__header {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.toggle-container {
    background: #F3F3F3;
    border-radius: 16px;
    padding: 8px;
    display: inline-flex;
    gap: 8px;
}

.toggle-btn {
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;

    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #A4A4A4;

    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #FF893F;
    color: white;
}

.toggle-btn:not(.active):hover {
    color: #555;
    background: rgba(0,0,0,0.05);
}

.how-study .title {
    font-size: 72px;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card {
    background: #F3F3F3;
    border-radius: 36px;
    padding: 32px;
    position: relative;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: background-color 0.3s ease;
}

.step-card:nth-child(3n + 1):last-child {
    grid-column: 2;
}

.step-card__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 36px;
    margin-bottom: 16px;
}

.step-card__text {
    color: #A4A4A4;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.45;
    z-index: 2;
}

.step-card__title,
.step-card__text,
.step-card .num {
    transition: color 0.3s ease; /* Добавили транзишн для текста */
}

.step-card__img{
    width: 200px;
    max-height: 231px;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.step-card .num {
    position: absolute;
    bottom: 32px;
    left: 32px;
    font-size: 60px;
    font-weight: 700;
    color: #A4A4A4;
}

.step-card:hover {
    background-color: #e0e0e0;
}

.step-card:hover .step-card__title {
    color: #000;
}

.step-card:hover .step-card__text {
    color: #000;
}

.step-card:hover .num {
    color: #000;
}


/*--------------------------------------------BEST-SLIDER---------------------------------*/
.best {
    padding: 60px 0;
    max-width: 100%;
    margin: 0 auto;
}

.best__title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #232323;
}

/* ---------- SLIDER ---------- */

.best-slider {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden; /* ВАЖНО: скрываем полосу прокрутки */
    width: 100%;
}

.best-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 10px 0 20px;
}

.best-track, .slide-track {
    will-change: transform; /* Выносим анимацию на GPU */
    /* Убедись, что используешь transform: translate3d(0,0,0) или translateZ(0) для ускорения */
}

.best-track::-webkit-scrollbar {
    display: none;
}

/* ---------- CARD ---------- */

.best-card {
    flex-shrink: 0;
    position: relative;
    min-width: 300px;
    height: 400px;
    border-radius: 32px;
    background: #4EACFF;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.best-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
}

.best-card__content {
    position: absolute;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 2;
}


.best-card__title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
    color: #111;
}

.badge {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 32px;
    background: rgba(78, 113, 255, 0.2);
    color: #1842F0;
    margin-bottom: 8px;
}

.date {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #232323;
}

/*------------------------------------------------------NEWS-----------------------------------------*/
.news {
    padding: 80px 10px;
    max-width: 1600px;
    margin: 0 auto;
}

.news__title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #232323;
}

/* ---------- GRID ---------- */

.news__grid {
    display: grid;
    grid-template-columns: repeat(3, 304px);
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

/* ---------- CARD ---------- */

.news-card {
    background: #F3F3F3;
    border-radius: 36px;
    padding: 20px;
    width: 100%;
    min-height: 380px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-card__content{
    margin-top: auto;
}

.news-card__title {
    font-family: "Inter", sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.news-card__desc {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    color: #A4A4A4;
    margin-bottom: 14px;
}

.news-card__date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #A4A4A4;
}

.news-card__date img {
    width: 18px;
    height: 20px;
}

/* ---------- BUTTON ---------- */

.news-card__btn {
    width: 100%;
    margin-top: 16px;
    align-self: flex-start;

    padding: 12px 0;
    background: #DCE4FF;
    color: #1842F0;
    border-radius: 20px;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 18px;
    text-decoration: none;

    transition: 0.2s;
}

.news-card__btn:hover {
    background: #C9D4FF;
}

/* ---------- MORE ---------- */

.news__more {
    display: flex;
    justify-content: center;
}

.news__more-btn {
    padding: 16px 24px;
    background: #1842F0;
    color: #ffffff;
    border-radius: 60px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
}


.best-card__photo{
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.08);
}

.best-card__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}


/* Скрыть стандартный контент Moodle на главной, но оставить placeholder */
/* Не ломаем layout Moodle */
#maincontent {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

#region-main > .no-overflow,
#region-main > [role="main"] > *:not(.smart-frontpage) {
    display: none !important;
}

.best-card{
  position: relative;
  overflow: hidden;
}

/* Градиент — под контентом и фото */
.best-card::after{
  content:"";
  position:absolute;
  inset:0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%);
}

/* Фото и текст — поверх градиента */
.best-card__photo,
.best-card__content{
  position: relative;
  z-index: 2;
}

.best-card__photo{
  width: 260px;
  height: 245px;
  border-radius: 7px;
  overflow: hidden;
  margin: 18px auto 12px;
  position: relative;
  z-index: 2;
}

/* Важно: перебить bootstrap img{height:auto} */
.best-card .best-card__photo > img.best-card__img{
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;   /* перебивает max-width:100% */
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.news-card__media{
    width: 100%;
    height: 170px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #E9E9E9;
}

.news-card__img{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.news-card__media--empty{
    background: #F0F0F0;
}


/* ---------------------------
   Moodle lang menu styling
   scope: .smart-lang
---------------------------- */

.smart-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 1) Если Moodle вывел SELECT */
.smart-lang select,
.smart-lang .custom-select select,
.smart-lang .langmenu select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  color: #fff;

  padding: 10px 42px 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1;

  cursor: pointer;
  outline: none;
}

/* стрелка справа (если select) */
/* .smart-lang::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 10px;
  height: 10px;
  pointer-events: none;
  opacity: .85;
  transform: rotate(45deg);
  border-right: 2px solid rgba(255,255,255,.85);
  border-bottom: 2px solid rgba(255,255,255,.85);
} */

/* hover/focus */
.smart-lang select:hover,
.smart-lang select:focus {
  border-color: rgba(255,255,255,.45);
  background: rgba(0,0,0,.25);
}

/* ---------------------------
   2) Если Moodle вывел dropdown (bootstrap-like)
---------------------------- */

/* скрываем текстовые лейблы типа "Language" если есть */
.smart-lang label,
.smart-lang .sr-only,
.smart-lang .accesshide {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* кнопка dropdown */
.smart-lang .dropdown-toggle,
.smart-lang button.dropdown-toggle,
.smart-lang .btn.dropdown-toggle {
  border: 1px solid rgba(255,255,255,.25) !important;
  background: rgba(0,0,0,.15) !important;
  color: #fff !important;

  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 14px !important;

  box-shadow: none !important;
}

/* убираем стандартную каретку bootstrap, если мешает */
.smart-lang .dropdown-toggle::after {
  margin-left: 10px !important;
  opacity: .85;
}

/* меню */
.smart-lang .dropdown-menu {
  min-width: 160px;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(20, 20, 20, .98);
}

/* пункты */
.smart-lang .dropdown-menu a,
.smart-lang .dropdown-item {
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.smart-lang .dropdown-menu a:hover,
.smart-lang .dropdown-item:hover {
  background: rgba(255,255,255,.10);
}

/* активный язык */
.smart-lang .dropdown-item.active,
.smart-lang .dropdown-menu .active > a {
  background: rgba(255,255,255,.16);
}
/* =========================
   Moodle lang_menu (select2) overrides
   Works for: select2-container--bootstrap-5
   Scope: .smart-lang
   ========================= */

/* скрываем label "Language" */
.smart-lang .langmenu label {
  display: none !important;
}

/* скрываем оригинальный select (он и так hidden, но на всякий) */
/* .smart-lang select.langmenu {
  display: none !important;
} */

/* контейнер select2 */
.smart-frontpage-page .smart-lang .select2-container {
  font-size: 14px !important;
}

/* сама "кнопка" */
.smart-frontpage-page .smart-lang .select2-container--bootstrap-5
.select2-selection--single {
  background: rgba(0, 0, 0, .15) !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  border-radius: 10px !important;
  height: 42px !important;
  min-height: 42px !important;
  box-shadow: none !important;
  outline: none !important;
}

/* текст выбранного языка */
.smart-frontpage-page .smart-lang .select2-container--bootstrap-5
.select2-selection--single .select2-selection__rendered {
  color: #fff !important;
  line-height: 30px !important;
  padding-left: 14px !important;
  padding-right: 10px !important;
}

/* стрелка */
.smart-frontpage-page .smart-lang .select2-container--bootstrap-5
.select2-selection--single .select2-selection__arrow {
  height: 42px !important;
  right: 10px !important;
}

/* hover/focus */
.smart-frontpage-page .smart-lang .select2-container--bootstrap-5
.select2-selection--single:hover {
  background: rgba(0, 0, 0, .25) !important;
  border-color: rgba(255, 255, 255, .45) !important;
}

.smart-frontpage-page .smart-lang .select2-container--bootstrap-5.select2-container--focus
.select2-selection--single,
.smart-frontpage-page .smart-lang .select2-container--bootstrap-5.select2-container--open
.select2-selection--single {
  border-color: rgba(255, 255, 255, .55) !important;
  box-shadow: none !important;
}

/* ===== dropdown (список языков) ===== */

/* сам дропдаун */
.smart-frontpage-page .select2-container--bootstrap-5 .select2-dropdown {
  background: rgba(20, 20, 20, .98) !important;
  border: 1px solid rgba(255, 255, 255, .15) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.35) !important;
}

/* УБРАТЬ ПОИСК */
.smart-frontpage-page .select2-container--bootstrap-5 .select2-search,
.smart-frontpage-page .select2-container--bootstrap-5 .select2-search--dropdown,
.smart-frontpage-page .select2-container--bootstrap-5 .select2-search__field {
  display: none !important;
}

/* список */
.smart-frontpage-page .select2-container--bootstrap-5 .select2-results__options {
  padding: 8px !important;
}

/* пункт */
.smart-frontpage-page .select2-container--bootstrap-5 .select2-results__option {
  color: #fff !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
}

/* hover */
.smart-frontpage-page .select2-container--bootstrap-5
.select2-results__option--highlighted.select2-results__option--selectable {
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
}

/* выбранный */
.smart-frontpage-page .select2-container--bootstrap-5
.select2-results__option--selected {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
}

/* убираем "Go" (noscript) если вдруг виден */
.smart-lang noscript {
  display: none !important;
}
/* ===== FORCE hide select2 search in lang menu ===== */
.smart-frontpage-page .smart-lang .select2-search,
.smart-frontpage-page .smart-lang .select2-search--dropdown,
.smart-frontpage-page .smart-lang .select2-search--dropdown.select2-search--hide,
.smart-frontpage-page .smart-lang .select2-search--dropdown.select2-search--hide .select2-search__field,
.smart-frontpage-page .smart-lang .select2-search__field {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* иногда search остаётся как span с высотой — прибиваем его */
.smart-frontpage-page .smart-lang span.select2-search.select2-search--dropdown {
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* убираем верхний отступ списка, который обычно создаёт поиск */
.smart-frontpage-page .smart-lang .select2-dropdown .select2-results {
  padding-top: 0 !important;
}
.smart-frontpage-page .smart-lang .select2-results__options {
  margin-top: 0 !important;
}
/* глобально скрыть search только для select2 bootstrap-5 контейнера */
.select2-container--bootstrap-5 .select2-search--dropdown,
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  display: none !important;
}
/* ===== Make dropdown visually merge with the top (Select2) ===== */

/* 1) Когда селект открыт — убираем нижние скругления у "кнопки" */
.smart-frontpage-page .smart-lang
.select2-container--open .select2-selection--single {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom-color: transparent !important; /* чтобы не было двойной линии */
}

/* 2) Сам dropdown: убираем верхние скругления и поднимаем на 1px, чтобы слиться */
.smart-frontpage-page .select2-container--bootstrap-5 .select2-dropdown {
  margin-top: -1px !important;                 /* склейка */
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  overflow: hidden !important;
}

/* 3) Чтобы ширина dropdown была точно как у кнопки */
.smart-frontpage-page .select2-container {
  width: auto !important;
}

/* 4) Красивее список: чуть меньше "мудловского" и аккуратнее */
.smart-frontpage-page .select2-container--bootstrap-5 .select2-results__options {
  padding: 6px !important;
}

.smart-frontpage-page .select2-container--bootstrap-5 .select2-results__option {
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

/* 5) Hover/active мягче */
.smart-frontpage-page .select2-container--bootstrap-5
.select2-results__option--highlighted.select2-results__option--selectable {
  background: rgba(255,255,255,.10) !important;
}

/* 6) Выбранный пункт (selected) */
.smart-frontpage-page .select2-container--bootstrap-5
.select2-results__option--selected {
  background: rgba(255,255,255,.14) !important;
}


/* Чтобы картинки не "прыгали" и не ломали триггеры */
.courses-card__img,
.best-card__img,
.news-card__img,
.photo,
.values__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Резервируем место под сетку фото */
.photos-grid .photo {
  aspect-ratio: 1 / 1;   /* или твой формат, например 4/5 */
}

/* Картинки курсов */
.courses-card__img {
  aspect-ratio: 16 / 9;
  border-radius: 16px; /* если надо */
}

/* Новости */
.news-card__img {
  aspect-ratio: 16 / 9;
}

/* Best (аватарки) */




/* чтобы табы точно ловили тап */
.courses .toggle-container {
  position: relative;
  z-index: 50;
}

.course-toggle {
  position: relative;
  z-index: 51;
  pointer-events: auto;
  touch-action: manipulation;
}

/* если где-то есть общий overlay */
.menu-overlay {
  pointer-events: none; /* по умолчанию */
}
.menu-overlay.active {
  pointer-events: auto; /* только когда меню открыто */
}
.values,
.stats,
.courses,
.how-study,
.photos-section,
.news,
.best {
  scroll-margin-top: 90px;
}
