/* ==========================================================================
   TRAVEL BLOG - DARK LUXURY AESTHETICS (MATCHING SCREENSHOT)
   ========================================================================== */

:root {
    --bg-dark: #141414;
    --bg-card: #181818;
    --bg-nav: #121212;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888888;
    --text-accent: #ffffff;
    --border-color: #242424;
    --accent-gold: #d4af37;
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body,
body.theme-dark {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* ==========================================================================
   SITE HEADER & TOP NAVIGATION
   ========================================================================== */

.site-header {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 0;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu li + li:not(.nav-theme-item)::before {
    content: '•';
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin-right: 18px;
    display: inline-block;
    vertical-align: middle;
}

body.theme-light .nav-menu li + li:not(.nav-theme-item)::before {
    color: rgba(0, 0, 0, 0.28);
}

.nav-menu li a {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #cccccc;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: #ffffff;
}

.nav-menu li.active a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ffffff;
}

/* Навигация выпадающего подменю */
.nav-has-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-dropdown-chevron {
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.nav-has-dropdown:hover .nav-dropdown-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 8px 6px;
    min-width: 220px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1100;
}

/* Мост наведения курсора */
.nav-submenu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-has-dropdown:hover .nav-submenu,
.nav-has-dropdown:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(2px);
}

.nav-submenu li {
    width: 100%;
}

.nav-submenu li + li::before {
    display: none !important;
}

.nav-submenu li a {
    display: block;
    padding: 9px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #cbd5e1;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.nav-submenu li a::after {
    display: none !important;
}

.nav-submenu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(3px);
}

.nav-submenu li.active-sub a {
    background: rgba(163, 65, 43, 0.2);
    color: #f97316;
    font-weight: 700;
}

/* Подменю для светлой и универсальной тем */
:root[data-theme="light"] .nav-submenu,
:root[data-theme="universal"] .nav-submenu,
body.theme-light .nav-submenu,
body.theme-universal .nav-submenu {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

:root[data-theme="light"] .nav-submenu li a,
:root[data-theme="universal"] .nav-submenu li a,
body.theme-light .nav-submenu li a,
body.theme-universal .nav-submenu li a {
    color: #475569 !important;
}

:root[data-theme="light"] .nav-submenu li a:hover,
:root[data-theme="universal"] .nav-submenu li a:hover,
body.theme-light .nav-submenu li a:hover,
body.theme-universal .nav-submenu li a:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .nav-submenu li.active-sub a,
:root[data-theme="universal"] .nav-submenu li.active-sub a,
body.theme-light .nav-submenu li.active-sub a,
body.theme-universal .nav-submenu li.active-sub a {
    background: rgba(163, 65, 43, 0.12) !important;
    color: #a3412b !important;
}

/* Переключатель темы в верхнем навигационном меню */
.nav-theme-item {
    display: inline-flex;
    align-items: center;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    line-height: 1;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: scale(1.08);
}

.theme-toggle-btn:active {
    transform: scale(0.94);
}

.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* По умолчанию (тёмная тема): показываем солнце, луну прячем */
.theme-toggle-icon.icon-sun {
    display: inline-flex;
}

.theme-toggle-icon.icon-moon {
    display: none;
}

/* Светлая тема активна: прячем солнце, показываем луну */
.theme-toggle-btn.is-light-theme .theme-toggle-icon.icon-sun,
body.theme-light .theme-toggle-icon.icon-sun,
:root[data-theme="light"] .theme-toggle-icon.icon-sun {
    display: none !important;
}

.theme-toggle-btn.is-light-theme .theme-toggle-icon.icon-moon,
body.theme-light .theme-toggle-icon.icon-moon,
:root[data-theme="light"] .theme-toggle-icon.icon-moon {
    display: inline-flex !important;
}


.nav-admin-link {
    position: absolute;
    right: 30px;
}

.admin-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #e0e0e0;
    letter-spacing: 0.05em;
}

.admin-badge-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   TAGS SUB-NAV (IDENTICAL TO SCREENSHOT)
   ========================================================================== */

.tags-nav-bar {
    max-width: 1440px;
    margin: 36px auto 20px auto;
    padding: 0 30px;
    text-align: center;
}

.tags-list {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 12px;
    row-gap: 8px;
}

.tag-item a {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #a8a8a8;
    text-transform: uppercase;
    padding-bottom: 2px;
    transition: var(--transition);
}

.tag-item a:hover {
    color: #ffffff;
}

.tag-item.active a {
    color: #ffffff;
    border-bottom: 1.5px solid #ffffff;
}

.tag-separator {
    color: #4f4f4f;
    font-size: 11px;
    user-select: none;
}

/* Строка поиска */
.filter-controls-container {
    max-width: 1440px;
    margin: 10px auto 35px auto;
    padding: 0 30px;
    display: flex;
    justify-content: center;
}

.search-form {
    width: 100%;
    max-width: 420px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #777777;
}

.search-field {
    width: 100%;
    background: #1c1c1c;
    border: 1px solid #2e2e2e;
    color: #ffffff;
    padding: 9px 36px 9px 38px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.02em;
    outline: none;
    transition: var(--transition);
}

.search-field:focus {
    border-color: #555555;
    background: #222222;
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    color: #888888;
    font-size: 18px;
    line-height: 1;
}

.clear-search-btn:hover {
    color: #ffffff;
}

/* ==========================================================================
   POSTS GRID (4 COLUMNS LIKE SCREENSHOT)
   ========================================================================== */

.posts-grid-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px 60px 30px;
    flex: 1;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 32px;
    row-gap: 54px;
}

.post-card {
    display: flex;
    flex-direction: column;
}

.post-card-link-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
    color: inherit;
}

.post-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #202020;
    margin-bottom: 22px;
}

.post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.post-card-link-wrapper:hover .post-thumb {
    transform: scale(1.035);
}

.post-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.post-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.post-date {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #949494;
    text-transform: lowercase;
}

.meta-dot {
    color: #555555;
    font-size: 10px;
    user-select: none;
}

.post-reading-time {
    font-size: 11px;
    font-weight: 500;
    color: #808080;
    letter-spacing: 0.02em;
}

.post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #ffffff;
    margin-bottom: 10px;
    padding: 0 10px;
}

.post-subtitle {
    font-size: 12px;
    line-height: 1.5;
    color: #9e9e9e;
    margin-bottom: 14px;
    padding: 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    width: 100%;
}

.post-tags-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bfbfbf;
}

.post-footer-subrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.post-views-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6c6c6c;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-card-link-wrapper:hover .post-views-badge {
    color: #999999;
}

.post-arrow {
    font-size: 14px;
    color: #777777;
    transition: transform 0.2s ease, color 0.2s ease;
}

.post-card-link-wrapper:hover .post-arrow {
    color: #ffffff;
    transform: translateX(4px);
}

/* Состояние при отсутствии данных (Empty State) */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #191919;
    border-radius: 8px;
    border: 1px dashed #333333;
    max-width: 600px;
    margin: 40px auto;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 13px;
    color: #888888;
    margin-bottom: 20px;
}

.reset-filter-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #2e2e2e;
    color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.reset-filter-btn:hover {
    background: #3e3e3e;
}

/* Панель пагинации */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.page-link {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #cccccc;
    padding: 6px 14px;
    border: 1px solid #333333;
    border-radius: 4px;
    background: #1a1a1a;
}

.page-link:hover {
    border-color: #666666;
    color: #ffffff;
    background: #222222;
}

.page-indicator {
    font-size: 12px;
    color: #777777;
}

/* ==========================================================================
   SINGLE POST READING VIEW
   ========================================================================== */

.single-post-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 24px 80px 24px;
}

.post-back-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8c8c8c;
}

.back-link:hover {
    color: #ffffff;
}

.btn-edit-post {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #333333;
    border-radius: 4px;
    color: #aaaaaa;
}

.btn-edit-post:hover {
    border-color: #555555;
    color: #ffffff;
}

.single-post-header {
    text-align: center;
    margin-bottom: 36px;
}

.single-post-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tag-pill {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
}

.single-post-meta-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.single-post-date {
    display: inline-block;
    font-size: 12px;
    color: #8c8c8c;
    letter-spacing: 0.05em;
}

.single-post-reading-time {
    display: inline-block;
    font-size: 12px;
    color: #b0b0b0;
    font-weight: 500;
}

.single-post-title {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 600;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 18px;
}

.single-post-lead {
    font-size: 18px;
    line-height: 1.6;
    color: #cccccc;
    font-weight: 300;
    max-width: 760px;
    margin: 0 auto;
}

.single-post-covers {
    margin-bottom: 48px;
}

.cover-main-container {
    width: 100%;
    max-height: 540px;
    overflow: hidden;
    border-radius: 4px;
    background: #1e1e1e;
}

.cover-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-thumbnails-strip {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.thumb-btn {
    border: 2px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    width: 80px;
    height: 56px;
    flex-shrink: 0;
    transition: var(--transition);
}

.thumb-btn.active {
    border-color: #ffffff;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Типографика тела статьи */
.typography {
    font-size: 16px;
    line-height: 1.8;
    color: #d1d1d1;
}

.typography h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    color: #ffffff;
    margin: 42px 0 16px 0;
    font-weight: 600;
}

.typography h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    color: #f0f0f0;
    margin: 32px 0 14px 0;
    font-weight: 500;
}

.typography p {
    margin-bottom: 22px;
}

.typography blockquote {
    margin: 36px 0;
    padding: 22px 30px;
    background: #1c1c1c;
    border-left: 3px solid #ffffff;
    font-style: italic;
    font-size: 17px;
    color: #ececec;
    border-radius: 0 4px 4px 0;
}

.typography blockquote p {
    margin: 0;
}

.typography img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 24px;
    display: block;
}

.typography em,
.typography i {
    color: #999999;
    font-size: 13px;
    display: block;
    margin-top: 6px;
    margin-bottom: 24px;
    text-align: center;
}

.typography a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.typography a:hover {
    color: var(--accent-gold);
}

.single-post-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-tags-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tags-label,
.share-label {
    font-size: 12px;
    color: #777777;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tags-list-inline {
    display: flex;
    gap: 10px;
}

.tag-link {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: #222222;
    padding: 4px 10px;
    border-radius: 4px;
}

.tag-link:hover {
    background: #333333;
}

.footer-views-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1c1c1c;
    border: 1px solid #2e2e2e;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: #aaaaaa;
}

.footer-views-counter svg {
    color: #d4af37;
}

.footer-views-counter strong {
    color: #ffffff;
    font-weight: 700;
}

.btn-copy-url {
    background: #242424;
    border: 1px solid #383838;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-copy-url:hover {
    background: #333333;
}

/* Похожие статьи */
.related-posts-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 28px;
    text-align: center;
}

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

.related-card {
    display: flex;
    flex-direction: column;
}

.related-thumb-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #202020;
    border-radius: 3px;
    margin-bottom: 12px;
}

.related-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-thumb-wrap img {
    transform: scale(1.04);
}

.related-date {
    font-size: 11px;
    color: #888888;
    display: block;
    margin-bottom: 6px;
}

.related-post-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.35;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: #0d0d0d;
    border-top: 1px solid var(--border-color);
    padding: 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    font-size: 12px;
    color: #777777;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 12px;
    color: #aaaaaa;
}

.footer-links a:hover {
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */

@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 24px;
        row-gap: 40px;
    }
}

@media (max-width: 860px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 20px;
        row-gap: 36px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-container {
        flex-direction: column;
        gap: 14px;
    }

    .nav-admin-link {
        position: static;
    }
}

@media (max-width: 580px) {
    .posts-grid {
        grid-template-columns: 1fr;
        row-gap: 36px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .single-post-title {
        font-size: 28px;
    }

    .single-post-lead {
        font-size: 15px;
    }
}

/* ==========================================================================
   THEME LIGHT & HEADER LOGO INTEGRATION
   ========================================================================== */

:root[data-theme="light"],
body.theme-light {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-accent: #0f172a;
    --border-color: #e2e8f0;
}

body.theme-light {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

body.theme-light .site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

body.theme-light .nav-menu li a {
    color: #475569;
}

body.theme-light .nav-menu li a:hover,
body.theme-light .nav-menu li.active a {
    color: #0f172a;
}

body.theme-light .nav-menu li.active a::after {
    background-color: #0f172a;
}

body.theme-light .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.14);
    color: #334155;
}

body.theme-light .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.28);
    color: #0f172a;
}

body.theme-light .theme-toggle-icon.icon-sun {
    display: none;
}

body.theme-light .theme-toggle-icon.icon-moon {
    display: inline-flex;
}

/* Карточки и списки для светлой темы */
body.theme-light .post-card,
body.theme-light .category-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-light .post-title {
    color: #0f172a;
}

body.theme-light .post-subtitle {
    color: #475569;
}

body.theme-light .post-date,
body.theme-light .post-reading-time,
body.theme-light .meta-dot,
body.theme-light .post-views-badge {
    color: #64748b;
}

body.theme-light .post-card-link-wrapper:hover .post-views-badge {
    color: #0f172a;
}

body.theme-light .post-tags-label {
    color: #475569;
}

body.theme-light .post-thumb-container {
    background-color: #e2e8f0;
}

/* Поиск и фильтрация для светлой темы */
body.theme-light .search-field {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.theme-light .search-field:focus {
    border-color: #64748b;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

body.theme-light .search-icon,
body.theme-light .clear-search-btn {
    color: #94a3b8;
}

body.theme-light .clear-search-btn:hover {
    color: #0f172a;
}

body.theme-light .tag-item a {
    color: #64748b;
}

body.theme-light .tag-item a:hover,
body.theme-light .tag-item.active a {
    color: #0f172a;
    border-bottom-color: #0f172a;
}

body.theme-light .tag-separator {
    color: #cbd5e1;
}

/* Пагинация для светлой темы */
body.theme-light .page-link {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

body.theme-light .page-link:hover {
    background: #f8fafc;
    border-color: #0f172a;
    color: #0f172a;
}

body.theme-light .page-indicator {
    color: #64748b;
}

/* Страница отдельной статьи для светлой темы */
body.theme-light .single-post-title {
    color: #0f172a;
}

body.theme-light .single-post-lead {
    color: #334155;
}

body.theme-light .single-post-date,
body.theme-light .single-post-reading-time {
    color: #64748b;
}

body.theme-light .back-link {
    color: #64748b;
}

body.theme-light .back-link:hover {
    color: #0f172a;
}

body.theme-light .btn-edit-post {
    border-color: #cbd5e1;
    color: #475569;
}

body.theme-light .btn-edit-post:hover {
    border-color: #64748b;
    color: #0f172a;
}

body.theme-light .tag-pill {
    background: rgba(0, 0, 0, 0.06);
    color: #1e293b;
}

body.theme-light .cover-main-container {
    background: #e2e8f0;
}

/* Типографика для светлой темы */
body.theme-light .typography {
    color: #334155;
}

body.theme-light .typography h2,
body.theme-light .typography h3,
body.theme-light .typography h4,
body.theme-light .typography strong {
    color: #0f172a;
}

body.theme-light .typography blockquote {
    background: #f8fafc;
    border-left-color: var(--site-accent-color, #A3412B);
    color: #1e293b;
}

body.theme-light .typography code {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

body.theme-light .typography hr {
    border-color: #e2e8f0;
}

body.theme-light .site-footer {
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

body.theme-light .site-footer .footer-copy,
body.theme-light .site-footer .footer-links a {
    color: #64748b;
}

/* Логотип в шапке сайта */
.site-header-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-header-logo-link:hover {
    opacity: 0.85;
}

.site-header-logo-img {
    display: block;
    object-fit: contain;
}

.himal-brand-logo-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.himal-brand-logo-preview .logo-txt-himal {
    color: #ffffff;
}

.himal-brand-logo-preview .logo-txt-trex {
    color: #ffffff;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: 5px;
    margin-left: 2px;
}

body.theme-light .himal-brand-logo-preview .logo-txt-himal,
body.theme-light .himal-brand-logo-preview .logo-txt-trex {
    color: #0f172a;
}

body.theme-light .himal-brand-logo-preview .logo-icon-peak polygon:first-child {
    fill: #0f172a;
}

.nav-container.logo-pos-left {
    justify-content: space-between;
}

.nav-container.logo-pos-center {
    flex-direction: column;
    gap: 12px;
}

.nav-container.logo-pos-right {
    flex-direction: row-reverse;
    justify-content: space-between;
}

/* ==========================================================================
   GLOBAL COLORS, FONTS, THEMES & ELEMENT SHAPES
   ========================================================================== */

:root {
    --site-heading-font: 'Forum', 'Montserrat', serif;
    --site-body-font: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --site-accent-color: #A3412B;
    --site-h1-size: 36px;
    --site-h3-size: 24px;
    --site-body-size: 15px;
    --site-elem-radius: 12px;
    --site-card-radius: 12px;
    --site-btn-radius: 9999px;
    --site-input-radius: 0px;
}

/* 1. Тема Universal (Теплая редакционная) */
:root[data-theme="universal"],
body.theme-universal {
    --bg-dark: #fcfbf7;
    --bg-card: #ffffff;
    --bg-nav: #f7f4ee;
    --text-primary: #1c2026;
    --text-secondary: #4a5462;
    --text-muted: #748092;
    --text-accent: #1c2026;
    --border-color: #eae5dc;
}

body.theme-universal {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

body.theme-universal .site-header {
    background-color: #f7f4ee;
    border-bottom: 1px solid #eae5dc;
}

body.theme-universal .nav-menu li a {
    color: #4a5462;
}

body.theme-universal .nav-menu li a:hover,
body.theme-universal .nav-menu li.active a {
    color: #1c2026;
}

body.theme-universal .nav-menu li.active a::after {
    background-color: #1c2026;
}

body.theme-universal .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
    color: #4a5462;
}

body.theme-universal .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.09);
    border-color: rgba(0, 0, 0, 0.25);
    color: #1c2026;
}

body.theme-universal .theme-toggle-icon.icon-sun {
    display: none;
}

body.theme-universal .theme-toggle-icon.icon-moon {
    display: inline-flex;
}

body.theme-universal .post-card,
body.theme-universal .category-card {
    background-color: #ffffff;
    border-color: #eae5dc;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

body.theme-universal .post-title {
    color: #1c2026;
}

body.theme-universal .post-subtitle {
    color: #4a5462;
}

body.theme-universal .post-date,
body.theme-universal .post-reading-time,
body.theme-universal .meta-dot,
body.theme-universal .post-views-badge {
    color: #748092;
}

body.theme-universal .post-card-link-wrapper:hover .post-views-badge {
    color: #1c2026;
}

body.theme-universal .post-tags-label {
    color: #5a6575;
}

body.theme-universal .post-thumb-container {
    background-color: #eae5dc;
}

body.theme-universal .search-field {
    background: #ffffff;
    border-color: #ded7cb;
    color: #1c2026;
}

body.theme-universal .search-field:focus {
    border-color: #748092;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(116, 128, 146, 0.12);
}

body.theme-universal .search-icon,
body.theme-universal .clear-search-btn {
    color: #8c98a8;
}

body.theme-universal .clear-search-btn:hover {
    color: #1c2026;
}

body.theme-universal .tag-item a {
    color: #748092;
}

body.theme-universal .tag-item a:hover,
body.theme-universal .tag-item.active a {
    color: #1c2026;
    border-bottom-color: #1c2026;
}

body.theme-universal .tag-separator {
    color: #eae5dc;
}

body.theme-universal .page-link {
    background: #ffffff;
    border-color: #ded7cb;
    color: #4a5462;
}

body.theme-universal .page-link:hover {
    background: #f7f4ee;
    border-color: #1c2026;
    color: #1c2026;
}

body.theme-universal .page-indicator {
    color: #748092;
}

body.theme-universal .single-post-title {
    color: #1c2026;
}

body.theme-universal .single-post-lead {
    color: #3e4754;
}

body.theme-universal .single-post-date,
body.theme-universal .single-post-reading-time {
    color: #748092;
}

body.theme-universal .back-link {
    color: #748092;
}

body.theme-universal .back-link:hover {
    color: #1c2026;
}

body.theme-universal .btn-edit-post {
    border-color: #ded7cb;
    color: #4a5462;
}

body.theme-universal .btn-edit-post:hover {
    border-color: #748092;
    color: #1c2026;
}

body.theme-universal .tag-pill {
    background: rgba(0, 0, 0, 0.05);
    color: #1c2026;
}

body.theme-universal .cover-main-container {
    background: #eae5dc;
}

body.theme-universal .typography {
    color: #2c333f;
}

body.theme-universal .typography h2,
body.theme-universal .typography h3,
body.theme-universal .typography h4,
body.theme-universal .typography strong {
    color: #1c2026;
}

body.theme-universal .typography blockquote {
    background: #f4efe6;
    border-left-color: var(--site-accent-color, #A3412B);
    color: #1c2026;
}

body.theme-universal .site-footer {
    background-color: #f1ede4;
    border-top: 1px solid #eae5dc;
}

body.theme-universal .site-footer .footer-copy,
body.theme-universal .site-footer .footer-links a {
    color: #748092;
}

body.theme-universal .himal-brand-logo-preview .logo-txt-himal,
body.theme-universal .himal-brand-logo-preview .logo-txt-trex {
    color: #1c2026;
}

body.theme-universal .himal-brand-logo-preview .logo-icon-peak polygon:first-child {
    fill: #1c2026;
}

/* 2. Тема Contrast (Высококонтрастная черно-белая) */
:root[data-theme="contrast"],
body.theme-contrast {
    --bg-dark: #000000;
    --bg-card: #0a0a0c;
    --bg-nav: #000000;
    --text-primary: #ffffff;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
    --text-accent: #ffffff;
    --border-color: #27272a;
}

body.theme-contrast {
    background-color: #000000;
    color: #ffffff;
}

body.theme-contrast .site-header {
    background-color: #000000;
    border-bottom: 1px solid #27272a;
}

body.theme-contrast .nav-menu li a {
    color: #d4d4d8;
}

body.theme-contrast .nav-menu li a:hover,
body.theme-contrast .nav-menu li.active a {
    color: #ffffff;
}

body.theme-contrast .nav-menu li.active a::after {
    background-color: #ffffff;
}

body.theme-contrast .theme-toggle-btn {
    background: #000000;
    border: 1px solid #52525b;
    color: #ffffff;
}

body.theme-contrast .theme-toggle-btn:hover {
    border-color: #ffffff;
    background: #18181b;
}

body.theme-contrast .theme-toggle-icon.icon-sun {
    display: inline-flex;
}

body.theme-contrast .theme-toggle-icon.icon-moon {
    display: none;
}

body.theme-contrast .post-card,
body.theme-contrast .category-card {
    background-color: #0a0a0c;
    border-color: #27272a;
}

body.theme-contrast .site-footer {
    background-color: #050505;
    border-top: 1px solid #27272a;
}

body.theme-contrast .site-footer .footer-copy,
body.theme-contrast .site-footer .footer-links a {
    color: #a1a1aa;
}

/* 3. Привязка типографики для всех страниц */
h1,
h2,
h3,
h4,
h5,
h6,
.hero-heading,
.page-h1,
.page-h2,
.page-h3,
.page-h4,
.post-title,
.single-post-title,
.blog-hero-title,
.category-card-title,
.section-title,
.footer-title,
.post-header-title {
    font-family: var(--site-heading-font) !important;
}

body,
.cms-page,
.site-main,
.rich-text,
.post-body,
.post-content,
.post-excerpt,
.post-meta,
.page-block,
.single-post-lead,
.single-post-content {
    font-family: var(--site-body-font);
}

.rich-text,
.post-body,
.single-post-content p,
.post-excerpt {
    font-size: var(--site-body-size);
}

.page-h1,
h1.post-title,
.single-post-title,
h1.hero-heading,
.blog-hero-title {
    font-size: clamp(28px, 4.5vw, var(--site-h1-size));
}

.page-h3,
h3.post-subtitle,
h3.section-subtitle {
    font-size: clamp(19px, 3vw, var(--site-h3-size));
}

/* 4. Включенные акцентные цвета */
body.accents-enabled h2,
body.accents-enabled h3,
body.accents-enabled .page-h3,
body.accents-enabled .hero-eyebrow,
body.accents-enabled .post-category,
body.accents-enabled .category-pill,
body.accents-enabled .post-tag-badge,
body.accents-enabled .nav-menu.highlight-accent li.active a {
    color: var(--site-accent-color) !important;
}

button.btn-primary,
a.btn-primary,
.hero-btn,
.post-btn,
.blog-filter-btn.active,
.pagination .active,
.btn-accent,
.comment-submit-btn {
    background-color: var(--site-accent-color) !important;
    border-color: var(--site-accent-color) !important;
    color: #ffffff !important;
    border-radius: var(--site-btn-radius) !important;
}

/* 5. Радиусы скругления элементов */
button,
.btn,
.btn-action,
input[type="button"],
input[type="submit"] {
    border-radius: var(--site-btn-radius);
}

.post-card,
.category-card,
.photo-card,
.post-thumb,
.cover-main-img {
    border-radius: var(--site-elem-radius);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    border-radius: var(--site-input-radius);
}

/* 6. Стили списков */
body.list-style-dash .rich-text ul>li,
body.list-style-dash .single-post-content ul>li,
body.list-style-dash .post-body ul>li {
    list-style: none !important;
    position: relative;
    padding-left: 20px;
}

body.list-style-dash .rich-text ul>li::before,
body.list-style-dash .single-post-content ul>li::before,
body.list-style-dash .post-body ul>li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--site-accent-color);
    font-weight: bold;
}

body.list-style-check .rich-text ul>li,
body.list-style-check .single-post-content ul>li,
body.list-style-check .post-body ul>li {
    list-style: none !important;
    position: relative;
    padding-left: 22px;
}

body.list-style-check .rich-text ul>li::before,
body.list-style-check .single-post-content ul>li::before,
body.list-style-check .post-body ul>li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--site-accent-color);
    font-size: 0.9em;
}

body.list-style-bullet .rich-text ul>li::marker,
body.list-style-bullet .single-post-content ul>li::marker,
body.list-style-bullet .post-body ul>li::marker {
    color: var(--site-accent-color);
}

body.list-style-number .rich-text ol>li::marker,
body.list-style-number .single-post-content ol>li::marker,
body.list-style-number .post-body ol>li::marker {
    color: var(--site-accent-color);
    font-weight: 600;
}

/* 7. Стили цитат */
body.quote-style-line blockquote,
body.quote-style-line .rich-text blockquote,
body.quote-style-line .single-post-content blockquote {
    border-left: 3.5px solid var(--site-accent-color) !important;
    padding-left: 18px !important;
    font-style: italic;
    background: transparent !important;
}

body.quote-style-bg blockquote,
body.quote-style-bg .rich-text blockquote,
body.quote-style-bg .single-post-content blockquote {
    border-left: none !important;
    background: rgba(163, 65, 43, 0.08) !important;
    border-radius: var(--site-elem-radius, 8px) !important;
    padding: 16px 20px !important;
    font-style: italic;
}

body.quote-style-quotes blockquote,
body.quote-style-quotes .rich-text blockquote,
body.quote-style-quotes .single-post-content blockquote {
    position: relative;
    border-left: none !important;
    padding-left: 36px !important;
    font-style: italic;
}

body.quote-style-quotes blockquote::before,
body.quote-style-quotes .rich-text blockquote::before,
body.quote-style-quotes .single-post-content blockquote::before {
    content: "“";
    position: absolute;
    left: 0;
    top: -12px;
    font-size: 44px;
    font-family: Georgia, serif;
    color: var(--site-accent-color);
    line-height: 1;
}

body.quote-style-box blockquote,
body.quote-style-box .rich-text blockquote,
body.quote-style-box .single-post-content blockquote {
    border: 1px solid rgba(148, 163, 184, 0.4) !important;
    border-radius: var(--site-elem-radius, 8px) !important;
    padding: 16px 20px !important;
    font-style: italic;
}

/* ================= COOKIE CONSENT BANNER ================= */
.site-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    width: calc(100% - 48px);
    max-width: 860px;
    background: rgba(22, 24, 29, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: var(--site-elem-radius, 14px);
    padding: 18px 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-cookie-banner.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.site-cookie-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.site-cookie-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(194, 94, 63, 0.12);
    border-radius: 50%;
    color: #c25e3f;
}

.site-cookie-text {
    font-size: 14px;
    line-height: 1.5;
    color: #e2e8f0;
    margin: 0;
}

.site-cookie-link {
    color: #c25e3f;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.site-cookie-link:hover {
    color: #e07452;
}

.site-cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-cookie-accept-btn {
    background: #8b251a;
    color: #ffffff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 10px 24px;
    border-radius: var(--site-btn-radius, 9999px);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(139, 37, 26, 0.35);
}

.site-cookie-accept-btn:hover {
    background: #a32d20;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 37, 26, 0.5);
}

.site-cookie-decline-btn {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: var(--site-btn-radius, 9999px);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.site-cookie-decline-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* Адаптации для светлой темы */
body.theme-light .site-cookie-banner,
[data-theme="light"] .site-cookie-banner {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
}

body.theme-light .site-cookie-text,
[data-theme="light"] .site-cookie-text {
    color: #1e293b;
}

body.theme-light .site-cookie-decline-btn,
[data-theme="light"] .site-cookie-decline-btn {
    color: #64748b;
    border-color: rgba(0, 0, 0, 0.15);
}

body.theme-light .site-cookie-decline-btn:hover,
[data-theme="light"] .site-cookie-decline-btn:hover {
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.3);
}

@media (max-width: 680px) {
    .site-cookie-banner {
        bottom: 12px;
        width: calc(100% - 24px);
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .site-cookie-actions {
        justify-content: flex-end;
    }
    .site-cookie-accept-btn,
    .site-cookie-decline-btn {
        flex: 1;
        text-align: center;
    }
}

/* Модальное окно правовых документов для публичного сайта */
.site-legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.site-legal-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.site-legal-modal-card {
    background: #181a1f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--site-elem-radius, 14px);
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

body.theme-light .site-legal-modal-card,
[data-theme="light"] .site-legal-modal-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

.site-legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .site-legal-modal-header,
[data-theme="light"] .site-legal-modal-header {
    border-bottom-color: #e2e8f0;
}

.site-legal-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

body.theme-light .site-legal-modal-header h3,
[data-theme="light"] .site-legal-modal-header h3 {
    color: #0f172a;
}

.site-legal-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s;
}

.site-legal-modal-close:hover {
    color: #ffffff;
}

.site-legal-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    color: #cbd5e1;
    white-space: pre-wrap;
}

body.theme-light .site-legal-modal-body,
[data-theme="light"] .site-legal-modal-body {
    color: #334155;
}

/* ================= GLOBAL SITE FOOTER (HIMALTREX) ================= */
.site-footer {
    background: #1e1e1e;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.himaltrex-footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 20px 18px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-tg-subscribe-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    width: 100%;
}

.footer-tg-subscribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 40px;
    background: #bdbdbd;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #4b5563 !important;
    text-decoration: none;
    font-family: var(--site-heading-font, 'Montserrat', sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 9999px;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.footer-tg-subscribe-btn:hover {
    background: #d4d4d4;
    color: #1f2937 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.footer-tg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    flex-shrink: 0;
}

.footer-social-icons {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.footer-social-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.site-footer .footer-copy {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Адаптации для светлой темы */
body.theme-light .site-footer,
[data-theme="light"] .site-footer {
    background: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .footer-tg-subscribe-btn,
[data-theme="light"] .footer-tg-subscribe-btn {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b !important;
}

body.theme-light .footer-social-link svg,
[data-theme="light"] .footer-social-link svg {
    fill: #1e293b;
}

body.theme-light .site-footer .footer-copy,
[data-theme="light"] .site-footer .footer-copy {
    color: #475569;
}

/* ================= КНОПКА БЫСТРОГО ПЕРЕХОДА В АДМИНКУ ================= */
.admin-quick-edit-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: pointer;
    text-decoration: none;
    opacity: 0.55;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-quick-edit-btn:hover {
    opacity: 1;
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.admin-quick-edit-btn:active {
    transform: scale(0.95);
}

.admin-quick-edit-btn .admin-gear-icon {
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-quick-edit-btn:hover .admin-gear-icon {
    transform: rotate(60deg);
}

/* Адаптация под светлую тему сайта */
body.theme-light .admin-quick-edit-btn,
[data-theme="light"] .admin-quick-edit-btn {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

body.theme-light .admin-quick-edit-btn:hover,
[data-theme="light"] .admin-quick-edit-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.35);
    color: #0f172a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(59, 130, 246, 0.25);
}

@media (max-width: 768px) {
    .admin-quick-edit-btn {
        top: 10px;
        left: 10px;
        width: 34px;
        height: 34px;
    }
    .admin-quick-edit-btn svg {
        width: 18px;
        height: 18px;
    }
}