/*
Theme Name: HotLair
*/

/*--------------------------------------------------------------
# Normalize
--------------------------------------------------------------*/

/* Тёмная тема (теперь по умолчанию в :root) */
:root {
    --hl-primary: #888888;
    --hl-primary-light: #f06292;
    --hl-bg: #121212; /* Основной тёмный фон */
    --hl-text: #e5e5e5; /* Основной светлый текст */
    --hl-text-light: #b3b3b3; /* Вторичный светлый текст */
    --hl-border: #333333; /* Тёмная граница */
    --hl-bg-secondary: #1e1e1e; /* Вторичный тёмный */
	
    /* Для мобильного меню в dark */
    --hl-dark-bg: #1e1e1e;
    --hl-dark-text: #ffffff;
    --hl-dark-text-secondary: #b3b3b3;
    --hl-dark-border: #333333;
    --hl-dark-hover: rgba(233, 30, 99, 0.2);
    --code-font: monospace, monospace;
    --shadow-base: 0 2px 6px rgba(0,0,0,0.18);
    --shadow-hover: 0 6px 14px rgba(0,0,0,0.25);
}
/* Светлая тема (теперь для переключения) */
[data-theme="light"] {
    --hl-bg: #fafafa; /* Светлый фон */
    --hl-text: #1a1a1a; /* Тёмный текст */
    --hl-text-light: #666; /* Серый */
    --hl-border: #e0e0e0; /* Светлая граница */
    --hl-bg-secondary: #ffffff; /* Вторичный светлый */
    /* Для мобильного меню в light */
    --hl-dark-bg: #1e1e1e;
    --hl-dark-text: #ffffff;
    --hl-dark-text-secondary: #ccc;
    --hl-dark-border: #333333;
    --hl-dark-hover: rgba(233, 30, 99, 0.1);
    --shadow-base: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-hover: 0 6px 16px rgba(0,0,0,0.25);
}

body, input, button, select, textarea {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Глобальное применение переменных с переходом (но без transition на начальной загрузке) */
body {
    background-color: var(--hl-bg);
    color: var(--hl-text);
}
html {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    box-sizing: border-box;
}


/* SCROLL*/
html {
	scrollbar-gutter: stable;
	scrollbar-width: thin;
}

/* Только на десктопе (>768px) принудительно всегда видимый бар */
@media (min-width: 769px) {
    html {
        overflow-y: scroll;      /* Всегда видимый бар на десктопе (фикс сдвигов) */
    }
}

/* Горизонтальный скролл принудительно скрыт везде */
body {
    overflow-x: hidden;
}

/* WebKit (Chrome, Edge, Safari) — дефолтные стили (дарк-тема) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;         /* Тёмный фон трека по умолчанию */
    border-radius: 12px;
    margin: 4px 0;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 12px;
    border: 3px solid transparent;
    background-clip: content-box;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hl-primary);
    background-clip: content-box;
}

/* Firefox — дефолт (дарк) */
html {
    scrollbar-color: #555 #1e1e1e;
}

/* Переопределение только для светлой темы */
[data-theme="light"]::-webkit-scrollbar-track {
    background: #ffffff;
}

[data-theme="light"]::-webkit-scrollbar-thumb {
    background: #aaa;
}

[data-theme="light"]::-webkit-scrollbar-thumb:hover {
    background: var(--hl-primary);  /* Можно оставить тот же ховер-эффект, либо задать другой */
}

[data-theme="light"] {
    scrollbar-color: #aaa #ffffff; /* Firefox светлая тема */
}


*,
*:before,
*:after {
    box-sizing: inherit;
}
body {
    margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section,
summary {
    display: block;
}
audio,
canvas,
progress,
video {
    display: inline-block;
    vertical-align: baseline;
}
audio:not([controls]) {
    display: none;
    height: 0;
}
[hidden],
template {
    display: none;
}
a {
    text-decoration: none;
    outline: 0;
    color: var(--hl-text);
}
@media (hover: hover) and (pointer: fine) {
	a:hover {
		text-decoration: none;
		outline: 0;
		transition: color 0.2s linear;
		color: var(--hl-primary);
	}
}

a:focus,
a:active,
a:visited {
    text-decoration: none;
    outline: 0;
    transition: color 0.2s linear;
    color: var(--hl-primary);
}

*:focus:not(:focus-visible),
*:active:not(:focus-visible),
*:visited:not(:focus-visible),
*:hover:not(:focus-visible) {
    outline: 0;
}
button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
select::-moz-focus-inner,
input[type="file"]>input[type="button"]::-moz-focus-inner {
    border: 0;
    outline: 0;
}
abbr[title] {
    border-bottom: 1px dotted;
}
b,
strong {
    font-weight: bold;
}
dfn {
    font-style: italic;
}
h1,
h2 {
    font-size: 1.5em;
    margin: 0 0 0.75em;
    font-weight: normal;
    min-height: 36px;
    overflow: hidden;
    color: var(--hl-text);
}
p.site-description {
    margin: 0 0 0.5em;
    color: var(--hl-text-light);
}
mark {
    background: #ff0;
    color: #000;
}
small {
    font-size: 80%;
}
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
sup {
    top: -0.5em;
}
sub {
    bottom: -0.25em;
}
img {
    border: 0;
    height: auto;
    /* Make sure images are scaled correctly. */
    max-width: 100%;
    /* Adhere to container width. */
}
svg:not(:root) {
    overflow: hidden;
}
figure {
    margin: 1em 0;
}
hr {
    box-sizing: content-box;
    height: 0;
    background-color: var(--hl-border);
    border: 0;
    height: 1px;
    margin-bottom: 1.5em;
}
pre {
    overflow: auto;
}
code,
kbd,
pre,
samp {
    font-family: var(--code-font);
    font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
    margin: 0;
}
button {
    overflow: visible;
    outline: none;
}
button,
select {
    text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}
button[disabled],
html input[disabled] {
    cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}
input {
    line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    height: auto;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}


textarea {
    overflow: auto;
    width: 100%;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 0 1.5em;
    width: 100%;
}

i {
    margin-right: 0.188em;
}
.text-center {
    text-align: center;
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
body,
input,
select,
textarea {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    clear: both;
}
p {
    margin-bottom: 1em;
}
dfn,
cite,
em,
i {
    font-style: italic;
}
blockquote {
    margin: 0 1.5em;
}
address {
    margin: 0 0 1.5em;
}
pre {
    background: var(--hl-bg-secondary);
    font-family: var(--code-font);
    font-size: 15px;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.6em;
    max-width: 100%;
    overflow: auto;
    padding: 1.6em;
    color: var(--hl-text);
}
code,
kbd,
tt,
var {
    font-family: var(--code-font);
    font-size: 15px;
    font-size: 0.9375rem;
}
abbr,
acronym {
    border-bottom: 1px dotted var(--hl-text-light);
    cursor: help;
}
mark,
ins {
    background: #fff9c0;
    text-decoration: none;
}
big {
    font-size: 125%;
}
/*--------------------------------------------------------------
# Elements
--------------------------------------------------------------*/
ul,
ol {
    margin: 0 0 1.5em;
}
ul {
    list-style: disc;
}
ol {
    list-style: decimal;
}
li>ul,
li>ol {
    margin-bottom: 0;
    margin-left: 1.5em;
}
dt {
    font-weight: bold;
}
dd {
    margin: 0 1.5em 1.5em;
}
figure {
    margin: 1em 40px;
}
.row {
    overflow: hidden; /* Предотвращает выход дочерних элементов */
    max-width: 90em;
    margin: 0 auto;
}
.width70 {
    width: 70%;
}
.width100 {
    width: 100%;
}
/*--------------------------------------------------------------
# Forms
--------------------------------------------------------------*/

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime-local"],
input[type="color"],
textarea {
    background-color: var(--hl-bg-secondary);
    border: 1px solid var(--hl-border);
    color: var(--hl-text);
}

/*--------------------------------------------------------------
## Links
--------------------------------------------------------------*/
a *,
a:hover,
a:active,
a:focus {
    outline: 0;
}
/*--------------------------------------------------------------
## Menus
--------------------------------------------------------------*/
.hl-header {
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--hl-bg);
    border-bottom: 1px solid var(--hl-border);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hl-header.scrolled {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    background: var(--hl-bg);
}

[data-theme="light"] .hl-header.scrolled {
    background: var(--hl-bg);
}

/* Sticky только для мобильных */
/* Основной фикс: на мобильных всегда твёрдый фон + sticky */
@media (max-width: 768px) {
    .hl-header {
        position: sticky;                  /* ← Обязательно возвращаем sticky */
        top: 0;                            /* Фиксируем сверху */
        background: var(--hl-bg) !important; /* Твёрдый фон (автоматически под тему) */
        border-bottom: 1px solid var(--hl-border); /* Опционально: сохраняем нижнюю границу */
    }
    
    .hl-header.scrolled {
        background: var(--hl-bg) !important; /* Твёрдый фон при скролле */
        box-shadow: 0 8px 32px rgba(0,0,0,0.08); /* Тень остаётся */
    }
    
    /* Light-тема: если хотите чуть другой оттенок при скролле — можно уточнить */
    [data-theme="light"] .hl-header,
    [data-theme="light"] .hl-header.scrolled {
        background: #fafafa !important; /* Или #ffffff, как вам нравится */
    }
}
.hl-header__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
@media (max-width: 768px) {
    .hl-header__inner {
        height: 64px;
        padding: 0 16px;
        gap: 0;
        justify-content: space-between;
    }
}
/* Логотип */
.hl-logo a {
    display: block;
    line-height: 0;
}
.hl-logo img {
    height: 52px;
    width: auto;
    transition: transform 0.3s ease;
    display: block;
}
.logo-footer .hl-logo img {
    height: 59px;
}
@media (hover: hover) and (pointer: fine) {
	.logo-footer .hl-logo img:hover {
		filter: brightness(1.05) contrast(1.05); /* ярче и контрастнее */
		transition: filter 0.2s ease;
	}
	.hl-logo img:hover {
		filter: brightness(1.05) contrast(1.05); /* ярче и контрастнее */
		transition: filter 0.2s ease;
	}
}
.hl-logo .logo-dark {
    display: block;
}
.hl-logo .logo-light {
    display: none;
}
[data-theme="light"] .hl-logo .logo-dark {
    display: none;
}
[data-theme="light"] .hl-logo .logo-light {
    display: block;
}
@media (max-width: 768px) {
    .hl-logo img {
        height: 52px;
    }
}
/* Поиск (десктоп/планшет) */
.hl-search {
    flex: 1;
    max-width: 520px;
}
@media (max-width: 1024px) {
    .hl-search {
        max-width: 400px;
    }
}
@media (max-width: 768px) {
    .hl-search {
        display: none;
    }
}
.hl-search__form {
    position: relative;
}
.hl-search__input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 20px;
    border: 2px solid var(--hl-border);
    border-radius: 12px;
    font-size: 15px;
    background: var(--hl-bg);
    color: var(--hl-text);
}


.hl-search__button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    background: transparent;
    color: var(--hl-text-light);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
	.hl-search__button:hover {
		background: rgba(255, 255, 255, 0.06);
	}
	[data-theme="light"] .hl-search__button:hover {
		background: rgba(0, 0, 0, 0.04);
	}
}
.hl-search__button:active {
    background: rgba(255, 255, 255, 0.1);
}
.hl-search__button:focus-visible {
    outline: 2px solid var(--hl-text-light);
    outline-offset: 2px;
}
.hl-search__button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}


[data-theme="light"] .hl-search__button {
    color: #555555;
}
[data-theme="light"] .hl-search__button:active {
    background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .hl-search__button:focus-visible {
    outline: 2px solid #666666;
}

/* Мобильный поиск (dropdown) */
.hl-mobile-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hl-bg);
    border-top: 1px solid var(--hl-border);
    padding: 16px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 998;
}
.hl-mobile-search.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.hl-mobile-search__form {
    position: relative;
}
.hl-mobile-search__input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 16px;
    border: 2px solid var(--hl-border);
    border-radius: 10px;
    font-size: 16px;
    background: var(--hl-bg);
    color: var(--hl-text);
}


.hl-mobile-search__button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 36px;
    height: 36px;
    background: transparent;
    color: var(--hl-text-light);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.hl-mobile-search__button:focus-visible {
    outline: 2px solid var(--hl-text-light);
    outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
	.hl-mobile-search__button:hover {
		background: rgba(255, 255, 255, 0.06);
	}
}
.hl-mobile-search__button:active {
    background: rgba(255, 255, 255, 0.1);
}
.hl-mobile-search__button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Light theme корректировки для мобильного поиска */
[data-theme="light"] .hl-mobile-search__input:focus {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
    border-color: #666666;
}
@media (hover: hover) and (pointer: fine) {
	[data-theme="light"] .hl-mobile-search__input:hover {
		border-color: #999999;
	}
	[data-theme="light"] .hl-mobile-search__button:hover {
		background: rgba(0, 0, 0, 0.04);
	}
}
[data-theme="light"] .hl-mobile-search__button {
    color: #555555;
}
[data-theme="light"] .hl-mobile-search__button:active {
    background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .hl-mobile-search__button:focus-visible {
    outline: 2px solid #666666;
}

/* Десктопная навигация */
.hl-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
@media (max-width: 768px) {
    .hl-nav {
        display: none;
    }
}
.hl-nav__list {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (max-width: 1024px) {
    .hl-nav__list {
        gap: 20px;
    }
}
.hl-nav__item a {
    color: var(--hl-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}
.hl-nav__item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #42aaff;
    transition: width 0.3s ease;
    opacity: 0.6;
}
@media (hover: hover) and (pointer: fine) {
	.hl-nav__item a:hover::after {
		width: 100%;
	}
}


[data-theme="light"] .hl-nav__item a::after {
    background: #42aaff; /* Мягкий серый */
    opacity: 1;
}

/* Мобильные элементы */
.hl-mobile-controls {
    display: none;
    align-items: center;
    gap: 16px;
}
@media (max-width: 768px) {
    .hl-mobile-controls {
        display: flex;
    }
}
.hl-mobile-search-btn, .hl-mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hl-text);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    transition: background 0.3s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.hl-mobile-search-btn:focus-visible, .hl-mobile-menu-btn:focus-visible {
    outline: 2px solid var(--hl-text-light);
    outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
	.hl-mobile-search-btn:hover, .hl-mobile-menu-btn:hover {
		background: rgba(255, 255, 255, 0.06);
	}
}	
.hl-mobile-search-btn:active, .hl-mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.1);
}
.hl-mobile-search-btn svg, .hl-mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* Light theme корректировки для мобильных кнопок */
[data-theme="light"] .hl-mobile-search-btn:focus-visible,
[data-theme="light"] .hl-mobile-menu-btn:focus-visible {
    outline: 2px solid #666666;
}
@media (hover: hover) and (pointer: fine) {
	[data-theme="light"] .hl-mobile-search-btn:hover,
	[data-theme="light"] .hl-mobile-menu-btn:hover {
		background: rgba(0, 0, 0, 0.04);
	}
}	
[data-theme="light"] .hl-mobile-search-btn:active,
[data-theme="light"] .hl-mobile-menu-btn:active {
    background: rgba(0, 0, 0, 0.08);
}

/* Выпадающее мобильное меню */
.hl-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hl-dark-bg);
    color: var(--hl-dark-text);
    border-top: 1px solid var(--hl-dark-border);
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 998;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    will-change: transform, opacity;
}
@media (max-width: 768px) {
    .hl-mobile-menu {
        border-radius: 0 0 12px 12px;
    }
}
.hl-mobile-menu[aria-expanded="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.hl-mobile-menu[aria-expanded="false"] {
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.hl-mobile-menu:not(.active) .hl-mobile-nav__item {
    opacity: 1;
    transform: translateY(0);
}
.hl-mobile-menu.active .hl-mobile-nav__item {
    animation: fadeInUp 0.4s ease forwards;
}
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(1) { animation-delay: 0s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(2) { animation-delay: 0.05s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(3) { animation-delay: 0.1s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(4) { animation-delay: 0.15s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(5) { animation-delay: 0.2s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(6) { animation-delay: 0.25s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(7) { animation-delay: 0.3s; }
.hl-mobile-menu.active .hl-mobile-nav__item:nth-child(8) { animation-delay: 0.35s; }
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hl-mobile-menu__header {
    background: var(--hl-dark-bg);
    padding: 7px 7px;
    border-bottom: 1px solid var(--hl-dark-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hl-mobile-menu__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--hl-dark-text);
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    height: 32px;
	padding-left: 12px;
}
.hl-mobile-menu__close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hl-dark-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.2s ease;
    font-size: 24px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    position: relative; /* важно для ::before и ::after */
}

/* Сам крестик из двух псевдоэлементов */
.hl-mobile-menu__close-btn::before,
.hl-mobile-menu__close-btn::after {
    content: '';
    position: absolute;
    width: 18px;           /* длина линии */
    height: 2px;           /* толщина */
    background-color: currentColor; /* наследует color от кнопки */
    border-radius: 1px;
    transition: background-color 0.3s ease;
}

.hl-mobile-menu__close-btn::before {
    transform: rotate(45deg);
}

.hl-mobile-menu__close-btn::after {
    transform: rotate(-45deg);
}

/* Эффекты (оставляем ваши) */
@media (hover: hover) and (pointer: fine) {
	.hl-mobile-menu__close-btn:hover {
		background: rgba(255, 255, 255, 0.06);
	}
}
.hl-mobile-menu__close-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95); /* лёгкий клик-эффект */
}

.hl-mobile-menu__close-btn:focus-visible {
    outline: 2px solid var(--hl-text-light);
    outline-offset: 2px;
}
.hl-mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hl-mobile-nav__item {
    margin-bottom: 0;
    opacity: 0;
    border-bottom: 1px solid var(--hl-dark-border);
    will-change: opacity, transform;
}
.hl-mobile-menu.reset-anim .hl-mobile-nav__item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
.hl-mobile-nav__item a {
    color: var(--hl-dark-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
    position: relative;
}

.hl-mobile-nav__item a:active {
    background: rgba(255, 255, 255, 0.02);
}

@media (hover: hover) and (pointer: fine) {
	.hl-mobile-nav__item a:hover {
		background: rgba(255, 255, 255, 0.02);
	}
}
.hl-mobile-nav__item a::before {
    content: '▶';
    font-size: 14px;
    opacity: 0.7;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.hl-mobile-nav__item:last-child {
    border-bottom: none;
}
.hl-mobile-nav__item.icon-home a::before { content: '🏠'; }
.hl-mobile-nav__item.icon-categories a::before { content: '📂'; }
.hl-mobile-nav__item.icon-photos a::before { content: '❤️'; }
.hl-mobile-nav__item.icon-prnstars a::before { content: '⭐'; }
.hl-mobile-nav__item.icon-toggle a::before { content: '🌗'; }
/* Hot badge — убрали розовый, сделали оранжевый (не primary) */
.hl-mobile-nav__item.hot a::after {
    content: 'Hot';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f97316; /* Оранжевый, не розовый */
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}
.hl-mobile-nav__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--hl-dark-text-secondary);
    font-style: italic;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    margin: 20px;
    font-weight: 400;
    line-height: 1.4;
}
.hl-mobile-search__input:focus,
.hl-mobile-search__input:focus-visible,
.hl-search__input:focus,
.hl-search__input:focus-visible {
    outline: none !important;
}

/* Убеждаемся, что мобильное меню скрыто на десктопе */
@media (min-width: 769px) {
    .hl-mobile-menu,
    .hl-mobile-search {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    .hl-mobile-controls {
        display: none !important;
    }
}



/* Явно указываем тёмную схему в dark-теме */
.hl-search__input,
.hl-mobile-search__input {
    color-scheme: dark;
}

/* Явно указываем светлую схему в light-теме (на всякий случай) */
[data-theme="light"] .hl-search__input,
[data-theme="light"] .hl-mobile-search__input {
    color-scheme: light;
}

/* Дополнительно: фикс жёлтого/белого фона автозаполнения (autofill) в тёмной теме */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--hl-bg) inset !important;
    -webkit-text-fill-color: var(--hl-text) !important;
    caret-color: var(--hl-text) !important;
    transition: background-color 5000s ease-in-out 0s; /* Чтобы не мигало */
}

/* Если в light-теме тоже бывают проблемы с autofill */
[data-theme="light"] input:-webkit-autofill,
[data-theme="light"] input:-webkit-autofill:hover,
[data-theme="light"] input:-webkit-autofill:focus,
[data-theme="light"] input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fafafa inset !important; /* Или #ffffff */
    -webkit-text-fill-color: #1a1a1a !important;
}
/* Адаптация мобильного меню для light темы */
[data-theme="light"] .hl-mobile-menu {
    background: #ffffff;                     /* Светлый фон меню */
    color: #1a1a1a;                           /* Основной тёмный текст */
    border-top-color: #eaeaea;                /* Светлая граница сверху */
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);  /* Более мягкая тень для светлой темы */
}

[data-theme="light"] .hl-mobile-menu__header {
    background: #ffffff;                     /* Фон заголовка меню */
    border-bottom-color: #eaeaea;             /* Граница под заголовком */
}

[data-theme="light"] .hl-mobile-menu__title {
    color: #1a1a1a;                          /* Текст заголовка */
}

[data-theme="light"] .hl-mobile-menu__close-btn {
    color: #666666;                          /* Цвет крестика (вторичный текст) */
}
@media (hover: hover) and (pointer: fine) {
	[data-theme="light"] .hl-mobile-menu__close-btn:hover {
		background: rgba(0, 0, 0, 0.06);
	}
	[data-theme="light"] .hl-mobile-nav__item a:hover {
		background: rgba(0, 0, 0, 0.04);          /* Ховер-эффект светлый */
	}
}

[data-theme="light"] .hl-mobile-nav__item a:active {
    background: rgba(0, 0, 0, 0.04);          /* Ховер-эффект светлый */
}

[data-theme="light"] .hl-mobile-menu__close-btn:active {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hl-mobile-menu__close-btn::before,
[data-theme="light"] .hl-mobile-menu__close-btn::after {
    background-color: currentColor;          /* Крестик наследует цвет */
}

[data-theme="light"] .hl-mobile-nav__item {
    border-bottom-color: #eaeaea;             /* Границы между пунктами */
}

[data-theme="light"] .hl-mobile-nav__item a {
    color: #1a1a1a;                          /* Основной цвет ссылок */
}

[data-theme="light"] .hl-mobile-nav__item.hot a::after {
    background: #f97316;                     /* Hot-бейдж остаётся оранжевым */
    color: white;
}

[data-theme="light"] .hl-mobile-nav__empty {
    color: #666666;                          /* Текст "пусто" */
    background: rgba(0, 0, 0, 0.03);
}
/* Плавная анимация открытия и закрытия мобильного меню без скачка вверх */
.hl-mobile-menu {
    transform-origin: top;
    transition:
        opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        visibility 0s linear 0.35s;
	
}

.hl-mobile-menu[aria-expanded="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        visibility 0s linear 0s;
}

.hl-mobile-menu[aria-expanded="false"] {
    transform: translateY(-12px); /* или -10px, как было раньше */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        visibility 0s linear 0.35s;
}
/*--------------------------------------------------------------
# Widgets — ОБЩИЕ СТИЛИ (оставлено только используемое)
--------------------------------------------------------------*/
*,
.widget * {
    box-sizing: border-box;
}
.widget {
    margin: 0 0 1.5em;
    position: relative;
    width: 100%;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 20px 0 40px 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 1024px) { .cat-grid { gap: 12px; } }
@media (max-width: 480px) {
    .cat-grid {
        grid-template-columns: 1fr;
        gap: 20px !important;
        margin: 15px 0 !important;
    }
}
.cat-pack {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-base);
    background: var(--hl-bg-secondary);
    display: flex;
    flex-direction: column;
    contain: layout style;
    -webkit-tap-highlight-color: transparent;
    backface-visibility: hidden;
    transition: box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .cat-pack:hover {
        box-shadow: var(--shadow-hover);
    }
    
    .cat-pack:hover .cat-meta {
        background: rgba(33, 33, 33, 1); /* Лёгкий светлый оверлей в dark */
    }
	[data-theme="light"] .cat-pack:hover .cat-meta {
		background: rgba(252, 252, 252, 1); /* Затемнение в light */
	}
}


.cat-pack-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
/* Миниатюра — modern aspect-ratio (dynamic img fills; no flash) */
.cat-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--hl-bg);
    overflow: hidden;
    flex-shrink: 0;
    contain: layout style paint;
	
}

/* Fallback для старых браузеров (no aspect-ratio) */
@supports not (aspect-ratio: 16 / 9) {
    .cat-thumbnail {
        height: 0;
        padding-bottom: 56.25%;
    }
    .cat-thumbnail > * {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
    }
}
.cat-thumbnail img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}


.cat-thumbnail img.loaded {
    opacity: 1;
}


/* Мета */
.cat-meta {
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    background: var(--hl-bg-secondary);
    flex-grow: 1;
	transition: background 0.2s ease; /* Добавлено здесь */
}

.cat-meta h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.32;
    font-weight: 500;
    color: var(--hl-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
	
}
.cat-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--hl-text-light);
    margin-top: 10px;
}
@media (max-width: 480px) {
    .cat-meta-footer { margin-top: 8px; }
}
@media (max-width: 480px) {
    .cat-meta { padding: 12px 12px 10px; }
    .cat-meta h3 { font-size: 15px; margin-bottom: 6px; }
    .cat-meta-footer { font-size: 12.5px; }
    .cat-thumbnail img {
        contain-intrinsic-size: calc(100vw * 9 / 16) calc(100vw * 9 / 16);
    }
}
/* Active состояние */
.cat-pack:active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: none;
    transition: none;
}
.cat-thumbnail img:active {
    filter: none !important;
    opacity: 1 !important;
}
/* Бейджи */
.duration-badge,
.views-badge {
    position: absolute;
    bottom: 4px;
    z-index: 5;
    background: rgba(0,0,0,0.70);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 6px 10px 6px 9px;
    font-size: 12px;
    font-weight: 500;
    color: #fafafa;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;


}

.duration-badge { left: 4px; }
.views-badge { right: 4px; }
@media (max-width: 480px) {
    .duration-badge,
    .views-badge {
        font-size: 11.5px;
        padding: 5px 8px;
    }
    .duration-badge { left: 4px; }
    .views-badge { right: 4px; }
}
.duration-badge .icon,
.views-badge .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    position: relative;
}
@media (max-width: 480px) {
    .duration-badge .icon,
    .views-badge .icon {
        width: 13px;
        height: 13px;
    }
}

.is-vertical .cat-thumbnail {
    background: #000 !important;
}
.pack-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.75);
    color: #e0e0e0;
    padding: 6px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.4px;
}
.pack-overlay span {
    display: inline-block;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] .pack-overlay {
    background: rgba(18, 18, 18, 0.65);
}

/*--------------------------------------------------------------
# Filter
--------------------------------------------------------------*/
/* Header с заголовком и фильтром */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    position: relative;
    z-index: 21;
}

.widget-title-new {
    color: var(--hl-text);
    margin: 0;
    text-align: left;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    font-size: 25px;
}

.widget-title-new * {
    margin: 0;
    line-height: inherit;
}

/* Контролы: поиск слева, фильтр справа */
.categories-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Фильтр */
.filter-controls {
    position: relative;
    flex-shrink: 0;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px !important;
    height: 42px;
    font-size: 14px;
    font-weight: 600;
    background-color: rgba(33, 33, 33, 1);
    border: 1px solid var(--hl-border) !important;
    border-radius: 12px;
    color: var(--hl-text) !important;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    line-height: 42px !important;
	
}

.filter-btn,
.filter-btn-related {
    -webkit-tap-highlight-color: transparent;
}


/* При наведении */
@media (hover: hover) and (pointer: fine) {
	.filter-btn:hover {
		background-color: rgba(37, 37, 37, 1) !important;
		transition: background-color 0.2s ease;
	}
}

/* Дропдаун */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    min-width: 150px;
    background-color: var(--hl-bg-secondary) !important;
    border: 1px solid var(--hl-border) !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden; /* ← ЭТО ГЛАВНОЕ ИСПРАВЛЕНИЕ */
}

.dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hl-text) !important;
    text-decoration: none;
    background-color: transparent !important;
    border-bottom: 1px solid var(--hl-border) !important;
    transition: background-color 0.3s ease;
}

.dropdown a:last-child {
    border-bottom: none !important;
}
@media (hover: hover) and (pointer: fine) {
	.dropdown a:hover {
		background-color: rgba(255, 255, 255, 0.02) !important;
	}
}
.dropdown a.active {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* ==================== ПОИСК НА DESKTOP ==================== */
.desktop-search-container {
    position: relative;
    min-width: 270px;
    max-width: 380px;
    flex: 1 1 280px;
    height: 42px;
}

.desktop-search-container .wpst-cat-search {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 42px; /* слева под лупу, справа под крестик */
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    font-size: 15px;
    background: var(--hl-bg-secondary);
    color: var(--hl-text);
    box-sizing: border-box;
    line-height: 42px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    box-shadow: none !important;
}

.desktop-search-container .wpst-cat-search:focus {
    outline: none;
    border: 1px solid var(--hl-border) !important;
}

.desktop-search-container .wpst-cat-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

/* Иконка лупы (desktop) */
.desktop-search-container .search-icon {
    position: absolute;
    left: 14px;
    top: 55%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.desktop-search-container .search-icon svg {
    width: 18px;
    height: 18px;
}

.desktop-search-container .wpst-cat-search:focus ~ .search-icon {
    opacity: 0.9;
}

/* Крестик очистки (desktop) */
.desktop-search-container .cat-search-clear {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: var(--hl-text);
    opacity: 0.5;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
	.desktop-search-container .cat-search-clear:hover {
		opacity: 1;
		background-color: rgba(255, 255, 255, 0.08);
	}
}
.desktop-search-container .cat-search-clear svg {
    width: 20px;
    height: 20px;
    display: block;
}

.desktop-search-container .wpst-cat-search:not(:placeholder-shown) ~ .cat-search-clear {
    display: block;
}

/* ==================== МОБИЛЬНЫЙ ПОИСК ==================== */
.cat-search-wrapper {
    flex-shrink: 0;
}

.cat-search-toggle {
    background: var(--hl-bg-secondary);
    border: 1px solid var(--hl-border);
    border-radius: 8px;
    height: 42px;
    width: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hl-text);
    flex-shrink: 0;
}

.cat-search-toggle svg {
    width: 20px;
    height: 20px;
}

/* Контейнер мобильного поиск-бара — базовое состояние (скрыто) */
.cat-search-input-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;              /* Вместо left: 50% */
    right: 0;             /* Растягиваем на всю ширину родителя */
    margin: 0 auto;       /* Центрируем по горизонтали (стабильно даже при изменении viewport) */
    width: 93vw;
    max-width: 500px;
    z-index: 30;
    background-color: var(--hl-bg-secondary);
    border: 1px solid var(--hl-border);
    border-radius: 12px;
    overflow: hidden;
    /* Анимация появления (только opacity + лёгкий translateY — без scale и translateX) */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 
        opacity 0.35s ease,
        visibility 0s linear 0.35s;
}

/* Активное состояние */
.widget-header.search-active .cat-search-input-container {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: 
        opacity 0.4s ease;
}

/* Поле поиска внутри — с небольшой задержкой (чтобы контейнер появился первым) */
.cat-search-input-container .wpst-cat-search {
    width: 100%;
    height: 48px; /* Как в вашем мобильном варианте */
    padding: 0 60px 0 60px;
    border: none; /* Бордер от контейнера */
    border-radius: 12px;
    font-size: 18px;
    background: transparent;
    color: var(--hl-text);
    line-height: 48px;
    opacity: 0; /* Скрыто изначально */
    transition: opacity 0.25s ease 0.1s; /* Задержка 0.1s */
}

/* Поле появляется после контейнера */
.widget-header.search-active .wpst-cat-search,
.cat-search-input-container.active .wpst-cat-search {
    opacity: 1;
}

/* Общие иконки внутри полей */
.search-icon {
    position: absolute;
    left: 15px;
    top: 55%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.7;
}

.search-icon svg {
    width: 22px;
    height: 22px;
}

.cat-search-clear {
    display: none;
    position: absolute;
    right: 4px;
    top: 55%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--hl-text);
    opacity: 0.6;
    transition: opacity 0.2s, background-color 0.2s;
}
@media (hover: hover) and (pointer: fine) {
	.cat-search-clear:hover {
		opacity: 1;
		background-color: rgba(255, 255, 255, 0.08);
	}
}
.cat-search-clear svg {
    width: 20px;
    height: 20px;
}
/* Полностью убираем любые тени и обводки с крестика на мобильных */
.cat-search-clear {
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

/* Все состояния — активное, фокус, hover */
.cat-search-clear:active,
.cat-search-clear:focus,
.cat-search-clear:hover,
.cat-search-clear:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    opacity: 0.8; /* опционально: лёгкое затемнение вместо тени */
}

/* Дополнительно — убираем возможную обводку от системы при фокусе */
.cat-search-clear::-moz-focus-inner {
    border: 0;
}

/* На всякий случай — для всего мобильного бара */
@media (max-width: 768px) {
    .cat-search-input-container .cat-search-clear {
        -webkit-tap-highlight-color: transparent;
        outline: none !important;
        box-shadow: none !important;
    }

    .cat-search-input-container .cat-search-clear:active,
    .cat-search-input-container .cat-search-clear:focus {
        outline: none !important;
        box-shadow: none !important;
        background: none !important;
    }
}
/* ==================== АДАПТИВНОСТЬ ==================== */

@media (min-width: 769px) {
    /* Desktop: показываем постоянный бар, скрываем мобильные элементы */
    .desktop-search-container {
        display: block;
    }
    .cat-search-toggle,
    .cat-search-wrapper,
    .cat-search-input-container {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Mobile: скрываем desktop-бар, показываем только toggle */
    .categories-controls {
        gap: 12px;
    }
    .desktop-search-container {
        display: none !important;
    }
    .cat-search-toggle {
        display: flex;
    }
    /* Открытие мобильного бара */
    .widget-header.search-active .cat-search-input-container {
        display: block;
    }
    /* Стили мобильного бара */
.cat-search-input-container .wpst-cat-search {
    height: 48px;
    padding: 0 60px 0 60px;
    font-size: 18px;
    line-height: 48px;
    border: none;                              /* ← убираем бордер у input */
    border-radius: 12px;                        /* оставляем, но он теперь внутри контейнера */
    background: transparent;                   /* фон берётся от контейнера */
    color: var(--hl-text);
    box-shadow: none;
    transition: background-color 0.3s ease;
}

.cat-search-input-container .search-icon svg {
	width: 24px;
	height: 24px;
}
.cat-search-input-container .cat-search-clear svg {
	width: 22px;
	height: 22px;
}
}

/* ==================== СВЕТЛАЯ ТЕМА ==================== */
[data-theme="light"] .filter-btn {
	background-color: rgba(250, 250, 250, 1) !important;
}
@media (hover: hover) and (pointer: fine) {
	[data-theme="light"] .filter-btn:hover {
		background-color: rgba(247, 247, 247, 1) !important;
	}
	[data-theme="light"] .filter-btn-related:hover {
		background-color: rgba(247, 247, 247, 1) !important;
	}

	[data-theme="light"] .dropdown a:hover {
		background-color: rgba(0, 0, 0, 0.06) !important;
	}
	[data-theme="light"] .desktop-search-container .cat-search-clear:hover {
		opacity: 1;
		background-color: rgba(0, 0, 0, 0.08);
	}
	[data-theme="light"] .cat-search-clear:hover {
		opacity: 0.9;
		background-color: rgba(0, 0, 0, 0.08);
	}
}
[data-theme="light"] .filter-btn-related {
	background-color: rgba(250, 250, 250, 1) !important;
}

[data-theme="light"] .dropdown a.active {
    background-color: rgba(0, 0, 0, 0.12) !important;
}

/* Desktop поиск — светлая тема */
[data-theme="light"] .desktop-search-container .wpst-cat-search {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .desktop-search-container .wpst-cat-search:focus {
    border: 1px solid var(--hl-border) !important;
}
[data-theme="light"] .desktop-search-container .wpst-cat-search::placeholder {
    color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .desktop-search-container .search-icon {
    opacity: 0.5;
}
[data-theme="light"] .desktop-search-container .search-icon svg {
    stroke: #666;
}
[data-theme="light"] .desktop-search-container .cat-search-clear {
    opacity: 0.5;
}


[data-theme="light"] .wpst-cat-search::placeholder {
    color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .search-icon {
    opacity: 0.5;
}
[data-theme="light"] .search-icon svg {
    stroke: #555555;
}
[data-theme="light"] .cat-search-clear {
    opacity: 0.5;
}

[data-theme="light"] .cat-search-clear svg {
    stroke: #555555;
}
[data-theme="light"] .cat-search-input-container {
    background-color: rgba(255, 255, 255, 1);  /* или просто #fff */
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .cat-search-input-container .wpst-cat-search:focus {
    background-color: rgba(0, 0, 0, 0.02);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}


/*--------------------------------------------------------------
# Photos
--------------------------------------------------------------*/
/* Photos grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
/* Hover animation styles adapted from script #2 */
.photo-packs {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-pack {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
	.photo-packs:hover {
		box-shadow: 0 6px 16px rgba(0,0,0,0.12);
		transform: translateY(-2px);
	}
	.photo-pack:hover {
		box-shadow: 0 6px 16px rgba(0,0,0,0.18);
		transform: translateY(-2px);
	}
}

.photo-item {
    background: var(--hl-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.photo-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.photo-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-meta {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.photo-meta .photo-name {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 500;
    color: var(--hl-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    flex: 1;
}
@media (max-width: 480px) {
    .photo-meta h3 {
        font-size: 15px;
        line-height: 1.25;
    }
}
/* Load more */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}
.load-more-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
@media (hover: hover) and (pointer: fine) {
	.load-more-btn:hover {
		background: #005a87;
		transform: translateY(-2px);
		box-shadow: 0 4px 8px rgba(0,90,135,0.3);
	}
}
.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* Modal overlay */
.photo-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    touch-action: pan-x;
}
/* Modal content */
.photo-modal-content {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    width: fit-content;
    height: fit-content;
    opacity: 0;
    transition: opacity 0.3s ease;
    touch-action: pan-x;
}
@media (max-width: 768px) {
    .photo-modal-content {
        padding-top: 20px; /* Fallback */
    }
}
.modal-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease; /* Добавили opacity в transition для плавности */
}
@media (max-width: 768px) {
    .modal-image {
        max-width: 90vw;
        max-height: 80vh; /* Уменьшено для вертикальных фото, чтобы не упиралось в верх */
    }
}
.modal-vote-container {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10001;
}
@media (max-width: 768px) {
    .modal-vote-container {
        right: 10px;
        gap: 13px;
    }
}
/* Улучшенные стили для модальных кнопок лайк/дизлайк: полное удаление обводки */
.modal-vote-container .modal-vote-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent; /* Убирает тач-обводку на iOS/Chrome mobile */
    -webkit-touch-callout: none; /* Убирает callout на iOS */
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 768px) {
    .modal-vote-btn {
        font-size: 18px;
    }
}
.vote-summary {
    display: flex;
    gap: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #bebebe;
    margin-left: auto;
}
.vote-summary span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.vote-summary .vote-icon-like 
.vote-summary .vote-icon-dislike {
    color: #bebebe;
}

[data-theme="light"] .vote-summary .vote-icon-like 
.vote-summary .vote-icon-dislike {
    color: #232323;
}
[data-theme="light"] .vote-summary {
    color: #232323;
}
/* Состояния: фокус, hover, active — полное подавление обводки */
.modal-vote-container .modal-vote-btn:focus,
.modal-vote-container .modal-vote-btn:hover,
.modal-vote-container .modal-vote-btn:active,
.modal-vote-container .modal-vote-btn:focus-visible,
.modal-vote-container .modal-vote-btn:focus-within {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: none;
    border: none;
    outline: none;
    outline-offset: 0;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}
/* Firefox-specific: убирает moz-focus-inner border */
.modal-vote-container .modal-vote-btn::-moz-focus-inner {
    border: 0;
    padding: 0;
}
@media (hover: hover) and (pointer: fine) {
	/* Hover эффект остаётся (без обводки) */
	.modal-vote-container .modal-vote-btn:hover {
		color: #fff;
		transform: scale(1.1);
	}
}
/* Active анимация */
.modal-vote-container .modal-vote-btn.active {
    animation: pulse 0.5s ease-in-out;
}
.modal-vote-container .like-btn.active,
.modal-vote-container .like-btn.active .vote-icon {
    color: #28a745;
}
.modal-vote-container .dislike-btn.active,
.modal-vote-container .dislike-btn.active .vote-icon {
    color: #dc3545;
}
/* Анимация pulse (без изменений) */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10003; /* Выше всего, поверх хинтов и content */
    border-radius: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: none;
    color: white;
    font-size: 24px;
    background: transparent;
    padding: 0;
    line-height: 1;
}
.modal-close .close-icon {
    font-size: 24px;
    line-height: 1;
}
.modal-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
}
/* Мобильная версия: absolute относительно content */
@media (max-width: 768px) {
    .modal-close.mobile {
        position: absolute;
        right: 10px;
        font-size: 24px;
        background: transparent;
		padding-top: 10px;
    }
	
	
    .modal-close.mobile .close-icon {
        font-size: 32px;
    }
}
/* Modal nav (prev/next) — улучшенная анимация и полное удаление обводки */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.2s ease;
    display: none;
    z-index: 10001;
    font-size: 30px;
    padding: 10px;
    outline: none;
    box-shadow: none;
    user-select: none;
    line-height: 1;
    vertical-align: middle;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent; /* Удаление тач-обводки (на всякий случай) */
}
.prev {
    left: 20px;
}
.next {
    right: 20px;
}
.modal-nav .nav-icon {
    font-size: 30px;
    color: inherit;
    line-height: 1;
}
@media (max-width: 768px) {
    /* Modal nav: жёстко hidden на mobile, чтобы не дёргались */
    .modal-nav {
        display: none;
    }
}
@media (hover: hover) and (pointer: fine) {
	/* Hover: лёгкая анимация — scale + opacity */
	.modal-nav:hover {
		opacity: 0.8;
		transform: translateY(-50%) scale(1.05); /* Лёгкий scale для "подъёма" */
	}
}
/* Active: лёгкое нажатие */
.modal-nav:active {
    color: #fff;
    transform: translateY(-50%) scale(0.95); /* Scale down для клика, с translateY для consistency */
    transition: color 0.1s ease, transform 0.1s ease, opacity 0.1s ease; /* Быстрый отклик */
    opacity: 1;
}
/* Фокус: полное подавление обводки и красного цвета */
.modal-nav:focus,
.modal-nav:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
    color: #fff; /* Белый, без красного */
    transform: translateY(-50%) scale(1); /* Сброс scale, но с translateY */
    -webkit-tap-highlight-color: transparent;
}
.modal-nav::-moz-focus-inner {
    border: 0;
    padding: 0;
}
#swipe-hint,
#tap-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    z-index: 10002; /* Выше vote-container (10001), чтобы поверх всего в модале */
    white-space: nowrap; /* Фикс: текст в одну строку */
    max-width: 90vw;
    text-align: center;
}
/* Разместить tap-hint чуть выше swipe-hint на мобильных */
@media (max-width: 768px) {
    #swipe-hint {
        bottom: 20px; /* Поднимаем swipe-hint, чтобы разместить tap-hint ниже */
    }
    #tap-hint {
        bottom: 20px; /* tap-hint остаётся внизу */
    }
}
/* Modal loader */
.modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
}
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.prev-photo,
.next-photo {
    display: none;
}


/*--------------------------------------------------------------
# Site Footer
--------------------------------------------------------------*/
/* Основные стили футера */
.site-footer {
    background: var(--hl-bg);
    border-top: 1px solid var(--hl-border);
    padding: 13px 0;
    margin-top: 1em;
    clear: both;
    width: 100%;
	
}

/* Блок с копирайтом и ссылками */
.site-info {
    color: #bbbbbb;
    text-align: center;
    font-size: 15px;        /* Точно 16px для всего текста и ссылок */
    line-height: 1.2;       /* Межстрочный интервал для основного текста */
    padding-top: 0.9em;
	font-weight: 500;
    clear: both;
}
[data-theme="light"] .site-info {
	color: #333333;
}
@media (hover: hover) and (pointer: fine) {
	[data-theme="light"] .site-footer .site-info a:hover{
		color: #4b4b4b;
	}
	.site-footer .site-info a:hover {
		color: #c8c8c8;
	}
}	
/* Ссылки в футере */
.site-footer .site-info a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

/* Логотип в футере */
.logo-footer {
    text-align: center;
    opacity: 1;
    filter: none;
    background: none;
}

.logo-footer a {
    display: inline-block;
    opacity: 1;
}

.site-logo {
    opacity: 1;
    filter: none;
    -webkit-filter: none;
    object-fit: contain;
    width: auto;
    height: auto;
    max-width: 100%;
    border: none;
    box-shadow: none;
    transition: none;
	
}

/* Убираем hover-эффекты для логотипа */
.logo-footer:hover,
.logo-footer:hover .site-logo {
    opacity: 1;
    filter: none;
}

/* Контейнер со ссылками (Privacy Policy и т.д.) */
.footer-links {
    text-align: center;
    margin-top: 0.5em;      /* Отступ от текста "All rights reserved..." */
    line-height: 1.8;
}

.link-group {
    display: inline;
}
.link-group a:not(:last-child)::after,
.link-group:not(:last-child)::after {
    content: " · ";
    font-size: 16px;          /* ← основной размер, был 16px — теперь больше */
    font-weight: 700;         /* жирнее */
    color: var(--hl-text-light); /* можно сделать чуть светлее/темнее */
}

/* Мобильная версия (≤768px) */
@media (max-width: 768px) {
    .link-group {
        display: block;
        margin-bottom: 0.2em;     /* Просторные отступы между строками */
        text-align: center;
    }
    
    .link-group:not(:last-child)::after {
        content: "";
    }
    
    /* Шрифт остаётся 16px — не уменьшаем */
    .site-info {
        font-size: 15px;
        line-height: 1.2;
    }
    
    .footer-links {
        margin-top: 0.7em;
    }
}
/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%); /* вместо clip: rect(...) */
    white-space: nowrap;
    border: 0;
}
/* Do not show the outline on the skip link target. */
#content[tabindex="-1"]:focus {
    outline: 0;
}

/*--------------------------------------------------------------
# Site Content
--------------------------------------------------------------*/
.site-content {
    padding: 1em;

    background: var(--hl-bg); /* Глобальный фон */
}
#content {
    min-height: 40em;
}
.content-area {
    width: 100%;
}
.page-content {
    margin: 1.5em 0 0;
}
.page-links {
    clear: both;
    margin: 0 0 1.5em;
}
.byline,
.updated:not(.published) {
    display: none;
}
.single .byline,
.group-blog .byline {
    display: inline;
}

/*--------------------------------------------------------------
# Custom Search
--------------------------------------------------------------*/
.custom-search-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--hl-border);
    border-radius: 4px; /* Согласовали с темой (4px вместо 6px) для избежания несоответствий */
    overflow: hidden;
    background: var(--hl-bg-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 40px; /* Фиксированная высота для идеального прилегания */
    box-sizing: border-box;
    position: relative; /* Добавили, чтобы переопределить position от темы */
    outline: none; /* Подавление обводки на wrapper */
}
@media (max-width: 767px) {
    .custom-search-wrapper {
        height: 42px; /* Чуть выше на мобильных для удобства тача */
    }
}
.custom-search-input {
    flex: 1;
    border: none;
    padding: 0 14px; /* Убрали top/bottom padding, высота от line-height */
    font-size: 16px;
    background: transparent;
    outline: none; /* Усилили для подавления обводки везде */
    color: var(--hl-text);
    height: 100%;
    line-height: 40px; /* Центрирование текста по вертикали */
    border-right: 1px solid var(--hl-border); /* Разделитель переместили на input для избежания артефактов на hover кнопки */
    box-shadow: none; /* Подавление любой тени/обводки */
}
@media (max-width: 767px) {
    .custom-search-input {
        font-size: 16px; /* Предотвращаем зум iOS */
        line-height: 42px;
    }
}

.custom-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--hl-bg-secondary, #f5f5f5);
    padding: 0; /* Убрали padding для плотного прилегания */
    cursor: pointer;
    width: 44px; /* Ширина кнопки для иконки + отступы */
    height: 100%; /* Полная высота обертки */
    flex-shrink: 0;
    color: var(--hl-text-light, #666);
    outline: none; /* Базовое подавление обводки для кнопки */
    box-shadow: none; /* Подавление тени */
    /* Убрали border-left — теперь разделитель на input, чтобы на hover кнопки не было полосы */
}
@media (max-width: 767px) {
    .custom-search-submit {
        width: 48px; /* Чуть шире для тача */
    }
}
@media (hover: hover) and (pointer: fine) {
	.custom-search-submit:hover {
		background: var(--hl-text-light, #e5e5e5);
	}
}	
.custom-search-submit:focus,
.custom-search-submit:focus-visible,
.custom-search-submit:active {
    outline: none; /* Полное подавление обводки на фокусе/клик/visible (для современных браузеров) */
    background: var(--hl-text-light, #e5e5e5); /* Лёгкий фон на фокусе для доступности */
    border: none; /* Подавление бордера */
    box-shadow: none; /* Полное подавление любой тени/обводки */
}
.custom-search-icon {
    width: 18px;
    height: 18px;
    color: var(--hl-text-light, #666);
    stroke: currentColor;
    stroke-width: 1.8;
    outline: none; /* На всякий случай для SVG */
    box-shadow: none;
}
/* Переопределение темных стилей для формы и input (чтобы избежать конфликтов с темой) — усилили специфичность */
.site-branding .header-search form,
.site-branding .header-search form.custom-search-wrapper,
.site-branding .header-search input,
.site-branding .header-search input.custom-search-input,
.site-branding .header-search button.custom-search-submit {
    border: none; /* Базовое подавление бордера */
    outline: none;
    box-shadow: none;
    border-radius: inherit; /* Наследуем от wrapper */
}
.site-branding .header-search input:focus,
.site-branding .header-search input.custom-search-input:focus,
.site-branding .header-search form:focus-within,
.site-branding .header-search form.custom-search-wrapper:focus-within,
.site-branding .header-search button:focus {
    outline: none;
    border: none; /* Полное подавление бордера на фокусе от temp-style.php */
    border-color: transparent; /* Если тема меняет только цвет */
    box-shadow: none; /* Подавление любой тени/обводки от WP/темы */
}

/****************/
/* MEDIAQUERIES */
/****************/


/* Small desktops ----------- */
@media only screen and (min-width : 64.001em) and (max-width : 84em) {
    #content {
        min-height: 40em;
    }
    .content-area {
        width: 100%;
    }
}
/* Desktops and laptops ----------- */
@media only screen and (min-width : 84.001em) {
    /* Styles */
    #content {
        min-height: 40em;
    }
    .content-area {
        width: 100%;
    }
}
	
/* Кастомная пагинация — базовые стили (по умолчанию под тёмную тему) */
.custom-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0 10px;
    width: 100%;
}

.custom-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
}

/* Базовая кнопка страницы */
.custom-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.07);
    color: #d0d0d0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    box-shadow: none; /* явно указываем начальное состояние для лучшей анимации тени */
    transition:
        background-color 0.3s ease-out,
        border-color 0.3s ease-out,
        color 0.3s ease-out,
        box-shadow 0.3s ease-out;
}

@media (hover: hover) and (pointer: fine) {
	.custom-page-btn:hover:not(.disabled):not(.active) {
		background: rgba(255, 255, 255, 0.14);
		border-color: rgba(255, 255, 255, 0.28);
		color: #ffffff;
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);

		transition:
			background-color 0.3s ease-out,
			border-color 0.3s ease-out,
			color 0.3s ease-out,
			box-shadow 0.3s ease-out;
	}
}
/* Active и Disabled — без изменений */
.custom-page-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font-weight: 600;
}

/* Disabled состояние */
.custom-page-btn.disabled {
    opacity: 0.4;                  /* полупрозрачная */
    pointer-events: none !important; /* полностью некликабельная */
    transform: none !important;
    box-shadow: none !important;
}

/* Prev / Next */
.custom-page-btn.prev,
.custom-page-btn.next {
    font-size: 32px;
    min-width: 56px;
    line-height: 1;
}

.custom-page-btn.prev .arrow,
.custom-page-btn.next .arrow {
    display: inline-block;
    transform: translateY(-3px);
    line-height: 1;
}

/* ====================== LIGHT ТЕМА ====================== */
[data-theme="light"] .custom-page-btn {
    background: rgba(250, 250, 250, 1);
    color: #333333;
    border: 1px solid rgba(0, 0, 0, 0.20);
}
@media (hover: hover) and (pointer: fine) {
	[data-theme="light"] .custom-page-btn:hover:not(.disabled):not(.active) {
		background: rgba(244, 244, 244, 1);
		border-color: rgba(0, 0, 0, 0.20);
		color: #000000;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
	}
}
[data-theme="light"] .custom-page-btn.active {
    background: rgba(240, 240, 240, 1);
    border-color: rgba(0, 0, 0, 0.18);
    color: #000000;
    font-weight: 600;
}

/* Disabled в light теме — чуть мягче, чтобы не сливалось */
[data-theme="light"] .custom-page-btn.disabled {
    opacity: 0.45;
}

/* ====================== МОБИЛЬНАЯ АДАПТАЦИЯ ====================== */
@media (max-width: 768px) {
    .custom-pagination {
        gap: 8px;
    }
    
    .custom-page-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 10px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .custom-page-btn.prev,
    .custom-page-btn.next {
        min-width: 50px;
        font-size: 24px;
    }
    
    .custom-pagination-wrapper {
        margin: 30px 0 2px;
    }
}


.related-videos-section .filter-controls {
    display: flex;
    justify-content: center;
}

.filter-btn-related {
    /* Основные изменения для увеличения */
    height: 45px;                    /* было 42 → теперь комфортнее */
    min-width: 150px;                /* гарантирует, что кнопка не будет слишком узкой */
    padding: 0 28px;                 /* больше воздуха по бокам — выглядит премиальнее */
    font-size: 16px;                 /* чуть крупнее текст — лучше читаемость */
    font-weight: 600;
    /* Остальное оставляем как было, но можно усилить */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(33, 33, 33, 1) !important;
    border: 1px solid var(--hl-border) !important;
    border-radius: 12px;    
    color: var(--hl-text) !important;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
	letter-spacing: 0.02em;
	transition: background-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
	.filter-btn-related:hover {
		transition: background-color 0.2s ease;
		background-color: rgba(37, 37, 37, 1) !important;
	}
}

.related-videos-section  .cat-grid {
    margin: 10px 0 30px 0;
}
@media (max-width: 480px) {
    .related-videos-section .cat-grid {
        margin: 20px 0 !important;
    }
}

.error-404 .page-header {
    text-align: center;
    padding: 40px 20px 20px;
    margin-bottom: 20px;
}

.error-404 .page-header h1 {
    font-size: 48px;
    line-height: 1.4;
    margin: 0 0 20px 0;
    color: var(--hl-text, #333);
}

.error-404 .page-header p {
    font-size: 20px;
    margin: 0 auto 30px;
    max-width: 700px;
    opacity: 0.8;
    line-height: 1.5;
}


/* Сообщение "Tap again..." на мобильных */
.tap-message {
    position: fixed; /* изменил на fixed, чтобы элемент был относительно viewport */
    bottom: 7px;    /* отступ от нижнего края, можно изменить */
    left: 50%;
    transform: translateX(-50%); /* центрируем только по горизонтали */
    z-index: 5;
    background: rgba(0, 0, 0, 0.7);
    color: #fafafa;
    padding: 8px 13px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tap-message.show {
    opacity: 1;
    visibility: visible;
}
.no-search-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: var(--hl-text);
    opacity: 0.7;
}



.entry-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.03); /* Очень лёгкое высветление — почти не видно, но текст "дышит" */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Тень для глубины */
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content strong {
    color: #005fa8; /* Ваш акцент */
}

.entry-content h1,
.entry-content h2 {
    font-weight: 600;
    color: #ffffff;
}

.entry-content h2 {
    font-size: 1.8rem;
	border-bottom: 2px solid #005fa8;
	padding-bottom: 10px;
}

.entry-content ul {
    margin: 20px 0;
    padding-left: 30px;
}
.entry-content h1 {
	font-size: 2rem;
	text-align: center;
}
.entry-content ul li {
    margin-bottom: 12px;
    list-style: disc;
}

.entry-content ul li::marker {
    color: #005fa8;
}

/* Light-тема (если вдруг включится) */
[data-theme="light"] .entry-content {
    color: #333;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .entry-content h1,
[data-theme="light"] .entry-content h2 {
    color: #222;
    border-bottom-color: #005fa8;
}
.compliance-header {
    position: relative;
    margin-bottom: 2rem;
}

.last-updated {
    text-align: right;
    font-size: 0.95rem;
    color: #aaa;               /* чуть сероватый, чтобы не спорил с заголовком */
}
@media (max-width: 768px) {
	.entry-content h2 {
		font-size: 1.6rem;
		text-align: center;
	}
	.entry-content h1 {
		font-size: 1.8rem;
		text-align: center;
	}
	.last-updated {
		text-align: center;
	}
}