@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --btn-bg:     #1976d2;
    --btn-text:   #ffffff;
    --btn-border: #1976d2;
}

* {
    box-sizing: border-box;
}

/* Резервираме мястото на вертикалния скролбар постоянно — иначе при навигация
   между къса страница (без скрол) и дълга страница (със скрол) центрираното
   съдържание (margin:auto) леко "скача" встрани, защото видимата ширина се
   променя с ширината на скролбара. */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f6f9;
    color: #1a1a2e;
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.2;
    color: #111111;
    margin-top: 0;
}

.container {
    width: 92%;
    max-width: 1140px;
    margin: 0 auto;
}

/* ===== BRAND HEADER ===== */
.site-header {
    background: linear-gradient(135deg, #0d1b2a 0%, #1565c0 60%, #1976d2 100%);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 4px 20px rgba(13,27,42,0.35);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

/* Brand: logo + title group */
.site-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}

.site-logo-link {
    display: flex;
    flex-shrink: 0;
}

.site-logo {
    height: 56px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    transition: transform 0.2s;
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.site-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.site-title a {
    text-decoration: none;
    /* Gradient text effect */
    background: linear-gradient(90deg, #ffffff 0%, #90caf9 60%, #42a5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    transition: opacity 0.2s;
}

.site-title a:hover {
    opacity: 0.85;
}

.site-subtitle {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    line-height: 1.2;
}

/* ── Header right: [Здравей,... + бутони под него] вляво от БГ/EN (само
   десктоп; на мобилен .site-header-hello-group е скрита и тук остава само
   езиковия превключвач). ── */
.site-header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    flex-shrink: 0;
}

.site-header-hello-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-right: 10px;
}

.site-header-hello {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.80);
    white-space: nowrap;
}

.site-header-hello strong {
    color: #fff;
}

.site-header-hello-name {
    color: inherit;
    text-decoration: none;
}

.site-header-hello-name:hover strong {
    text-decoration: underline;
    color: #bfdbfe;
}

.site-header-hello-unread {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 20px;
    text-decoration: none;
    margin-left: 3px;
    vertical-align: middle;
}

.site-header-hello-unread:hover {
    background: #b91c1c;
    text-decoration: none;
}

.site-header-match-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #059669;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
}

.site-header-match-link:hover {
    background: #047857;
    text-decoration: none;
    color: #fff;
}

.nav-auth-hello-wrap {
    display: none;
}

.nav-auth-match-link {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
}

.nav-auth-match-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ── Simple BG/EN language buttons (shared with catalog) ── */
.cat-lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.cat-lang-btn {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    border: 1.5px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
}
.cat-lang-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-color: rgba(255,255,255,0.55);
}
.cat-lang-btn.active {
    background: #fff;
    color: #1565c0;
    border-color: #fff;
}

/* ── Падащо меню за превод (Google Translate) ── */
.lang-translate {
    position: relative;
    display: inline-block;
}
.lang-translate-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    font-family: inherit;
}
.lang-translate-chevron {
    display: inline-block;
    font-size: 0.7em;
    transition: transform 0.15s ease;
}
.lang-translate.open .lang-translate-chevron {
    transform: rotate(180deg);
}
.lang-translate-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1200;
}
.lang-translate.open .lang-translate-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-translate-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    text-align: left;
    border-radius: 7px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.12s;
}
.lang-translate-item:hover,
.lang-translate-item:focus-visible {
    background: #f1f5f9;
    outline: none;
}
.lang-translate-item .flag {
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1;
}
.lang-translate-item .flag svg {
    display: block;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    overflow: hidden;
}
.lang-translate-sep {
    height: 1px;
    background: #e5e9f0;
    margin: 5px 4px;
}
.lang-translate-reset {
    color: #64748b;
}

/* Скриване на стандартния Google Translate банер/иконки — използваме собственото меню */
body {
    top: 0 !important;
}
.goog-te-banner-frame,
.goog-te-gadget-icon,
.goog-tooltip,
#goog-gt-tt,
.goog-te-balloon-frame,
#google_translate_element,
body > .skiptranslate {
    display: none !important;
}
.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* ── Back-to-top button ────────────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 500;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(25,118,210,0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
    transform: translateY(10px);
    text-transform: uppercase;
}
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#back-to-top:hover {
    background: #1251a3;
}

.lang-switcher-wrap {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.9);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.25);
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    user-select: none;
    backdrop-filter: blur(4px);
}

.lang-flag {
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

.lang-switcher:hover .lang-btn,
.lang-switcher.open .lang-btn {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.5);
    color: #ffffff;
}

.lang-dropdown {
    list-style: none;
    margin: 0;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 160px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    z-index: 300;
    border: 1px solid #e5e7eb;
}

.lang-switcher.open .lang-dropdown {
    display: flex;
}

.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.lang-dropdown li a:hover {
    background: #eff6ff;
    color: #1565c0;
}

/* ===== NAVIGATION BAR ===== */
.site-nav {
    background: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 85px; /* height of brand header */
    z-index: 190;
}

.site-nav > .container {
    display: flex;
    align-items: center;
}

.site-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    gap: 2px;
}

/* ===== NAV AUTH BUTTONS ===== */
.nav-orders-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    color: #fff;
    background: var(--btn-bg, #1976d2);
    border: 1.5px solid var(--btn-bg, #1976d2);
    flex-shrink: 0;
    white-space: nowrap;
    transition: opacity .15s;
    margin-right: .5rem;
}
.nav-orders-btn:hover { opacity: .88; }

.nav-auth-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Бутоните Колекция/Админ/Панел/Регистрация/Вход/Изход се показват под
   "Здравей, ..." в десктоп хедъра; на мобилен се показват в навигацията както
   досега (вижда се само едната от двете копия според екрана). */
.nav-auth-btns.nav-auth-btns--mobile {
    display: none;
}
.site-header-auth-btns {
    justify-content: flex-end;
}

/* На синия фон на хедъра синият стил на бутоните се сливаше с фона — обръщаме
   цветовете, за да изпъкват ясно (само за копието под "Здравей, ..."). */
.site-header-auth-btns .nav-auth-btn--outline {
    border-color: rgba(255,255,255,.75);
    color: #fff;
}
.site-header-auth-btns .nav-auth-btn--outline:hover {
    background: #fff;
    color: #1565c0;
}
.site-header-auth-btns .nav-auth-btn--filled {
    background: #fff;
    color: #1565c0;
    border-color: #fff;
}
.site-header-auth-btns .nav-auth-btn--filled:hover {
    background: #dbeafe;
    border-color: #dbeafe;
    color: #1251a0;
}
.site-header-auth-btns .nav-orders-btn {
    background: #fff;
    color: #1565c0;
    border-color: #fff;
}
.site-header-auth-btns .nav-orders-btn:hover {
    opacity: 1;
    background: #dbeafe;
}

.nav-auth-hello {
    display: none; /* shown only on mobile via media query */
    font-size: .78rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    margin-right: 10px;
}

.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    line-height: 1.4;
    background: none;
    font-family: inherit;
}

.nav-auth-btn--outline {
    border-color: #1976d2;
    color: #1976d2;
    background: transparent;
}

.nav-auth-btn--outline:hover {
    background: #1976d2;
    color: #fff;
}

.nav-auth-btn--filled {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.nav-auth-btn--filled:hover {
    background: #1251a0;
    border-color: #1251a0;
}

/* ===== LOGIN MODAL ===== */
.nav-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-auth-modal[hidden] { display: none; }

.nav-auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    animation: modalFadeIn .18s ease;
}

.nav-auth-modal-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 14px;
    padding: 36px 40px 30px;
    width: min(420px, 94vw);
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    animation: modalSlideUp .2s ease;
}

@keyframes modalFadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes modalSlideUp { from { transform:translateY(18px);opacity:0 } to { transform:translateY(0);opacity:1 } }

.nav-auth-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.nav-auth-modal-close:hover { color: #111; background: #f3f4f6; }

.nav-auth-modal-title {
    margin: 0 0 6px;
    font-size: 1.3rem;
}

.nav-auth-modal-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 7px;
    padding: 10px 14px;
    color: #991b1b;
    font-size: .88rem;
    margin-bottom: 14px;
}
.nav-auth-modal-success {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.nav-auth-modal-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: .88rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.nav-auth-modal-input {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: .95rem;
    outline: none;
    transition: border-color .15s;
}

.nav-auth-modal-input:focus { border-color: #1976d2; box-shadow: 0 0 0 3px rgba(25,118,210,.15); }

.nav-auth-modal-btn {
    width: 100%;
    padding: 11px;
    margin-top: 4px;
    font-size: .95rem;
}

.nav-auth-modal-footer {
    text-align: center;
    font-size: .83rem;
    color: #6b7280;
    margin: 14px 0 0;
}

/* ===== OAUTH BUTTONS ===== */
.oauth-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 14px;
}
.oauth-sep-line {
    flex: 1;
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0;
}
.oauth-sep-text {
    font-size: .76rem;
    color: #9ca3af;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.oauth-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: .93rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: box-shadow .18s, background .15s, border-color .15s;
    line-height: 1.25;
    letter-spacing: .01em;
}
.oauth-btn svg { flex-shrink: 0; display: block; }

/* Google – стил от официалните насоки на Google */
.oauth-btn--google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(60,64,67,.18), 0 1px 2px rgba(60,64,67,.1);
}
.oauth-btn--google:hover {
    background: #f8f9fa;
    border-color: #c6cacd;
    box-shadow: 0 2px 6px rgba(60,64,67,.22), 0 1px 4px rgba(60,64,67,.14);
    color: #3c4043;
}

/* Facebook – официален Facebook синьо */
.oauth-btn--facebook {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
    box-shadow: 0 1px 3px rgba(24,119,242,.35);
}
.oauth-btn--facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    box-shadow: 0 2px 8px rgba(24,119,242,.45);
    color: #fff;
}

/* ===== NAV SEARCH BUTTON ===== */
.nav-search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-left: 8px;
}

.nav-search-btn:hover {
    background: #eff6ff;
    color: #1565c0;
}

.nav-search-btn svg {
    display: block;
}

.site-nav-item {
    position: relative;
}

.site-nav-item > a {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.15s;
    position: relative;
}

.site-nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    border-radius: 2px;
}

.site-nav-item > a:hover {
    color: #1565c0;
}

.site-nav-item > a:hover::after {
    transform: scaleX(1);
}

.site-nav-submenu {
    list-style: none;
    margin: 0;
    padding: 6px;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 190px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
    border-radius: 10px;
    display: none;
    z-index: 200;
    border: 1px solid #e5e7eb;
}

.site-nav-submenu a {
    display: block;
    padding: 8px 13px;
    font-size: 0.83rem;
    font-weight: 500;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: background 0.12s, color 0.12s;
}

.site-nav-submenu a:hover {
    background: #eff6ff;
    color: #1565c0;
}

/* Подменютата се отварят само при клик на стрелката, не при hover */
.site-nav-item.has-children {
    display: flex;
    align-items: stretch;
}

.site-nav-item.has-children > a {
    flex: 1 1 auto;
}

.site-nav-item.submenu-open > .site-nav-submenu {
    display: block;
}

/* Десктоп hover — подменю при задържане на мишката */
@media (min-width: 769px) {
    .site-nav-item.has-children:hover > .site-nav-submenu {
        display: block;
    }
}

/* ===== NAVIGATION HAMBURGER ===== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: #374151;
    transition: background 0.15s;
    flex-shrink: 0;
}

.nav-hamburger:hover {
    background: #f0f4ff;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

.site-nav.is-open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.site-nav.is-open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Keep old .main-nav selectors as aliases so JS still works */
.main-nav { display: none; }

/* Toggle arrow: desktop styling */
.nav-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 8px 0 2px;
    font-size: 0.9rem;
    color: #374151;
    transition: transform 0.2s, color 0.15s;
    transform: rotate(90deg);
    flex-shrink: 0;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.nav-submenu-toggle:hover {
    color: #1565c0;
}

.site-nav-item.submenu-open > .nav-submenu-toggle {
    color: #1565c0;
    transform: rotate(270deg);
}

.site-main {
    padding: 10px 0 72px;
}

.home-hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 0 10px;
}

.hero-main {
    background: #ffffff;
    color: #1b2540;
    border-top: 4px solid #1976d2;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 6px 24px rgba(15,23,42,0.10);
    display: flex;
    flex-direction: column;
    height: 420px;
    overflow: hidden;
}

.hero-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #1976d2;
    background: #e3f2fd;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 10px;
}

.hero-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
}

.hero-date {
    margin: 0 0 14px;
    font-size: 0.82rem;
    color: #6b7280;
}

.hero-excerpt {
    font-size: 0.88rem;
    line-height: 1.75;
    color: #374151;
    max-height: 110px;
    overflow: hidden;
}

/* .hero-main-news вече е идентично с .hero-main - без допълнителни overrides */

.hero-main-news {
    /* идентично с базовия .hero-main */
}

/* Компактна версия на hero панел в 4-колонен ред */
.hero-main--sm {
    padding: 14px;
    height: 360px;
    max-height: unset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.hero-main--sm .news-card-top { margin-bottom: 6px; flex-shrink: 0; }
.hero-main--sm .news-card-title { font-size: .80rem !important; margin-bottom: 4px; }
.hero-main--sm .news-card-excerpt { font-size: .68rem !important; max-height: none; }
.hero-main--sm .news-card-excerpt *:not(img) { font-size: inherit !important; }
.hero-main--sm .news-card-excerpt img {
    max-width: 45%;
    height: auto;
    float: right;
    margin: 0 0 4px 6px;
    border-radius: 4px;
}
.hero-main--sm .news-card-tag { font-size: .63rem; padding: 2px 8px; }
.hero-main--sm .hero-stamp-img { max-height: 80px; }
.hero-main--sm .hero-stamp-img-wrap { margin: 8px 0 4px; }
.hero-main--sm .news-slider { flex: 1; overflow: hidden; min-height: 0; }
.hero-main--sm .news-slider-nav { margin-top: 6px; flex-shrink: 0; }
.hero-main--sm .news-card-btn { padding: 6px 14px; font-size: .78rem; flex-shrink: 0; }
.hero-main--empty {
    background: #f4f6f9;
    border-top-color: #c8d0dc;
    box-shadow: none;
}

/* Hero панел с реклама вместо плъзгач със съдържание */
.hero-main--ad {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}
.hero-ad-link {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-ad-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
/* Код-тип реклама (напр. AdSense) в Hero панел — рекламният код има собствен
   фиксиран размер (напр. 300x50), затова панелът не наследява фиксираната
   височина 360px от .hero-main--sm, а се свива до реалния размер на кода,
   центриран, за да не остава голямо празно място под него. */
.hero-main--ad-code {
    height: auto;
    min-height: 90px;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

/* ── Странични стационарни рекламни банери (ляво/дясно) ── */
.sidebar-banner {
    position: fixed;
    /* Под най-високото възможно състояние на горната част: лентата за достъпност
       (~38px, вижда се само в най-горна позиция на скрола — не е sticky) +
       .site-header (85px, sticky) + .site-nav (~46px, sticky) + междина. */
    top: 190px;
    max-height: calc(100vh - 210px);
    overflow: hidden;
    z-index: 150; /* под .site-header (200) / .site-nav (190) */
}
.sidebar-banner img {
    display: block;
    width: 100%;
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.sidebar-banner--left  { left: 12px; }
.sidebar-banner--right {
    right: 12px;
    /* Оставя свободна зоната долу вдясно, заета от чата и бутона "Нагоре"
       — банерът спира преди тях, вместо да ги застъпва. */
    bottom: 170px;
    max-height: none;
}

@media (max-width: 1400px) {
    /* .container става fluid под ~1239px — няма достатъчно място без застъпване */
    .sidebar-banner { display: none; }
}

/* ── Хоризонтален банер под навигационното меню (само на десктоп — на
   мобилни устройства мястото е за .mobile-banner-top, виж по-долу) ── */
.below-nav-banner {
    background: #f4f6f9;
    border-bottom: 1px solid #e5e7eb;
}
.below-nav-banner-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
}
.below-nav-banner-inner img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .below-nav-banner { display: none; }
}

/* ── Мобилни банери (само на мобилни ширини — виж includes/header.php) ── */
.mobile-banner-top,
.mobile-banner-bottom {
    display: none;
}

@media (max-width: 768px) {
    .mobile-banner-top {
        display: block;
        background: #f4f6f9;
        border-bottom: 1px solid #e5e7eb;
    }
    .mobile-banner-top-inner {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 12px;
        /* Твърдо ограничение — принуждава "responsive" реклами (напр. AdSense
           data-ad-format="auto") да изберат малък формат според тясната ширина,
           а max-height/overflow служи като последна защита ако все пак опитат
           да рендират по-голям формат. */
        max-width: 320px;
        margin: 0 auto;
        max-height: 64px;
        overflow: hidden;
    }
    .mobile-banner-top-inner img {
        display: block;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    .mobile-banner-top-inner ins.adsbygoogle {
        max-width: 320px !important;
        max-height: 60px !important;
    }

    .mobile-banner-bottom {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 480; /* под чата (500) и бутона „Нагоре" (500) */
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 16px rgba(0,0,0,.12);
        padding: 8px 40px 8px 12px;
        max-height: 100px;
        overflow: hidden;
    }
    .mobile-banner-bottom img {
        display: block;
        max-width: 100%;
        max-height: 84px;
        height: auto;
        border-radius: 6px;
    }
    .mobile-banner-bottom-close {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: rgba(0,0,0,.45);
        color: #fff;
        border: none;
        font-size: 17px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Hero photos grid panel */
.hero-photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0 4px;
    flex: 1;
}
.hero-photo-item {
    display: block;
    overflow: hidden;
    border-radius: 5px;
    background: #000;
    aspect-ratio: 1/1;
}
.hero-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}
.hero-photo-item:hover img { transform: scale(1.04); }

/* Слайд с видео/събитие в панел 3 */
.side-slide-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 5px;
    background: #000;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.side-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Панел 4 — На тази дата */
.hero-today-panel {
    border-top-color: #059669;
    max-height: 340px;
    overflow-y: auto;
}
.hero-today-stamps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    flex: 1;
}
.hero-today-stamp-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.hero-today-stamp-img-wrap {
    flex-shrink: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-today-stamp-img-wrap img {
    max-width: 48px;
    max-height: 60px;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.hero-today-stamp-body { flex: 1; min-width: 0; }
.hero-today-stamp-year {
    font-size: .68rem;
    font-weight: 700;
    color: #059669;
    background: #d1fae5;
    padding: 1px 6px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 2px;
}
.hero-today-stamp-name {
    font-size: .80rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-today-stamp-name:hover { color: #059669; }
.hero-today-stamp-bk { font-size: .68rem; color: #9ca3af; margin-top: 2px; }

/* Tag font-size in panel 4 matches --sm panels */
.hero-today-panel .news-card-tag { font-size: .63rem; padding: 2px 8px; }

.news-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.news-card-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #1976d2;
    background: #e3f2fd;
    padding: 3px 10px;
    border-radius: 999px;
}

.news-card-date {
    font-size: 0.78rem;
    color: #6b7280;
}

.news-card-title {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.news-card-excerpt {
    font-size: 0.84rem;
    line-height: 1.65;
    color: #374151;
    flex: 1;
    max-height: 275px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.news-card-excerpt::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 24px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #ffffff 100%);
}

.news-card-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-card-list-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.news-card-list-date {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-card-list-title {
    font-size: 0.82rem;
    color: #374151;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.news-card-btn {
    display: inline-block;
    margin-top: auto;
    padding: 9px 22px;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 2px solid var(--btn-border);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    transition: filter 0.18s, transform 0.15s, box-shadow 0.18s;
    letter-spacing: 0.02em;
}

.news-card-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* ---- News Hero Slider ---- */
.news-slider {
    position: relative;
    min-height: 120px;
    flex: 1 1 auto;
}
.news-slide {
    display: none;
    animation: slideFadeIn 0.45s ease;
}
.news-slide.active {
    display: block;
}
@keyframes slideFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.news-slider-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.news-slider-prev,
.news-slider-next {
    background: var(--btn-bg, #1a5fa8);
    color: var(--btn-text, #fff);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.18s;
    flex-shrink: 0;
}
.news-slider-prev:hover,
.news-slider-next:hover {
    filter: brightness(1.18);
}
.news-slider-dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.news-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--btn-bg, #1a5fa8);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.news-slider-dot.active {
    background: var(--btn-bg, #1a5fa8);
}

/* Stamp slider dots — reuse news-slider-dot style */
.stamp-slider-prev,
.stamp-slider-next,
.today-slider-prev,
.today-slider-next {
    background: var(--btn-bg, #1a5fa8);
    color: var(--btn-text, #fff);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.18s;
    flex-shrink: 0;
}
.stamp-slider-prev:hover,
.stamp-slider-next:hover,
.today-slider-prev:hover,
.today-slider-next:hover {
    filter: brightness(1.18);
}
.stamp-slider-dot,
.today-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--btn-bg, #1a5fa8);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.stamp-slider-dot.active,
.today-slider-dot.active {
    background: var(--btn-bg, #1a5fa8);
}

/* Stamp image in hero slider */
.hero-stamp-img-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 4px;
}
.hero-stamp-img-wrap--two .hero-stamp-img {
    max-height: 120px;
}
.hero-stamp-img {
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    transition: transform 0.2s, opacity 0.2s;
}
.hero-stamp-img:hover {
    transform: scale(1.04);
    opacity: 0.9;
}

.hero-stamp-desc {
    font-size: 0.68rem;
    line-height: 1.55;
    color: #374151;
    margin-top: 6px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* Gallery section below hero */
.home-events-section {
    margin: 10px 0 8px;
}
.home-gallery-section {
    margin: 12px 0 12px;
}
.home-gallery-section .section-heading {
    margin-bottom: 14px;
}

/* Textblock section */
.home-textblock-section {
    margin: 12px 0;
}
.home-textblock-content {
    font-size: .97rem;
    line-height: 1.75;
    color: var(--text-color, #1e293b);
}
.home-textblock-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.home-textblock-content h1,
.home-textblock-content h2,
.home-textblock-content h3,
.home-textblock-content h4 {
    margin: 1em 0 .4em;
    line-height: 1.3;
}
.home-textblock-content p { margin: 0 0 .9em; }
.home-textblock-content a { color: var(--accent-color, #1565c0); }
.home-textblock-content table {
    border-collapse: collapse;
    width: 100%;
    margin: .8em 0;
}
.home-textblock-content td,
.home-textblock-content th {
    border: 1px solid #d1d5db;
    padding: 7px 10px;
    font-size: .9rem;
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.home-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}
.home-gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
}
.home-gallery-item img:hover {
    transform: scale(1.04);
    opacity: 0.9;
}
@media (max-width: 720px) {
    .home-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .home-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}


.hero-button {
    display: inline-block;
    padding: 9px 22px;
    margin-top: auto;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 2px solid var(--btn-border);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    transition: filter 0.18s, transform 0.15s, box-shadow 0.18s;
    letter-spacing: 0.02em;
}

.hero-button:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Преглед на галерията в home hero */

.hero-gallery-preview {
    margin: 12px 0 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
}

.hero-gallery-item {
    min-height: 0;
}

.hero-gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 80px;
    max-height: 198px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
}

.hero-gallery-item img:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* ── Section headings ──────────────────────────────────────── */
.section-heading {
    position: relative;
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 20px;
    padding-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--btn-bg, #1976d2);
    border-radius: 2px;
}

.section-heading.sh-center {
    text-align: center;
}

.section-heading.sh-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Override .home-col h2 when section-heading is used */
.home-col h2.section-heading {
    font-size: 1.25rem;
    text-transform: none;
    letter-spacing: -0.01em;
    font-weight: 800;
    color: #111827;
    border-bottom: none;
    padding-bottom: 14px;
}

.home-intro, .home-news, .home-gallery {
    margin-bottom: 30px;
}

/* Галерия в home-two-cols дясна колона */
.home-gallery-col {
    /* optional: keeps column aligned top */
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.home-gallery-thumb {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #e5e7eb;
}

.home-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.22s, opacity 0.18s;
}

.home-gallery-thumb:hover img {
    transform: scale(1.07);
    opacity: 0.88;
}

.home-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
    gap: 24px;
    margin-top: 0;
}

.home-news-section {
    display: block;
    margin-top: 0;
}

/* ── Видео секция на началната страница ───────────────────────────────────── */
.home-videos-section {
    margin: 12px 0;
}
.home-videos-section .section-heading {
    margin-bottom: 14px;
}
.home-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.home-video-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.home-video-embed {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}
.home-video-embed iframe,
.home-video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}
.home-video-title {
    margin: 0;
    padding: 10px 12px;
    font-size: .9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}
@media (max-width: 900px) {
    .home-videos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .home-videos-grid { grid-template-columns: 1fr; }
}

/* ── Share bar ────────────────────────────────────────────────────────────── */
.share-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: 22px 0 6px;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
}
.share-bar-label {
    font-size: .78rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    margin-right: 2px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity .15s, transform .12s;
    border: none;
    cursor: pointer;
}
.share-btn:hover { opacity: .82; transform: translateY(-1px); }
.share-btn--fb   { background: #1877f2; color: #fff; }
.share-btn--x    { background: #000;    color: #fff; }
.share-btn--wa   { background: #25d366; color: #fff; }
.share-btn--tg   { background: #2aabee; color: #fff; }
.share-btn--link { background: #6366f1; color: #fff; }

/* Compact share bar — sits inline in the back-row, no label, small icons */
.share-bar--compact {
    margin: 0;
    margin-left: auto;
    padding: 0;
    border-top: none;
    gap: 5px;
}
.share-bar--compact .share-btn {
    width: 26px;
    height: 26px;
    border-radius: 5px;
}
.share-bar--compact .share-btn svg {
    width: 12px;
    height: 12px;
}

/* video detail page */
.video-detail-wrap {
    max-width: 820px;
    margin: 0 auto;
}
.video-detail-embed {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 22px;
}
.video-detail-embed iframe,
.video-detail-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


.home-col h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
    color: #9ca3af;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.home-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-news-list li {
    background: transparent;
    border-bottom: 1px solid #e8eaec;
    padding: 12px 0 12px 12px;
    display: flex;
    flex-direction: column;
    border-left: 3px solid transparent;
    transition: border-color 0.15s;
    box-shadow: none;
    border-radius: 0;
}

.home-news-list li:hover {
    border-left-color: #1565c0;
}

.home-news-date {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Inter', system-ui, sans-serif;
}

.home-news-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

.news-form label {
    display: block;
    margin-bottom: 10px;
}

.news-title-input,
.news-date-input {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    margin-top: 4px;
}

/* ── Bilingual tabs (BG/EN) ─────────────────────────────────── */
.bilang-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}
.bilang-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    color: #6b7280;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.bilang-tab.active {
    color: #1565c0;
    border-bottom-color: #1565c0;
}
.bilang-panel[hidden] { display: none; }

/* ── Модерни fieldset-блокове за допълнителни данни (напр. изложба) ──────── */
.admin-fieldset {
    background: linear-gradient(180deg, #f8fafc 0%, #f4f6fb 100%);
    border: 1px solid #e5e9f2;
    border-radius: 14px;
    padding: 18px 20px 20px;
    margin: 18px 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.admin-fieldset-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1565c0;
    font-family: 'Inter', system-ui, sans-serif;
}

.admin-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px 18px;
}

.admin-field-grid--dates {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.admin-field--full {
    grid-column: 1 / -1;
}

.admin-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.admin-input,
.admin-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #dbe1ea;
    border-radius: 9px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #ffffff;
    color: #1f2937;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-textarea {
    resize: vertical;
    line-height: 1.5;
}

.admin-input:hover,
.admin-textarea:hover {
    border-color: #c3cde0;
}

.admin-input:focus,
.admin-textarea:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.14);
}

.admin-input::placeholder,
.admin-textarea::placeholder {
    color: #b0b8c9;
}

/* ── Translate button ───────────────────────────────────────────────────── */
.translate-btn-wrap {
    margin: -12px 0 20px;
}

.btn-translate-bg {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-translate-bg:hover:not(:disabled) {
    background: #dcfce7;
    border-color: #4ade80;
}

.btn-translate-bg:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.editor-toolbar {
    margin: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.editor-toolbar button,
.editor-toolbar select {
    padding: 4px 8px;
    font-size: 0.9rem;
}

.toolbar-btn-image {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 4px;
    color: #1565c0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}

.toolbar-btn-image:hover {
    background: #bbdefb;
}

.toolbar-btn-image:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-btn-pdf {
    background: #fce4ec;
    border: 1px solid #f48fb1;
    border-radius: 4px;
    color: #c62828;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.toolbar-btn-pdf:hover    { background: #f8bbd0; }
.toolbar-btn-pdf:disabled { opacity: 0.5; cursor: not-allowed; }

/* PDF picker панел */
.pdf-picker-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff8f8;
    border: 1.5px dashed #f48fb1;
    border-radius: 8px;
}
.pdf-picker-panel[hidden] { display: none; }

/* Обвивка около редактора (нужна за позициониране на align bar) */
.editor-wrapper {
    position: relative;
}

/* Мини-toolbar при клик върху снимка */
.img-align-bar {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    background: #f0f7ff;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 4px 6px;
    margin-bottom: 4px;
}
.img-align-bar:not([hidden]) { display: flex; }

.img-align-bar button {
    padding: 3px 8px;
    font-size: 0.8rem;
    border: 1px solid #c5d7f5;
    border-radius: 4px;
    background: #f0f7ff;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s;
}

.img-align-bar button:hover {
    background: #bbdefb;
}

.img-align-sep {
    width: 1px;
    height: 18px;
    background: #c5d7f5;
    margin: 0 2px;
    display: inline-block;
}

.img-width-input {
    width: 110px;
    padding: 2px 6px;
    font-size: 0.82rem;
    border: 1px solid #c5d7f5;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.15s;
}

.img-width-input:focus {
    border-color: #1976d2;
}

.img-width-apply {
    padding: 3px 8px !important;
    background: #e8f5e9 !important;
    border-color: #a5d6a7 !important;
    color: #2e7d32 !important;
    font-weight: 700 !important;
}

.img-width-apply:hover {
    background: #c8e6c9 !important;
}

.img-border-btn.active {
    background: #fff3cd !important;
    border-color: #f0ad4e !important;
    color: #7c5200 !important;
    font-weight: 700 !important;
}

.img-delete-btn {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}
.img-delete-btn:hover {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
}

/* Resize overlay – показва се върху избраната снимка */
.img-resize-overlay {
    position: absolute;
    z-index: 15;
    pointer-events: none;
    border: 2px solid #1976d2;
    border-radius: 3px;
    box-sizing: border-box;
}

.img-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #1976d2;
    border-radius: 2px;
    pointer-events: all;
    box-sizing: border-box;
}

.img-resize-handle[data-handle="nw"] { top: -6px;  left: -6px;  cursor: nw-resize; }
.img-resize-handle[data-handle="ne"] { top: -6px;  right: -6px; cursor: ne-resize; }
.img-resize-handle[data-handle="sw"] { bottom: -6px; left: -6px;  cursor: sw-resize; }
.img-resize-handle[data-handle="se"] { bottom: -6px; right: -6px; cursor: se-resize; }

/* Забранява text-selection по време на drag */
body.img-resizing {
    user-select: none;
    cursor: ew-resize;
}

/* Панел за избор на снимка */
.image-picker-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f0f7ff;
    border: 1.5px dashed #90caf9;
    border-radius: 8px;
}

.image-picker-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1565c0;
}

.image-picker-status {
    font-size: 0.85rem;
    color: #d32f2f;
}

/* Снимки вътре редактора */
.news-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    cursor: pointer;
    outline: 2px solid transparent;
    transition: outline-color 0.15s;
}

.news-editor img:hover {
    outline-color: #1976d2;
}

.news-editor img[style*="float: left"],
.news-editor img[style*="float:left"] {
    margin-right: 16px;
    margin-bottom: 8px;
}

.news-editor img[style*="float: right"],
.news-editor img[style*="float:right"] {
    margin-left: 16px;
    margin-bottom: 8px;
}

.news-editor {
    min-height: 220px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #c5d7f5;
    background: #fff;
    overflow-y: auto;
}

.news-save-button {
    margin-top: 12px;
    padding: 10px 18px;
    background: #1976d2;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}

.news-save-button:hover {
    background: #1e88e5;
}

/* Админ - превю снимка на новина */
.news-cover-field {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-cover-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
}

.news-cover-hint {
    font-size: 0.8rem;
    font-weight: 400;
    color: #9ca3af;
}

.news-cover-input {
    padding: 6px 8px;
    border: 1.5px dashed #93c5fd;
    border-radius: 6px;
    background: #f0f7ff;
    cursor: pointer;
    font-size: 0.9rem;
}

.news-cover-input:hover {
    border-color: #1976d2;
    background: #e0effe;
}

.news-cover-preview {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.news-cover-placeholder {
    width: 160px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.news-cover-preview img {
    width: 160px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
}

.news-cover-remove {
    font-size: 0.82rem;
    font-weight: 600;
    color: #dc2626;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    background: #fff5f5;
    transition: background 0.15s;
    white-space: nowrap;
    align-self: flex-start;
}

.news-cover-remove:hover {
    background: #fee2e2;
}

/* Админ - качване снимки към новина */
.news-images-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    margin-top: 14px;
}

.news-images-input {
    padding: 6px 8px;
    border: 1.5px dashed #93c5fd;
    border-radius: 6px;
    background: #f0f7ff;
    cursor: pointer;
    font-size: 0.9rem;
}

.news-images-input:hover {
    border-color: #1976d2;
    background: #e0effe;
}

.news-existing-images {
    margin-top: 14px;
}

.news-images-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.news-image-thumb {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.news-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-image-delete {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: rgba(220,38,38,0.88);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
    line-height: 1;
    font-weight: 700;
    transition: background 0.15s;
}

.news-image-delete:hover {
    background: #dc2626;
}

/* Image reordering (drag-and-drop + arrows) */
.news-images-grid .news-image-thumb { cursor: grab; }
.news-images-grid .news-image-thumb:active { cursor: grabbing; }
.img-drag-ghost { opacity: 0.35; }
/* Cover image indicator */
.news-image-thumb.is-cover { border-color: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }
.img-cover-btn {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.45);
    color: #d1d5db;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}
.img-cover-btn:hover { background: rgba(0,0,0,0.72); color: #f59e0b; }
.news-image-thumb.is-cover .img-cover-btn { color: #f59e0b; background: rgba(0,0,0,0.55); }
.img-reorder-btns {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 2px 3px;
    background: rgba(0,0,0,0.48);
}
.img-move-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    padding: 1px 5px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.12s;
}
.img-move-btn:hover { background: rgba(255,255,255,0.25); }

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.news-item {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.news-date {
    font-size: 0.85rem;
    color: #777;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.gallery-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0;
    text-align: center;
    margin: 0;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15,23,42,0.14);
}

.gallery-item img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.gallery-item figcaption {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #4b5563;
}

/* ═══ Newsletter Subscribe Bar ═══════════════════════════════════════════════ */
.nl-subscribe-bar {
    background: linear-gradient(135deg, #1e3a5f 0%, #1565c0 100%);
    color: #fff;
    padding: 28px 0;
    border-top: 1px solid #1e3a8a;
}
.nl-subscribe-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.nl-subscribe-text {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nl-subscribe-text strong {
    font-size: 1.05rem;
    color: #fff;
}
.nl-subscribe-text span {
    font-size: 0.875rem;
    color: #bfdbfe;
}
.nl-subscribe-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 2 1 400px;
}
.nl-sub-input {
    flex: 1 1 160px;
    padding: 9px 13px;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
    min-width: 0;
}
.nl-sub-input::placeholder { color: rgba(255,255,255,0.55); }
.nl-sub-input:focus { background: rgba(255,255,255,0.25); }
.nl-sub-btn {
    padding: 9px 22px;
    border-radius: 6px;
    border: none;
    background: #fff;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nl-sub-btn:hover:not(:disabled) { background: #dbeafe; }
.nl-sub-btn:disabled { opacity: .6; cursor: default; }
.nl-sub-msg {
    font-size: 0.875rem;
    margin-top: 6px;
    width: 100%;
}

.site-footer {
    background: linear-gradient(135deg, var(--footer-bg-from, #47709d) 0%, var(--footer-bg-to, #4164a6) 100%);
    color: var(--footer-text, #b8c8e0);
    padding: 20px 0 22px;
    font-size: 0.88rem;
    border-top: 3px solid var(--footer-border, #1565c0);
}

.site-footer p {
    color: var(--footer-text, #b8c8e0);
    margin: 0 0 8px;
    opacity: 0.85;
}

/* ── Three-column footer grid ── */
.footer-cols {
    display: flex;
    flex-direction: row;
    gap: 32px;
    margin-top: 24px;
}

.footer-col {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.footer-col p {
    margin: 0;
    color: var(--footer-text, #b8c8e0);
    line-height: 1.6;
}

.site-footer .footer-col a {
    color: var(--footer-text, #b8c8e0);
    text-decoration: none;
}

.site-footer .footer-col a:hover,
.site-footer .footer-col a:focus {
    opacity: 0.75;
    text-decoration: underline;
}

.footer-nav {
    margin-bottom: 22px;
}

.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-nav ul li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--footer-text, #b8c8e0);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 6px 16px 6px 12px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.footer-nav ul li a::before {
    content: '›';
    font-size: 1.15em;
    line-height: 1;
    color: #4d8fd4;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.footer-nav ul li a:hover {
    background: var(--footer-border, #1565c0);
    color: #fff;
    border-color: var(--footer-border, #1565c0);
    transform: translateY(-1px);
}

.footer-nav ul li a:hover::before {
    color: #fff;
    transform: translateX(2px);
}

/* ── Посещения по държави (футър) ── */
.footer-visits {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 0 0 14px;
    padding: 6px 14px 7px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    font-size: 0.8rem;
    line-height: 1.25;
}
.footer-visits-side { flex: 0 0 110px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.footer-visits-mode {
    font: inherit; font-size: 0.72rem; font-weight: 600; line-height: 1.2;
    color: inherit; cursor: pointer;
    padding: 2px 9px; border-radius: 12px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
    transition: background .15s;
}
.footer-visits-mode:hover { background: rgba(255,255,255,0.2); }
.site-footer a.footer-visits-full {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.72rem; font-weight: 700; line-height: 1.2;
    color: #fff; text-decoration: none; white-space: nowrap;
    padding: 3px 10px; border-radius: 12px;
    background: var(--footer-border, #1565c0); border: 1px solid rgba(255,255,255,0.35);
    transition: transform .15s, background .15s;
}
.site-footer a.footer-visits-full:hover { transform: translateY(-1px); background: #1e88e5; text-decoration: none; }
.footer-visits:not(.fv-mode-pages) .fv-p,
.footer-visits.fv-mode-pages .fv-v { display: none !important; }
.footer-visits-title {
    flex: none;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
    padding-top: 1px;
}
.footer-visits-grid { flex: 1 1 auto; min-width: 0; display: flex; gap: 24px; }
.footer-visits-col { flex: 1 1 0; min-width: 0; }
.footer-visits-head {
    font-weight: 600;
    margin-bottom: 2px;
    padding-bottom: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-visits-col ul { list-style: none; margin: 0; padding: 0; }
.footer-visits-col li { display: flex; align-items: center; gap: 6px; padding: 0; }
.footer-visits-col li img { flex: none; border-radius: 2px; width: 16px; height: 12px; }
.footer-visits-col .fv-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-visits-col .fv-cnt { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.footer-visits-col .fv-imp { font-weight: 400; opacity: 0.75; font-size: 0.78em; white-space: nowrap; }
.footer-visits-empty { opacity: 0.7; font-style: italic; }
.footer-visits-toggle { display: none; }
@media (max-width: 700px) {
    .footer-visits { flex-direction: column; gap: 4px; position: relative; }
    .footer-visits-col:nth-child(n+2) { display: none; }
    .footer-visits.fv-open .footer-visits-col:nth-child(n+2) { display: block; }
    .footer-visits-toggle {
        display: flex; align-items: center; justify-content: center;
        position: absolute; top: 4px; right: 8px;
        width: 28px; height: 24px; padding: 0;
        color: inherit; background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; cursor: pointer;
    }
    .footer-visits-toggle svg { transition: transform .2s; }
    .footer-visits.fv-open .footer-visits-toggle svg { transform: rotate(180deg); }
    .footer-visits-side { flex-basis: auto; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 36px; }
    .footer-visits-grid { flex-direction: column; gap: 8px; width: 100%; }
}

/* Лайтбокс за галерията на публичния сайт */

.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1000;
}

.gallery-lightbox.is-open {
    display: block;
}

.gallery-lightbox-backdrop {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.85);
}

.gallery-lightbox-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    color: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox-image-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-lightbox-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
}

.gallery-lightbox-counter {
    font-size: 0.82rem;
    color: #9ca3af;
    text-align: center;
    letter-spacing: 0.06em;
    margin-top: 8px;
    margin-bottom: 2px;
    flex-shrink: 0;
}

.gallery-lightbox-caption {
    font-size: 0.9rem;
    color: #e5e7eb;
    text-align: center;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.gallery-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    background: #111827;
    border-radius: 999px;
    border: none;
    color: #f9fafb;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.2rem;
}
.gallery-lightbox-zoom {
    position: absolute;
    top: -16px;
    left: -16px;
    background: #111827;
    border-radius: 999px;
    border: none;
    color: #f9fafb;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    user-select: none;
    z-index: 10;
}
.gallery-lightbox-zoom.is-zoomed {
    background: #1d4ed8;
}

.gallery-lightbox-nav {
    background: rgba(15,23,42,0.9);
    border: none;
    color: #e5e7eb;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 10px 0 16px;
    width: 100%;
    flex-shrink: 0;
}

.gallery-lightbox-nav-row .gallery-lightbox-nav {
    position: static;
    transform: none;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
    left: auto;
    right: auto;
}

@media (max-width: 600px) {
    .gallery-lightbox-content {
        width: 96vw;
        height: 80vh;
    }
    .gallery-lightbox-close {
        top: 8px;
        right: 8px;
    }
    .gallery-lightbox-zoom {
        top: 8px;
        left: 8px;
    }
}

.footer-admin-link a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.15s;
}

.footer-admin-link a:hover {
    color: #7a9bbf;
}

/* Админ стилове */

/* ══════════════════════════════════════════════════════════
   ADMIN PANEL — SIDEBAR LAYOUT
   ══════════════════════════════════════════════════════════ */

/* Reset body for admin pages */
.admin-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f1f5f9;
    color: #0d1b2a;
    font-family: 'Inter', system-ui, sans-serif;
}

/* Outer wrapper — full viewport */
.admin-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top bar ──────────────────────────────────────────────── */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 58px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 1px 4px rgba(15,23,42,0.08);
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-topbar-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .admin-topbar-title { display: none; }
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar-user-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    color: #64748b;
}

.admin-topbar-user-icon svg {
    width: 20px;
    height: 20px;
}

.admin-topbar-username {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.admin-logout-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: #dc2626;
    text-decoration: none;
    padding: 5px 14px;
    border: 1.5px solid #fca5a5;
    border-radius: 999px;
    background: #fff5f5;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.admin-logout-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.admin-site-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
    padding: 5px 14px;
    border: 1.5px solid #90caf9;
    border-radius: 999px;
    background: #eff6ff;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.admin-site-btn:hover {
    background: #dbeafe;
    border-color: #1565c0;
}

.admin-chat-badge {
    display: inline-block;
    margin-left: 5px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    vertical-align: middle;
}
.admin-chat-badge--active {
    background: #64748b;
}
.admin-chat-badge--unread {
    background: #dc2626;
}

/* ══════════════════════════════════════════════════════════
   MEMBER PANEL — topbar + horizontal nav layout
   ══════════════════════════════════════════════════════════ */
.member-nav {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 99;
    background: #1e293b;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 2px;
    height: 44px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.member-nav-item {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    height: 32px;
}

.member-nav-item:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.07);
}

.member-nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79,70,229,0.35);
}

.member-subnav {
    position: fixed;
    top: calc(58px + 44px);
    left: 0;
    right: 0;
    z-index: 98;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 20px;
    height: 36px;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.member-subnav-item {
    display: flex;
    align-items: center;
    padding: 4px 14px;
    height: 26px;
    font-size: .82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: background .12s, color .12s;
    white-space: nowrap;
}

.member-subnav-item:hover {
    color: #1e293b;
    background: #e2e8f0;
}

.member-subnav-item.active {
    color: #4f46e5;
    background: #ede9fe;
    font-weight: 700;
}

.member-content {
    margin-top: calc(58px + 44px);
    padding: 28px 32px 40px;
    background: #f1f5f9;
    min-height: calc(100vh - 58px - 44px);
}

.has-subnav .member-content {
    margin-top: calc(58px + 44px + 36px);
    min-height: calc(100vh - 58px - 44px - 36px);
}

@media (max-width: 640px) {
    .member-content {
        padding: 16px 14px 28px;
    }
}

/* ── Collection toggle button (catalog pages) ─────────────── */
.collection-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 5px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #f8fafc;
    color: #64748b;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    line-height: 1.4;
}
.collection-btn:hover {
    background: #fef9c3;
    border-color: #fbbf24;
    color: #92400e;
}
.collection-btn.in-collection {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #b45309;
}
.collection-btn.in-collection .collection-btn-icon {
    color: #f59e0b;
}
.collection-btn-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f59e0b;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.collection-btn-cond-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    margin-left: 2px;
}
.collection-btn-cond-pill {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 6px;
    border-radius: 9px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    font-size: .67rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.3;
}
.collection-btn-cond-pill .cbcp-qty {
    background: #f59e0b;
    color: #fff;
    border-radius: 7px;
    padding: 0 4px;
    font-size: .63rem;
    font-weight: 800;
}
.collection-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Collection grouped accordion (member panel) ─────────── */
.coll-groups { display:flex; flex-direction:column; gap:6px; }
.coll-group { background:#fff; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; }
.coll-group[open] { border-color:#93c5fd; box-shadow:0 0 0 3px rgba(59,130,246,.08); }
.coll-group-summary {
    display:flex; align-items:center; gap:12px; padding:10px 14px;
    cursor:pointer; list-style:none; user-select:none;
}
.coll-group-summary::-webkit-details-marker { display:none; }
.coll-group-summary:hover { background:#f8fafc; }
.coll-group-arrow { font-size:.7em; color:#9ca3af; transition:transform .2s; flex-shrink:0; }
.coll-group[open] > .coll-group-summary .coll-group-arrow { transform:rotate(90deg); }
.coll-group-thumb { flex-shrink:0; }
.coll-group-name { flex:1; min-width:0; font-weight:600; font-size:.9rem; color:#1e293b; word-break:break-word; }
.coll-group-year { font-size:.8rem; color:#64748b; background:#f1f5f9; padding:2px 9px; border-radius:20px; flex-shrink:0; }
.coll-group-badge { font-size:.76rem; font-weight:700; color:#0369a1; background:#e0f2fe; padding:2px 9px; border-radius:20px; flex-shrink:0; }
.coll-group-body { border-top:1px solid #e2e8f0; background:#fafbfc; overflow-x:auto; }

@media (max-width: 768px) {
    .coll-group-summary {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 6px 8px;
        padding: 8px 10px;
    }
    .coll-group-name {
        order: -1;
        flex: 0 0 100%;
        width: 100%;
        font-size: .85rem;
    }
}

/* ── Add-series button (catalog pages) ───────────────────── */
.collection-series-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    border: 1px solid #fbbf24;
    border-radius: 20px;
    background: #fffbeb;
    color: #92400e;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    line-height: 1.4;
    vertical-align: middle;
}
.collection-series-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}
.collection-series-btn.series-done {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #b45309;
    cursor: default;
}
.collection-series-btn.collection-series-remove {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}
.collection-series-btn.collection-series-remove:hover {
    background: #fecaca;
    border-color: #f87171;
}
.collection-series-btn.collection-series-remove .collection-series-btn-icon {
    color: #ef4444;
}
.collection-series-btn-icon {
    color: #f59e0b;
    font-size: .95rem;
}

/* ── Main layout (sidebar + content) ─────────────────────── */
.admin-layout {
    display: flex;
    flex: 1;
    margin-top: 58px; /* height of topbar */
    min-height: calc(100vh - 58px);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.admin-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: #1e293b;
    min-height: calc(100vh - 58px);
    position: fixed;
    top: 58px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 12px 0 20px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 8px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.80rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.admin-nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: #e2e8f0;
}

.admin-nav-item.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79,70,229,0.35);
}

/* Sub-nav items (categories) — legacy */
.admin-nav-item.admin-nav-sub {
    padding-left: 24px;
    font-size: 0.74rem;
    opacity: 0.85;
}
.admin-nav-item.admin-nav-sub.active {
    background: rgba(79,70,229,0.22);
    color: #c4b5fd;
    box-shadow: none;
}

/* Collapsible nav groups */
.admin-nav-group { display: flex; flex-direction: column; }

.admin-nav-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.80rem;
    font-weight: 500;
    color: #cbd5e1;
    transition: background 0.15s, color 0.15s;
}
.admin-nav-toggle:hover,
.admin-nav-toggle.active {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}
.admin-nav-toggle.active {
    background: rgba(79,70,229,0.35);
    color: #ffffff;
    font-weight: 600;
}

.admin-nav-arrow {
    margin-left: auto;
    font-size: 0.6rem;
    opacity: 0.6;
    transition: transform 0.2s;
}
.admin-nav-group.open .admin-nav-arrow { transform: rotate(180deg); }

.admin-nav-children {
    display: none;
    flex-direction: column;
    padding-left: 10px;
    margin-top: 2px;
}
.admin-nav-group.open .admin-nav-children { display: flex; }

.admin-nav-child {
    font-size: 0.74rem;
    padding: 5px 8px 5px 12px;
    opacity: 0.85;
}
.admin-nav-child.active {
    background: rgba(79,70,229,0.22);
    color: #c4b5fd;
    box-shadow: none;
    opacity: 1;
}

.admin-nav-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-nav-icon svg {
    width: 16px;
    height: 16px;
}

.admin-nav-label {
    white-space: nowrap;
}

/* ── Main content area ────────────────────────────────────── */
.admin-content {
    margin-left: 210px;
    flex: 1;
    padding: 28px 32px 40px;
    background: #f1f5f9;
    min-width: 0;
}

/* ── Content page title ───────────────────────────────────── */
.admin-content > h2:first-child,
.admin-content > h1:first-child {
    margin-top: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e2e8f0;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .admin-sidebar {
        width: 185px;
    }
    .admin-content {
        margin-left: 185px;
        padding: 20px 18px 30px;
    }
}

@media (max-width: 640px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        top: auto;
        min-height: auto;
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-content {
        margin-left: 0;
        padding: 16px 14px 28px;
    }
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD STATISTICS CARDS
   ══════════════════════════════════════════════════════════ */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s;
}

.admin-stat-card:hover {
    box-shadow: 0 6px 18px rgba(15,23,42,0.1);
}

.admin-stat-card--blue   { border-left-color: #3b82f6; }
.admin-stat-card--green  { border-left-color: #10b981; }
.admin-stat-card--purple { border-left-color: #8b5cf6; }
.admin-stat-card--orange { border-left-color: #f59e0b; }

.admin-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.admin-stat-icon svg {
    width: 20px;
    height: 20px;
}

.admin-stat-card--blue   .admin-stat-icon { background: #eff6ff; color: #3b82f6; }
.admin-stat-card--green  .admin-stat-icon { background: #ecfdf5; color: #10b981; }
.admin-stat-card--purple .admin-stat-icon { background: #f5f3ff; color: #8b5cf6; }
.admin-stat-card--orange .admin-stat-icon { background: #fffbeb; color: #f59e0b; }

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
}

.admin-stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Quick actions on dashboard */
.admin-quick-actions {
    margin-top: 28px;
}

.admin-quick-actions h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    font-weight: 700;
    margin: 0 0 14px;
}

.admin-quick-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ══════════════════════════════════════════════════════════
   LEGACY ADMIN CLASSES (kept for form/table compatibility)
   ══════════════════════════════════════════════════════════ */

.admin-subtabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #e5e7eb;
    padding: 4px;
    border-radius: 999px;
}

.admin-subtab {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    color: #4b5563;
    background: transparent;
}

.admin-subtab.active {
    background: #4f46e5;
    color: #f9fafb;
}

.admin-two-column {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.admin-form-narrow {
    flex: 1 1 0;
}

@media (max-width: 768px) {
    .admin-two-column {
        flex-direction: column;
    }
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.admin-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.06);
}

.admin-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7280;
    margin-bottom: 4px;
}

.admin-card-main {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-card-sub {
    font-size: 0.78rem;
    color: #9ca3af;
}

.admin-actions-row {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-actions-row .btn {
    border-radius: 999px;
    padding: 9px 20px;
}

.admin-btn-purple {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
}

.admin-btn-pink {
    background: linear-gradient(135deg, #ec4899, #f97316);
    color: #ffffff;
}

.admin-btn-outline {
    background: transparent;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.admin-form {
    margin-top: 10px;
    margin-bottom: 22px;
    max-width: 1200px;
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 20px 16px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.06);
}

.admin-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}

.admin-form .btn-primary {
    margin-top: 6px;
}

.admin-footer-textarea {
    width: 100%;
    min-height: 320px;
    resize: vertical;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    font-family: inherit;
}

/* Login page body (separate from admin panel body) */
.admin-login-body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 0 0, #7b61ff 0, #4b6fff 35%, #2c3e9a 70%, #1a1b4b 100%);
    color: #0d1b2a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.admin-login-container {
    max-width: 420px;
    width: 100%;
    background: rgba(255,255,255,0.96);
    padding: 26px 26px 24px;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.55);
    box-sizing: border-box;
}

.admin-login-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.admin-login-subtitle {
    margin: 0 0 18px;
    font-size: 0.85rem;
    color: #6b7280;
}

.admin-login-container label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.admin-login-container input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    font-size: 1rem;
}

.admin-login-container .btn-primary {
    width: 100%;
    margin-top: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 12px;
    font-size: 1rem;
}

.admin-login-container .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

@media (max-width: 480px) {
    .admin-login-body {
        align-items: flex-start;
        padding: 20px 12px;
    }
    .admin-login-container {
        padding: 22px 18px 20px;
        border-radius: 16px;
    }
    .admin-login-title {
        font-size: 1.25rem;
    }
}

.error {
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* Таблици в админ панела */

.admin-table-wrapper {
    margin-top: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15,23,42,0.06);
}

.admin-table thead {
    background: #f3f4f6;
}

.admin-table th,
.admin-table td {
    padding: 9px 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #6b7280;
}

.admin-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.admin-table tbody tr:hover {
    background: #eef2ff;
}

.admin-table-actions {
    white-space: nowrap;
    text-align: right;
}

.admin-page-link {
    font-size: 0.82rem;
    color: #1565c0;
    text-decoration: none;
    font-family: monospace;
    word-break: break-all;
}
.admin-page-link:hover {
    text-decoration: underline;
}

.admin-table-thumb {
    width: 72px;
}

.admin-table-thumb img {
    max-width: 64px;
    border-radius: 8px;
}

/* Групирани снимки по албуми в таб "Снимки" */

.admin-album-row {
    cursor: pointer;
}

.admin-album-row:hover {
    background: #e5ecff;
}

.admin-album-images-row {
    display: none;
}

.admin-album-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-album-image-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 220px;
}

.admin-album-image-thumb img {
    max-width: 110px;
    border-radius: 8px;
    display: block;
}

.admin-album-image-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-album-image-date {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 2px 0 4px;
}

.admin-album-image-actions .btn-small {
    font-size: 0.75rem;
}

/* Общи бутони за админ панела */

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--btn-bg);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
    transition: filter 0.18s, transform 0.14s, box-shadow 0.18s;
}

.btn-primary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #c5d7f5;
}

.btn-secondary:hover {
    background: #bbdefb;
}

.btn-danger {
    background: #e53935;
    color: #ffffff;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-small {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* Дискретна справка за отворени срокове за кандидатстване (events.php) */
.events-deadline-ticker {
    background: linear-gradient(135deg, #f6f9ff 0%, #eef3fc 100%);
    border: 1px solid #dce7f8;
    border-radius: 12px;
    padding: 10px 14px 12px;
    margin-bottom: 18px;
}

.events-deadline-ticker-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #1565c0;
    margin-bottom: 6px;
}

.events-deadline-ticker-icon {
    font-size: 0.9em;
}

.events-deadline-ticker-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.events-deadline-ticker-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.76rem;
    line-height: 1.3;
    color: #6b7280;
    overflow: hidden;
    transition: background 0.15s;
}

.events-deadline-ticker-row:hover {
    background: rgba(21, 101, 192, 0.08);
}

.events-deadline-ticker-title {
    flex-shrink: 0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: #1f2937;
}

.events-deadline-ticker-sep {
    flex-shrink: 0;
    color: #c7d2e0;
    font-size: 0.7em;
}

.events-deadline-ticker-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6b7280;
}

.events-deadline-ticker-field .edt-ico {
    flex-shrink: 0;
    font-size: 0.85em;
}

.events-deadline-ticker-deadline {
    flex-shrink: 0;
    margin-left: auto;
    font-weight: 700;
    color: #1565c0;
    background: #e3edfd;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* Страница Всички новини */

.news-page {
    padding: 0 0 60px;
}

.news-page h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    color: #111111;
}

.news-page h1.section-heading {
    font-size: 1.4rem;
    margin: 0 0 20px;
}

.news-page-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.news-page-heading-row .section-heading {
    margin: 0 0 20px;
}

.news-year-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 20px;
}

.news-page-subline {
    font-size: 0.72rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 28px;
    font-family: 'Inter', system-ui, sans-serif;
}

.news-page-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-page-item {
    background: #ffffff;
    border-bottom: 1px solid #e8eaec;
    padding: 20px;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0 18px;
    align-items: start;
    transition: background 0.15s;
}

.news-page-item:first-child {
    border-top: 1px solid #e8eaec;
    border-radius: 12px 12px 0 0;
}

.news-page-item:last-child {
    border-radius: 0 0 12px 12px;
}

.news-page-item:hover {
    background: #f9fafe;
}

.news-page-meta {
    font-size: 0.68rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 4px;
    line-height: 1.4;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-page-date {
    display: block;
}

.news-page-author {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 3px;
}

.news-page-cover {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: opacity 0.15s;
}

.news-page-cover:hover {
    opacity: 0.88;
}

.news-page-body {
    display: flex;
    flex-direction: column;
}

.news-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.news-item-views {
    font-size: 0.76rem;
    color: #9ca3af;
    font-family: 'Inter', system-ui, sans-serif;
    white-space: nowrap;
}

.news-page-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.news-page-title a {
    color: #111827;
    text-decoration: none;
}

.news-page-title a:hover {
    color: #1565c0;
}

.news-page-excerpt {
    font-size: 0.86rem;
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.65;
}

.news-read-btn {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--btn-bg);
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: 0.03em;
    padding: 6px 16px;
    border: 2px solid var(--btn-border);
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, transform 0.15s;
}

.news-read-btn:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    transform: translateY(-1px);
}

.pagination {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-link {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 0.83rem;
    color: #374151;
    text-decoration: none;
    background: #ffffff;
    transition: background 0.15s, border-color 0.15s;
}

.pagination-link:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.pagination-link.active {
    background: #1565c0;
    color: #ffffff;
    border-color: #1565c0;
}

/* ===== Форма за контакти ===== */
.contact-page {
    padding: 5px 0 64px;
}

.contact-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: start;
}

.contact-heading {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0d1b2a;
    margin: 0 0 12px;
    line-height: 1.2;
}

.contact-subline {
    font-size: 1rem;
    color: #4b5563;
    margin: 0 0 28px;
    line-height: 1.6;
}

.contact-details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #374151;
}

.contact-icon {
    font-size: 1.2rem;
    line-height: 1;
    color: #1565c0;
}

.contact-details a {
    color: #1565c0;
    text-decoration: none;
    word-break: break-all;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-form-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 6px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.contact-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 24px;
    color: #065f46;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-success-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-errors {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    color: #991b1b;
    font-size: 0.9rem;
}

.contact-errors p {
    margin: 4px 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.contact-required {
    color: #dc2626;
    font-weight: 700;
}

/* ===== ADMIN FLASH MESSAGES ===== */
.admin-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    margin-bottom: 18px;
    border-radius: 10px;
    font-size: 0.93rem;
    font-weight: 500;
    border-left: 4px solid transparent;
    animation: flashIn .3s ease;
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.admin-flash--success {
    background: #ecfdf5;
    border-left-color: #10b981;
    color: #065f46;
}
.admin-flash--error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #7f1d1d;
}
.admin-flash--warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #78350f;
}

/* ===== ADMIN SETTINGS TABS ===== */
.settings-tabs-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.settings-tab-link {
    padding: 10px 22px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.settings-tab-link:hover {
    color: #1565c0;
}

.settings-tab-link.active {
    color: #1565c0;
    border-bottom-color: #1565c0;
    background: #eff6ff;
}

@media (max-width: 640px) {
    .settings-tabs-nav {
        flex-wrap: wrap;
        gap: 4px 4px;
        border-bottom: none;
        margin-bottom: 16px;
    }
    .settings-tab-link {
        flex: 1 1 calc(50% - 4px);
        text-align: center;
        padding: 8px 6px;
        font-size: 0.8rem;
        white-space: normal;
        border: 1.5px solid #e5e7eb;
        border-bottom: 1.5px solid #e5e7eb;
        margin-bottom: 0;
        border-radius: 8px;
    }
    .settings-tab-link.active {
        border-color: #1565c0;
        background: #eff6ff;
    }
}

/* ===== SECURITY PAGE (security.php) — значки, карти, IP търсачка ===== */
.sec-badge {
    display: inline-block;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: .64rem;
    font-weight: 700;
    white-space: nowrap;
}
.sec-badge-blocked  { background: #fee2e2; color: #991b1b; }
.sec-badge-crawler  { background: #e0f2fe; color: #0369a1; }
.sec-badge-eu       { background: #dcfce7; color: #15803d; }
.sec-badge-botcheck { background: #fef3c7; color: #92400e; font-weight: 600; }
.sec-badge-free     { background: #f0fdf4; color: #15803d; font-weight: 600; }

.sec-badge-sub {
    font-size: .6rem;
    color: #ef4444;
    margin-top: 1px;
}
.sec-badge-extra { margin-top: 4px; }
.sec-badge-note {
    font-size: .63rem;
    margin-top: 2px;
    white-space: nowrap;
}
.sec-badge-note-blocked { color: #dc2626; }
.sec-badge-note-warn    { color: #b45309; }

/* Обща карта — еднакъв вид на секциите във всички табове */
.sec-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}
.sec-card-lg    { padding: 22px 24px; margin-bottom: 24px; }
.sec-card-md    { padding: 12px 14px; margin-bottom: 14px; }
.sec-card-tight { padding: 14px; text-align: center; }
.sec-mb-16      { margin-bottom: 16px; }

/* Карта без вътрешен padding — за таблици с header (ъглите се подрязват) */
.sec-card-flush {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

/* Статистически плочки (напр. брой критични/високи заплахи) */
.sec-stat-tile {
    flex: 1;
    min-width: 130px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    border-top: 4px solid #9ca3af;
}
.sec-stat-tile-critical { border-top-color: #ef4444; }
.sec-stat-tile-high     { border-top-color: #dc2626; }
.sec-stat-tile-medium   { border-top-color: #f59e0b; }
.sec-stat-tile-low      { border-top-color: #6366f1; }

/* Статус "pill" (АКТИВИРАН/ИЗКЛЮЧЕН) до заглавията в НАСТРОЙКИ */
.sec-pill {
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.sec-pill-on  { background: #dcfce7; color: #15803d; }
.sec-pill-off { background: #f3f4f6; color: #6b7280; }

/* Заглавие на секция в карта (икона + текст + pill) */
.sec-section-title {
    margin: 0 0 6px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Бутон "Запази" в НАСТРОЙКИ секции */
.sec-submit-btn {
    padding: 7px 22px;
    font-size: .85rem;
    cursor: pointer;
}

/* Компактно заглавие и основна навигация — само на security.php.
   По-специфичен селектор нарочно, за да надделее над общото правило
   ".admin-content > h2:first-child" от админ шаблона (за всички страници). */
.admin-content > h2.sec-page-title:first-child {
    margin-top: -10px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    font-size: 1.1rem;
}
.sec-page-nav {
    margin-bottom: 8px;
}
.sec-page-nav .settings-tab-link {
    padding: 6px 14px;
    font-size: .78rem;
}

/* Подтабове на "СПИСЪЦИ IP" (LOG ONLINE / МЕРКИ / ДАТАЦЕНТЪР) */
.sec-subtabs-wrap {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    margin: -8px 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sec-subtabs-label {
    font-size: .7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    margin-right: 2px;
}
.sec-subtab-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .74rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
}
.sec-subtab-link:hover { background: #eef2f7; }
.sec-subtab-link.active { background: #1565c0; color: #fff; }
.sec-subtab-count {
    background: rgba(0,0,0,.08);
    border-radius: 20px;
    padding: 0 6px;
    font-size: .78em;
    font-weight: 700;
}
.sec-subtab-link.active .sec-subtab-count { background: rgba(255,255,255,.3); }

/* Линк "Виж всички →" до заглавие на секция в СТАТИСТИКА */
.sec-section-link {
    margin-left: auto;
    font-size: .68rem;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
    white-space: nowrap;
}
.sec-section-link:hover { text-decoration: underline; }

/* Компактно табло — таб СТАТИСТИКА */
.sec-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    align-items: start;
}
.sec-stats-overview .sec-card {
    padding: 12px 14px;
}
.sec-mini-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.sec-mini-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sec-mini-tile {
    flex: 1 1 68px;
    min-width: 62px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
}
.sec-mini-num {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
}
.sec-mini-label {
    font-size: .6rem;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.2;
}
.sec-mini-caption {
    font-size: .62rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 4px 2px;
}
.sec-mini-note {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: .75rem;
    color: #166534;
    margin-bottom: 12px;
}

/* Компактни списъци в СТАТИСТИКА — "Ръчно блокирани" и "Изключения" */
.sec-stats-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.sec-list-header {
    padding: 4px 10px;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sec-list-manual    .sec-list-header { background: #f5f3ff; color: #5b21b6; border-bottom-color: #ddd6fe; }
.sec-list-whitelist .sec-list-header { background: #f0f9ff; color: #0369a1; border-bottom-color: #bae6fd; }
.sec-list-threat    .sec-list-header { background: #fef2f2; color: #991b1b; border-bottom-color: #fca5a5; }
.sec-list-botcheck  .sec-list-header { background: #fef3c7; color: #92400e; border-bottom-color: #fde68a; }
.sec-list-new-btn {
    background: rgba(255,255,255,.6);
    color: inherit;
    border: 1px solid currentColor;
    border-radius: 5px;
    padding: 2px 10px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    white-space: nowrap;
}
.sec-list-new-btn:hover { background: rgba(255,255,255,.9); }

/* Модални прозорци за добавяне/редакция/изтриване в СТАТИСТИКА */
.sec-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.sec-modal-overlay.open { display: flex; }
.sec-modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 18px 20px;
    max-width: 380px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sec-modal-title {
    margin: 0 0 14px;
    font-size: .92rem;
    font-weight: 700;
    color: #1e293b;
}
.sec-modal-field { margin-bottom: 12px; }
.sec-modal-field label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}
.sec-modal-field input[type="text"],
.sec-modal-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 9px;
    font-size: .84rem;
}
.sec-modal-field input[type="text"] { font-family: monospace; }
.sec-modal-error {
    font-size: .74rem;
    color: #ef4444;
    margin: -6px 0 10px;
    display: none;
}
.sec-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}
.sec-modal-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}
.sec-modal-btn-cancel { background: #e5e7eb; color: #374151; }
.sec-modal-btn-save   { background: #1565c0; color: #fff; }
.sec-modal-btn-danger { background: #ef4444; color: #fff; }
.sec-modal-confirm-text { font-size: .84rem; color: #374151; margin-bottom: 4px; }
.sec-list-empty {
    padding: 10px;
    text-align: center;
    font-size: .7rem;
    color: #9ca3af;
    font-style: italic;
}
.sec-list-action-btn {
    border: none;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: .56rem;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    margin: 0 1px;
    white-space: nowrap;
}

/* Компактни таблици в подтабовете на "Списъци IP" (LOG ONLINE / МЕРКИ / ДАТАЦЕНТЪР) */
.sec-compact-tbl th,
.sec-compact-tbl td {
    padding: 2px 6px;
    line-height: 1.25;
}
.sec-compact-tbl thead th {
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Шрифт на данните в 4-те таблици в таб СТАТИСТИКА — ID селектор нарочно,
   за да надделее над ".admin-table td { font-size: 0.85rem }". */
#stats-manual-table th,   #stats-manual-table td,
#stats-whitelist-table th, #stats-whitelist-table td,
#stats-threat-table th,   #stats-threat-table td,
#stats-botcheck-table th, #stats-botcheck-table td {
    font-size: .7rem;
}

/* Единен визуален код "Авто" / "Ръчно" — навсякъде в Списъци IP */
.ab-badge {
    display: inline-block;
    font-size: .64rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.ab-badge-auto     { background: #fef3c7; color: #92400e; }
.ab-badge-manual   { background: #ede9fe; color: #5b21b6; }
.ab-badge-static   { background: #f3f4f6; color: #6b7280; }
.ab-badge-expired  { background: #f3f4f6; color: #6b7280; }
.ab-badge-threat   { background: #fee2e2; color: #991b1b; }

/* Цветна лента отляво на реда — веднага различаваш авто от ръчно блокирано, без да четеш текст */
.ab-row-auto   { border-left: 3px solid #f59e0b; }
.ab-row-manual { border-left: 3px solid #7c3aed; }

/* Бутони за филтриране на таблица по тип (Всички / Авто / Ръчни / ...) */
.ab-flt {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: .74rem;
    cursor: pointer;
    font-weight: 500;
    transition: background .15s;
}
.ab-flt:hover { background: #e5e7eb; }
.ab-flt.ab-flt-active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }

/* Търсачка "Провери IP" — над табовете, видима навсякъде в security.php */
.sec-ipcheck {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
}
.sec-ipcheck-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.sec-ipcheck-label {
    font-weight: 700;
    font-size: .76rem;
    color: #1e293b;
    white-space: nowrap;
}
.sec-ipcheck-input {
    flex: 1 1 220px;
    min-width: 160px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .78rem;
    font-family: monospace;
}
.sec-ipcheck-btn {
    padding: 4px 12px;
    border-radius: 6px;
    border: none;
    background: #1565c0;
    color: #fff;
    font-weight: 700;
    font-size: .74rem;
    cursor: pointer;
}
.sec-ipcheck-btn:hover { background: #0d47a1; }
.sec-ipcheck-result { margin-top: 6px; font-size: .74rem; }
.sec-ipcheck-result .sec-ipr-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 3px 0;
    border-top: 1px solid #f1f5f9;
}
.sec-ipcheck-result .sec-ipr-line:first-child { border-top: none; }

/* Color preset swatches */
.color-preset {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.color-preset:hover {
    transform: scale(1.2);
    border-color: rgba(0,0,0,0.25);
}

/* Design color label rows */
.btn-color-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 8px;
}

.btn-color-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #374151;
}

.btn-color-label input[type="color"] {
    width: 64px;
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 3px;
    background: none;
}

.btn-color-label code {
    font-size: 0.78rem;
    color: #6b7280;
    font-family: monospace;
    letter-spacing: 0.04em;
}

/* ===== ADMIN RESET SECTION ===== */
.admin-reset-box {
    margin-top: 32px;
    background: #fff5f5;
    border: 2px solid #fca5a5;
    border-radius: 14px;
    padding: 22px 24px;
}
.admin-reset-box h3 {
    margin: 0 0 6px;
    color: #991b1b;
    font-size: 1.05rem;
}
.admin-reset-box .reset-warning {
    font-size: 0.87rem;
    color: #7f1d1d;
    margin: 0 0 16px;
}
.admin-reset-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.admin-reset-checkboxes label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}
.admin-reset-checkboxes input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #dc2626;
    cursor: pointer;
}
.admin-reset-confirm {
    margin-bottom: 14px;
}
.admin-reset-confirm label {
    font-size: 0.87rem;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}
.admin-reset-confirm input[type="text"] {
    padding: 7px 10px;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 220px;
}

.contact-input,
.contact-textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.contact-input:focus,
.contact-textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* ═══ CAPTCHA ════════════════════════════════════════════════════════════ */
.contact-captcha-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}
.contact-captcha-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.contact-captcha-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.contact-captcha-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: #1d4ed8;
    background: #eff6ff;
    border: 2px dashed #93c5fd;
    border-radius: 10px;
    padding: 8px 20px;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
    pointer-events: none;
}
.contact-captcha-field {
    flex: 1;
    min-width: 150px;
}
.contact-captcha-input {
    max-width: 160px;
    font-size: 1.15rem;
    letter-spacing: 0.22em;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

/* ═══ PDF линк в съдържанието ═══════════════════════════════════════════ */
.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #fff3e0;
    border: 1.5px solid #ffb74d;
    border-radius: 6px;
    color: #e65100;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    word-break: break-all;
    vertical-align: middle;
    margin: 2px 0;
}
.pdf-link:hover {
    background: #ffe0b2;
    border-color: #e65100;
    color: #bf360c;
}

/* ═══ PDF Модален прозорец ══════════════════════════════════════════ */
.pdf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9100;
    align-items: center;
    justify-content: center;
}
.pdf-modal.is-open {
    display: flex;
}
.pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}
.pdf-modal-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.38);
    display: flex;
    flex-direction: column;
    width: 92vw;
    max-width: 980px;
    height: 90vh;
    overflow: hidden;
    animation: pdfModalIn 0.18s ease;
}
@keyframes pdfModalIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    gap: 8px;
}
.pdf-modal-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}
.pdf-modal-close {
    background: none;
    border: none;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 4px;
    flex-shrink: 0;
    transition: color 0.12s;
}
.pdf-modal-close:hover { color: #d32f2f; }
.pdf-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #e8e8e8;
    min-height: 0;
}
.pdf-modal-footer {
    padding: 10px 16px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #fafafa;
}
body.pdf-modal-is-open { overflow: hidden; }
@media (max-width: 600px) {
    .pdf-modal-content {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }
}

/* ── PDF прикачени файлове (публичен сайт) ─────────────────────────────── */
.pdf-attachments {
    margin-top: 28px;
    padding: 18px 20px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.pdf-attachments-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pdf-attachments .pdf-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #1d4ed8;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    word-break: break-all;
}
.pdf-attachments .pdf-link:last-child { margin-bottom: 0; }
.pdf-attachments .pdf-link:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    text-decoration: none;
}

/* ── PDF до последна снимка (last-row layout) ───────────────────────────── */
.news-view-last-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 14px;
    flex-wrap: wrap;
}
.news-view-last-row--solo {
    margin-top: 32px;
}
.news-view-last-row > .news-view-image-item {
    flex: 0 0 auto;
    max-width: 320px;
    width: 320px;
}
.news-view-last-row > .news-view-image-item img {
    width: 320px;
    max-width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    box-shadow: 0 4px 14px rgba(15,23,42,0.10);
}
.news-view-last-row > .pdf-attachments {
    flex: 0 0 auto;
    width: 320px;
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
}
.news-view-last-row > .pdf-attachments .pdf-preview-frame {
    height: 220px;
}

/* ── Страница: съдържание + PDF вдясно ──────────────────────────────────── */
.page-content-with-pdfs {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.page-content-with-pdfs > .news-view-content {
    flex: 1;
    min-width: 0;
}
.pdf-page-sidebar {
    flex: 0 0 320px;
    width: 320px;
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
}
.pdf-page-sidebar .pdf-preview-frame {
    height: 220px;
}

/* ── PDF картичка с вграден преглед (iframe) ─────────────────────────────── */
.pdf-preview-card {
    position: relative;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,0.07);
    cursor: pointer;
    transition: box-shadow 0.18s, border-color 0.18s;
}
.pdf-preview-card:last-child { margin-bottom: 0; }
.pdf-preview-card:hover {
    box-shadow: 0 6px 20px rgba(15,23,42,0.14);
    border-color: #93c5fd;
}
.pdf-preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}
.pdf-preview-frame {
    width: 100%;
    height: 260px;
    border: none;
    display: block;
    background: #f3f4f6;
    pointer-events: none;
}
.pdf-modal-print {
    margin-right: 8px;
}

@media (max-width: 640px) {
    .news-view-last-row {
        flex-direction: column;
    }
    .news-view-last-row > .news-view-image-item,
    .news-view-last-row > .news-view-image-item img {
        width: 100%;
        max-width: 100%;
    }
    .news-view-last-row > .pdf-attachments,
    .pdf-page-sidebar {
        width: 100%;
        flex-basis: auto;
        max-width: 100%;
    }
    .page-content-with-pdfs {
        flex-direction: column;
    }
    .pdf-preview-frame {
        height: 220px;
    }
}

/* ── PDF адмін списък (admin panel) ──────────────────────────────────────── */
.pdf-admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.pdf-admin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff7f0;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    flex-wrap: wrap;
}
.pdf-admin-icon { font-size: 1.2rem; flex-shrink: 0; }
.pdf-admin-name {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-textarea {
    resize: vertical;
    min-height: 130px;
}

.contact-submit {
    align-self: flex-start;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 2px solid var(--btn-border);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 12px 28px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    transition: filter 0.18s, transform 0.15s, box-shadow 0.18s;
}

.contact-submit:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.2);
}

.contact-submit:active {
    transform: scale(0.97);
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .contact-form-box {
        padding: 24px 20px;
    }
    .contact-row {
        grid-template-columns: 1fr;
    }
}

/* Детайлна страница на новина */

.news-view-page {
    padding: 0 0 60px;
}

.news-view-back {
    margin-bottom: 24px;
}

.news-view-back-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.news-view-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 800;
    color: #1565c0;
    margin-bottom: 8px;
}

/* Category badge shown on news/event detail */
.news-view-category {
    margin: 0 0 14px;
}
.news-category-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #6941c6;
    background: #f4f0fd;
    border: 1px solid #e0d5f9;
    border-radius: 20px;
    padding: 3px 12px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.news-category-link::before {
    content: '⊞';
    font-size: .8em;
    opacity: .7;
}
.news-category-link:hover {
    background: #ede9fb;
    color: #4a2ca8;
}

.news-view-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: #111111;
}

.news-view-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', system-ui, sans-serif;
}

.news-view-date::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: #1565c0;
    border-radius: 2px;
}

.news-author {
    font-size: 0.78rem;
    color: #6b7280;
    font-style: italic;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e5e7eb;
    flex-shrink: 0;
}

.news-author-label {
    font-style: normal;
    font-weight: 600;
    color: #6b7280;
}

.news-author-link {
    color: #6b7280;
    text-decoration: none;
}

.news-author-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.view-count-label {
    font-size: 0.75rem;
    color: #b0b8c9;
    margin-top: -22px;
    margin-bottom: 24px;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: 0.01em;
}

.news-view-date .view-count-label {
    margin: 0;
    display: inline-block;
}

/* Статична страница (page.php) — по-компактно разстояние под менюто */
.page-static-view {
    padding-top: 0;
}

.site-main:has(.page-static-view) {
    padding-top: 0;
}

.page-static-view .news-view-back-row {
    margin-bottom: 6px;
}

.page-static-view .news-view-title {
    margin-bottom: 8px;
}

.page-static-view .news-view-date {
    margin-bottom: 16px;
}

.news-view-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #1f2937;
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 4px 16px rgba(15,23,42,0.06);
}

/* Данни за изложба (Място, дати, класове, цени, комисар, срок) */
.exhibition-details-box {
    background: #f4f8ff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 12px;
}

.view-count-label + .exhibition-details-box {
    margin-top: -12px;
}

.exhibition-details-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1565c0;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

/* Две колони: ляво — кратки данни; дясно — класове/цени за участие */
.exhibition-details-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 8px 32px;
    align-items: start;
}

.exhibition-details-col--left {
    border-right: 1px solid #dbeafe;
    padding-right: 24px;
}

.exhibition-details-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.exhibition-details-row {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 5px;
}

.exhibition-details-row dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: #111827;
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.exhibition-details-row dt::after {
    content: ':';
}

.exhibition-details-row dd {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.3;
    white-space: pre-line;
    min-width: 0;
    overflow-wrap: break-word;
}

.exhibition-details-block + .exhibition-details-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #dbeafe;
}

.exhibition-details-block-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
}

.exhibition-details-block-body {
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.6;
    white-space: pre-line;
}

/* Класове/Цени за участие — 1 ред преглед + стрелка за разгъване */
.exhibition-expand-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.exhibition-expand-summary::-webkit-details-marker {
    display: none;
}

.exhibition-expand-summary::marker {
    content: '';
}

.exhibition-expand-preview {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exhibition-expand-arrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1565c0;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1;
    transition: transform 0.2s ease, background 0.15s ease;
}

.exhibition-expand-summary:hover .exhibition-expand-arrow {
    background: #0d47a1;
}

.exhibition-expand[open] .exhibition-expand-arrow {
    transform: rotate(180deg);
}

.exhibition-expand-body {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.6;
    white-space: pre-line;
}

.news-view-content p { margin: 0 0 1.2em; }
.news-view-content h2 { font-size: 1.6rem; font-weight: 700; margin: 1.5em 0 0.5em; }
.news-view-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.3em 0 0.4em; }
.news-view-content img { max-width: 100%; border-radius: 8px; }
.news-view-content a { color: #1565c0; }

/* Снимки вмъкнати в текста на новината */
.news-view-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Видеа вмъкнати в текста (YouTube div + сървърни video елементи) */
.news-view-content div[style*="float"],
.news-view-content video {
    max-width: 100%;
}
.news-view-content video {
    height: auto;
    display: block;
}

.news-view-content img[style*="float: left"],
.news-view-content img[style*="float:left"],
.news-card-excerpt img[style*="float: left"],
.news-card-excerpt img[style*="float:left"] {
    margin-right: 18px;
    margin-bottom: 10px;
    margin-top: 5px;
}

.news-view-content img[style*="float: right"],
.news-view-content img[style*="float:right"],
.news-card-excerpt img[style*="float: right"],
.news-card-excerpt img[style*="float:right"] {
    margin-left: 18px;
    margin-bottom: 10px;
    margin-top: 5px;
}

.news-view-content::after {
    content: '';
    display: table;
    clear: both;
}

/* Снимки към новина - публичен изглед */
.news-view-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 32px;
}

.news-view-image-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    box-shadow: 0 4px 14px rgba(15,23,42,0.10);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* ============================================================
   ACCESSIBILITY (достъпност)
   ============================================================ */

/* Skip to main content */
.a11y-skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 10000;
    background: #000;
    color: #fff;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    transition: top 0.15s;
    white-space: nowrap;
}
.a11y-skip-link:focus {
    top: 0;
    outline: 3px solid #ffdd00;
    outline-offset: 2px;
}

/* Accessibility toolbar */
.a11y-bar {
    background: #0d1b2a;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 5px 0;
}
.a11y-bar-inner {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.a11y-bar-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-right: 4px;
    user-select: none;
}
.a11y-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.85);
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.5;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    min-width: 32px;
}
.a11y-btn:hover,
.a11y-btn:focus-visible {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
    outline: 2px solid #ffdd00;
    outline-offset: 1px;
}
.a11y-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.a11y-btn.a11y-active {
    background: rgba(255,255,255,0.22);
    border-color: #ffdd00;
    color: #fff;
}
.a11y-btn-inc { font-weight: 700; }
.a11y-btn-hc  { font-size: 1rem; }

/* Горно меню (location = topbar) — най-вдясно в лентата за достъпност */
.topbar-nav { margin-left: auto; }
.topbar-nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.topbar-nav-item { position: relative; }
.topbar-nav-link {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
    padding: 3px 13px; margin: 0; cursor: pointer; border-radius: 999px;
    font-family: inherit; font-size: 0.78rem; font-weight: 500; letter-spacing: .02em; line-height: 1.55;
    color: rgba(255,255,255,0.92); text-decoration: none; display: inline-flex; align-items: center;
    transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.topbar-nav-link:hover, .topbar-nav-item.open > .topbar-nav-link {
    background: #ffdd00; border-color: #ffdd00; color: #0d1b2a; text-decoration: none;
}
.topbar-nav-link:focus-visible { outline: 2px solid #ffdd00; outline-offset: 2px; }
.topbar-nav-text { display: inline-flex; align-items: center; }
.topbar-nav-ico { flex: 0 0 auto; margin-right: 6px; }
.topbar-nav-caret { font-size: 0.55rem; margin-left: 6px; transition: transform .18s; }
.topbar-nav-item.open > .topbar-nav-link .topbar-nav-caret { transform: rotate(180deg); }
.topbar-nav-sub {
    display: none; position: absolute; right: 0; top: 100%; z-index: 1200;
    min-width: 200px; margin: 8px 0 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    box-shadow: 0 12px 28px rgba(13,27,42,0.28);
}
.topbar-nav-sub::before {
    content: ""; position: absolute; top: -6px; right: 22px; width: 10px; height: 10px;
    background: #fff; border-left: 1px solid #e5e7eb; border-top: 1px solid #e5e7eb; transform: rotate(45deg);
}
/* невидим мост, за да не се затваря менюто при преминаване с мишката */
.topbar-nav-sub::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.topbar-nav-item.open > .topbar-nav-sub { display: block; }
.topbar-nav-sub .topbar-nav-link {
    display: flex; width: 100%; box-sizing: border-box; padding: 8px 12px; white-space: nowrap;
    background: transparent; border: 0; border-radius: 7px; color: #1f2937; font-size: 0.84rem;
}
.topbar-nav-sub .topbar-nav-link:hover { background: #fff7cc; color: #0d1b2a; }
@media (hover: hover) and (min-width: 769px) {
    .topbar-nav-item:hover > .topbar-nav-sub { display: block; }
    .topbar-nav-item:hover > .topbar-nav-link { background: #ffdd00; border-color: #ffdd00; color: #0d1b2a; }
}
.topbar-burger { display: none; }
@media (max-width: 768px) {
    .topbar-nav { flex: 0 0 auto; margin-left: auto; position: relative; }
    .topbar-burger {
        display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
        padding: 7px 10px; border-radius: 8px; font-family: inherit; font-size: 0.82rem; font-weight: 600;
        color: #fff; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.22);
    }
    .topbar-burger:focus-visible { outline: 2px solid #ffdd00; outline-offset: 2px; }
    .topbar-nav.is-open .topbar-burger { background: #ffdd00; border-color: #ffdd00; color: #0d1b2a; }
    .topbar-burger-lines { position: relative; width: 16px; height: 12px; display: inline-block; }
    .topbar-burger-lines i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s, top .2s; }
    .topbar-burger-lines i:nth-child(1) { top: 0; }
    .topbar-burger-lines i:nth-child(2) { top: 5px; }
    .topbar-burger-lines i:nth-child(3) { top: 10px; }
    .topbar-nav.is-open .topbar-burger-lines i:nth-child(1) { top: 5px; transform: rotate(45deg); }
    .topbar-nav.is-open .topbar-burger-lines i:nth-child(2) { opacity: 0; }
    .topbar-nav.is-open .topbar-burger-lines i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

    .topbar-nav-list {
        display: none; position: absolute; right: 0; top: 100%; z-index: 1200;
        margin-top: 8px; padding: 8px; width: 250px; max-width: calc(100vw - 32px);
        flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
        box-shadow: 0 14px 32px rgba(13,27,42,0.35);
    }
    .topbar-nav.is-open .topbar-nav-list { display: flex; }
    .topbar-nav-item { width: 100%; }
    .topbar-nav-link,
    .topbar-nav-sub .topbar-nav-link {
        display: flex; width: 100%; box-sizing: border-box; justify-content: space-between;
        padding: 11px 12px; font-size: 0.92rem; border-radius: 8px;
        background: transparent; border: 0; color: #1f2937;
    }
    .topbar-nav-link:hover, .topbar-nav-item.open > .topbar-nav-link { background: #fff7cc; color: #0d1b2a; }
    /* подменютата се разгъват вътре в панела */
    .topbar-nav-sub {
        position: static; min-width: 0; max-width: none; margin: 2px 0 4px 10px; padding: 0 0 0 8px;
        border: 0; border-left: 2px solid #ffdd00; border-radius: 0; box-shadow: none; background: transparent;
    }
    .topbar-nav-sub::before, .topbar-nav-sub::after { display: none; }
    .topbar-nav-sub .topbar-nav-link { padding: 9px 10px; font-size: 0.88rem; }
}
html.a11y-hc .topbar-nav-link { background: #000 !important; border: 1px solid #fff !important; color: #fff !important; }
html.a11y-hc .topbar-nav-link:hover, html.a11y-hc .topbar-nav-item.open > .topbar-nav-link { background: #ffdd00 !important; color: #000 !important; }
html.a11y-hc .topbar-nav-sub { background: #000 !important; border: 2px solid #fff !important; }
html.a11y-hc .topbar-nav-sub::before { display: none; }
html.a11y-hc .topbar-nav-sub .topbar-nav-link { border: 0 !important; }
html.a11y-hc .topbar-burger { background: #000 !important; border: 1px solid #fff !important; color: #fff !important; }
@media (max-width: 768px) {
    html.a11y-hc .topbar-nav-list { background: #000 !important; border: 2px solid #fff !important; }
}

/* Font size overrides */
html.a11y-font-lg body { zoom: 1.15; }
html.a11y-font-xl body { zoom: 1.30; }
html.a11y-font-sm body { zoom: 0.87; }

/* High contrast mode */
html.a11y-hc body {
    background: #ffffff !important;
    color: #000000 !important;
}

/* Header & toolbar */
html.a11y-hc .site-header,
html.a11y-hc .a11y-bar {
    background: #000000 !important;
    border-bottom: 2px solid #ffffff !important;
}

/* Site title & subtitle – достатъчен контраст върху черния фон */
html.a11y-hc .site-title a,
html.a11y-hc .site-subtitle,
html.a11y-hc .site-header-hello,
html.a11y-hc .site-header-hello-name {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
}

/* Nav & footer */
html.a11y-hc .site-nav,
html.a11y-hc .site-footer {
    background: #000000 !important;
    color: #ffffff !important;
}
html.a11y-hc .site-footer,
html.a11y-hc .footer-nav a,
html.a11y-hc .footer-nav p {
    color: #ffffff !important;
}

/* Footer nav линкове — бели върху черен фон */
html.a11y-hc .footer-nav ul li a,
html.a11y-hc .footer-nav ul li a:visited {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.6) !important;
    text-decoration: none !important;
}
html.a11y-hc .footer-nav ul li a::before {
    color: #ffffff !important;
}
html.a11y-hc .footer-nav ul li a:hover,
html.a11y-hc .footer-nav ul li a:focus {
    color: #000000 !important;
    background: #ffffff !important;
    border-color: #ffffff !important;
    text-decoration: underline !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
    transform: none !important;
}
html.a11y-hc .footer-nav ul li a:hover::before,
html.a11y-hc .footer-nav ul li a:focus::before {
    color: #000000 !important;
}

/* Навигационни линкове — бели върху черен фон (21:1) */
html.a11y-hc .site-nav-item > a,
html.a11y-hc .site-nav-item > a:visited,
html.a11y-hc .site-nav-list a,
html.a11y-hc .site-nav-list a:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}
html.a11y-hc .site-nav-item > a:hover,
html.a11y-hc .site-nav-item > a:focus,
html.a11y-hc .site-nav-list a:hover,
html.a11y-hc .site-nav-list a:focus {
    color: #ffdd00 !important;
    text-decoration: underline !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}

/* Подменюта */
html.a11y-hc .site-nav-submenu {
    background: #111111 !important;
    border: 1px solid #ffffff !important;
}
html.a11y-hc .site-nav-submenu a,
html.a11y-hc .site-nav-submenu a:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}
html.a11y-hc .site-nav-submenu a:hover,
html.a11y-hc .site-nav-submenu a:focus {
    color: #ffdd00 !important;
    text-decoration: underline !important;
    background: #000000 !important;
}

/* ── WCAG 1.4.1: Линкове — underline, не само цвят ── */
html.a11y-hc a {
    color: #0000ee !important;
    text-decoration: underline !important;
}
html.a11y-hc a:visited {
    color: #551a8b !important;
    text-decoration: underline !important;
}
html.a11y-hc a:hover,
html.a11y-hc a:focus {
    color: #cc0000 !important;
    text-decoration: underline !important;
    outline: 2px solid #cc0000 !important;
    outline-offset: 2px !important;
}

/* ── WCAG 2.4.7: Видим фокус за ВСИЧКИ интерактивни елементи ── */
html.a11y-hc *:focus-visible,
html.a11y-hc *:focus {
    outline: 3px solid #000000 !important;
    outline-offset: 2px !important;
}

/* ── WCAG 1.4.1: Бутони — hover/active с рамка, не само цвят ── */
html.a11y-hc .btn,
html.a11y-hc button:not(.a11y-btn) {
    border: 2px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
}
html.a11y-hc .btn:hover,
html.a11y-hc button:not(.a11y-btn):hover {
    background: #000000 !important;
    color: #ffffff !important;
    outline: 3px solid #000000 !important;
    outline-offset: 2px !important;
}

/* ── WCAG 1.4.1: Disabled бутони — видими без разчитане само на opacity ── */
html.a11y-hc button:disabled,
html.a11y-hc input:disabled,
html.a11y-hc .btn:disabled {
    opacity: 1 !important;
    background: #e0e0e0 !important;
    color: #6b6b6b !important;
    border: 2px dashed #6b6b6b !important;
    cursor: not-allowed !important;
}

/* ── WCAG 1.4.1: Езикови бутони БГ/EN — висока специфичност чрез .site-header ── */
html.a11y-hc .site-header .cat-lang-btn,
html.a11y-hc .site-header .cat-lang-btn:link,
html.a11y-hc .site-header .cat-lang-btn:visited {
    background: transparent !important;
    color: #ffffff !important;
    border: 2px solid rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
}
html.a11y-hc .site-header .cat-lang-btn:hover,
html.a11y-hc .site-header .cat-lang-btn:focus {
    background: rgba(255,255,255,0.2) !important;
    color: #ffdd00 !important;
    border-color: #ffdd00 !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}
html.a11y-hc .site-header .cat-lang-btn.active,
html.a11y-hc .site-header .cat-lang-btn.active:link,
html.a11y-hc .site-header .cat-lang-btn.active:visited {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #ffdd00 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

/* ── WCAG 1.4.3: Placeholder — достатъчен контраст ── */
html.a11y-hc ::placeholder {
    color: #555555 !important;
    opacity: 1 !important;
}

/* Newsletter bar в HC — тъмносиният фон прави placeholder невидим без тези правила */
html.a11y-hc .nl-subscribe-bar {
    background: #ffffff !important;
    border-top: 2px solid #000000 !important;
    color: #000000 !important;
}
html.a11y-hc .nl-subscribe-text strong,
html.a11y-hc .nl-subscribe-text span {
    color: #000000 !important;
}
html.a11y-hc .nl-sub-input {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc .nl-sub-input:focus {
    outline: 3px solid #000000 !important;
    background: #ffffff !important;
}
html.a11y-hc .nl-sub-btn {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
}

/* ── WCAG 1.4.1: Success / Error / Warning — икони чрез ::before ── */
html.a11y-hc .nav-auth-modal-success::before,
html.a11y-hc .admin-flash--success::before,
html.a11y-hc .nl-sub-msg[style*="green"]::before {
    content: '✓ ';
    font-weight: 700;
}
html.a11y-hc .nav-auth-modal-error::before,
html.a11y-hc .admin-flash--error::before {
    content: '✕ ';
    font-weight: 700;
}
html.a11y-hc .admin-flash--warning::before {
    content: '⚠ ';
    font-weight: 700;
}

/* Success/Error фонове с ясен контраст */
html.a11y-hc .nav-auth-modal-success,
html.a11y-hc .admin-flash--success {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc .nav-auth-modal-error,
html.a11y-hc .admin-flash--error {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc .admin-flash--warning {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

/* ── WCAG 1.4.1: „В колекция" бутон — текст + рамка, не само цвят ── */
html.a11y-hc .collection-btn.in-collection {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    font-weight: 700 !important;
}
html.a11y-hc .collection-btn.in-collection .collection-btn-icon {
    color: #000000 !important;
}
html.a11y-hc .collection-btn.in-collection::after {
    content: ' ✓';
    font-weight: 700;
}

/* Общи контейнери */
html.a11y-hc .news-page-item,
html.a11y-hc .news-view-content,
html.a11y-hc .news-view-page,
html.a11y-hc .news-page,
html.a11y-hc .hero-section,
html.a11y-hc .home-news-section,
html.a11y-hc .home-events-section {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}
html.a11y-hc .section-heading,
html.a11y-hc h1, html.a11y-hc h2,
html.a11y-hc h3, html.a11y-hc h4 {
    color: #000000 !important;
}
html.a11y-hc img {
    filter: contrast(1.15);
}
html.a11y-hc .a11y-btn-hc {
    background: rgba(255,255,255,0.25) !important;
    border-color: #ffdd00 !important;
    color: #ffdd00 !important;
}

/* ── Навигация: базови линкове (menu items) — бели ── */
/* Специфичност (0,3,2): site-nav + a + :visited */
html.a11y-hc .site-nav .site-nav-list a,
html.a11y-hc .site-nav .site-nav-list a:link,
html.a11y-hc .site-nav .site-nav-list a:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}
html.a11y-hc .site-nav .site-nav-list a:hover,
html.a11y-hc .site-nav .site-nav-list a:focus {
    color: #ffdd00 !important;
    text-decoration: underline !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}

/* ── Auth бутони (Панел / Колекция / Изход) — висока специфичност ── */
/* Специфичност (0,4,1): .site-nav + .nav-auth-btns + .nav-auth-btn + :visited */
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn:link,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn:visited {
    text-decoration: none !important;
}
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--filled,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--filled:link,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--filled:visited {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
}
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--filled:hover,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--filled:focus {
    background: #ffdd00 !important;
    color: #000000 !important;
    border-color: #ffdd00 !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--outline,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--outline:link,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--outline:visited {
    background: transparent !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--outline:hover,
html.a11y-hc .site-nav .nav-auth-btns .nav-auth-btn--outline:focus {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffdd00 !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}

/* ── Поръчки бутон ── */
html.a11y-hc .site-nav .nav-orders-btn,
html.a11y-hc .site-nav .nav-orders-btn:link,
html.a11y-hc .site-nav .nav-orders-btn:visited {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
    text-decoration: none !important;
}
html.a11y-hc .site-nav .nav-orders-btn:hover,
html.a11y-hc .site-nav .nav-orders-btn:focus {
    background: #ffdd00 !important;
    color: #000000 !important;
    border-color: #ffdd00 !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}

/* ── Търсачка иконка ── */
html.a11y-hc .site-nav .nav-search-btn,
html.a11y-hc .site-nav .nav-search-btn:link,
html.a11y-hc .site-nav .nav-search-btn:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}
html.a11y-hc .site-nav .nav-search-btn:hover,
html.a11y-hc .site-nav .nav-search-btn:focus {
    color: #ffdd00 !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}

/* ── Хамбургер бутон (мобилна навигация) ── */
html.a11y-hc .nav-hamburger {
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
}
html.a11y-hc .nav-hamburger:hover,
html.a11y-hc .nav-hamburger:focus {
    background: rgba(255,255,255,0.18) !important;
    border-color: #ffdd00 !important;
    outline: 2px solid #ffdd00 !important;
}

/* ── Мобилен dropdown – черен фон, бял текст ── */
html.a11y-hc .site-nav-list {
    background: #000000 !important;
    border-top: 2px solid #ffffff !important;
    box-shadow: 0 8px 32px rgba(255,255,255,0.15) !important;
}

/* ── Мобилно приветствие в навигацията ── */
html.a11y-hc .nav-auth-hello,
html.a11y-hc .nav-auth-hello * {
    color: #ffffff !important;
}

/* nav-auth-btn варианти — тук са заменени от по-специфичните правила по-горе */

/* ── Всички input / textarea / select полета ── */
html.a11y-hc input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.a11y-hc textarea,
html.a11y-hc select {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
html.a11y-hc textarea:focus,
html.a11y-hc select:focus {
    outline: 3px solid #000000 !important;
    outline-offset: 2px !important;
    background: #fffde7 !important;
}
html.a11y-hc input[type="checkbox"],
html.a11y-hc input[type="radio"] {
    accent-color: #000000 !important;
    outline: 2px solid #000000 !important;
}

/* ── Hero карти (начална страница) ── */
html.a11y-hc .hero-main,
html.a11y-hc .hero-main-news,
html.a11y-hc .hero-today-panel,
html.a11y-hc .hero-main--empty {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    border-top: 4px solid #000000 !important;
    box-shadow: none !important;
    color: #000000 !important;
}
html.a11y-hc .hero-label {
    background: #000000 !important;
    color: #ffffff !important;
}
html.a11y-hc .hero-title,
html.a11y-hc .hero-date,
html.a11y-hc .hero-excerpt,
html.a11y-hc .hero-excerpt * {
    color: #000000 !important;
}

/* ── Новинарски тагове и бутони в картите ── */
html.a11y-hc .news-card-tag {
    background: #000000 !important;
    color: #ffffff !important;
}
html.a11y-hc .news-card-title,
html.a11y-hc .news-card-title * {
    color: #000000 !important;
}
html.a11y-hc .news-card-btn,
html.a11y-hc .news-card-btn:link,
html.a11y-hc .news-card-btn:visited {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
    text-decoration: none !important;
}
html.a11y-hc .news-card-btn:hover,
html.a11y-hc .news-card-btn:focus {
    background: #ffffff !important;
    color: #000000 !important;
    outline: 2px solid #000000 !important;
}
html.a11y-hc .news-read-btn,
html.a11y-hc .news-read-btn:link,
html.a11y-hc .news-read-btn:visited {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
    text-decoration: none !important;
}
html.a11y-hc .news-read-btn:hover,
html.a11y-hc .news-read-btn:focus {
    background: #ffffff !important;
    color: #000000 !important;
    outline: 2px solid #000000 !important;
}

/* ── Slider навигация (dots & arrows) ── */
html.a11y-hc .news-slider-nav button {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc .news-slider-nav button:hover,
html.a11y-hc .news-slider-nav button:focus {
    background: #000000 !important;
    color: #ffffff !important;
    outline: 2px solid #000000 !important;
}
html.a11y-hc .news-slider-dot {
    background: #cccccc !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc .news-slider-dot.active {
    background: #000000 !important;
}

/* ── Метаданни (дати, категории) ── */
html.a11y-hc .hero-date,
html.a11y-hc .news-page-date,
html.a11y-hc .news-meta-date,
html.a11y-hc .news-view-meta,
html.a11y-hc .news-view-meta *,
html.a11y-hc .section-label,
html.a11y-hc .news-card-excerpt,
html.a11y-hc .news-card-excerpt * {
    color: #000000 !important;
}
html.a11y-hc .news-category-link,
html.a11y-hc .news-category-link:link,
html.a11y-hc .news-category-link:visited {
    color: #000000 !important;
    border-color: #000000 !important;
    text-decoration: underline !important;
}

/* ── Search result type badge ── */
html.a11y-hc .search-result-type {
    background: #000000 !important;
    color: #ffffff !important;
}

/* ── Login/Register modal ── */
html.a11y-hc .nav-auth-modal-body {
    background: #ffffff !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
}
html.a11y-hc .nav-auth-modal-title {
    color: #000000 !important;
}
html.a11y-hc .nav-auth-modal-close {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}
html.a11y-hc .nav-auth-modal-close:hover,
html.a11y-hc .nav-auth-modal-close:focus {
    background: #ffdd00 !important;
    color: #000000 !important;
    border-color: #000000 !important;
}
html.a11y-hc .nav-auth-modal-backdrop {
    background: rgba(0,0,0,0.88) !important;
}

/* ── Collection бутон (не е добавен в колекция) ── */
html.a11y-hc .collection-btn:not(.in-collection) {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
html.a11y-hc .collection-btn:not(.in-collection):hover,
html.a11y-hc .collection-btn:not(.in-collection):focus {
    background: #000000 !important;
    color: #ffffff !important;
}

/* ── Pagination ── */
html.a11y-hc .pagination-link {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    text-decoration: none !important;
}
html.a11y-hc .pagination-link.active {
    background: #000000 !important;
    color: #ffffff !important;
}
html.a11y-hc .pagination-link:hover,
html.a11y-hc .pagination-link:focus {
    background: #000000 !important;
    color: #ffffff !important;
    outline: 2px solid #ffdd00 !important;
}

/* ── Tags / badges с цветни фонове ── */
html.a11y-hc [class*="badge"],
html.a11y-hc [class*="-tag"],
html.a11y-hc [class*="-label"]:not(.a11y-bar-label):not(.footer-rss-label) {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

/* ── Таблици ── */
html.a11y-hc table,
html.a11y-hc th,
html.a11y-hc td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
    background: #ffffff !important;
}
html.a11y-hc th {
    background: #000000 !important;
    color: #ffffff !important;
}

/* ── Карти / panels с box-shadow ── */
html.a11y-hc .news-page-item,
html.a11y-hc .search-result-card,
html.a11y-hc .hero-main,
html.a11y-hc .home-panel {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
}

@media (max-width: 640px) {
    .a11y-bar-label { display: none; }
    .a11y-btn { padding: 3px 8px; }
}

.news-view-image-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(15,23,42,0.16);
}

.news-view-pdfs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 32px;
}

.news-view-pdf-item {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15,23,42,0.10);
}

.news-view-pdf-item iframe {
    width: 100%;
    height: 220px;
    border: none;
    display: block;
}

.news-pdf-label {
    display: block;
    padding: 7px 12px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    color: #1e40af;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s;
}

.news-pdf-label:hover {
    background: #dbeafe;
}

/* Публична страница Галерия */

.gallery-page {
    padding: 0 0 60px;
}

.gallery-page h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.gallery-level {
    margin-bottom: 26px;
}

.gallery-level h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 800;
    color: #9ca3af;
    margin: 0 0 12px;
}

.gallery-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-chip {
    padding: 12px 22px 12px 12px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #374151;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.gallery-chip:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(21,101,192,0.12);
    color: #1565c0;
}

.gallery-chip.active {
    background: #1565c0;
    color: #ffffff;
    border-color: #1565c0;
    box-shadow: 0 4px 14px rgba(21,101,192,0.3);
}

.gallery-chip-thumb {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-chip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-chip-label {
    white-space: nowrap;
}

.gallery-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gallery-album-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    text-decoration: none;
    color: #111827;
    border: 2px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.gallery-album-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 20px rgba(21,101,192,0.10);
}

.gallery-album-card.active {
    border-color: #1565c0;
    box-shadow: 0 8px 20px rgba(21,101,192,0.18);
}

.gallery-album-thumb {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.gallery-album-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-album-text {
    display: flex;
    flex-direction: column;
}

.gallery-album-name {
    font-weight: 700;
    font-size: 1.02rem;
    margin-bottom: 2px;
}

.gallery-album-meta {
    font-size: 0.78rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
        order: 1;
        flex-shrink: 0;
    }

    .site-header-hello,
    .site-header-hello-group {
        display: none;
    }

    .site-title {
        font-size: 1.1rem;
    }

    .site-subtitle {
        font-size: 0.68rem;
    }

    .site-nav .container {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px 4px;
        padding-top: 4px;
        padding-bottom: 8px;
        position: relative;
    }

    .nav-auth-hello-wrap {
        display: flex;
        flex-direction: column;
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
        align-self: center;
    }

    .nav-auth-hello {
        display: block;
        font-size: .78rem;
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 4px;
    }

    .nav-auth-match-link {
        display: block;
        padding: 0 4px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-search-btn {
        margin-left: auto;
        order: 3;
        flex-shrink: 0;
    }

    /* Action buttons wrapper — forced to second row, right-aligned */
    .nav-auth-btns {
        order: 10;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
        justify-content: flex-end;
    }

    /* На мобилен показваме копието от навигацията, не това под "Здравей, ..." */
    .nav-auth-btns.nav-auth-btns--mobile {
        display: flex;
    }
    .site-header-auth-btns {
        display: none;
    }

    /* Action buttons — pushed to row 2 */
    .nav-auth-btn {
        padding: 3px 8px;
        font-size: .7rem;
    }

    .site-nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 2px solid #e5e7eb;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 180;
        flex-direction: column;
        flex-wrap: nowrap; /* иначе при ограничена височина елементите се пренасят в нова колона вдясно */
        gap: 0;
        padding: 6px 0 calc(16px + env(safe-area-inset-bottom, 0px));
    }

    /* Отворено меню: панел от лентата до долния ръб на екрана (top се задава от app.js),
       дългият списък с подменюта се скролира вътре в него */
    .site-nav.is-open .site-nav-list {
        display: flex;
        position: fixed;
        top: 130px;
        bottom: 0;
        left: 0;
        right: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* Докато менюто е отворено, чатът и „Нагоре“ не трябва да го закриват */
    body.mobile-nav-open #back-to-top,
    body.mobile-nav-open .chat-widget,
    body.mobile-nav-open .chat-widget-restore {
        display: none !important;
    }

    .site-nav-item {
        width: 100%;
    }

    .site-nav-item > a {
        padding: 11px 20px;
        font-size: 0.88rem;
    }

    .site-nav-item > a::after {
        display: none;
    }

    /* has-children: link takes all space, arrow button on right */
    .site-nav-item.has-children {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }

    .site-nav-item.has-children > a {
        flex: 1 1 auto;
    }

    .nav-submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        flex-shrink: 0;
        background: none;
        border: none;
        border-left: 1px solid #e5e7eb;
        cursor: pointer;
        font-size: 1.4rem;
        color: #6b7280;
        transition: color 0.15s, transform 0.2s;
        padding: 0;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        touch-action: manipulation;
        transform: none; /* reset desktop rotation */
    }

    .nav-submenu-toggle:hover {
        color: #1565c0;
    }

    .site-nav-item.submenu-open > .nav-submenu-toggle {
        color: #1565c0;
        transform: rotate(90deg);
    }

    /* Submenus: hidden by default, shown when submenu-open */
    .site-nav-submenu {
        display: none;
        width: 100%;
        position: static;
        box-shadow: none;
        border-radius: 0;
        border: none;
        padding: 0;
        background: #f8fafc;
        border-top: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
        margin: 0;
        min-width: unset;
    }

    .site-nav-item.submenu-open > .site-nav-submenu {
        display: block;
    }
}

/* ═══ Активен чат — плаваща джаджа ═══════════════════════════════════════════ */
.chat-widget {
    position: fixed;
    right: 24px;
    bottom: 88px;
    z-index: 500;
}
.chat-widget-toggle {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .15s;
}
.chat-widget-toggle:hover {
    background: #1e40af;
    transform: scale(1.05);
}
.chat-widget-dismiss {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #64748b;
    color: #fff;
    border: 2px solid #fff;
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
    z-index: 1;
}
.chat-widget-dismiss:hover {
    background: #475569;
}
.chat-widget-restore {
    position: fixed;
    right: 27px;
    bottom: 80px;
    z-index: 499;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .5;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .2);
    transition: opacity .15s, background .15s, transform .15s;
}
.chat-widget-restore:hover {
    opacity: 1;
    background: #1d4ed8;
    transform: scale(1.08);
}
.chat-widget-restore[hidden] {
    display: none;
}
.chat-widget-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.chat-widget-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 320px;
    max-width: calc(100vw - 40px);
    height: 440px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-widget-panel[hidden] {
    display: none;
}
.chat-widget-header {
    background: #1d4ed8;
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chat-widget-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.chat-widget-inactive-banner {
    background: #fef3c7;
    color: #92400e;
    font-size: .78rem;
    padding: 8px 14px;
    line-height: 1.4;
    border-bottom: 1px solid #fde68a;
}
.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
}
.chat-widget-bubble {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: .87rem;
    line-height: 1.4;
    word-wrap: break-word;
}
.chat-widget-bubble-visitor {
    align-self: flex-end;
    background: #1d4ed8;
    color: #fff;
    border-bottom-right-radius: 2px;
}
.chat-widget-bubble-admin {
    align-self: flex-start;
    background: #e5e7eb;
    color: #1e293b;
    border-bottom-left-radius: 2px;
}
.chat-widget-form-wrap {
    display: flex;
    flex-direction: column;
}
.chat-widget-email-row {
    padding: 10px 12px 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}
.chat-widget-email-row[hidden] {
    display: none;
}
.chat-widget-email-hint {
    font-size: .78rem;
    color: #475569;
    margin: 0 0 6px;
    line-height: 1.35;
}
.chat-widget-email-row input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: .87rem;
    font-family: inherit;
    margin-bottom: 8px;
}
.chat-widget-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}
.chat-widget-form textarea {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: .87rem;
    font-family: inherit;
    max-height: 96px;
}
.chat-widget-form button {
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 10px;
    width: 38px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 1rem;
}
.chat-widget-form button:hover { background: #1e40af; }
.chat-widget-attach-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 1.1rem !important;
}
.chat-widget-attach-btn:hover { background: #e2e8f0 !important; }
.chat-widget-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 0;
    background: #fff;
}
.chat-widget-preview[hidden] { display: none; }
.chat-widget-preview-chip {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.chat-widget-preview-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.chat-widget-preview-remove {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    border: none;
    font-size: .65rem;
    line-height: 16px;
    cursor: pointer;
    padding: 0;
}
.chat-widget-bubble img {
    max-width: 160px;
    max-height: 160px;
    border-radius: 8px;
    display: block;
    margin-top: 4px;
    cursor: pointer;
}
@media (max-width: 480px) {
    .chat-widget-panel {
        width: calc(100vw - 24px);
        right: -8px;
    }
}
    }
    }

    .site-nav-submenu a {
        padding: 10px 20px 10px 36px;
        font-size: 0.84rem;
        border-radius: 0;
    }
}

@media (max-width: 1150px) and (min-width: 721px) {
    .home-hero { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .home-hero { grid-template-columns: 1fr; }
    .news-view-title { font-size: 1.8rem; }
    .news-view-content { padding: 18px 16px; }
    .exhibition-details-columns { grid-template-columns: 1fr; }
    /* Информация за изложбата: дългият текст отива на нов ред под етикета (вместо да се
       свива в тясна колона до него); съвсем дългите низове (адреси) се чупят, а не разширяват страницата. */
    .exhibition-details-box { max-width: 100%; overflow-wrap: anywhere; }
    .exhibition-details-row { flex-wrap: wrap; row-gap: 1px; }
    .exhibition-details-row dd { flex: 1 1 auto; max-width: 100%; overflow-wrap: anywhere; }
    /* Класове / Цени: първият ред вече не се реже с „…", а се пренася на нов ред */
    .exhibition-expand-summary { align-items: flex-start; }
    .exhibition-expand-preview { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
    /* Без хоризонтален скрол на страницата — иначе sticky шапката не се държи на мобилни.
       overflow-x:clip (за разлика от hidden) не създава контейнер за скрол и не чупи sticky. */
    body { overflow-x: clip; }
    .exhibition-details-col--left { border-right: none; padding-right: 0; padding-bottom: 16px; border-bottom: 1px solid #dbeafe; margin-bottom: 4px; }
    .news-page-item { grid-template-columns: 1fr; }
    .news-page-meta { flex-direction: row; align-items: center; margin-bottom: 8px; }
    .news-page-cover { width: 80px; aspect-ratio: 4/3; flex-shrink: 0; }
    .news-page-meta a { order: -1; }
    .news-page-meta .news-page-date { order: 0; }
    .footer-cols { flex-direction: column; gap: 20px; }
}

.news-video video {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* ══════════════════════════════════════════════════════════
   SEARCH PAGE
   ══════════════════════════════════════════════════════════ */
/* Search page tabs */
.search-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.search-tabs::-webkit-scrollbar { display: none; }

.search-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    background: none;
    cursor: pointer;
}
.search-tab:hover {
    color: #1565c0;
    border-bottom-color: #bfdbfe;
}
.search-tab.active {
    color: #1565c0;
    border-bottom-color: #1565c0;
}
.search-tab svg {
    flex-shrink: 0;
    opacity: 0.75;
}
.search-tab.active svg { opacity: 1; }

html.a11y-hc .search-tab { color: #000 !important; }
html.a11y-hc .search-tab.active {
    color: #000 !important;
    border-bottom-color: #000 !important;
    outline: 2px solid #000;
}

/* Catalog search grid */
.search-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px 16px;
    margin-top: 4px;
}

.search-cat-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-cat-field label {
    font-size: 0.81rem;
    font-weight: 600;
    color: #374151;
}

.search-cat-field input,
.search-cat-field select {
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0d1b2a;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.search-cat-field input:focus,
.search-cat-field select:focus {
    border-color: #1565c0;
    background: #fff;
}

.search-cat-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.search-cat-submit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.search-cat-submit:hover { background: #1976d2; }

.search-cat-link {
    font-size: 0.87rem;
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
}

.search-cat-link:hover { text-decoration: underline; }

/* Artist browse link */
.search-artists-browse-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
    padding: 9px 18px;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    transition: background 0.15s, border-color 0.15s;
}

.search-artists-browse-link:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* Image search panel */
.search-image-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 24px 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    margin-top: 8px;
}

.search-image-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 16px;
}

.search-image-desc {
    font-size: 0.92rem;
    color: #475569;
    max-width: 540px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.search-image-go-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #1565c0;
    color: #fff;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}

.search-image-go-btn:hover { background: #1976d2; }

.search-page {
    padding: 12px 0 64px;
}

.search-form-wrap {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15,23,42,0.08);
    padding: 28px 32px;
    margin-bottom: 32px;
}

.search-form-wrap h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0d1b2a;
    margin: 0 0 18px;
}

.search-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.search-input-row input[type="search"],
.search-input-row input[type="text"] {
    flex: 1;
    padding: 11px 16px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    color: #0d1b2a;
    transition: border-color 0.15s;
    background: #f8fafc;
    min-width: 0;
}

.search-input-row input:focus {
    border-color: #1565c0;
    background: #fff;
}

.search-input-row button {
    padding: 11px 24px;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 7px;
}

.search-input-row button:hover {
    background: #1976d2;
}

/* Search filter pills */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.search-filter-pill {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.search-filter-pill:hover {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.search-filter-pill.active {
    background: #1565c0;
    color: #fff;
    border-color: #1565c0;
}

html.a11y-hc .search-filter-pill {
    color: #000 !important;
    background: #fff !important;
    border-color: #000 !important;
}
html.a11y-hc .search-filter-pill:hover,
html.a11y-hc .search-filter-pill:focus {
    background: #000 !important;
    color: #fff !important;
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
}
html.a11y-hc .search-filter-pill.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
    outline: 2px solid #fff !important;
}

.search-results-info {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 12px;
}

.search-results-info strong {
    color: #0d1b2a;
}

/* Result cards */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.search-result-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15,23,42,0.07);
    padding: 20px 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f1f5f9;
}

.search-result-card:hover {
    box-shadow: 0 6px 24px rgba(21,101,192,0.13);
    transform: translateY(-2px);
    border-color: #bfdbfe;
}

.search-result-body {
    flex: 1;
    min-width: 0;
}

.search-result-type {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.search-result-type.type-news       { background: #e0f2fe; color: #0369a1; }
.search-result-type.type-event      { background: #fef9c3; color: #92400e; }
.search-result-type.type-page       { background: #f0fdf4; color: #166534; }
.search-result-type.type-video      { background: #fce7f3; color: #9d174d; }
.search-result-type.type-obuchenie  { background: #ede9fe; color: #5b21b6; }

.search-result-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0d1b2a;
    margin: 0 0 6px;
    line-height: 1.35;
}

.search-result-snippet {
    font-size: 0.87rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.search-result-snippet mark {
    background: #fef08a;
    color: #0d1b2a;
    border-radius: 3px;
    padding: 0 2px;
    font-style: normal;
}

.search-result-thumb {
    flex-shrink: 0;
    width: 96px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.search-result-author,
.search-result-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

.search-result-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #94a3b8;
    transition: color 0.15s;
    padding-top: 4px;
}

.search-result-card:hover .search-result-arrow {
    color: #1565c0;
}

.search-empty {
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15,23,42,0.07);
}

.search-empty-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    color: #cbd5e1;
}

.search-empty h2 {
    font-size: 1.2rem;
    color: #374151;
    margin: 0 0 6px;
}

.search-empty p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 600px) {
    .search-form-wrap {
        padding: 20px 16px;
    }
    .search-result-card {
        padding: 16px;
    }
    .search-input-row button span {
        display: none;
    }
    .search-result-thumb {
        width: 72px;
        height: 54px;
    }
}
/* -- Footer RSS links ------------------------------------------ */
.footer-rss {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 14px;
}
.footer-rss-label {
    opacity: 0.75;
}
.footer-rss-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--footer-text, #b8c8e0);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 2px 8px;
    transition: background .2s, color .2s;
}
.footer-rss-link:hover,
.footer-rss-link:focus {
    background: rgba(255,255,255,0.12);
    color: var(--footer-text, #b8c8e0);
    outline: none;
}
.footer-rss-icon {
    flex-shrink: 0;
}
html.a11y-hc .footer-rss-link {
    color: #ff0 !important;
    border-color: #ff0 !important;
}
html.a11y-hc .footer-rss-link:hover,
html.a11y-hc .footer-rss-link:focus {
    background: #ff0 !important;
    color: #000 !important;
}

/* ── Footer donate button ────────────────────────────────── */
.footer-donate-btn {
    display: inline-flex;
    align-items: center;
    height: 34px;
    gap: 6px;
    padding: 0 16px;
    margin-left: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffb347, #ff5e62);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 94, 98, 0.35);
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.footer-donate-btn svg {
    flex-shrink: 0;
}
.footer-donate-btn:hover,
.footer-donate-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 98, 0.5);
    filter: brightness(1.05);
    color: #fff;
    outline: none;
}
html.a11y-hc .footer-donate-btn {
    background: #ff0 !important;
    color: #000 !important;
    box-shadow: none !important;
}

/* ── Footer social icons ─────────────────────────────────── */
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-social-label {
    font-size: 0.78rem;
    opacity: 0.7;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.footer-social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.08);
    text-decoration: none;
    transition: background .2s, color .2s, transform .15s;
}
.footer-social-link:hover,
.footer-social-link:focus {
    color: #fff;
    transform: translateY(-2px);
    outline: none;
}
.footer-social-link.footer-social-facebook:hover  { background: #1877f2; }
.footer-social-link.footer-social-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.footer-social-link.footer-social-youtube:hover   { background: #ff0000; }
.footer-social-link.footer-social-twitter:hover   { background: #000; }
.footer-social-link.footer-social-tiktok:hover    { background: #010101; }
.footer-social-link.footer-social-linkedin:hover  { background: #0a66c2; }
html.a11y-hc .footer-social-link {
    border: 2px solid #ff0 !important;
    color: #ff0 !important;
    background: transparent !important;
}
html.a11y-hc .footer-social-link:hover,
html.a11y-hc .footer-social-link:focus {
    background: #ff0 !important;
    color: #000 !important;
}

/* ── Screen-reader only utility ────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ══════════════════════════════════════════════════════════════
   МЛАДЕЖКА ФИЛАТЕЛИЯ (/youngphilatelists/)
   ══════════════════════════════════════════════════════════════ */
.yp-back-row { margin-bottom: 16px; }

/* ── Небе + облаци + хълм (декоративен фон на hub страницата) ────────────── */
.yp-sky {
    position: relative;
    overflow: hidden;
    padding: 14px 18px 26px;
    border-radius: 24px;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #6fb6ec 0%, #9ed3f5 45%, #dcf0fc 85%, #eaf7ec 100%);
    isolation: isolate;
}
.yp-cloud {
    position: absolute;
    background: #fff;
    border-radius: 999px;
    opacity: .9;
    filter: blur(.2px);
    z-index: 0;
    animation: ypDrift 40s linear infinite;
}
.yp-cloud::before, .yp-cloud::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 999px;
}
.yp-cloud--1 { width: 66px; height: 24px; top: 6%;  left: -5%; animation-duration: 55s; }
.yp-cloud--1::before { width: 36px; height: 36px; top: -18px; left: 7px; }
.yp-cloud--1::after  { width: 26px; height: 26px; top: -12px; left: 35px; }
.yp-cloud--2 { width: 54px;  height: 20px; top: 55%; left: 60%; animation-duration: 70s; animation-delay: -15s; }
.yp-cloud--2::before { width: 30px; height: 30px; top: -14px; left: 6px; }
.yp-cloud--2::after  { width: 22px; height: 22px; top: -10px; left: 29px; }
.yp-cloud--3 { width: 42px;  height: 16px; top: 2%; left: 32%; animation-duration: 48s; animation-delay: -30s; }
.yp-cloud--3::before { width: 22px; height: 22px; top: -11px; left: 5px; }
.yp-cloud--3::after  { width: 16px; height: 16px; top: -7px; left: 21px; }
@keyframes ypDrift {
    from { transform: translateX(-10%); }
    to   { transform: translateX(120vw); }
}
.yp-balloon {
    position: absolute;
    top: 2%;
    right: 6%;
    font-size: 2rem;
    line-height: 1;
    z-index: 0;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.15));
    animation: ypFloat 5s ease-in-out infinite;
}
/* Вариант 1: generic „супергерой / монстърче / комикс" декорации — emoji.
   Вариант 2 (.yp-hero-deco--svg): същите роли, но като нарисувани SVG
   илюстрации (виж ypHeroSvg*() в youngphilatelists/index.php) — и в двата
   случая НЕ са конкретни защитени с права герои (Pokémon, Marvel/DC и т.н.).
   Реални лицензирани илюстрации се качват от Админ > Младежка филателия > Банер. */
.yp-hero-deco {
    position: absolute;
    z-index: 0;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
}
.yp-hero-deco--svg { filter: drop-shadow(0 5px 9px rgba(0,0,0,.22)); }
.yp-hero-deco--svg svg { display: block; }
.yp-hero-deco--hero    { top: 10%;  left: 4%;  font-size: 2.1rem; animation: ypFloat 4.5s ease-in-out infinite; animation-delay: -1s; }
.yp-hero-deco--monster { bottom: 8%; left: 16%; font-size: 1.7rem; animation: ypFloat 5.5s ease-in-out infinite; animation-delay: -2.5s; }
.yp-hero-deco--burst   { top: 6%;  left: 42%; font-size: 1.3rem; animation: ypPulse 2.4s ease-in-out infinite; }
.yp-hero-deco--sparkle { bottom: 14%; right: 20%; font-size: 1.4rem; animation: ypPulse 3s ease-in-out infinite; animation-delay: -1.2s; }
.yp-hero-deco--svg.yp-hero-deco--hero    svg { width: auto; height: 76px; }
.yp-hero-deco--svg.yp-hero-deco--monster svg { width: auto; height: 46px; }
.yp-hero-deco--svg.yp-hero-deco--burst   svg { width: auto; height: 50px; }
.yp-hero-deco--svg.yp-hero-deco--sparkle svg { width: auto; height: 32px; }
@media (max-width: 640px) {
    .yp-hero-deco--svg.yp-hero-deco--hero    svg { height: 52px; }
    .yp-hero-deco--svg.yp-hero-deco--monster svg { height: 32px; }
    .yp-hero-deco--svg.yp-hero-deco--burst   svg { height: 34px; }
    .yp-hero-deco--svg.yp-hero-deco--sparkle svg { height: 22px; }
    .yp-hero-deco--hero, .yp-hero-deco--monster, .yp-hero-deco--burst, .yp-hero-deco--sparkle { font-size: 1.3rem; }
}
@keyframes ypPulse {
    0%, 100% { transform: scale(1);   opacity: .85; }
    50%      { transform: scale(1.25); opacity: 1; }
}
@keyframes ypFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-14px) rotate(3deg); }
}
.yp-hill {
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -10%;
    height: 46px;
    background: linear-gradient(180deg, #8fd67f 0%, #6cc25c 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    z-index: 0;
}

.yp-hero { position: relative; z-index: 1; text-align: center; padding: 10px 16px 4px; }
.yp-title-ribbon {
    position: relative;
    display: inline-block;
    background: #fdf6e3;
    border: 3px solid #e7d9a8;
    border-radius: 16px;
    padding: 14px 40px;
    box-shadow: 0 8px 0 rgba(0,0,0,.08), 0 10px 20px rgba(0,0,0,.12);
    margin-bottom: 6px;
}
.yp-title-ribbon::before, .yp-title-ribbon::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 26px;
    height: 34px;
    background: #e7d9a8;
    transform: translateY(-50%);
}
.yp-title-ribbon::before { left: -18px; clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.yp-title-ribbon::after  { right: -18px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.yp-hero-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: .02em;
}
.yp-hero-title .yp-letter { display: inline-block; }
.yp-hero-text {
    position: relative;
    z-index: 1;
    font-size: clamp(.68rem, 2.3vw, 1.05rem);
    font-weight: 600;
    color: #0d3b66;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 10px auto 0;
    text-shadow: 0 1px 2px rgba(255,255,255,.6);
}

/* ── Марка на месеца — тъмна звездна карта ───────────────────────────────── */
.yp-som-banner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 20px;
    align-items: center;
    color: #fff;
    background:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,.8), transparent),
        radial-gradient(2px 2px at 90px 15px, rgba(255,255,255,.6), transparent),
        radial-gradient(1.5px 1.5px at 140px 60px, rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 190px 25px, rgba(255,255,255,.5), transparent),
        radial-gradient(1.5px 1.5px at 240px 45px, rgba(255,255,255,.7), transparent),
        linear-gradient(135deg, #10214f 0%, #1b3a7a 60%, #24499a 100%);
    background-repeat: repeat-x;
    background-size: 260px 90px, 260px 90px, 260px 90px, 260px 90px, 260px 90px, cover;
    border-radius: 18px;
    padding: 20px;
    margin: 24px 0 32px;
    box-shadow: 0 10px 26px rgba(16,33,79,.35);
    flex-wrap: wrap;
}
.yp-som-img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.yp-som-body { flex: 1; min-width: 200px; }
.yp-som-tag {
    display: inline-block;
    font-size: .78rem;
    font-weight: 800;
    color: #7a2e00;
    background: #fbbf24;
    border-radius: 999px;
    padding: 3px 12px;
    margin-bottom: 8px;
}
.yp-som-title { margin: 0 0 12px; font-size: 1.05rem; color: #fff; }
.yp-som-desc { color: #e5e7eb; }

/* Пълна информация за изложба в списъка (exhibitions_archive.php) */
.yp-ex-desc { margin: 10px 0 0; font-size: .93rem; line-height: 1.7; color: #374151; }
.yp-ex-subheading { margin: 18px 0 6px; font-size: .95rem; font-weight: 700; color: #0d1b2a; }
.yp-ex-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.yp-ex-gallery .yp-ex-lightbox-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); }

/* Изложби с младежко участие — "Информация за изложбата" картички (exhibitions.php) */
.yp-exhibitions-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.yp-exhibition-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.yp-exhibition-card-title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0d1b2a;
}

.yp-exhibition-card-title a {
    color: inherit;
    text-decoration: none;
}

.yp-exhibition-card-title a:hover {
    color: #1565c0;
    text-decoration: underline;
}

.yp-exhibition-card .exhibition-details-box {
    margin-bottom: 0;
}

/* Резултати от изложби — младежки (exhibitions_archive.php) и общи (events_results.php) */
.yp-youth-results,
.exhibition-results-list {
    margin-bottom: 32px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.yp-youth-results-card,
.exhibition-results-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.yp-youth-results-title,
.exhibition-results-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #0d1b2a;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.yp-youth-results-date,
.exhibition-results-date {
    font-size: .78rem;
    font-weight: 500;
    color: #9ca3af;
}

.yp-youth-results-table-wrap,
.exhibition-results-table-wrap {
    overflow-x: auto;
}

.yp-youth-results-table,
.exhibition-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.yp-youth-results-table th,
.exhibition-results-table th {
    text-align: left;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    padding: 6px 10px;
    border-bottom: 2px solid #e5e7eb;
}

.yp-youth-results-table td,
.exhibition-results-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f1f3;
    color: #1f2937;
}

.yp-youth-results-table tr:last-child td,
.exhibition-results-table tr:last-child td {
    border-bottom: none;
}

.exhibition-results-youth-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    color: #1565c0;
    background: #e3edfd;
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
}

/* ── Секции с цветни ленти (като в детска инфографика) ───────────────────── */
/* Изрична грид с именувани области (НЕ auto-fit) — всяка секция е закачена
   за конкретна област, така че подредбата е предвидима на всяка ширина:
   Колона 1: Образователно съдържание (заема 2 реда)
   Колона 2: Състезателен елемент (ред 1) + Визуално/интерактивно (ред 2)
   Колона 3: Практически инструменти (заема 2 реда)
   Колона 4: Игри (заема 2 реда) */
.yp-sections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "edu comp   tools games"
        "edu visual tools post";
    gap: 10px;
    align-items: stretch;
}
@media (max-width: 980px) {
    .yp-sections-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "edu   comp"
            "edu   visual"
            "tools games"
            "tools post";
    }
}
@media (max-width: 560px) {
    .yp-sections-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "edu"
            "comp"
            "visual"
            "tools"
            "games"
            "post";
    }
}
.yp-section {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 9px 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
/* Шарен фон — истинско многоцветно „конфети" петно (не един тон с нюанси),
   различни хармонични, но КОНТРАСТНИ цветове в едно петно. Ползва се както
   за картичките-панели на hub-а (.yp-section--*), така и за целите
   подстраници в /youngphilatelists/ (.yp-shell--*). */
.yp-section--edu, .yp-shell--edu {
    background:
        radial-gradient(circle at 10% 12%, rgba(33,150,243,.42), transparent 42%),
        radial-gradient(circle at 85% 8%,  rgba(255,193,7,.36),  transparent 40%),
        radial-gradient(circle at 92% 55%, rgba(233,30,99,.32),  transparent 42%),
        radial-gradient(circle at 15% 60%, rgba(0,191,165,.36),  transparent 42%),
        radial-gradient(circle at 55% 92%, rgba(124,77,255,.34), transparent 46%),
        radial-gradient(circle at 60% 35%, rgba(76,175,80,.24),  transparent 46%),
        #f4f8fc;
    border-color: #bfdbfe;
}
.yp-section--edu { grid-area: edu; }
.yp-section--comp, .yp-shell--comp {
    background:
        radial-gradient(circle at 10% 12%, rgba(229,57,53,.42),  transparent 42%),
        radial-gradient(circle at 85% 8%,  rgba(255,193,7,.36),  transparent 40%),
        radial-gradient(circle at 92% 55%, rgba(255,112,150,.34),transparent 42%),
        radial-gradient(circle at 15% 60%, rgba(255,112,67,.36), transparent 42%),
        radial-gradient(circle at 55% 92%, rgba(156,39,176,.3),  transparent 46%),
        radial-gradient(circle at 60% 35%, rgba(0,188,212,.22),  transparent 46%),
        #fdf6f4;
    border-color: #f3b7b7;
}
.yp-section--comp { grid-area: comp; }
.yp-section--tools, .yp-shell--tools {
    background:
        radial-gradient(circle at 10% 12%, rgba(67,160,71,.42),  transparent 42%),
        radial-gradient(circle at 85% 8%,  rgba(255,235,59,.4),  transparent 40%),
        radial-gradient(circle at 92% 55%, rgba(0,172,193,.34),  transparent 42%),
        radial-gradient(circle at 15% 60%, rgba(255,152,0,.34),  transparent 42%),
        radial-gradient(circle at 55% 92%, rgba(233,30,99,.28),  transparent 46%),
        radial-gradient(circle at 60% 35%, rgba(124,77,255,.22), transparent 46%),
        #f4faf3;
    border-color: #b7dcb9;
}
.yp-section--tools { grid-area: tools; }
.yp-section--visual, .yp-shell--visual {
    background:
        radial-gradient(circle at 10% 12%, rgba(63,81,181,.42),  transparent 42%),
        radial-gradient(circle at 85% 8%,  rgba(0,229,255,.32),  transparent 40%),
        radial-gradient(circle at 92% 55%, rgba(233,30,99,.32),  transparent 42%),
        radial-gradient(circle at 15% 60%, rgba(156,39,176,.36), transparent 42%),
        radial-gradient(circle at 55% 92%, rgba(255,193,7,.28),  transparent 46%),
        radial-gradient(circle at 60% 35%, rgba(0,191,165,.24),  transparent 46%),
        #f5f4fb;
    border-color: #bcc4e8;
}
.yp-section--visual { grid-area: visual; }
.yp-section--games, .yp-shell--games {
    background:
        radial-gradient(circle at 10% 12%, rgba(255,152,0,.42),  transparent 42%),
        radial-gradient(circle at 85% 8%,  rgba(255,235,59,.4),  transparent 40%),
        radial-gradient(circle at 92% 55%, rgba(233,30,99,.34),  transparent 42%),
        radial-gradient(circle at 15% 60%, rgba(3,169,244,.34),  transparent 42%),
        radial-gradient(circle at 55% 92%, rgba(156,39,176,.3),  transparent 46%),
        radial-gradient(circle at 60% 35%, rgba(76,175,80,.22),  transparent 46%),
        #fdf9f2;
    border-color: #f6cea0;
}
.yp-section--games { grid-area: games; }
.yp-section--post, .yp-shell--post {
    background:
        radial-gradient(circle at 10% 12%, rgba(0,137,123,.42),  transparent 42%),
        radial-gradient(circle at 85% 8%,  rgba(255,202,40,.36), transparent 40%),
        radial-gradient(circle at 92% 55%, rgba(236,64,122,.34), transparent 42%),
        radial-gradient(circle at 15% 60%, rgba(3,169,244,.34),  transparent 42%),
        radial-gradient(circle at 55% 92%, rgba(255,112,67,.3),  transparent 46%),
        radial-gradient(circle at 60% 35%, rgba(129,199,132,.24),transparent 46%),
        #f2faf9;
    border-color: #a9d8d2;
}
.yp-section--post { grid-area: post; }

/* Шарен „shell" фон за целите подстраници в /youngphilatelists/ (не само
   картичките на hub-а) — увива основното съдържание (списъци, форми,
   статии), за да изглежда цветно и на вътрешните страници. */
.yp-shell {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px 20px 28px;
    margin-bottom: 40px;
}

/* Текстови елементи, изведени директно върху шарения фон (без своя бяла
   картичка) — получават непрозрачна „подложка", за да остане текстът четлив
   независимо колко наситен е фонът зад него. Descendant-селектори (не >),
   за да хванат заглавията на всички нива (h1/h2) навсякъде в подстраницата.
   Изключения: бутонът „← Младежка филателия" (.yp-back-row) си остава
   само бутон, а главното заглавие (.section-heading / .news-view-title)
   остава чист текст — виж правилото за тях по-долу, само с text-shadow. */
.yp-shell .news-page-heading-row,
.yp-shell .news-page-subline,
.yp-shell .news-view-label,
.yp-shell .news-view-date,
.yp-shell .news-view-content,
.yp-shell .view-count-label,
.yp-shell .yp-glossary-item,
.yp-shell .yp-search-input,
.yp-shell .yp-puzzle-win,
.yp-shell #yp-gloss-empty {
    background: rgba(255,255,255,.92);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.yp-shell .yp-glossary-item { margin-bottom: 6px; border-bottom: none; }

/* Заглавието — само текст (без бяла кутия), четливо чрез светъл ореол. */
.yp-shell .section-heading,
.yp-shell .news-view-title {
    color: #0d1b2a;
    text-shadow: 0 1px 2px rgba(255,255,255,.9), 0 0 16px rgba(255,255,255,.7);
}
@media (max-width: 640px) {
    .yp-shell { padding: 16px 14px 20px; border-radius: 12px; }
}
.yp-ribbon-heading {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-weight: 800;
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 5px 16px 5px 20px;
    margin: 0 0 8px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    position: relative;
}
.yp-ribbon-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    border-style: solid;
    border-width: 8px 10px 0 0;
    border-color: rgba(0,0,0,.25) transparent transparent transparent;
}
.yp-ribbon--edu     { background: #1565c0; }
.yp-ribbon--edu::after     { border-color: #0d47a1 transparent transparent transparent; }
.yp-ribbon--comp    { background: #c62828; }
.yp-ribbon--comp::after    { border-color: #8e1c1c transparent transparent transparent; }
.yp-ribbon--tools   { background: #2e7d32; }
.yp-ribbon--tools::after   { border-color: #1b5e20 transparent transparent transparent; }
.yp-ribbon--visual  { background: #1a2a6c; }
.yp-ribbon--visual::after  { border-color: #101a45 transparent transparent transparent; }
.yp-ribbon--games   { background: #ef6c00; }
.yp-ribbon--games::after   { border-color: #b34e00 transparent transparent transparent; }
.yp-ribbon--post    { background: #00897b; }
.yp-ribbon--post::after    { border-color: #00695c transparent transparent transparent; }

.yp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 6px;
}
.yp-card {
    display: flex;
    flex-direction: column;
    background: #fffdf6;
    border: 2px dashed #d9cfa8;
    border-radius: 9px;
    padding: 8px 9px;
    text-decoration: none;
    color: inherit;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.yp-card:hover {
    transform: translateY(-4px) rotate(-.6deg);
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
    border-color: #f59e0b;
    border-style: solid;
    text-decoration: none;
}
.yp-card--static { cursor: default; }
.yp-card--static:hover { transform: none; box-shadow: none; border-color: #d9cfa8; border-style: dashed; }
.yp-card--active { border-color: #1976d2; border-style: solid; box-shadow: 0 0 0 2px rgba(25,118,210,.25); }
.yp-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fef3c7;
    font-size: .95rem;
    line-height: 1;
    margin-bottom: 4px;
}
.yp-card-title { font-weight: 700; font-size: .85rem; line-height: 1.2; margin-bottom: 2px; color: #0d1b2a; }
.yp-card-desc { font-size: .74rem; line-height: 1.22; color: #6b7280; }
/* Когато иконките са скрити (настройка от админ панела), картичките остават
   компактни — само заглавие + описание, без празно място за иконата. */
.yp-card:has(.yp-card-title:first-child) { padding-top: 9px; }

/* Речник */
.yp-search-input {
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: .95rem;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.yp-glossary-list { display: flex; flex-direction: column; gap: 4px; }
.yp-glossary-item {
    padding: 14px 0;
    border-bottom: 1px solid #eef0f2;
}
.yp-glossary-item dt { font-weight: 700; color: #0d1b2a; margin-bottom: 4px; }
.yp-glossary-item dd { margin: 0; color: #4b5563; font-size: .93rem; }
.yp-search-empty { color: #9ca3af; }

/* Материали */
.yp-materials-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.yp-material-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    flex-wrap: wrap;
}
.yp-material-icon { font-size: 1.6rem; flex-shrink: 0; }
.yp-material-body { flex: 1; min-width: 180px; }
.yp-material-cat {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 2px 9px;
    margin-bottom: 4px;
}
.yp-material-title { margin: 0 0 4px; font-size: 1rem; }
.yp-material-desc { margin: 0; font-size: .88rem; color: #6b7280; }
.yp-material-thumb-btn { flex-shrink: 0; padding: 0; border: none; background: none; cursor: pointer; border-radius: 8px; overflow: hidden; line-height: 0; }
.yp-material-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid #e5e7eb; }
.yp-material-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Модал за преглед на материали */
.yp-preview-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.yp-preview-modal[hidden] { display: none; }
.yp-preview-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .72); }
.yp-preview-modal-dialog { position: relative; background: #fff; border-radius: 14px; width: min(900px, 100%); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.yp-preview-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; }
.yp-preview-modal-title { font-weight: 700; font-size: .95rem; color: #0d1b2a; }
.yp-preview-modal-close { border: none; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: #6b7280; padding: 2px 6px; }
.yp-preview-modal-close:hover { color: #111827; }
.yp-preview-modal-body { flex: 1; overflow: auto; background: #f3f4f6; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.yp-preview-img { max-width: 100%; max-height: 80vh; display: block; margin: auto; }
.yp-preview-frame { width: 100%; height: 80vh; border: none; display: block; }

.yp-starter-kit {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 22px;
}
.yp-starter-kit-text { color: #1e3a5f; }

/* Точки/значки (пъзел + викторина) */
.yp-points-bar {
    display: flex;
    justify-content: center;
    gap: 14px;
    background: #f9f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 14px;
    margin: 0 auto 12px;
    width: fit-content;
    font-size: .78rem;
    flex-wrap: wrap;
}

/* Пъзел */
.yp-puzzle-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.yp-puzzle-board {
    display: grid;
    gap: 2px;
    /* Само fallback, докато JS (fitBoard() в puzzle.php) изчисли и зададе
       точна ширина/височина в px спрямо реалните пропорции на снимката —
       виж защо чист CSS auto/aspect-ratio не е достатъчно надежден вътре
       в отзивчив flex контейнер. */
    width: 90%;
    max-width: 480px;
    aspect-ratio: 1/1;
    margin: 0 auto;
    background: #0d1b2a;
    border-radius: 10px;
    overflow: hidden;
}
.yp-puzzle-tile {
    background-repeat: no-repeat;
    cursor: pointer;
    transition: filter .12s;
}
.yp-puzzle-tile:hover { filter: brightness(1.06); }
.yp-puzzle-tile--picked {
    outline: 3px solid #f59e0b;
    outline-offset: -3px;
    z-index: 1;
}
.yp-puzzle-controls { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.yp-puzzle-win { font-weight: 700; color: #16a34a; font-size: .88rem; margin: 0; }

/* По-дребен шрифт и по-плътни разстояния специално на страницата с пъзела */
.yp-puzzle-page .section-heading { font-size: 1.05rem; margin: 0 0 6px; padding-bottom: 4px; }
.yp-puzzle-page .news-page-subline { margin: 0; }

/* Форма „Предложи снимка за пъзела" (лява колона на puzzle.php) */
.yp-pp-suggest {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.08);
}
.yp-pp-suggest-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: .95rem;
    font-weight: 800;
    color: #0d1b2a;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.yp-pp-suggest-title::-webkit-details-marker { display: none; }
.yp-pp-suggest-arrow { font-size: .75rem; color: #6b7280; transition: transform .18s; }
.yp-pp-suggest[open] .yp-pp-suggest-arrow { transform: rotate(180deg); }
.yp-pp-suggest-body { padding-top: 10px; }
.yp-pp-suggest-text { font-size: .78rem; color: #4b5563; margin: 0 0 10px; line-height: 1.4; }
.yp-pp-form { display: flex; flex-direction: column; gap: 8px; }
.yp-pp-field { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; font-weight: 600; color: #374151; }
.yp-pp-field input {
    font-weight: 400;
    font-size: .85rem;
    padding: 6px 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
}
.yp-pp-captcha { display: flex; align-items: center; gap: 8px; }
.yp-pp-captcha-code {
    font-weight: 800;
    letter-spacing: .15em;
    background: #f3f4f6;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: .85rem;
}
.yp-pp-captcha input { flex: 1; min-width: 0; font-size: .85rem; padding: 6px 9px; border: 1px solid #d1d5db; border-radius: 6px; box-sizing: border-box; }
.yp-pp-msg { font-size: .78rem; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.yp-pp-msg--ok  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.yp-pp-msg--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.yp-pp-msg--err p { margin: 0; }

/* Двуколонно оформление: 1/3 текст (ляво) / 2/3 самият пъзел (дясно) */
.yp-puzzle-split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}
.yp-puzzle-left { padding-top: 2px; }
.yp-puzzle-right { display: flex; flex-direction: column; }
@media (max-width: 780px) {
    .yp-puzzle-split { grid-template-columns: 1fr; }
    .yp-puzzle-left { text-align: center; }
}

/* Викторина */
.yp-quiz-app {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    max-width: 560px;
}
.yp-quiz-progress { font-size: .82rem; color: #9ca3af; margin-bottom: 8px; font-weight: 700; }
.yp-quiz-question { font-size: 1.15rem; font-weight: 700; color: #0d1b2a; margin: 0 0 18px; }
.yp-quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.yp-quiz-option {
    text-align: left;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.yp-quiz-option:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; }
.yp-quiz-option:disabled { cursor: default; }
.yp-quiz-option--correct { background: #f0fdf4 !important; border-color: #16a34a !important; color: #166534; font-weight: 700; }
.yp-quiz-option--wrong { background: #fef2f2 !important; border-color: #dc2626 !important; color: #991b1b; }
.yp-quiz-result { font-size: 1.2rem; font-weight: 700; color: #0d1b2a; margin: 12px 0; }

@media (max-width: 640px) {
    .yp-som-banner { flex-direction: column; text-align: center; }
    .yp-som-img { width: 100%; max-width: 220px; height: auto; aspect-ratio: 1/1; }
    .yp-puzzle-wrap { flex-direction: column; }
    .yp-puzzle-board { max-width: 92%; max-height: 46vh; }
    .yp-hero-title { font-size: 1rem; }
    .yp-title-ribbon { padding: 12px 26px; }
    .yp-balloon { font-size: 1.5rem; right: 4%; top: 2%; }
}

@media (prefers-reduced-motion: reduce) {
    .yp-cloud, .yp-balloon, .yp-hero-deco { animation: none; }
}

/* Собствен hero банер (качена картинка от админ панела) */
.yp-sky--custom {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.yp-sky--custom::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.35) 100%);
    z-index: 0;
}
.yp-sky--custom .yp-hero-text {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,.65);
}
