:root {
    --color-bg: #f7f8fa;
    --color-bg-secondary: #fff;
    --color-text: #232a3a;
    --color-text-secondary: #444;
    --color-accent: #4d7cff;
    --color-accent-hover: #2dabc4;
    --color-card-bg: #fff;
    --color-card-shadow: 0 2px 16px #e3e8f0;
    --color-btn-bg: #4d7cff;
    --color-btn-text: #fff;
    --color-navbar-bg: #cfe2ff;
    --color-navbar-link: #232a3a;
    --color-navbar-link-hover: #4d7cff;
    --color-footer-bg: #cfe2ff;
    --color-footer-bottom-bg: #c1d8fc;
    --color-footer-text: #232a3a;
    --color-footer-link: #232a3a;
    --color-footer-link-hover: #4d7cff;
    --color-footer-accent: #4d7cff;
    --color-footer-tagline: #444;
    --color-footer-border: #e3e8f0;
    --color-card-border: #e3e8f0;
    --color-card-title: #232a3a;
    --color-card-desc: #444;
    --color-hero-face-label: #232a3a;
    --color-hero-face-bg: #fff;
    --color-hero-face-shadow: 0 2px 16px #e3e8f0;
    --color-overlay-bg: rgba(255,255,255,0.92);
    --color-overlay-text: #232a3a;
    --color-carousel-indicator: #232a3a;
    --color-carousel-indicator-active: #4d7cff;
    --color-carousel-arrow: #4d7cff;
    --color-carousel-shadow: #e3e8f0;
    --color-btn-secondary-bg: #e3e8f0;
    --color-btn-secondary-text: #4d7cff;
    --color-input-bg: #fff;
    --color-input-text: #232a3a;
    --color-border: #e3e8f0;
    --color-progress-bar: #4CAF50;
    --color-success: #28a745;
    --color-success-hover: #218838;
    --color-danger: #dc3545;
    --color-danger-hover: #bb2d3b;
    --color-link: #4d7cff;
    --color-link-hover: #2dabc4;
    --color-hero-gradient: #e3e8f0;
    --color-hero-btn-bg: var(--color-accent);
    --color-hero-btn-text: #fff;
    --color-hero-btn-hover-bg: var(--color-accent);
    --color-hero-btn-hover-text: #fff;
    --primary-font: "Onest", sans-serif;

}




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


body {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text);
    flex-direction: column;
    font-family: var(--primary-font);
}

.captcha{
    width:clamp(50px,100px,200px);
    height: clamp(30px, 50px, 100px);
}

/* Цвет наименования полей во crispy form */
.form-label{
    color: rgb(255, 0, 0);
}

button{
    cursor: default;
}

header{
    display: flex;
    place-content: center;
    width: 100%;
    position: relative;
}

.navbar {
    background-color: var(--color-navbar-bg) !important; /* Переопределяем фон */
    width: 100%;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar #logopng{
    width: clamp(100px, 15vw, 200px);
    transition: width 0.3s ease;
}

.navbar #logolink{
    position: relative;
    font-size: 2em;
    color:#797878;
}

.navbar-nav .nav-link {
    color: var(--color-navbar-link) !important; /* Цвет текста */
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: var(--color-navbar-link-hover) !important; /* Цвет текста при наведении */
}

.nav-profile-actions {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1001;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.nav-profile-actions .nav-link {
    color: var(--color-navbar-link) !important;
    padding: 0.5rem !important;
}

.nav-profile-actions .nav-link:hover {
    color: var(--color-navbar-link-hover) !important;
}

/* Навигация: эмодзи до загрузки веб-шрифта Font Awesome (медленный CDN) */
.nav-icon-slot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    vertical-align: middle;
}

.nav-icon-slot__emoji {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
    line-height: 1;
    font-style: normal;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.nav-icon-slot__fa {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

html.nav-fa-ready .nav-icon-slot__emoji {
    opacity: 0;
}

html.nav-fa-ready .nav-icon-slot__fa {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .nav-icon-slot__emoji,
    .nav-icon-slot__fa {
        transition: none;
    }
}

.navbar-avatar-wrap {
    position: relative;
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-avatar-wrap__emoji {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.35rem;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 0;
}

.navbar-avatar--defer {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.navbar-avatar-wrap.is-loaded .navbar-avatar-wrap__emoji {
    opacity: 0;
}

.navbar-avatar--defer.is-loaded {
    opacity: 1;
}

.navbar-avatar.is-broken {
    display: none;
}

@media (max-width: 900px) {
    .navbar-avatar-wrap {
        width: 32px;
        height: 32px;
    }

    .navbar-avatar-wrap__emoji {
        font-size: 1.15rem;
    }
}

.custom-navbar .navbar-nav {
    margin-right: 130px; /* отступ от колокольчика и аватара */
}

.form-group{
    width: 50%;
    place-self: center;
    margin-bottom: 10px;
}

main {
    flex: 1;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 100px;
}

main section {
    display: flex;
    position: relative;
    width: 95%;
    height: 80vh;
    /* border: 5px solid red; */
    justify-self: center;
}

section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
}



#clinicajpg {
    width: 40%;
    position: absolute;
    bottom: 5%;
    right: 5%;

    transition: all 0.5s ease 0s;
}

#doc1_image {
    width: 260px;
    height: 360px;
    position: absolute;
    bottom: 30%;
    right: 75%;
    border: 1px solid darkgoldenrod;
    border-radius: 10%;
    box-shadow: -5px 10px 5px -5px rgb(0 0 100 / 0.6);

    transition: all 0.5s ease 0.5s;
}

#doc2_image {
    width: 220px;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 1px solid darkgoldenrod;
    border-radius: 10%;
    box-shadow: -5px 10px 5px -5px rgb(0 0 100 / 0.6);

    transition: all 0.5s ease 0.5s;
}

.section__inner-text{
    position: absolute;
    font-size: .9rem;
    left: 37%;
    top: 35%;
    width: 30%;
    height: 400px;
}


#section-3{
    height: 50vh;
}

    /* Стили только для новой карусели сотрудников */
    #staffCarousel {
        width: 97vw;
        margin-left: calc(-50vw + 50%);
        height: 75vh;
        overflow: hidden;
        position: relative;
    }

    #staffCarousel .carousel-inner,
    #staffCarousel .carousel-item {
        height: 100%;
        
    }

    #staffCarousel .carousel-item img {
        width: 80%;
        place-self: center;
        height: 40vh;
        object-fit: cover;
    }



    /* Кастомные индикаторы только для этой карусели */
    #staffCarousel .staff-indicators {
        bottom: 35%;
        gap: 12px;
    }

    #staffCarousel .staff-indicators button {
        width: 14px;
        height: 14px;
        border: 2px solid var(--color-carousel-indicator);
        background: transparent;
        opacity: 0.7;
        transition: all 0.3s ease;
    }

    #staffCarousel .staff-indicators .active {
        background: var(--color-carousel-indicator-active);
        opacity: 1;
        transform: scale(1.2);
    }

    /* Стили для текстового блока */
    #staffCarousel .text-overlay {
        position: absolute;
        top: 27%;
        left: 29%;
        transform: translate(-50%, -50%);
        width: 70%;
        max-width: 30%;
        max-height: 50%;
        background: var(--color-overlay-bg);
        padding: 2rem;
        border-radius: 10px;
        z-index: 2;
        color: var(--color-overlay-text);

        overflow: hidden;
    }

    #staffCarousel .text-overlay p {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 0.8rem;
        text-align: center;
    }

    #staffCarousel .text-overlay ul {
        list-style: none;
        padding-left: 0;
        margin-bottom: 0;
    }

    #staffCarousel .text-overlay li {
        position: relative;
        padding-left: 1.5rem;
        margin-bottom: 0.8rem;
        line-height: 1.4;
    }

    #staffCarousel .text-overlay li:before {
        content: "•";
        position: absolute;
        left: 0;
        color: #4CAF50;
        font-size: 1.2rem;
    }


    /* отображение видео в деталях урока */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 соотношение */
    height: 0;
    overflow: hidden;
    margin: 20px 0;
}

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

/* Адаптация iframe видео из CKEditor для мобильных устройств */
@media (max-width: 768px) {
    .lesson-content iframe[src*="rutube.ru"] {
        width: 100% !important;
        max-width: 500px !important;
        height: auto !important;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .lesson-content iframe[src*="rutube.ru"] {
        width: 328px !important;
        height: 200px !important;
        max-width: 100% !important;
    }
}

.scale_on_hover:hover{
    scale: 1.5;
}

.fixed {
	position: fixed;
	width: 100%;
	left: 0;
	top: 0;
    z-index: 500;
}


.persons__item {
	opacity: 0;
	transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}


.persons__item.animation-class {
	opacity: 1;
	transform: translateX(-30px);
	transition: opacity 0.3s ease-in-out, transform 1.3s ease-in-out;
}



.persons__item.animation-class:nth-child(2) {
	transform: translateX(30px);
    transition-delay: 1s;
}


main > section > .text-block {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    max-width: 50%;
    font-size: 1.3em;
}

main > section > .text-block-2 {
    position: absolute;
    top: 0;
    left: 70%;
    padding: 10px;
    max-width: 50%;
    font-size: 1.3em;
}


.cards-box{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15%;
    margin-bottom: 15%;
}


.cards-box .box{
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 30vw;
    height: 28vh;
    border: 3px solid var(--color-card-border);
    border-radius: 15%;
}

.cards-box > .box > svg{
    margin: auto;
}

.box h5{
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
}

.box p{
    margin-bottom: 15%;
    text-align: center;
    font-size: 0.8em;
    
}
.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: all 1.2s ease-in-out 0.2s;
}

.show {
    opacity: 1;
    transform: scale(1);
}
/* course_detail.html styles */
.progress {
    height: 25px;
    border-radius: 12px;
}

.progress-bar {
    background-color: var(--color-progress-bar);
    transition: width 0.5s ease-in-out;
}

.btn-success {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.btn-success:hover {
    background-color: var(--color-success-hover);
    border-color: var(--color-success-hover);
}


.list-group-item-action {
    transition: all 0.3s ease;
}

.badge {
    font-size: 0.9em;
    padding: 0.5em 0.75em;
}


/* --- */
.content-section{
    font-family: var(--primary-font);
}

.content-section h1{
    text-align: center;
    margin-bottom: 2vh;
    padding-bottom: 2vh;
    border-bottom: 1px solid var(--color-border);
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.lesson-navigation .btn {
    min-width: 200px;
}

.lesson-actions {
    display: flex;
    justify-content: space-around;
    flex-direction: column;
}

.lesson-actions form{
    display: inline-block;
}

.lesson-actions .btn-success {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}


.login-out-actions .btn {
    border-radius: 20px; /* Закругленные края */
    font-weight: bold;  /* Жирный текст */
    transition: all 0.3s ease; /* Плавный переход при наведении */
}

.login-out-actions .btn:hover {
    background-color: var(--color-link); /* Цвет при наведении */
    color: var(--color-btn-text); /* Цвет текста при наведении */
}


.warning-info-about{
    position: relative;
    margin-top: 90px;
    left: 70%;
    padding: 15px;
    display: flex;
    /* border: 5px dotted rgb(162, 159, 159); */
    align-self: center;
    flex-direction: column;
    font-family: cursive;
    font-style: italic;
}

.warning-info-about a a:hover{
    cursor: default;
}

#show_all_courses_btn{
    background-color: var(--color-link);
    width: fit-content;
    height: fit-content;
}

.course-info-block {
    place-self: center;
    text-align: center;
    height: 150px;
    width: 80%;
    margin-top: 20px;
    padding: 20px;
    background-color: var(--color-card-bg);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.course-info-block h5 {
    font-family: 'Montserrat', serif;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.course-info-block a{
    text-decoration: none;
}

.course-info-block p {
    font-size: 1em;
    font-family: 'Open Sans', sans-serif; /* Хорошо читаемый шрифт */
    color: var(--color-card-desc);
    
}

.carousel-item img {
    /* max-width: 700px; */
    height: 400px;
    object-fit: cover; /* Чтобы сохранить пропорции */
    border-radius: 10%;
    box-shadow: 3px 3px 10px var(--color-carousel-shadow);
}

.carousel-control-prev,
.carousel-control-next{
    height: 35%;
    padding-top: 13%;
}

#show_all_courses_btn:hover{
    color:var(--color-btn-text);
}

#course_detail_img{
    width: 90%;
    max-height: 400px;
    margin-left: 15px;
    margin-top: 10px;
}

.course-detail-content{
    place-self: center;
}

.course-detail-content li {
    padding: 5px;
}

/* Для правильного отображения кнопок */
.course-actions, .lesson-actions {
    margin: 20px 0;
}

/* Навигация в lesson_detail */
.lesson-navigation {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.lesson-navigation .btn {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin: 0 5px;
}
.course-actions{
    display: flex!important;
    flex-direction: row!important;
    justify-content: space-around;
    font: 1em sans-serif;
}

.card .btn{
    width: 100px;
}

.card-body a{
    cursor: default;
}

.course-actions a, .course-actions .btn {
    cursor: default;
}

.lesson-actions{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}
/* Кнопка удаления */
.btn-danger {
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background-color: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
}

/* Цвет текста по умолчанию для ввода поля ввода в форме создании урока */
.ck-editor__main {
    color: #333 !important;
    background-color: white !important;
}

    /* Стили для выравнивания изображений */
    /* Выравнивание изображений */
    .image-style-align-left {
        float: left;
        margin-right: 1.5rem;
        margin-bottom: 1rem;
        max-width: 50%;
    }

    .image-style-align-right {
        float: right !important;
        margin-left: 1.5rem !important;
        margin-bottom: 1rem !important;
        max-width: 50%;
        clear: right;
    }

    .image-style-align-center {
        display: block;
        margin: 1rem auto;
        max-width: 80%;
    }

    figure.image img{
        width: 100%;
        height: auto;
    }

    /* Очистка потока */
    .lesson-content::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Размеры шрифта */
    .ck-content {
        font-size: 16px;
        line-height: 1.6;
    }

    .ck-content p, .ck-content li {
        font-size: inherit;
    }

    .ck-content h1 { font-size: 2.0em; }
    .ck-content h2 { font-size: 1.8em; }
    .ck-content h3 { font-size: 1.6em; }

    /* Исправление конфликтов с Bootstrap */
    .lesson-content p {
        overflow: auto;
    }

    

    .lesson-content img {
        max-width: 100%;
        height: auto;
    }

.lesson-btns{
    height: var(--btn-height-at-lesson-detail);
    width: var(--btn-width-at-lesson-detail);
}

/* CKEditor content */
.lesson-content {
    color: #212529;
    font-size: 1rem;
    line-height: 1.5;
    overflow: visible;
    position: relative;
}
.lesson-content a {
    color: #0d6efd;
    text-decoration: underline;
}
.lesson-content a:hover {
    color: #0a58ca;
}

.lesson-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    background: #fafbfc;
    font-size: 1em;
    position: relative;
    z-index: 1;
    display: table;
    table-layout: auto;
}
.lesson-content th, .lesson-content td {
    border: 1px solid #bbb;
    padding: 8px 12px;
    text-align: left;
    position: relative;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.lesson-content th {
    background: #f3f3f3;
    font-weight: 600;
    text-align: center;
}
.lesson-content tr {
    position: relative;
    z-index: 1;
    display: table-row;
}
.lesson-content tr:nth-child(even) {
    background: #f7f7f7;
}

/* Дополнительные стили для предотвращения наложения таблиц */
.lesson-content table + table {
    margin-top: 24px;
}

.lesson-content table tbody {
    display: table-row-group;
}

.lesson-content table thead {
    display: table-header-group;
}

.lesson-content table tfoot {
    display: table-footer-group;
}

.lesson-content table colgroup {
    display: table-column-group;
}

.lesson-content table col {
    display: table-column;
}
/* CKEditor wrappers: fix overlay caused by inline heights and bootstrap .table clash */
.lesson-content figure.table {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important; /* override inline height like style="height:71px;" */
    overflow: visible;
    margin: 16px 0;
    background: transparent;
    border: 0;
}
.lesson-content figure.table > table {
    width: 100% !important;
    margin: 0;
}
.lesson-content figure.image {
    display: block;
    max-width: 100%;
    height: auto !important;
    margin: 16px 0;
}
.lesson-content .raw-html-embed {
    display: flex;
    width: 100%;
    margin: 16px 0;
    overflow: visible;
    justify-content: center;
}
.lesson-content .raw-html-embed iframe {
    display: block;
    width: 100%;
    max-width: 960px; /* ограничение на десктопе */
    aspect-ratio: 16/9; /* сохраняем пропорции видео */
    height: auto;
}

/* На случай, если iframe вставлен без .raw-html-embed */
.lesson-content iframe[src*="rutube.ru"],
.lesson-content iframe[src*="youtube.com"],
.lesson-content iframe[src*="youtu.be"] {
    display: block;
    margin: 16px auto;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16/9;
    height: auto;
}

/* Оформление заглушки для «битых» картинок */
/* Убрал, так как нет необходимости, восстановить если будет картинка */
/* .img-fallback {
    object-fit: contain;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    padding: 8px;
    width: 30%;
} */
/* Подпись к таблице */
.lesson-content figcaption {
    caption-side: top;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    color: #444;
    background: #f3f3f3;
    padding: 8px 0 8px 0;
    border-radius: 4px 4px 0 0;
    letter-spacing: 0.02em;
}
.lesson-content p {
    margin: 0 0 12px 0;
    color: var(--color-text);
}
.lesson-content h1, .lesson-content h2, .lesson-content h3 {
    margin: 18px 0 10px 0;
    font-weight: 700;
}
/* .lesson-content ul, .lesson-content ol {
    margin: 0 0 12px 24px;
} Возможно затирают иконки в навигации */ 
.lesson-content img {
    max-width: 100%;
    height: auto;
    display: block;
    /* margin: 12px 0; */
}



/* Анимация завершения курса */
.completion-animation {
    /* Убираем display: none из стилей */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex; /* По умолчанию видим */
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.5s ease-in-out;
    cursor: pointer;
}

.completion-message {
    cursor: default;
    pointer-events: none; 
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: scaleUp 0.5s ease-in-out;
}

.completion-message h2 {
    font-size: 2rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.completion-message p {
    font-size: 1.5rem;
    color: #333;
}

.confetti {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("confetti.08a1e6cd65ac.gif") no-repeat center center;
    background-size: cover;
    z-index: -1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}
/* ---- */



#id_image_helptext, #id_allowed_groups_helptext,
#id_video_id_helptext{
    color: var(--color-text);
}

/* во вкладке регистрации текст с информацией о требованиях к имени пользователя */
#id_username_helptext{
    color: #333;
}
/* во вкладке регистрации текст с информацией о требованиях к паролю */
#id_password1_helptext{
    color: var(--color-text);
}
/* во вкладке регистрации текст с информацией о подтверждении пароля */
#id_password2_helptext{
    color: var(--color-text);
}
/* Текст "Уже есть аккаунт" стилизуется непосредственно в templates/users/register.html */

/* Footer new */
.footer-main {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    width: 100%;
    padding: 40px 0 0 0;
    border-top: 2px solid var(--color-footer-border);
    font-family: var(--primary-font);
    margin-top: 40px;
    z-index: 100;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    gap: 32px;
}

.footer-col {
    flex: 1 1 200px;
    min-width: 200px;
    margin-bottom: 24px;
}

.footer-brand {
    max-width: 260px;
}
.footer-logo {
    width: 200px;
    margin-bottom: 12%;
    display: block;
}

/* Дублированный логотип для мобильных устройств */
.footer-logo-mobile {
    display: none;
    width: 80px;
    margin: 8px auto 8px auto;
    max-width: 100%;
    height: auto;
}

.footer-tagline {
    font-size: 1em;
    color: var(--color-footer-tagline);
    margin-top: 6px;
    font-style: italic;
}

.footer-links h5,
.footer-social h5,
.footer-contact h5 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--color-footer-accent);
    letter-spacing: 0.5px;
}
.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links ul li,
.footer-contact ul li {
    margin-bottom: 7px;
}
.footer-links a,
.footer-contact a {
    color: var(--color-footer-link);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-footer-link-hover);
    text-decoration: underline;
}

.footer__social-media {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 3px;
}
.footer__social-media-elem {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #333;
    padding: 4px;
    transition: background 0.2s, transform 0.2s;
}
.footer__social-media-elem:hover {
    background: var(--color-footer-accent);
    transform: scale(1.12);
}

.footer-bottom {
    border-top: 1px solid var(--color-footer-border);
    margin-top: 12px;
    padding: 16px 32px 8px 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.98em;
    background: var(--color-footer-bottom-bg);
    overflow-x: hidden;
}
.footer-text {
    color: var(--color-footer-text);
    font-size: 0.95em;
    font-style: italic;
    text-align: center;
    /* flex: 1 1 200px; */
}
.site-version {
    color: var(--color-footer-accent);
    font-size: 0.95em;
    font-weight: 600;
    margin-right: 18px;
}
.footer-policy {
    color: var(--color-footer-link);
    text-decoration: none;
    margin-left: 18px;
    transition: color 0.2s;
    font-size: 0.95em;
}
.footer-policy:hover {
    color: var(--color-footer-link-hover);
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 900px) {

    .footer-main {
        margin-top: 50px;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 12px;
        gap: 18px;
    }
    .footer-col {
        width: 100%;
        min-width: unset;
        margin-bottom: 14px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        /* padding: 12px 12px 8px 12px; */
        gap: 8px;
        overflow-x: hidden;
    }
    .footer-policy, .site-version, .footer-text {
        margin: 0;
        font-size: 0.92em;
    }
    
    /* На планшетах тоже показываем мобильный логотип */
    .footer-logo {
        display: none;
    }
    .footer-logo-mobile {
        display: block;
        width: 90px;
        margin-top: 10px;
        margin-bottom: 6px;
    }
}


/* Для больших экранов */
@media (min-width: 2300px){
    main section #clinicajpg {
        width: 700px;
        position: absolute;
        bottom: 5%;
        right: 0;
    }

    .section__inner-text{
        font-size: 1.3rem;
    }

    #doc1_image {
        width: 360px;
        height: 500px;
        position: absolute;
        bottom: 25%;
        right: 80%;
        
        

    }
    
    #doc2_image {
        width: 360px;
        position: absolute;
        bottom: 5%;
        right: 0;
        
         z-index: 2;  /* Индекс для наложения поверх текста section__inner-text во время наведения курсора*/

    }

    main > section > .text-block-2 {
        position: absolute;
        top: -20%;
        left: 50%;
        padding: 10px;
        max-width: 50%;
    }
    
    
}

@media (min-width: 1700px){
    main > section > .text-block-2 {
        position: absolute;
        top: 20%;
        left: 70%;
        padding: 10px;
        max-width: 50%;
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    
    body {
        display: flex;
        height: 100vh;
        max-width: 768px;
    }

    .navbar .navbar-toggler{
        font-size: smaller;
    }

    /* .navbar #logopng{
        width: 100px;
    } */

    .custom-navbar .navbar-nav {
        margin-right: 0px;
    }

    .custom-nav-list .nav-item.staff-icons-row {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 0px;
    }

    /* Карточка с действиями курса в course-details */
    .card{
        margin-top: 1vh;
    }

    main {
        flex: 1;
        place-content: center;
        padding: 5px;
        position: relative;
    
    }

    

    #clinicajpg {
        width: 260px;
        position: absolute;
        bottom: 5%;
        right: 0;
    }

    
    /* Стили только для новой карусели сотрудников */
    #staffCarousel {
        width: 900px;
        margin-left: calc(-50vw + 40%);
        height: 75vh;
        overflow: hidden;
        position: relative;
    }

    #staffCarousel .carousel-inner,
    #staffCarousel .carousel-item {
        height: 100%;
        
    }

    #staffCarousel .carousel-item img {
        width: 100%;
        max-width: 100%;
        height: 20vh;
        max-height: 20vh;
        object-fit: contain;
        object-position: center;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }



    /* Кастомные индикаторы только для этой карусели */
    #staffCarousel .staff-indicators {
        bottom: 55%;
        gap: 12px;
    }

    #staffCarousel .staff-indicators button {
        width: 7px;
        height: 7px;
        border: 2px solid var(--color-carousel-indicator);
        background: transparent;
        opacity: 0.7;
        transition: all 0.3s ease;
    }

    #staffCarousel .staff-indicators .active {
        background: var(--color-carousel-indicator-active);
        opacity: 1;
        transform: scale(1.2);
    }

    /* Стили для текстового блока */
    #staffCarousel .text-overlay {
        position: absolute;
        top: 12%;
        left: 38%;
        transform: translate(-50%, -50%);
        width: 40%;
        height: 20%;
        max-width: 580px;
        max-height: 240px;
        background: var(--color-overlay-bg);
        padding: 2rem;
        border-radius: 10px;
        z-index: 2;
        color: var(--color-overlay-text);
        font-size: 0.5em;

        overflow: scroll;
    }

    #staffCarousel .text-overlay p {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        text-align: center;
    }


    .card .btn {
        font-size: 0.6em;
        width: 70px;
        height: 40px;

        overflow: hidden;
    }
    

    #doc1_image {
        width: 150px;
        height: 280px;
        position: absolute;
        bottom: 20%;
        right: 70%;

        transition: all 0s ease 0s;
    }
    
    #doc2_image {
        width: 150px;
        position: absolute;
        bottom: 5%;
        right: 0;

        transition: all 0s ease 0s;
    }

    .scale_on_hover:hover{
        scale: 1;
    }

    .carousel-block {
        margin-left: -15px;
        width: calc(100% + 30px);
    }
    
    #staticCarousel,
    .carousel-item {
        height: 70vh;
    }

    main > section > .text-block {
        position: absolute;
        top: 0;
        left: 0;
        padding: 5px;
        max-width: 300px;
        font-size: 0.9em;
    }

    .login-out-actions{
        margin-left: 2%;
    }


    .warning-info-about{
        margin-top: 45px;
        padding: 8px;
        left: 20%;

    }

    .course-info-block {
        height: 75px;
        font-size: 1.25rem;
        margin-top: 10px;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 0 5px rgba(0,0,0,0.1);
    }
    
    .course-info-block h5 {
        font-size: 0.8em;
        margin-bottom: 5px;
    }
    
    .course-info-block p {
        font-size: 0.5em;
    }

    .carousel-item img {
        max-width: 70%;
        height: 200px;
        object-fit: cover; /* Чтобы сохранить пропорции */
    }

    .content-section{
        place-self: center;
        width: 100%;
        padding: 5%;
    }

    .content-section .form-group{
        width: 100%;
    }

    .lesson-actions {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        align-content: center;
        flex-direction: column;
        width: 100%;
    }

    .lesson-actions .lesson-btns{
        width: 85%;
        margin-top: 3%;
    }
    
    .lesson-actions form{
        display: inline-block;
    }

    .lesson-actions .btn-danger{
        width: 100%;
    }
    
    .lesson-actions .btn-success {
        font-size: 1rem;
    }
    
    
}

@media (max-width: 600px) {
    .footer-main {
        padding: 24px 0 0 0;
    }
    .footer-logo {
        display: none; /* Скрываем оригинальный логотип на мобильных */
    }
    .footer-logo-mobile {
        display: block; /* Показываем дублированный логотип в footer-bottom */
    }
    .footer__social-media-elem {
        width: 28px;
        height: 28px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        padding-top: 10px;
        /* padding: 12px 4px 8px 4px; */
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .footer-policy {
        margin-left: 0;
        margin-top: 8px;
        display: block;
        text-align: center;
        width: 100%;
        word-break: break-word;
        font-size: 0.95em;
    }
    
    .footer-text, .site-version {
        text-align: center;
        width: 100%;
        font-size: 0.92em;
    }
}


 @media (max-width: 512px)/* Временно сменил на 768  (было 512) */{ 
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-version{
        font-size: 0.6em!important;
        position: absolute;
        left: 1%;
    }


    /* Hero section */
    .hero {
        padding: 2rem;
        
    }

    section:first-child{
        height: 50%;
        width: 95vw;
        font-size: smaller;
        margin-bottom: 10%;
    }

    section:nth-child(2){
        height: 15%;
        width: 80vw;
    }

    section:nth-child(3){
        font-size: smaller;
        width: 80vw;
    }

    .text-block-2{
        position: relative;
        display: block;
        width: 100px;
        height: 100px;
        text-align: center;
    }

    .text-block-2 h5{
        position: absolute;
        bottom: 25%;
        right: 9%;
        font-size: 0.8rem!important;
    }

    /* Hero section */
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .text-block {
        position: static!important;
        max-width: 100%!important;
        padding: 15px!important;
    }

    #clinicajpg {
        position: relative!important;
        width: 80%!important;
        bottom: auto!important;
        right: auto!important;
        margin: 10px auto;
    }

    /* Staff Carousel */
    #staffCarousel {
        width: 100%!important;
        margin-left: 0!important;
        height: 50vh!important;
    }

    #staffCarousel .text-overlay {
        top: 35%!important;
        left: 50%!important;
        width: 90%!important;
        height: auto;
        max-height: 50%;
        padding: 10px!important;
        transform: translateX(-50%)!important;
    }

    #staffCarousel .staff-indicators{
        bottom: 70%;
    }

    #staffCarousel .staff-indicators button {
        width: 4px;
        height: 4px;
        border: 1px solid var(--color-carousel-indicator);
    }

    #staffCarousel .text-overlay p {
        font-size: 0.8rem!important;
        margin-bottom: 0.5rem!important;
    }

    #staffCarousel .text-overlay ul {
        padding-left: 15px;
        font-size: 0.7rem;
    }

    #staffCarousel .carousel-item img {
        height: 10vh!important;
        max-height: 10vh !important;
        max-width: 95%;
        object-fit: contain !important;
        object-position: center;
    }

    /* Section 3 - Doctors */
    #doc1_image {
        position: relative!important;
        width: 40%!important;
        height: auto!important;
        margin-right: 70px;
        right: auto!important;
        bottom: auto!important;
        top: -20%;
    }

    #doc2_image{
        position: relative!important;
        width: 40%!important;
        margin-left: 10%;
        height: auto!important;
        margin: 10px auto!important;
        right: auto!important;
        bottom: auto!important;
    }

    .section__inner-text {
        display: none;
        padding: 0 15px;
        text-align: center;
        max-height: 200px;
        overflow: auto;
    }

    /* Навигация lesson_detail */
    .lesson-navigation {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 15px 0;
    }

    .lesson-navigation .btn {
        width: 100%;
        font-size: 1rem;
        padding: 12px 0;
        text-align: center;
        margin: 0;
    }

    /* Cards grid */
    .cards-box {
        flex-direction: column;
        padding: 0 10px;
    }

    .cards-box .box {
        width: 80%!important;
        margin: 10px 0;
        padding: 15px!important;
    }

    .cards-box .box h5{
        font-size: 0.6em!important;
        /* margin-top: 15px; */
    }

    .cards-box .box p{
        font-size: 0.4em!important;
        /* margin-top: 15px; */
    }
    
    .cards-box svg {
        width: 48px!important;
        height: 48px!important;
    }

    /* Courses Carousel */
    #courseCarousel{
        height: 20%;
    }

    #courseCarousel .carousel-item{
        height: fit-content!important;
    }

    #courseCarousel .course-info-block {
        padding: 5px!important;
        margin: 5px!important;
    }

    #courseCarousel .course-info-block h5 {
        font-size: 0.9rem!important;
    }

    #courseCarousel .course-info-block p {
        display: none; /* Скрываем длинное описание */
    }

    #courseCarousel img {
        max-width: 90%!important;
        height: 150px!important;
    }

    /* Общие правки */
    h1 { font-size: 1.5rem!important; }
    h5 { font-size: 1rem!important; }
    p { font-size: 0.8rem!important; }

    #show_all_courses_btn {
        width: 90%;
        margin: 10px auto;
        display: block;
        text-decoration: none;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none; /* Скрываем стрелки для экономии места */
    }
    /* Футер */
    footer {
    width: 100%;
    background-color: var(--color-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0 10px 0 !important;
    /* margin-top: 30%; */
  }

  .footer-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 0 8px;
  }

  .footer-col {
    width: 100%;
    margin-bottom: 8px;
    text-align: center;
  }

  .footer-logo {
    display: none; /* Скрываем оригинальный логотип на очень маленьких экранах */
  }
  
  .footer-logo-mobile {
    display: block;
    width: 120px;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .footer-tagline {
    display: none; /* Скрываем теглайн для мобильных устройств */
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .footer-col h5 {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .footer-col ul {
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .footer-col ul li {
    margin-bottom: 2px;
    font-size: 0.97rem;
  }

  .footer__social-media {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 8px 0;
    flex-wrap: wrap;
  }

  .footer__social-media-elem {
    width: 28px;
    height: 28px;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
    font-size: 0.85rem;
    max-height: 45vh;
    overflow-x: hidden;
  }

  .footer-text {
    font-size: 0.85rem !important;
    color: var(--color-footer-text);
    text-align: center;
    margin-top: 22px;
    width: 100%;
    line-height: 1.3;
    font-style: italic;
  }
    
}

/* Media для горизонтального отображения на телефоне */
@media (max-width: 1200px) and (max-height: 500px){
    
    body {
        display: flex;
        height: 100vh;
        width: 100vw;
    }

    .navbar .navbar-toggler{
        font-size: smaller;
    }

    /* .navbar #logopng{
        width: 100px;
    } */

    .navbar-collapse {
        flex-direction: row !important;
        justify-content: space-between;
        padding: 10px;
    }
    .navbar-nav {
        flex-direction: row !important;
        justify-content: space-between;
        width: 100%;
    }
    .navbar-nav li {
        margin-right: 20px;
    }

    main {
        flex: 1;
        place-content: center;
        padding: 5px;
        position: relative;
    
    }


    main section #clinicajpg {
        width: 260px;
        position: absolute;
        bottom: 5%;
        right: 0;
    }
    
    main > section > .text-block {
        position: absolute;
        top: 0;
        left: 0;
        padding: 5px;
        max-width: 300px;
        font-size: 0.9em;
    }


    .content-section{
        place-self: center;
        width: 90%;
        padding: 5%;
    }

    /* Навигация lesson_detail */
    .lesson-navigation {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        margin: 15px 0;
    }

    .lesson-navigation .btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .lesson-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 2rem;
        width: 100%;
        max-height: 50px;
        justify-content: center;
        align-items: center;
        align-content: center;
        overflow: hidden;
    }

    .lesson-actions .lesson-btns{
        width: 85%;
        height: auto;
        margin-top: 3%;
    }
    
    .lesson-actions form{
        display: inline-block;
        height: auto;
    }

    .lesson-actions .btn-warning{
        width: 20%;
        margin-bottom: 30px;
    }

    .lesson-actions .btn-danger{
        width: 100%;
        margin-bottom: 13px;
    }
    
    .lesson-actions .btn-success {
        font-size: 1rem;
        margin-top: 2px;
    }
    

    .carousel-arrows{
        margin-bottom: 25px;
    }


    .warning-info-about{
        position: absolute;
        margin-right: 10px;
        top: 50%;
        padding: 8px;
    }

    .course-info-block {
        height: 75px;
        font-size: 1.3rem;
        margin-top: 10px;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 0 5px rgba(0,0,0,0.1);
    }
    
    .course-info-block h5 {
        font-size: 0.8em;
        margin-bottom: 5px;
    }
    
    .course-info-block p {
        font-size: 0.5em;
    }

    .carousel-item img {
        max-width: 350px;
        height: 200px;
        object-fit: cover; /* Чтобы сохранить пропорции */
    }
    
}

/* --- CUSTOM NAVIGATION STYLES --- */
.custom-navbar {
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-navbar-bg) !important;
    transition: box-shadow 0.3s;
}
.custom-nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: #ffb300 #222;
}
.custom-nav-list::-webkit-scrollbar {
    height: 6px;
}
.custom-nav-list::-webkit-scrollbar-thumb {
    background: #ffb300;
    border-radius: 4px;
}
.custom-nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    color: var(--color-navbar-link) !important;
    position: relative;
    transition: color 0.2s, transform 0.2s;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
    background: transparent;
}
.custom-nav-link i {
    font-size: 1.1em;
    transition: color 0.2s, transform 0.2s;
}
.custom-nav-link:hover, .custom-nav-link:focus {
    color: #ffb300 !important;
    background: rgba(255,179,0,0.08);
    transform: translateY(-2px) scale(1.06);
    text-shadow: 0 2px 8px rgba(255,179,0,0.12);
}
.custom-nav-link:hover i,
.custom-nav-link:focus i,
.custom-nav-link:hover .nav-icon-slot__fa,
.custom-nav-link:focus .nav-icon-slot__fa {
    color: #ffb300;
    transform: scale(1.2) rotate(-8deg);
}
.custom-divider {
    border-top: 2px dashed #ffb300;
    margin: 0 0.5rem;
    opacity: 0.5;
}
@media (max-width: 900px) {
    .custom-nav-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.1rem;
    }
    .custom-nav-link {
        font-size: 0.98em;
        padding: 0.5rem 0.7rem !important;
    }
    
}
@media (max-width: 600px) {
    .custom-navbar {
        padding: 0.2rem 0.2rem;
    }
    .custom-nav-link {
        font-size: 0.93em;
        padding: 0.4rem 0.5rem !important;
    }
    .custom-nav-list {
        overflow-x: auto;
    }
}
/* Delight: логотип анимируется при наведении */
/* #logopng {
    transition: transform 0.3s cubic-bezier(.68,-0.55,.27,1.55);
}
#logolink:hover #logopng {
    transform: rotate(-8deg) scale(1.08);
} */


.header.always-visible {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white; /* или какой у тебя фон */
  }

/* --- HERO LANDING (Skillbox style, адаптация под палитру сайта) --- */
  .hero-landing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(280deg, var(--color-hero-gradient) 60%, rgba(76, 175, 170, 0.1) 100%);
  color: var(--color-text);
  border-radius: 24px;
  padding: 48px 32px;
  margin-bottom: 32px;
  transition: background 0.3s ease, color 0.3s ease;
}
  .hero-landing__left { flex: 1 1 320px; min-width: 300px; }
  .hero-landing__right { flex: 1 1 420px; min-width: 320px; display: flex; justify-content: center; }
  .hero-landing__stats { display: flex; gap: 32px; margin: 24px 0; }
  .hero-landing__stat-num { font-size: 2.2rem; font-weight: bold; color: var(--color-accent); transition: color 0.3s ease; }
  .hero-landing__stat-label { display: block; font-size: 1rem; color: var(--color-text-secondary); transition: color 0.3s ease; }
  .hero-landing__categories { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
  .hero-landing__categories button { 
    background: var(--color-hero-btn-bg); 
    color: var(--color-hero-btn-text);
    border: none; 
    border-radius: 20px; 
    padding: 8px 20px; 
    font-size: 1rem;  
    cursor: pointer; 
    transition: background 0.2s, color 0.2s;
  }

  .hero-landing__categories button:hover { 
    border: none;  
    background: var(--color-hero-btn-hover-bg); 
    color: var(--color-hero-btn-hover-text);
  }

  .hero-landing__cta {
    display: inline-block; margin-top: 12px; background: var(--color-accent); color: #fff; padding: 10px 28px; border-radius: 24px; text-decoration: none; font-weight: 500; transition: background 0.2s;
  }
  .hero-landing__cta:hover { background: var(--color-accent-hover); }
  /* Коллаж карточек: портрет 3:4 без круглой «рамки», единый стиль с hero */
  .hero-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    max-width: 440px;
    margin-left: auto;
    width: 100%;
  }

  .hero-showcase__card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--color-hero-face-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .hero-showcase__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(35, 42, 58, 0.12);
  }

  .hero-showcase__media {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-hero-gradient) 0%, rgba(227, 232, 240, 0.6) 100%);
  }

  .hero-showcase__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .hero-showcase__card--symbol .hero-showcase__symbol {
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: clamp(2rem, 6vw, 2.75rem);
    line-height: 1;
    background: linear-gradient(145deg, rgba(77, 124, 255, 0.14), rgba(76, 175, 144, 0.18));
  }

  /* Эмодзи до загрузки Font Awesome (тот же html.nav-fa-ready, что и в шапке) */
  .hero-showcase__emoji {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    font-style: normal;
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
  }

  .hero-showcase__symbol-fa {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  html.nav-fa-ready .hero-showcase__card--symbol .hero-showcase__emoji {
    opacity: 0;
  }

  html.nav-fa-ready .hero-showcase__symbol-fa {
    opacity: 1;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-showcase__emoji,
    .hero-showcase__symbol-fa {
      transition: none;
    }
  }

  .hero-showcase__label {
    margin: 0;
    padding: 10px 10px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-hero-face-label);
    line-height: 1.3;
    transition: color 0.3s ease;
  }

@supports (image-rendering: high-quality) {
  .hero-showcase__img {
    image-rendering: high-quality;
  }
}

  @media (max-width: 900px) {
    .hero-landing { flex-direction: column; padding: 32px 12px; }
    .hero-landing__right, .hero-landing__left { min-width: unset; width: 100%; }
    .hero-showcase {
      margin-left: auto;
      margin-right: auto;
      max-width: min(440px, 100%);
    }
  }






.navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
    margin-left: 8px;
    transition: box-shadow 0.2s;
}
.navbar-avatar:hover, .navbar-avatar:focus {
    box-shadow: 0 0 0 2px #ffb300;
}
@media (max-width: 900px) {
    .navbar-avatar {
        width: 32px;
        height: 32px;
        margin-left: 0;
    }
    .nav-item.dropdown {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .navbar-avatar {
        margin: 0 auto;
        display: block;
        float: none;
    }
    .dropdown-menu {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        min-width: 140px;
    }
}

/* Стили для бургер меню - делаем его черным */
.navbar-toggler {
    border-color: #000 !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.25) !important;
}

/* Стили для мобильного колокольчика уведомлений */
@media (max-width: 991px) {
    .navbar .d-lg-none .nav-link {
        padding: 0.5rem 0.75rem;
        color: inherit !important;
    }
    
    .navbar .d-lg-none .nav-link:hover {
        color: inherit !important;
        opacity: 0.8;
    }
    
    .navbar .d-lg-none .dropdown-menu {
        margin-top: 0.5rem;
        border: 1px solid rgba(0,0,0,.15);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
        margin-left: -2.5rem;
    }
    
    /* Группировка колокольчика и бургер меню */
    .navbar .d-flex.align-items-center {
        margin-left: auto;
    }
}

/* Стили для плавающей кнопки чата поддержки */
.support-chat-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: var(--color-btn-text);
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Индикатор новых тикетов (красная точка) */
.new-tickets-indicator {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    background-color: #dc3545;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5);
    animation: ticketPulse 1.5s infinite;
}

@keyframes ticketPulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.support-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    color: var(--color-btn-text);
    text-decoration: none;
}

.support-chat-button:acitve{
    transform: scale(0.95);
}

.support-chat-button .pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.5
    }
    100%{
        transform: scale(1.5);
        opacity: 0;
    }
}
@media (max-width: 768px) {
    .support-chat-button {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* ===== Top-10 пользователей ===== */
.top-users-section {
    max-width: 1100px;
    margin: -3% auto;
    margin-top: 15%;
    padding: clamp(1.75rem, 4vw, 2.75rem) 16px clamp(2rem, 5vw, 3.5rem);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.top-users-header {
    text-align: center;
    margin-bottom: 0;
    width: 100%;
}

.top-users-header h2 {
    color: var(--color-text);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.top-users-header h2 i {
    color: #FFD700;
    margin-right: 8px;
}

.top-users-header p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin: 0;
}

.top-users-leaderboard {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    margin-bottom: 15%;
}

/* Пьедестал топ-3: порядок 2 — 1 — 3 */
.top-podium {
    width: 100%;
    padding: 0;
    margin: 0;
}

.top-podium__row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.top-podium__place {
    position: relative;
    flex: 0 1 220px;
    max-width: 260px;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.top-podium__place--1 {
    flex: 0 1 250px;
    max-width: 300px;
    order: 2;
    z-index: 1;
}

.top-podium__place--2 {
    order: 1;
    padding-top: 32px;
}

.top-podium__place--3 {
    order: 3;
    padding-top: 48px;
}

.top-podium__place--staff-link {
    cursor: pointer;
}

.top-podium__place .top-podium__place-inner {
    position: relative;
    z-index: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

a.top-podium__click {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 24px;
    text-indent: 120%;
    white-space: nowrap;
    overflow: hidden;
    background: transparent;
}

.top-podium__card,
.top-podium__plinth {
    position: relative;
    z-index: 0;
}

.top-podium__place .top-user-card__you-badge {
    z-index: 3;
    pointer-events: none;
}

.top-podium__place-inner--you .top-podium__card {
    box-shadow:
        0 0 0 2px var(--color-accent, #4d7cff),
        0 12px 32px rgba(30, 58, 95, 0.16);
}

.top-podium__card {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(30, 58, 95, 0.1);
    border-radius: 18px;
    padding: 20px 16px 16px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(30, 45, 75, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    transition: box-shadow 0.25s ease;
}

.top-podium__card--1 {
    border-radius: 20px;
    padding-top: 22px;
    background: linear-gradient(
        165deg,
        #fffefb 0%,
        #fff6e8 42%,
        #ffeed8 100%
    );
    border-color: rgba(184, 134, 11, 0.22);
    box-shadow:
        0 12px 40px rgba(90, 60, 20, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.top-podium__place--2 .top-podium__card {
    background: linear-gradient(
        165deg,
        #fdfefe 0%,
        #f2f4f7 48%,
        #e8ecf1 100%
    );
    border-color: rgba(90, 100, 118, 0.18);
    box-shadow:
        0 8px 28px rgba(45, 55, 72, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.top-podium__place--3 .top-podium__card {
    background: linear-gradient(
        165deg,
        #fffdfb 0%,
        #faf4ec 48%,
        #f3e9dd 100%
    );
    border-color: rgba(150, 100, 65, 0.2);
    box-shadow:
        0 8px 28px rgba(75, 48, 30, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.top-podium__medal {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.top-podium__medal--1 {
    top: -14px;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #e8c547 0%, #b8860b 100%);
    border: 2px solid #fff6cc;
    padding: 0;
}

.top-podium__medal-ring {
    position: relative;
    z-index: 1;
    line-height: 1;
    font-size: 1.05rem;
    color: #4a3b00;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.top-podium__medal--1::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(212, 160, 18, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) inset;
    pointer-events: none;
    z-index: 0;
}

.top-podium__medal--2 {
    background: linear-gradient(145deg, #d0d0d0 0%, #8a8a8a 100%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #2d2d2d;
    border: 2px solid #e8e8e8;
}

.top-podium__medal--3 {
    background: linear-gradient(145deg, #d4a574 0%, #a0522d 100%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #fff;
    border: 2px solid #e8c9a8;
}

.top-podium__avatar.top-user-avatar--podium {
    width: 80px;
    height: 80px;
    margin-top: 8px;
}

/* Золотой венок вокруг аватара лидера (1 место) */
.top-podium__avatar-laurel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    width: 108px;
    height: 108px;
    flex-shrink: 0;
}

.top-podium__laurel-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 132%;
    height: 132%;
    max-width: none;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 2px 8px rgba(40, 30, 0, 0.2));
}

.top-podium__avatar-laurel .top-podium__avatar.top-user-avatar--podium {
    margin-top: 0;
    z-index: 1;
}

.top-podium__place--2 .top-podium__avatar--podium,
.top-podium__place--3 .top-podium__avatar--podium {
    width: 72px;
    height: 72px;
}

.top-podium__place--1 .top-user-avatar--podium .top-user-avatar__img,
.top-podium__place--1 .top-user-avatar--podium .top-user-avatar-fallback {
    width: 80px;
    height: 80px;
}

.top-podium__place--2 .top-user-avatar--podium .top-user-avatar__img,
.top-podium__place--2 .top-user-avatar--podium .top-user-avatar-fallback,
.top-podium__place--3 .top-user-avatar--podium .top-user-avatar__img,
.top-podium__place--3 .top-user-avatar--podium .top-user-avatar-fallback {
    width: 72px;
    height: 72px;
}

.top-podium__name {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    color: var(--color-text);
    word-break: break-word;
}

.top-podium__card--1 .top-podium__name {
    font-size: 1.02rem;
}

.top-podium__subtitle,
.top-podium__subtitle.top-user-role {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.top-podium__points {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b8860b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.top-podium__plinth {
    width: 100%;
    min-height: 72px;
    margin-top: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px 6px 4px 4px;
    flex-shrink: 0;
    box-sizing: border-box;
    box-shadow:
        inset 0 10px 16px rgba(0, 0, 0, 0.12),
        0 6px 0 rgba(0, 0, 0, 0.08);
}

/* Ступени пьедестала: 1 > 2 > 3 (фиксированная высота, чтобы карточка лидера не «съедала» разницу) */
.top-podium__plinth--1 {
    height: 128px;
    min-height: 128px;
    background: linear-gradient(
        180deg,
        #3a3224 0%,
        #252018 48%,
        #15120d 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.28);
    padding: 8px 12px 10px;
    box-shadow:
        inset 0 10px 20px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 220, 150, 0.12),
        0 6px 0 rgba(0, 0, 0, 0.12);
}

.top-podium__plinth--2 {
    height: 86px;
    min-height: 86px;
    background: linear-gradient(
        180deg,
        #5c6066 0%,
        #3e4146 48%,
        #282b2f 100%
    );
    border: 1px solid rgba(220, 224, 230, 0.22);
    padding: 6px 10px 8px;
    box-shadow:
        inset 0 8px 18px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 6px 0 rgba(0, 0, 0, 0.1);
}

.top-podium__plinth--3 {
    height: 58px;
    min-height: 58px;
    background: linear-gradient(
        180deg,
        #5a3d2a 0%,
        #3d291c 48%,
        #261a12 100%
    );
    border: 1px solid rgba(205, 155, 110, 0.3);
    padding: 6px 8px 8px;
    box-shadow:
        inset 0 6px 14px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 200, 150, 0.1),
        0 6px 0 rgba(0, 0, 0, 0.1);
}

.top-podium__plinth-num {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    user-select: none;
}

.top-podium__plinth--2 .top-podium__plinth-num {
    color: #eef0f4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.top-podium__plinth--3 .top-podium__plinth-num {
    color: rgba(255, 236, 215, 0.96);
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}

/* Обёртка только для выравнивания «1» на цоколе, без рамки */
.top-podium__plinth-wreath {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 0;
}

.top-podium__plinth-num--1 {
    position: relative;
    z-index: 1;
    color: #f3d15f;
    font-size: 2.3rem;
    text-shadow: 0 0 0 1px #8a6a0a, 0 2px 4px rgba(0, 0, 0, 0.4);
    font-family: Georgia, "Times New Roman", serif;
}

/* Места 4–10: слева 4–7, справа 8–10 */
.top-users-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-users-list--rest {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    column-gap: 20px;
    row-gap: 14px;
}

.top-user-card {
    display: grid;
    grid-template-columns: 56px 64px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-card-border, #e6e8ef);
    border-radius: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    min-height: 92px;
}

/* Ссылка внутри li: не ломает сетку карточки (как у пользователей без ссылки) */
a.top-user-card__link {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.top-user-card--staff-link {
    cursor: pointer;
}

.top-user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(77, 124, 255, 0.12);
    border-color: var(--color-accent);
}

.top-user-card.rank-gold {
    border-color: #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), var(--color-bg-secondary));
}

.top-user-card.rank-silver {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.10), var(--color-bg-secondary));
}

.top-user-card.rank-bronze {
    border-color: #CD7F32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.10), var(--color-bg-secondary));
}

.top-users-current-rank {
    margin-top: 1.25rem;
    width: 100%;
    clear: both;
}

.top-users-current-rank__hint {
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin: 0 0 12px;
}

.top-user-card.top-user-card--self {
    border-style: dashed;
    border-color: var(--color-accent);
    background: linear-gradient(135deg, rgba(77, 124, 255, 0.06), var(--color-bg-secondary));
}

/* Текущий пользователь внутри топ-10 */
.top-user-card.top-user-card--you {
    position: relative;
    z-index: 0;
    padding-right: 52px;
    box-shadow:
        0 0 0 2px var(--color-accent, #4d7cff),
        0 10px 28px rgba(77, 124, 255, 0.2);
    animation: top-user-you-glow 2.4s ease-in-out infinite;
}

.top-user-card.top-user-card--you:hover {
    box-shadow:
        0 0 0 2px var(--color-accent, #4d7cff),
        0 14px 32px rgba(77, 124, 255, 0.28);
}

@keyframes top-user-you-glow {
    0%,
    100% {
        box-shadow:
            0 0 0 2px rgba(77, 124, 255, 0.55),
            0 8px 22px rgba(77, 124, 255, 0.14);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(77, 124, 255, 0.85),
            0 14px 34px rgba(77, 124, 255, 0.26);
    }
}

@media (prefers-reduced-motion: reduce) {
    .top-user-card.top-user-card--you {
        animation: none;
        box-shadow:
            0 0 0 3px var(--color-accent, #4d7cff),
            0 10px 24px rgba(77, 124, 255, 0.18);
    }
}

.top-user-card__you-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent, #4d7cff), #3558d4);
    padding: 4px 9px;
    border-radius: 999px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(77, 124, 255, 0.45);
    pointer-events: none;
}

.top-user-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.top-user-rank-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-accent);
    background: rgba(77, 124, 255, 0.12);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-user-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.top-user-avatar__placeholder {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--color-card-border, #e6e8ef);
    box-sizing: border-box;
    background: linear-gradient(
        110deg,
        var(--color-bg-secondary, #eef0f5) 0%,
        rgba(77, 124, 255, 0.12) 45%,
        var(--color-bg-secondary, #eef0f5) 90%
    );
    background-size: 200% 100%;
    animation: top-user-avatar-shimmer 1.4s ease-in-out infinite;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.top-user-avatar__placeholder.is-hidden {
    opacity: 0;
    visibility: hidden;
    animation: none;
}

@keyframes top-user-avatar-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .top-user-avatar__placeholder {
        animation: none;
        background: var(--color-bg-secondary, #eef0f5);
    }
}

.top-user-avatar__img {
    position: relative;
    z-index: 1;
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-card-border, #e6e8ef);
    background: var(--color-bg);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.top-user-avatar__img.is-loaded {
    opacity: 1;
}

.top-user-avatar-fallback {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-card-border, #e6e8ef);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 1.6rem;
}

.top-user-info {
    min-width: 0;
}

.top-user-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.35;
}

.top-user-role {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.3;
}

.top-user-points {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 193, 7, 0.15);
    color: #b8860b;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    white-space: nowrap;
}

.top-user-points i {
    color: #f1b900;
}

.top-users-empty {
    text-align: center;
    padding: 32px;
    color: var(--color-text-secondary);
}

@media (max-width: 1200px) {
    .top-users-section {
        margin: 0 auto;
        padding: 1.25rem 12px 1.75rem;
    }
}

@media (max-width: 900px) {
    .top-users-list--rest {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-auto-flow: row;
    }
}

@media (max-width: 640px) {
    .top-podium__row {
        flex-direction: column;
        align-items: center;
    }

    .top-podium__place--1 {
        order: 1;
    }

    .top-podium__place--2 {
        order: 2;
        padding-top: 0;
    }

    .top-podium__place--3 {
        order: 3;
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .top-users-section {
        margin: 0 auto;
        padding: 1.25rem 12px 1.75rem;
    }

    .top-users-header h2 {
        font-size: 1.3rem;
    }

    .top-users-header p {
        font-size: 0.85rem;
    }

    .top-user-card {
        grid-template-columns: 40px 48px 1fr auto;
        gap: 10px;
        padding: 10px 12px;
        min-height: 72px;
        border-radius: 14px;
    }

    .top-user-avatar {
        width: 48px;
        height: 48px;
    }

    .top-user-avatar__img {
        width: 48px;
        height: 48px;
    }

    .top-user-avatar-fallback {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .top-user-rank {
        font-size: 1.3rem;
    }

    .top-user-rank-num {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .top-user-name {
        font-size: 0.9rem !important;
    }

    .top-user-role {
        font-size: 0.75rem !important;
    }

    .top-user-card.top-user-card--you {
        padding-right: 46px;
    }

    .top-user-card__you-badge {
        top: 6px;
        right: 8px;
        font-size: 0.58rem;
        padding: 3px 7px;
    }

    .top-user-points {
        padding: 4px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    section.hero-landing {
        width: min(100%, calc(100vw - 24px));
        height: auto;
        min-height: 0;
        padding: 24px 16px;
        margin-bottom: 24px;
        /* overflow: hidden режет декоративные тени и иногда ухудшает сглаживание фото внутри */
        overflow: visible;
    }

    .hero-landing__left,
    .hero-landing__right {
        min-width: 0;
        width: 100%;
    }

    .hero-landing__right {
        display: block;
        margin-top: 8px;
    }

    .hero-landing__left h1 {
        overflow-wrap: anywhere;
    }

    .hero-landing__stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        text-align: center;
    }

    .hero-landing__categories {
        justify-content: center;
    }

    .hero-showcase {
        gap: 10px 12px;
        max-width: min(440px, 100%);
    }

    .hero-showcase__label {
        font-size: 0.78rem;
        padding: 8px 6px 10px;
    }

    section.home-staff-section,
    section.top-users-section {
        width: min(100%, calc(100vw - 24px));
        height: auto;
        min-height: 0;
        margin-left: auto;
        margin-right: auto;
    }

    .carousel-block {
        width: 100%;
        margin-left: 0;
    }

    #staffCarousel {
        width: 100% !important;
        max-width: 100%;
        margin-left: 0 !important;
        height: auto !important;
        overflow: hidden;
    }

    #staffCarousel .carousel-inner,
    #staffCarousel .carousel-item {
        height: auto !important;
    }

    #staffCarousel .carousel-item {
        padding: 0 0 28px;
    }

    #staffCarousel .text-overlay {
        position: relative;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: none;
        height: auto;
        max-height: none;
        margin: 0 0 12px;
        padding: 16px !important;
        overflow: visible;
    }

    #staffCarousel .staff-indicators {
        bottom: 0;
    }

    #staffCarousel .carousel-item img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 220px !important;
        max-height: 220px !important;
        object-fit: contain;
        object-position: center;
        border-radius: 18px;
    }
}

@media (max-width: 512px) {
    section.hero-landing {
        width: calc(100vw - 20px) !important;
        margin-bottom: 20px !important;
    }

    .hero-landing__right {
        margin-top: 24px;
        max-height: none;
    }

    .hero-landing__stats {
        gap: 8px;
    }

    .hero-landing__stat-num {
        font-size: 1.8rem;
    }

    .hero-landing__stat-label {
        font-size: 0.82rem;
    }

    .hero-landing__categories a {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .hero-landing__categories button {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .hero-showcase {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        max-width: 100%;
    }

    .hero-showcase__label {
        font-size: 0.74rem;
        padding: 8px 6px;
    }

    section.home-staff-section,
    section.top-users-section {
        width: calc(100vw - 20px) !important;
    }

    #staffCarousel .text-overlay {
        padding: 12px !important;
    }

    #staffCarousel .text-overlay p {
        font-size: 0.95rem !important;
    }

    #staffCarousel .text-overlay ul {
        padding-left: 18px;
        font-size: 0.78rem;
    }

    #staffCarousel .carousel-item img {
        height: 180px !important;
        max-height: 180px !important;
        object-fit: contain !important;
        object-position: center;
    }
}