/* =============================== */
/* MAIN CONTENT (Основная часть)   */
/* =============================== */

.main {
    flex: 1;
    padding: 20px 40px;
    max-width: calc(100% - 280px);
    transition: margin-left 0.3s ease-in-out;
}

/* HEADER */
.header {
    background: #333;
    padding: 10px 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    height: 60px;
}

/* =============================== */
/* GLOBAL STYLES & FONT SETUP      */
/* =============================== */
@font-face {
    font-family: 'TT Rounds';
    src: url('TTMedium.ttf') format('truetype');


}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'TT Rounds';
    src: url('TTMedium_0.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    font-size: 20px;
}

body {
    background: #111;
    color: #eee;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* FILTERS */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    /*border: 1px solid #333;*/
    border-radius: 6px;
    /*background: #1a1a1a;*/
    /*padding: 5px 10px;*/
    padding: 5px 0% 5px 50%;
}

.filter-wrapper {
    flex: 1;
    flex-wrap: wrap;
    display: flex;
    width: 15%;
    min-width: 125px;
    /*border: 1px solid #333;*/
    /*border-radius: 6px;    */
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    /* padding: 5px 10px; */
    /*background: #1a1a1a;   */
}

.filter-label {
    font-weight: bold;
    color: #f5a623;
    white-space: nowrap;
    font-size: .9em;
    justify:center;
}

.filter-selector {
    width: 100%;
    background: #1a1a1a;
}

select {
    padding: 8px;
    background: #1a1a1a;
    color: #eee;
    border: 1px solid #333;
    border-radius: 6px;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* CARD */
.card {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #222;
}

.card:hover {
    transform: scale(1.00);
    box-shadow: 0 15px 30px rgba(245, 166, 35, 0.3);
    border-color: #f5a623;
}

.card-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
}

.card-body pre {
    font-weight: 300;
    font-size: 16px;
}

.gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Плавная слайдерная анимация */
    will-change: transform;
}

.gallery-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0,0,0,0.8);
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 3;
}

.card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card img.gallery-main {
    transform: scale(1.01);
}

.card:hover img.gallery-main {
    transform: scale(1.05);
    transition-duration: 0.3s;
}

.card-body {
    padding: 15px 20px 10px;
    font-size: 16px;
    line-height: 1.6;
}

.card.hidden {
    display: none !important;
}

.card-button {
    width: 100%;
    padding: 10px 5px;
    border: 1px solid #F5A623;
    border-radius: 5px;
    text-align: center;
}

.card-button:hover {
    border: 1px solid #222;
    background: #F5A623;
    color: #222;
}

@keyframes blinkBlur {
  from { filter: blur(6px); }
  to   { filter: blur(12px); }
}

.is-blinking-blur {
  animation: blinkBlur 0.7s ease-in-out infinite alternate;
}

.title {
    font-weight: bold;
    color: #f5a623;
    font-size: 1.4em;
}

.separator {
    width: 100%;
    height: 2px;
    background: #fff;
}

/* PAGINATION */
.pagination {
    margin: 30px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pagination .current-page {
    padding: 8px 12px;
    border: none;
    background: #222;
    color: #eee;
    border-radius: 5px;
    cursor: pointer;
    background: #f5a623;
    color: #000;
}

.pagination .other-page {
    padding: 8px 12px;
    border: none;
    background: #222;
    color: #eee;
    border-radius: 5px;
    cursor: pointer;
}

.pagination button:hover {
    background: #f5a623;
    color: #000;
}

/* =============================== */
/* SIDEBAR (Коллапсируемый)       */
/* =============================== */
.sidebar {
    width: 280px;
    background: #1a1a1a;
    height: auto;
    min-height: 100vh;
    transition: width 0.3s ease-in-out;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 91px;
}

.sidebar h2 {
    padding: 10px 15px;
    margin: 18px 10px;
    margin-bottom: 10px;
    margin-bottom: 10px;
    color: #f5a623;
    font-size: 24px;
}

.sidebar a {
    width: 84%;
    display: flex;
    align-items: center;
    padding: 15px 10px;
    margin: 18px 20px;
    background: #222;
    border: none;
    color: #eee;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 18px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.sidebar a span {
    opacity: 1;
    transition: opacity 0.3s;
    text-decoration: none;
}

.sidebar a:hover {
    background: #f5a623;
    color: #000;
}

.sidebar.collapsed a  {
    width: 59%;
    height: 51px;
    display: flex;
    align-items: center;
    padding: 15px 10px;
    margin: 18px 20px;
    background: #222;
    border: none;
    color: #eee;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 18px;
    cursor: pointer;
}

.sidebar.collapsed a span {
    opacity: 0;
}

.sidebar .current-category {
    background: #f5a623;
    color: #000;
}

.sidebar .other-category {
}

.logo-placeholder {
    background: #000;
    font-size: 28px;
    color: #f5a623;
    font-weight: 900;
    cursor: pointer;
}

.logo-placeholder-alt {
    display: flex;
    padding: 8px;
    margin: 3px;
    justify-content: center;
    background: #1a1a1a;
    font-size: 28px;
    color: #f5a623;
    font-weight: 900;
    cursor: pointer;
    border: 2px solid #444;
    border-radius: 7px;
}

.logo-img {
    width: 210px;
}

/* =============================== */
/* RUN STRING                      */
/* =============================== */

.run_track {
    --speed: 90s;
    --fade-size: 70px;

    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    margin: 10px 5px;

    /* Плавное исчезновение слева и справа */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0,
        black var(--fade-size),
        black calc(100% - var(--fade-size)),
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0,
        black var(--fade-size),
        black calc(100% - var(--fade-size)),
        transparent 100%
    );
}

.run_string {
    display: inline-flex;
    width: max-content;

    animation: marquee-scroll var(--speed) linear infinite;
}

.run_string span {
    flex-shrink: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Сдвиг ровно на ширину первой копии */
@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Пауза при наведении */
.run_track:hover .run_string {
    animation-play-state: paused;
}

/* Уважение системной настройки отключения анимации */
@media (prefers-reduced-motion: reduce) {
    .run_string {
        animation: none;
    }
}