﻿@font-face {
    font-family: 'Hangyaboly';
    src: url(fonts/Hangyaboly.ttf) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Balmy';
    src: url(fonts/Balmy.ttf) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Bitter';
    src: url(fonts/Bitter-VariableFont_wght.ttf) format('truetype');
    font-weight: normal;
    font-style: normal;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .menu-main a:hover {
        background-color: transparent;
    }
}

/* ============================================================
   БАЗОВА СТРУКТУРА ТА FLEXBOX
   ============================================================ */
body {
    padding-top: 100px;
    margin-bottom: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-check-input:focus {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem #e6dede !important;
    border-color: #b3201d !important;
}

.form-control:focus {
    border-color: #b3201d !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 0.25rem #e6dede !important;
    outline: 0 !important;
}

@media (min-width: 992px) {
    .body-main .dropdown-menu {
        right: 30px !important;
    }
}

/* БЕЗПЕЧНА ТА СУВОРА ЗАБОРОНА БУДЬ-ЯКИХ ПІДКРЕСЛЕНЬ */
a,
a:hover,
a:focus,
a:active,
.nav-link,
.nav-link:hover,
.nav-link:focus,
.nav-link:active,
.dropdown-item,
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
    text-decoration: none !important;
}

a {
    color: #5f0b0e;
}

.menu-main .color a:hover {
    background: #e6dede;
    color: #b3201d;
}

.menu-main li a {
    color: #5f0b0e;
}

.navbar-brand:hover {
    text-decoration: none;
}

.container {
    color: #5f0b0e;
    font-family: 'Bitter', serif;
}

.container-fluid {
    font-family: 'Bitter', serif;
}

.nav-sticky {
    position: sticky;
    top: 0px;
}

/* ============================================================
   УТИЛІТАРНІ ТА ТИПОГРАФІЧНІ КЛАСИ
   ============================================================ */
.page-title-main {
    font-family: 'Balmy' !important;
    color: #b3201d !important;
    text-align: center !important;
    padding-top: 1rem !important;
    margin-bottom: 1rem !important;
    font-weight: normal;
}

.page-subtitle-main {
    font-family: 'Balmy' !important;
    color: #b3201d !important;
    text-align: center !important;
    padding-top: 1rem !important;
    margin-bottom: 1rem !important;
    font-weight: normal;
}

.border-denger {
    border-color: #dc3545 !important;
}

.border-secondly {
    border-color: #6c757d !important;
}

.project-content img {
    width: 100%;
}

.group-container {
    font-size: 20px;
}

    .group-container strong {
        color: #b3201d;
    }

    .group-container span {
        margin-left: 15px;
    }

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.person-container {
    font-size: 17px;
}

.footer-custom {
    background: #e6dede;
    color: #5f0b0e;
}

.menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

    .menu-links a.text-menu {
        color: #5f0b0e;
        font-size: 18px;
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .menu-links a.text-menu:hover {
            font-size: 20px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

.email-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.email {
    margin-right: 20px;
}

.social-link svg {
    color: black;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    margin-right: 20px;
}

.social-link:hover svg {
    color: #b3201d;
}

.lato-light {
    font-family: "Lato", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.contour-container {
    margin-top: 20px;
}

.contour-item {
    padding: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

    .contour-item img {
        max-width: 100%;
        height: auto;
        max-height: 150px;
    }

.custom-container {
    background-color: #fafbfc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

    .custom-container .row {
        margin: -10px;
    }

    .custom-container .col {
        padding: 10px;
    }

/* ============================================================
   ЛАЙКИ
   ============================================================ */
.like-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

    .like-button:hover svg path,
    .like-button .bi-heart-fill path,
    .like-button.liked svg path {
        fill: red;
        transition: fill 0.3s;
    }

/* ============================================================
   КОМЕНТАРІ ТА ЧАТИ
   ============================================================ */
#comments-section {
    width: 50%;
    margin: 0 auto;
}

#comments-list {
    list-style-type: none;
    padding: 0;
}

    #comments-list li {
        padding: 10px;
        border-bottom: 1px solid #ccc;
    }

#comment-text {
    width: 100%;
    height: 100px;
    margin-top: 10px;
}

#submit-comment-button {
    margin-top: 10px;
}

.comments-container {
    max-height: 350px;
    overflow-y: auto;
    background-color: #fbf9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

    .comments-container::-webkit-scrollbar {
        width: 6px;
    }

    .comments-container::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.2);
        border-radius: 3px;
    }

/* Чат модерації (адмін і педагог): свої повідомлення праворуч (#e6dede), чужі ліворуч (#c29797), ім'я над повідомленням */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    margin-bottom: 10px;
}

    .chat-message.chat-own { align-self: flex-end; align-items: flex-end; }
    .chat-message.chat-other { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    color: #2b1a1a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.chat-own .chat-bubble { background-color: #e6dede; border-bottom-right-radius: 2px; }
.chat-other .chat-bubble { background-color: #c29797; border-bottom-left-radius: 2px; }

.message-author {
    font-size: 0.75rem;
    font-weight: bold;
    color: #5f0b0e;
    margin: 0 4px 2px;
}

.message-text {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.3;
}

.message-time {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: right;
    margin-top: 4px;
}

/* ============================================================
   ФІЛЬТРИ ТА ДРОПДАУНИ
   ============================================================ */
.navbar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.dropdown-menu-start {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

    .dropdown-menu-start .dropdown-item {
        color: #5f0b0e;
    }

        .dropdown-menu-start .dropdown-item:hover,
        .dropdown-menu-start .dropdown-item:focus,
        .dropdown-item:hover {
            color: #b3201d;
            background-color: #e6dede;
        }

        .dropdown-menu-start .dropdown-item.active,
        .dropdown-menu-start .dropdown-item:active,
        .dropdown-item.active-filter,
        .dropdown-item.active {
            color: #fff !important;
            background-color: #b3201d !important;
            font-weight: bold;
        }

.clear-filters-btn,
.clear-filters-btn:hover,
.clear-filters-btn:focus,
.clear-filters-btn:active {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: #ffffff !important;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    z-index: 10;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

    .clear-filters-btn:hover {
        background-color: #b02a37;
        color: #ffffff !important;
        text-decoration: none !important;
        transform: scale(1.1);
    }

.filter-checkbox {
    accent-color: #dc3545;
    margin-right: 8px;
    cursor: pointer;
}

.clear-search-inline-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e6dede;
    color: #5f0b0e !important;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 5;
}

    .clear-search-inline-btn:hover {
        background-color: #dc3545;
        color: #ffffff !important;
    }

/* ============================================================
   СТИЛІЗАЦІЯ ІНПУТІВ, ФОКУСУ ТА ПРИБИРАННЯ БЛАКИТНОГО AUTOFILL
   ============================================================ */
.form-control:focus,
input[type="text"]:focus,
input[type="search"]:focus {
    border-color: #b3201d !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem #e6dede !important;
    outline: none !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #5f0b0e !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-outline-danger:focus,
.btn-outline-danger:active:focus {
    box-shadow: 0 0 0 0.25rem #e6dede !important;
    border-color: #b3201d !important;
    outline: none !important;
}

/* ============================================================
   КАСТОМНІ ПЕРЕМИКАЧІ (SWITCHES)
   ============================================================ */
.custom-danger-switch .form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.custom-danger-switch .form-check-input {
    cursor: pointer;
}

/* ============================================================
   СОЦМЕРЕЖІ ТА ВХІД
   ============================================================ */
.social a[href*="facebook"],
.social a[href*="instagram"],
.social a[href*="t.me"] {
    color: #b3201d !important;
    padding: 0 !important;
    transition: color 0.3s ease;
}

    .social a[href*="facebook"]:hover,
    .social a[href*="instagram"]:hover,
    .social a[href*="t.me"]:hover {
        color: #5f0b0e !important;
        background-color: transparent !important;
    }

    .social a[href*="facebook"] svg,
    .social a[href*="instagram"] svg,
    .social a[href*="t.me"] svg {
        fill: currentColor;
        width: 25px;
        height: 25px;
    }

.social a[href*="login" i],
.user-profile-nav-link.login-link {
    color: #8a8a8e !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .social a[href*="login" i]:hover,
    .social a[href*="login" i]:focus,
    .user-profile-nav-link.login-link:hover,
    .user-profile-nav-link.login-link:focus {
        color: #b3201d !important;
        background-color: transparent !important;
        transform: scale(1.15) translateX(2px);
    }

    .social a[href*="login" i] svg,
    .user-profile-nav-link.login-link svg {
        fill: currentColor !important;
        width: 25px;
        height: 25px;
        transition: inherit;
    }

.user-profile-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-notification-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    width: 17px;
    height: 17px;
    background-color: #dc3545;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* ============================================================
   ПАГІНАЦІЯ
   ============================================================ */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}

    .pagination .page-item:not(:first-child) .page-link {
        margin-left: -1px !important;
    }

    .pagination .page-link {
        position: relative;
        display: block;
        color: #dc3545;
        background-color: #fff;
        border: 1px solid #dee2e6;
        text-decoration: none;
        box-shadow: none !important;
        cursor: pointer;
        padding: 0.375rem 0.75rem;
    }

        .pagination .page-link:hover {
            z-index: 2;
            color: #b02a37;
            background-color: #E6DEDE;
            border-color: #dee2e6;
        }

        .pagination .page-link:focus {
            z-index: 3;
            outline: 0;
            box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
        }

    .pagination .page-item.active .page-link {
        z-index: 3;
        color: #fff !important;
        background-color: #dc3545 !important;
        border-color: #dc3545 !important;
    }

    .pagination .page-item.disabled .page-link {
        color: #6c757d;
        pointer-events: none;
        background-color: #fff;
        border-color: #dee2e6;
    }

    .pagination .page-item:first-child .page-link {
        border-top-left-radius: 0.375rem;
        border-bottom-left-radius: 0.375rem;
    }

    .pagination .page-item:last-child .page-link {
        border-top-right-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
    }

/* ============================================================
   СТОРІНКА 404 / ПОМИЛКИ
   ============================================================ */
.error-page-wrapper {
    min-height: 85vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.error-content {
    z-index: 5;
    position: relative;
    width: 100%;
}

.central-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    z-index: 1;
    padding: 2rem 0;
}

.illustration-bg {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 190%;
    max-width: none;
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.error-404-title {
    font-family: 'Balmy', sans-serif;
    font-size: 10rem;
    font-weight: bold;
    color: #b30e0d;
    text-shadow: 1px 1px 0px #5f0b0e, 2px 2px 0px #5f0b0e, 3px 3px 0px #5f0b0e, 4px 4px 0px #5f0b0e, 5px 5px 0px #5f0b0e, 6px 6px 0px #5f0b0e, 8px 8px 10px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
    line-height: 1;
}

.glass-text-box {
    background: transparent;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid rgba(141, 129, 130, 0.2);
}

.error-heading {
    font-family: 'Bitter', serif;
    color: #5f0b0e;
    font-size: 2.5rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
}

.error-description {
    font-family: 'Bitter', serif;
    color: #5f0b0e;
    font-weight: 500;
    font-size: 1.25rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.btn-transparent-action {
    background-color: transparent;
    color: #b30e0d;
    font-family: 'Balmy', sans-serif;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 600;
    border: 2px solid #b30e0d;
    transition: all 0.15s ease;
    box-shadow: 4px 4px 0px #b30e0d !important;
    backdrop-filter: blur(4px);
}

    .btn-transparent-action:hover {
        background-color: #b30e0d;
        color: #ffffff;
        transform: translate(2px, 2px);
        box-shadow: 2px 2px 0px #b30e0d !important;
    }

@media (max-width: 768px) {
    .error-404-title {
        font-size: 6rem;
        text-shadow: 1px 1px 0px #5f0b0e, 2px 2px 0px #5f0b0e, 3px 3px 0px #5f0b0e, 4px 4px 0px #5f0b0e;
    }

    .error-heading {
        font-size: 1.8rem;
    }

    .glass-text-box {
        padding: 1.5rem 1rem;
    }
}

/* ============================================================
   КНОПКА «ВГОРУ» ТА RECAPTCHA
   ============================================================ */
#loading-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.logo {
    max-width: 30%;
    height: auto;
}

.grecaptcha-badge {
    visibility: hidden !important;
}

.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    width: 44px;
    height: 44px;
    background-color: #b3201d;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .btn-scroll-top:hover {
        background-color: #5f0b0e;
        color: #ffffff;
        transform: translateY(-3px);
    }

/* ============================================================
   АДМІН ТАБИ ТА НАВІГАЦІЯ СПИСКІВ (*List)
   ============================================================ */
.admin-tabs.nav-tabs,
.nav-tabs-custom {
    border-bottom: 2px solid #dee2e6;
    gap: 5px;
}

    .admin-tabs .nav-link,
    .nav-tabs-custom .nav-link {
        font-family: 'Bitter', serif;
        font-weight: 500;
        color: #5f0b0e;
        border: none;
        border-bottom: 3px solid transparent;
        padding: 0.75rem 1.25rem;
        transition: all 0.2s ease-in-out;
        background-color: transparent;
    }

        .admin-tabs .nav-link:hover,
        .nav-tabs-custom .nav-link:hover {
            color: #b3201d;
            background-color: #E6DEDE;
            border-bottom-color: rgba(179, 32, 29, 0.3);
            border-radius: 4px 4px 0 0;
        }

        .admin-tabs .nav-link.active,
        .nav-tabs-custom .nav-link.active {
            color: #b3201d !important;
            background-color: transparent !important;
            border: none !important;
            border-bottom: 3px solid #b3201d !important;
            font-weight: bold;
        }

/* ============================================================
   СТРІЛОЧКИ СОРТУВАННЯ ТАБЛИЦЬ (TableHeader Sort Icons)
   ============================================================ */
.sort-icon-link {
    color: #b3201d;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 3px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

    .sort-icon-link:hover {
        background-color: #E6DEDE;
        color: #5f0b0e;
        transform: scale(1.15);
    }

    .sort-icon-link.active {
        background-color: #b3201d;
        color: #ffffff;
    }

    .sort-icon-link svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
    }

/* ============================================================
   СПЛИВАЮЧІ СПОВІЩЕННЯ (TOAST) ТА МОДАЛЬНІ ВІКНА
   ============================================================ */
#ajax-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    font-weight: bold;
    font-family: 'Bitter', serif;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

    #ajax-toast.show {
        opacity: 1;
        transform: translateY(0);
    }

.delete-confirm-card {
    width: 28rem;
    max-width: calc(100vw - 2rem);
    border-radius: 12px;
}

.modal-backdrop-custom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   ОБ'ЄМНІ КАРТКИ (Тінь та плавний Hover-ефект)
   ============================================================ */
.box-shadow {
    box-shadow: 0 4px 14px rgba(95, 11, 14, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

    .box-shadow:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgba(179, 32, 29, 0.16) !important;
    }

form.box-shadow:hover {
    transform: none !important;
}

/* ============================================================
   ОБ'ЄМНІ ПОСИЛАННЯ НА ГУРТКИ 
   ============================================================ */
a.interactive-link {
    display: inline-block;
    color: #b3201d !important;
    background-color: transparent;
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

    a.interactive-link:hover,
    a.interactive-link:focus,
    a.interactive-link:active {
        color: #b3201d !important;
        background-color: #e6dede !important;
        text-decoration: none !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(179, 32, 29, 0.15);
    }

/* ============================================================
   ВІДОБРАЖЕННЯ ТЕКСТУ ТА ЗОБРАЖЕНЬ СТАТЕЙ
   ============================================================ */
.project-content,
.article-content {
    font-family: 'Bitter', serif;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2b2b2b;
    text-align: justify;
    word-break: break-word;
}

    .project-content p,
    .article-content p {
        text-align: justify;
        margin-bottom: 1.25rem;
    }

    .project-content img,
    .article-content img {
        display: block !important;
        margin: 1.75rem auto !important;
        max-width: 65% !important;
        max-height: 520px !important; /* Обмежує висоту вертикальних фото */
        width: auto !important; /* Дозволяє зберігати реальну ширину */
        height: auto !important; /* Зберігає вихідні пропорції без обрізання */
        object-fit: scale-down !important; /* Запобігає кропу: фото вписується повністю */
        border-radius: 8px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
        clear: both;
    }

@media (max-width: 768px) {
    .project-content img,
    .article-content img {
        max-width: 95% !important;
        max-height: 420px !important;
    }
}

    .project-content figure,
    .article-content figure {
        display: block;
        margin: 2rem auto;
        text-align: center;
        clear: both;
    }

/* ============================================================
   LITE YOUTUBE PLAYER & FLOATING NAV CAROUSEL
   ============================================================ */
.video-slider-outer {
    padding: 0 55px;
}

.yt-lazy-player {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #000;
}

.yt-hd-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-lazy-player:hover .yt-hd-poster {
    transform: scale(1.02);
}

.yt-custom-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s ease;
}

    .yt-custom-play-btn svg {
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    }

.yt-lazy-player:hover .yt-custom-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
}

.yt-active-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 3;
}

.custom-video-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: #b3201d;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

    .custom-video-nav.prev-btn {
        left: 0;
    }

    .custom-video-nav.next-btn {
        right: 0;
    }

    .custom-video-nav:hover {
        background-color: #5f0b0e;
        color: #ffffff;
        transform: translateY(-50%) scale(1.1);
    }

@media (max-width: 768px) {
    .video-slider-outer {
        padding: 0;
    }

    .custom-video-nav {
        width: 38px;
        height: 38px;
        background-color: rgba(179, 32, 29, 0.85);
    }

        .custom-video-nav.prev-btn {
            left: 8px;
        }

        .custom-video-nav.next-btn {
            right: 8px;
        }
}

/* ============================================================
   ХЕДЕР: ПОШУКОВИЙ РЯДОК ТА ПІДКАЗКИ
   ============================================================ */
.header-search-container {
    flex: 2 1 420px;
    width: 68%;
    max-width: 650px;
    min-width: 320px;
    margin-left: auto !important;
    margin-right: 1.25rem !important;
    align-self: center;
    position: relative;
}

.header-search-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-search-field {
    font-family: 'Bitter', Georgia, serif !important;
    font-size: 0.88rem !important;
    color: #5f0b0e !important;
    background-color: #ffffff !important;
    border: 1.5px solid #d2c7c7 !important;
    border-radius: 8px !important;
    padding-left: 12px !important;
    padding-right: 36px !important;
    height: 38px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .header-search-field::placeholder {
        color: #8d797a !important;
        font-family: 'Bitter', serif;
        font-size: 0.82rem !important;
        opacity: 0.65 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-search-field:focus {
        background-color: #ffffff !important;
        border-color: #b3201d !important;
        box-shadow: 0 0 0 0.2rem rgba(179, 32, 29, 0.18) !important;
        outline: none !important;
    }

.header-search-clear-btn {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #a39596;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    transition: color 0.2s ease;
}

    .header-search-clear-btn:hover {
        color: #b3201d;
    }

.header-search-submit-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #b0a4a5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
}

.header-search-group:focus-within .header-search-submit-btn {
    color: #b3201d !important;
}

.header-search-submit-btn:hover {
    color: #b3201d !important;
    transform: translateY(-50%) scale(1.15);
}

.header-search-suggestions {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 420px;
    overflow-y: auto;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.15) !important;
    z-index: 2000 !important;
    margin: 0 !important;
    padding: 0.4rem 0 !important;
    list-style: none !important;
    text-align: left !important;
}

    .header-search-suggestions li {
        text-align: left !important;
        width: 100%;
    }

        .header-search-suggestions li a {
            font-family: 'Bitter', Georgia, serif;
            padding: 0.6rem 1rem !important;
            transition: background-color 0.15s ease;
            white-space: normal !important;
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: space-between !important;
            text-align: left !important;
            text-decoration: none !important;
            color: #5f0b0e;
        }

            .header-search-suggestions li a:hover,
            .header-search-suggestions li a:focus {
                background-color: #e6dede !important;
                color: #b3201d !important;
            }

.suggestion-title {
    color: #5f0b0e !important;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
    text-align: left !important;
    margin-right: auto !important;
}

.suggestion-badge {
    font-family: 'Bitter', serif;
    font-weight: normal;
    color: #5f0b0e !important;
    background-color: #f8f9fa;
    border: 1px solid #dfd4d4;
    font-size: 0.75rem;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}

.suggestion-more-link {
    background-color: #fff8f8 !important;
    color: #b3201d !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border-radius: 0 0 6px 6px;
    justify-content: center !important;
    text-align: center;
}

    .suggestion-more-link:hover {
        background-color: #e6dede !important;
        color: #5f0b0e !important;
    }

/* ============================================================
   ПУДРОВІ СПОВІЩЕННЯ (POWDER ALERTS)
   ============================================================ */
.powder-notice-alert {
    background-color: #e6dede !important;
    border: 1px solid #d5c8c8 !important;
    color: #5f0b0e !important;
    border-radius: 8px;
}

    .powder-notice-alert .notice-icon {
        color: #b3201d !important;
    }

/* ============================================================
   КОРКОВА ДОШКА: ТВОРЧИЙ ХАОС ТА МІНІ-СТІКЕРИ
   ============================================================ */
.cork-board {
    background-color: #f7f3ef;
    background-image: radial-gradient(#e5dbcf 15%, transparent 16%), radial-gradient(#d6c8b9 15%, transparent 16%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
    border: 10px solid #dfd3c5 !important;
    border-radius: 12px;
    height: 580px;
    max-height: 75vh;
    box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.cork-canvas {
    position: relative;
    width: 100%;
    height: 100%;
}

.cork-pushpin-sample {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cork-mini-note {
    position: absolute;
    width: 60px;
    height: 56px;
    padding: 10px 2px 2px;
    border-radius: 2px;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 3px 8px rgba(95, 11, 14, 0.14), 0 1px 3px rgba(0,0,0,0.08);
    transform: rotate(var(--base-rot));
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, z-index 0.05s;
}

    .cork-mini-note:hover:not(.is-expanded) {
        transform: scale(1.4) rotate(0deg) !important;
        box-shadow: 0 10px 22px rgba(95, 11, 14, 0.35) !important;
        z-index: 200 !important;
    }

.theme-powder {
    background: linear-gradient(180deg, #FBF8F8 0%, #F3ECEC 100%);
    border: 1px solid #E5DADA;
}

.theme-rose {
    background: linear-gradient(180deg, #FAF4F4 0%, #F5EAEB 100%);
    border: 1px solid #EAD8D9;
}

.theme-parchment {
    background: linear-gradient(180deg, #FDFDFB 0%, #F6F3EE 100%);
    border: 1px solid #EAE3D9;
}

.theme-warm {
    background: linear-gradient(180deg, #FAF8F5 0%, #F1ECE5 100%);
    border: 1px solid #E3DBD1;
}

.cork-pushpin {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 3;
}

.cork-pin-red {
    background: radial-gradient(circle at 35% 35%, #ff5252, #b3201d 75%, #5f0b0e);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 -1px 1px rgba(0,0,0,0.3);
}

.cork-pin-gray {
    background: radial-gradient(circle at 35% 35%, #cfd4da, #6c757d 75%, #343a40);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 -1px 1px rgba(0,0,0,0.3);
}

.mini-note-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.mini-day {
    font-size: 0.62rem;
    font-weight: 800;
    color: #b3201d;
    text-transform: uppercase;
}

.mini-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: #495057;
    margin-top: 2px;
}

.cork-expanded-card {
    display: none;
}

.cork-mini-note.is-expanded {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(0deg) !important;
    width: 320px !important;
    height: auto !important;
    min-height: 220px !important;
    padding: 24px 20px 20px !important;
    z-index: 1095 !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38) !important;
    cursor: default !important;
    border-radius: 6px !important;
}

    .cork-mini-note.is-expanded .cork-pushpin {
        top: -8px;
        width: 18px;
        height: 18px;
    }

    .cork-mini-note.is-expanded .mini-note-content {
        display: none;
    }

    .cork-mini-note.is-expanded .cork-expanded-card {
        display: block;
        width: 100%;
        animation: fadeInExpanded 0.2s ease;
        text-align: left;
    }

.expanded-title {
    font-family: 'Bitter', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #5f0b0e;
    line-height: 1.35;
}

.btn-close-expanded {
    position: absolute;
    top: 6px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #5f0b0e;
    cursor: pointer;
    padding: 0;
}

    .btn-close-expanded:hover {
        color: #b3201d;
    }

.cork-note-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(40, 20, 20, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1090;
}

    .cork-note-backdrop.show {
        display: block;
    }

@keyframes fadeInExpanded {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   ГАЛЕРЕЯ НАГОРОД (КНИЖКОВИЙ А4: 1 до 1.414)
   ============================================================ */
.awards-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 15px 0 25px 0;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.awards-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: infiniteScrollAwards 24s linear infinite;
}

    .awards-track:hover {
        animation-play-state: paused;
    }

.award-card-item {
    flex: 0 0 auto;
    cursor: pointer;
}

.award-paper-frame {
    width: 190px;
    height: 268px;
    background: #ffffff;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(95, 11, 14, 0.12);
    border: 1px solid #e8dede;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

    .award-paper-frame:hover {
        transform: translateY(-6px) scale(1.04);
        box-shadow: 0 12px 26px rgba(179, 32, 29, 0.22);
    }

.award-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.award-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(179, 32, 29, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.award-paper-frame:hover .award-hover-overlay {
    opacity: 1;
}

@keyframes infiniteScrollAwards {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ============================================================
   INSTAGRAM FEED CAROUSEL
   ============================================================ */
.insta-carousel-section {
    /* Розміри слайда: у мобільній версії змінюються лише ці змінні, решта розмітки спільна */
    --insta-w: 400px;
    --insta-h: 283px;
    --insta-gap: 28px;
    --insta-viewport-h: 410px;
    position: relative;
    width: 100%;
    padding: 20px 0 40px;
    overflow: hidden;
}

.insta-carousel-viewport {
    position: relative;
    width: 100%;
    height: var(--insta-viewport-h);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.insta-device-frame {
    position: relative;
    width: calc(var(--insta-w) + 6px);
    background: transparent !important;
    border: 3px solid #b3201d;
    border-radius: 20px;
    box-shadow: none !important;
    padding: 0;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.insta-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #ffffff !important;
    border: none !important;
    margin: 0;
}

.insta-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 85%;
}

.insta-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
}

.insta-username {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #5f0b0e;
}

.insta-viewport-window {
    width: var(--insta-w);
    height: var(--insta-h);
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.insta-device-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #ffffff !important;
    border: none !important;
    margin: 0;
    font-size: 1.25rem;
    color: #5f0b0e;
}

.insta-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .insta-actions .bi-heart-fill {
        color: #b3201d !important;
        transform: scale(1.05);
    }

.insta-film-track {
    display: flex;
    gap: var(--insta-gap);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: max-content;
    height: var(--insta-h);
    align-items: center;
    z-index: 2;
    cursor: pointer;
    will-change: transform;
}

.insta-slide-item {
    flex: 0 0 var(--insta-w);
    width: var(--insta-w);
    height: var(--insta-h);
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: none !important;
    background-color: transparent;
    transition: none;
}

    .insta-slide-item:hover {
        transform: none;
    }

.insta-img-a4 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.insta-carousel-viewport::before,
.insta-carousel-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18%;
    z-index: 6;
    pointer-events: none;
}

.insta-carousel-viewport::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0));
}

.insta-carousel-viewport::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 30%, rgba(255, 255, 255, 0));
}

@media (max-width: 768px) {
    .insta-carousel-section {
        --insta-w: 290px;
        --insta-h: 205px;
        --insta-gap: 16px;
        --insta-viewport-h: 330px;
    }

    /* білі градієнти не повинні накривати рамку: займають лише вільне місце збоку від неї */
    .insta-carousel-viewport::before,
    .insta-carousel-viewport::after {
        width: calc((100% - var(--insta-w) - 6px) / 2);
    }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.photo-lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 5, 6, 0.88);
    backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

    .photo-lightbox-modal.show {
        display: flex;
        opacity: 1;
    }

.lightbox-content-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .lightbox-content-box img {
        max-width: 100%;
        max-height: 82vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        border: 3px solid #ffffff;
    }

.lightbox-caption {
    color: #f7f3ef;
    font-family: 'Bitter', serif;
    font-size: 1rem;
    margin-top: 10px;
    text-align: center;
}

.lightbox-close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
}

    .lightbox-close-btn:hover {
        color: #ff4d4d;
        transform: scale(1.2);
    }

/* ============================================================
   НАВІГАЦІЯ ДЕСКТОП 
   ============================================================ */
@media (min-width: 992px) {
    .menu-main {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .mobile-dropdown-slot {
        display: none !important;
    }

    .desktop-only-menu {
        display: none;
    }

        .dropdown:hover .desktop-only-menu,
        .desktop-only-menu.show {
            display: block !important;
        }
}

/* ============================================================
   ХЕДЕР: ХІТБОКС ІКОНКИ АДМІНА ТА ПОВЕДІНКА
   ============================================================ */
.admin-profile-dropdown-container {
    position: relative;
}

.admin-icon-hitbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 25px !important;
    margin: -25px !important;
    background: transparent !important;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

    .admin-icon-link,
    .admin-icon-link:hover,
    .admin-icon-link:focus,
    .admin-icon-link:active,
    .admin-icon-hitbox:hover .admin-icon-link,
    .admin-profile-dropdown-container:hover .admin-icon-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent !important;
        background-color: transparent !important;
        color: #8a8a8e !important;
        text-decoration: none !important;
        box-shadow: none !important;
        outline: none !important;
    }

        .admin-icon-link svg {
            fill: #8a8a8e;
            transition: fill 0.2s ease;
        }

@media (min-width: 992px) {
    .admin-icon-hitbox:hover .admin-icon-link svg,
    .admin-profile-dropdown-container:hover .admin-icon-link svg {
        fill: #b3201d !important;
    }
}

@media (max-width: 991.98px) {
    .admin-icon-hitbox.active svg,
    .admin-icon-hitbox.active .admin-icon-link svg,
    .admin-profile-dropdown-container.show .admin-icon-link svg {
        fill: #b3201d !important;
        color: #b3201d !important;
    }
}

/* ============================================================
    ДЕСКТОП ТА МОБІЛЬНА СІТКА
   ============================================================ */
.header-nav-wrapper {
    display: flex;
    align-items: center;
}

@media (min-width: 992px) {
    .header-nav-wrapper {
        flex-direction: row;
        gap: 16px;
    }

    .nav-row-1, .nav-row-2 {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
        gap: 12px;
    }

    .header-nav-wrapper .dropdown:hover > .desktop-dropdown {
        display: block !important;
    }

    .mobile-subgrid-slot {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    #navbarMenu.show,
    #navbarMenu.collapsing {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        height: auto !important;
        min-height: auto !important;
        gap: 0 !important;
        padding-bottom: 12px !important;
    }

    .header-nav-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 6px 0 0 0;
        margin: 0 !important;
    }

    .desktop-dropdown {
        display: none !important;
    }

    .header-search-container,
    .navbar .header-search-container,
    div.header-search-container {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 10px 0 12px 0 !important;
        padding: 0 4px !important;
    }

    .navbar-nav.align-items-center {
        width: 100% !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
        gap: 6px !important;
        justify-content: flex-start !important;
        flex: none !important;
    }

    .admin-user-greeting-mobile {
        display: block;
        color: #6c757d !important;
        text-align: center;
        font-weight: 400 !important;
        font-size: 14px !important;
        margin: 2px 0 !important;
        letter-spacing: 0.2px;
    }

    .social {
        margin: 0 !important;
        padding: 0 !important;
    }

    .admin-icon-hitbox {
        margin: 0 auto !important;
        padding: 4px !important;
    }

    .nav-row-1 {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        justify-content: space-between !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
    }

        .nav-row-1 .nav-item {
            flex: 1 1 33.33%;
            text-align: center;
        }

    .nav-row-2 {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        justify-content: space-around !important;
        margin: 10px 0 0 0 !important;
        padding: 0 !important;
        list-style: none;
    }

        .nav-row-2 .nav-item {
            flex: 1 1 50%;
            text-align: center;
        }

    .header-nav-wrapper .nav-link {
        font-family: 'Bitter', serif;
        font-size: 1rem;
        color: #5f0b0e !important;
        padding: 6px 4px;
        display: block;
        border-radius: 6px;
        text-align: center;
    }

        .header-nav-wrapper .nav-link:hover,
        .header-nav-wrapper .nav-link.active-toggle {
            background-color: #e6dede;
            color: #b3201d !important;
        }

    .mobile-subgrid-slot {
        display: none;
        width: 100%;
        margin: 8px 0;
        padding: 8px;
        background-color: #b3201d;
        border-radius: 12px;
        border: 1px solid #6c757d;
    }

        .mobile-subgrid-slot.show {
            display: grid !important;
        }

    .mobile-subgrid-2.show {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 12px;
    }

    .mobile-subgrid-3.show {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px 8px;
    }

    .mobile-subgrid-slot .dropdown-item {
        font-family: 'Bitter', serif;
        font-size: 0.88rem;
        color: #5f0b0e !important;
        background-color: #ffffff;
        border-radius: 6px;
        padding: 8px 4px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: normal;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        border: 1px solid #b3201d;
        min-height: 42px;
    }

        .mobile-subgrid-slot .dropdown-item:hover,
        .mobile-subgrid-slot .dropdown-item:active {
            background-color: #e6dede !important;
            color: #b3201d !important;
        }
}

/* ============================================================
   ІЗОЛЬОВАНІ СТИЛІ ФІЛЬТРІВ 
   ============================================================ */

.btn-outline-danger.dropdown-toggle {
    color: #b3201d !important;
    background-color: #ffffff !important;
    border: 1px solid #b3201d !important;
    border-radius: 6px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: none !important;
}

    .btn-outline-danger.dropdown-toggle svg,
    .btn-outline-danger.dropdown-toggle i {
        color: #b3201d !important;
        fill: #b3201d !important;
    }

    .btn-outline-danger.dropdown-toggle:hover,
    .btn-outline-danger.dropdown-toggle:focus,
    .btn-outline-danger.dropdown-toggle.active,
    .btn-outline-danger.dropdown-toggle.show {
        background-color: #b3201d !important;
        color: #ffffff !important;
        border-color: #b3201d !important;
    }

        .btn-outline-danger.dropdown-toggle:hover svg,
        .btn-outline-danger.dropdown-toggle:focus svg,
        .btn-outline-danger.dropdown-toggle.active svg,
        .btn-outline-danger.dropdown-toggle.show svg,
        .btn-outline-danger.dropdown-toggle:hover i,
        .btn-outline-danger.dropdown-toggle:focus i,
        .btn-outline-danger.dropdown-toggle.active i,
        .btn-outline-danger.dropdown-toggle.show i {
            color: #ffffff !important;
            fill: #ffffff !important;
        }

main form.d-inline-flex,
main .dropdown.position-relative {
    position: relative !important;
    display: inline-block !important;
}

main .dropdown-menu,
main .dropdown-menu.dropdown-menu-end {
    display: none;
    position: absolute !important;
    top: calc(100% + 4px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    float: none !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: max-content !important;
    min-width: 250px !important;
    max-width: 340px !important;
    max-height: 380px !important;
    overflow-y: auto !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 6px !important;
    box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    z-index: 1025 !important;
}

    main .dropdown-menu.show {
        display: block !important;
    }

    main .dropdown-menu li {
        list-style: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    main .dropdown-menu .dropdown-item {
        font-family: 'Bitter', serif !important;
        font-size: 0.95rem !important;
        color: #5f0b0e !important;
        background-color: transparent !important;
        border: none !important;
        border-radius: 4px !important;
        padding: 0.35rem 0.65rem !important;
        text-align: left !important;
        white-space: normal !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        cursor: pointer !important;
        box-shadow: none !important;
        min-height: auto !important;
    }

        main .dropdown-menu .dropdown-item:hover,
        main .dropdown-menu .dropdown-item:focus {
            background-color: #e6dede !important;
            color: #b3201d !important;
        }

        main .dropdown-menu .dropdown-item.active-filter,
        main .dropdown-menu .dropdown-item.active {
            background-color: #b3201d !important;
            color: #ffffff !important;
            font-weight: bold !important;
        }

.filter-checkbox,
input[type="radio"].filter-checkbox {
    accent-color: #b3201d !important;
    margin-right: 10px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

main .dropdown-menu .dropdown-header {
    font-family: 'Bitter', serif !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #6c757d !important;
    padding: 0.25rem 0.65rem !important;
}

main .dropdown-menu .btn-danger,
.dropdown-menu .btn-danger {
    background-color: #b3201d !important;
    border-color: #b3201d !important;
    color: #ffffff !important;
    font-family: 'Bitter', serif !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 0.38rem 0.75rem !important;
    border-radius: 4px !important;
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
}

    main .dropdown-menu .btn-danger:hover,
    main .dropdown-menu .btn-danger:focus,
    main .dropdown-menu .btn-danger:active,
    .dropdown-menu .btn-danger:hover,
    .dropdown-menu .btn-danger:focus,
    .dropdown-menu .btn-danger:active {
        background-color: #8c1714 !important;
        border-color: #8c1714 !important;
        color: #ffffff !important;
    }

/* === ПУНКТИ МУЛЬТИВИБОРУ: фільтри та поля форм (custom-selects.js) ===
   Текст зліва, галочка справа; обраний і наведений пункт — системний колір #e6dede. */
.dropdown-menu .dropdown-item.multiselect-item,
main .dropdown-menu .dropdown-item.multiselect-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.45rem 0.85rem !important;
    cursor: pointer;
}

.dropdown-menu .dropdown-item.multiselect-item:hover,
.dropdown-menu .dropdown-item.multiselect-item.active-item,
main .dropdown-menu .dropdown-item.multiselect-item:hover,
main .dropdown-menu .dropdown-item.multiselect-item.active-item {
    background-color: #e6dede !important;
    color: #b3201d !important;
}

/* Фокус після кліку мишею не підсвічує пункт: колір залежить лише від стану (обраний / наведений) */
main .dropdown-menu .dropdown-item.multiselect-item:focus:not(:hover):not(.active-item),
main .dropdown-menu .dropdown-item.singleselect-item:focus:not(:hover):not(.active) {
    background-color: transparent !important;
    color: #5f0b0e !important;
}

main .dropdown-menu .dropdown-item.multiselect-item:focus,
main .dropdown-menu .dropdown-item.singleselect-item:focus {
    outline: none;
}

.dropdown-menu .dropdown-item.multiselect-item.disabled,
main .dropdown-menu .dropdown-item.multiselect-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.multiselect-item .place-text {
    flex-grow: 1;
    text-align: left;
    margin-right: 12px;
}

.multiselect-item .check-mark {
    margin-left: auto;
    flex-shrink: 0;
}

/* ============================================================
   ВИПАДАЮЧІ СПИСКИ (custom-selects.js): поля форм адмінки, інструктора й публічної форми запису.
   Обраний пункт — червоний, наведений — #e6dede (правила .dropdown-item.active та :hover вище).
   ============================================================ */
.custom-multiselect .btn {
    text-align: left;
    background-color: #ffffff;
}

.dropdown-item.singleselect-item,
.custom-multiselect .dropdown-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #5f0b0e;
    transition: all 0.2s ease;
}

    .dropdown-item.singleselect-item:hover,
    .custom-multiselect .dropdown-item:hover {
        background-color: #E6DEDE;
        color: #b3201d;
    }


/* ============================================================
   УНІФІКОВАНІ ДРОПДАУНИ ТА ВАЛІДАЦІЯ
   ============================================================ */
.custom-singleselect,
.custom-multiselect,
.schedule-time-dropdown,
.schedule-day-dropdown {
    position: relative !important;
    width: 100% !important;
}

    .custom-singleselect .dropdown-toggle,
    .custom-multiselect .dropdown-toggle,
    .schedule-time-dropdown .dropdown-toggle,
    .schedule-day-dropdown .dropdown-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 38px !important;
        width: 100% !important;
        font-size: 0.95rem !important;
        background-color: #ffffff !important;
        border: 1px solid #ced4da;
        border-radius: 0.375rem !important;
        box-shadow: none !important;
        padding: 0.375rem 0.75rem !important;
        color: #5f0b0e !important;
        cursor: pointer !important;
        position: relative !important;
        background-repeat: no-repeat !important;
        background-size: 16px 16px !important;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }

        .custom-singleselect .dropdown-toggle:focus,
        .custom-multiselect .dropdown-toggle:focus,
        .schedule-time-dropdown .dropdown-toggle:focus,
        .schedule-day-dropdown .dropdown-toggle:focus {
            border-color: #b3201d !important;
            box-shadow: 0 0 0 0.25rem #e6dede !important;
        }

        .custom-singleselect .dropdown-toggle::after,
        .custom-multiselect .dropdown-toggle::after,
        .schedule-time-dropdown .dropdown-toggle::after,
        .schedule-day-dropdown .dropdown-toggle::after {
            margin-left: auto !important;
            transition: margin-right 0.15s ease;
        }

.custom-singleselect .dropdown-toggle.is-valid,
.custom-multiselect .dropdown-toggle.is-valid,
.schedule-time-dropdown .dropdown-toggle.is-valid,
.schedule-day-dropdown .dropdown-toggle.is-valid {
    border-color: #ced4da !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 16px !important;
    padding-right: 2.3rem !important;
}

    .custom-singleselect .dropdown-toggle.is-valid::after,
    .custom-multiselect .dropdown-toggle.is-valid::after,
    .schedule-time-dropdown .dropdown-toggle.is-valid::after,
    .schedule-day-dropdown .dropdown-toggle.is-valid::after {
        margin-right: 1.3rem !important;
    }

.custom-singleselect .dropdown-toggle.is-invalid,
.custom-singleselect .dropdown-toggle.border-danger-custom,
.custom-multiselect .dropdown-toggle.is-invalid,
.custom-multiselect .dropdown-toggle.border-danger-custom,
.schedule-time-dropdown .dropdown-toggle.is-invalid,
.schedule-time-dropdown .dropdown-toggle.border-danger-custom,
.schedule-day-dropdown .dropdown-toggle.is-invalid,
.schedule-day-dropdown .dropdown-toggle.border-danger-custom {
    border-color: #dc3545 !important;
    border-width: 1.5px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 16px !important;
    padding-right: 2.3rem !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

    .custom-singleselect .dropdown-toggle.is-invalid::after,
    .custom-singleselect .dropdown-toggle.border-danger-custom::after,
    .custom-multiselect .dropdown-toggle.is-invalid::after,
    .custom-multiselect .dropdown-toggle.border-danger-custom::after,
    .schedule-time-dropdown .dropdown-toggle.is-invalid::after,
    .schedule-time-dropdown .dropdown-toggle.border-danger-custom::after,
    .schedule-day-dropdown .dropdown-toggle.is-invalid::after,
    .schedule-day-dropdown .dropdown-toggle.border-danger-custom::after {
        margin-right: 1.3rem !important;
    }


.custom-singleselect .singleselect-selected-text,
.custom-multiselect .multiselect-selected-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
}

main .custom-singleselect .dropdown-menu,
main .custom-multiselect .dropdown-menu,
main .schedule-time-dropdown .dropdown-menu,
main .schedule-day-dropdown .dropdown-menu,
.custom-singleselect .dropdown-menu,
.custom-multiselect .dropdown-menu,
.schedule-time-dropdown .dropdown-menu,
.schedule-day-dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-top: 4px !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    max-height: 320px !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 6px !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    z-index: 1050 !important;
    padding: 4px !important;
}

main .custom-singleselect .dropdown-menu,
main .custom-multiselect .dropdown-menu,
.custom-singleselect .dropdown-menu,
.custom-multiselect .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    max-height: 320px !important; 
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 6px !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    z-index: 1020 !important; 
    padding: 4px !important;
}

main .custom-singleselect.dropup .dropdown-menu,
main .custom-multiselect.dropup .dropdown-menu {
    top: auto !important;
    bottom: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
}

.select-menu-scroll {
    max-height: 250px;
    overflow-y: auto;
}

.custom-singleselect.is-locked .dropdown-toggle { background-color: #f0eae9 !important; color: #605756; cursor: not-allowed; }

/* ============================================================
   ЗБІЛЬШЕННЯ ФОТО ПРИ НАВЕДЕННІ (адмін-таблиці та коментарі)
   ============================================================ */
.group-square-zoom {
    width: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 1;
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, z-index 0.25s ease;
}

@media (min-width: 992px) {
    .group-square-zoom {
        cursor: zoom-in;
    }

        .group-square-zoom:hover {
            transform: scale(6.0) !important;
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5) !important;
            border: 2px solid #ffffff !important;
            border-radius: 8px !important;
            z-index: 1060 !important;
        }
}

/* Мобільна версія: фото відкривається по дотику в оверлеї (photo-zoom.js) */
.group-photo-mobile-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

    .group-photo-mobile-overlay.show {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

.group-photo-mobile-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background-color: rgba(95, 11, 14, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 1 !important;
}

.group-photo-mobile-content {
    position: relative !important;
    z-index: 2 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

    .group-photo-mobile-content img {
        max-width: min(85vw, 420px) !important;
        max-height: 75vh !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 16px !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
        border: 3px solid #ffffff !important;
        background-color: #ffffff !important;
    }

@media (min-width: 992px) {
    .group-photo-mobile-overlay {
        display: none !important;
    }
}

/* ============================================================
   КОМЕНТАРІ: мініатюра, ім'я, дата та плашка ролі в одному рядку
   Розмітку див. Views/Shared/Partials/_CommentItemPartial.cshtml та comments.js
   ============================================================ */
.comment-layout { display: flex; gap: 12px; align-items: flex-start; }
.comment-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain; /* фото показується повністю, без обрізання */
    border: 1px solid #e5dddd;
    background: #fff;
}
.comment-body { flex: 1 1 auto; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.comment-author { font-weight: 700; color: #3d3534; overflow-wrap: anywhere; }
.comment-date { font-size: .8rem; }
.comment-badge {
    margin-left: auto;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background: #b3201d; /* усі ролі — системний червоний; нові ролі додаватимуться модифікаторами .comment-badge-<роль> */
    border-radius: 999px;
    white-space: nowrap;
}
.comment-text { margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.comment-mention { color: #b3201d; font-weight: 600; }

/* Гілка коментаря: світлий фон завжди (щоб темна тема браузера не робила блок чорним) */
.comment-thread { background-color: #fff; color: #3d3534; color-scheme: light; }
.comment-deleted .comment-text { color: #8a7f7e; font-style: italic; }
.comment-avatar-empty { border-color: transparent; background: transparent; }
.comment-actions { display: flex; gap: 16px; margin-top: 6px; }
.comment-action {
    padding: 0;
    font-size: .85rem;
    font-weight: 600;
    color: #605756;
    background: none;
    border: 0;
    cursor: pointer;
}
.comment-action:hover { color: #b3201d; text-decoration: underline; }
.comment-action-danger { color: #b3201d; }

.comment-replies { margin: 8px 0 0 24px; padding-left: 16px; border-left: 2px solid #e5dddd; }
.comment-reply { margin-top: 12px; }
.comment-reply .comment-avatar { flex-basis: 36px; width: 36px; height: 36px; }
.comment-reply-form { margin-top: 10px; }

@media (max-width: 575.98px) {
    .comment-replies { margin-left: 8px; padding-left: 10px; }
    .comment-badge { margin-left: 0; }
}

/* Завжди світла схема: автотемний режим браузера не має інвертувати блоки сайту */
html { color-scheme: light; }

/* FAQ на сторінці «Про нас»: акордеон у корпоративних кольорах */
.faq-section { max-width: 900px; scroll-margin-top: 90px; }
.faq-accordion .accordion-button { font-size: 1.1rem; color: #621012; }
.faq-accordion .accordion-button:not(.collapsed) { background-color: #f0eae9; color: #b3201d; box-shadow: none; }
.faq-accordion .accordion-button:focus { border-color: #b3201d; box-shadow: 0 0 0 .2rem rgba(179, 32, 29, .15); }
.faq-accordion .accordion-button::after { filter: grayscale(1); }
