@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;
}

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;
}

/* ── Simple BG/EN language buttons (shared with catalog) ── */
.cat-lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    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;
}

/* ── 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;
}

/* Right side: only lang switcher */
.site-header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.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-auth-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-auth-hello {
    font-size: .78rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    cursor: pointer;
    border: 2px 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-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;
}

/* ===== 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;
}

.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; }

.site-main {
    padding: 10px 0 72px;
}

.home-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0 0 32px;
}

.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;
    max-height: 574px;
    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 */
}

.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%);
}

.hero-main-news .news-card-title {
    font-size: 1.05rem;
}

.hero-main-news .news-card-excerpt {
    font-size: 0.75rem;
}

.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 {
    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 {
    filter: brightness(1.18);
}
.stamp-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 {
    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.9rem;
    line-height: 1.55;
    color: #374151;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gallery section below hero */
.home-events-section {
    margin: 0 0 8px;
}
.home-gallery-section {
    margin: 32px 0 32px;
}
.home-gallery-section .section-heading {
    margin-bottom: 14px;
}
.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-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; }

/* ── 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;
}

.site-footer {
    background: linear-gradient(135deg, #47709d 0%, #4164a6 100%);
    color: #b8c8e0;
    padding: 40px 0 22px;
    font-size: 0.88rem;
    border-top: 3px solid #1565c0;
}

.site-footer p {
    color: #8fa3be;
    margin: 0 0 8px;
}

.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: #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: #1565c0;
    color: #fff;
    border-color: #1565c0;
    transform: translateY(-1px);
}

.footer-nav ul li a:hover::before {
    color: #fff;
    transform: translateX(2px);
}

/* Лайтбокс за галерията на публичния сайт */

.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%);
    max-width: 90vw;
    max-height: 90vh;
    color: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox-image-wrap {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.gallery-lightbox-image-wrap img {
    max-width: 100%;
    max-height: 80vh;
    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-caption {
    font-size: 0.9rem;
    color: #e5e7eb;
    text-align: center;
    max-width: 80vw;
}

.gallery-lightbox-counter {
    font-size: 0.82rem;
    color: #9ca3af;
    text-align: center;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.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;
}

/* Desktop: nav-row stays in flex flow but has 0 height (children are absolute) */
.gallery-lightbox-nav-row {
    /* nothing — just an empty flex item */
}
.gallery-lightbox-nav-row .gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-prev {
    left: -52px;
}

.gallery-lightbox-next {
    right: -52px;
}

@media (max-width: 600px) {
    .gallery-lightbox-content {
        max-width: 96vw;
    }
    .gallery-lightbox-image-wrap {
        max-height: 58vh;
    }
    .gallery-lightbox-image-wrap img {
        max-height: 58vh;
    }
    /* On mobile: nav-row becomes a real flex row below caption */
    .gallery-lightbox-nav-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 24px;
        margin-top: 14px;
        width: 100%;
    }
    .gallery-lightbox-nav-row .gallery-lightbox-nav {
        position: static;
        transform: none;
    }
    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        left: auto;
        right: auto;
    }
}

.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;
}

/* ══════════════════════════════════════════════════════════
   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-content {
    margin-top: calc(58px + 44px);
    padding: 28px 32px 40px;
    background: #f1f5f9;
    min-height: calc(100vh - 58px - 44px);
}

@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: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: 230px;
    flex-shrink: 0;
    background: #1e293b;
    min-height: calc(100vh - 58px);
    position: fixed;
    top: 58px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 16px 0 24px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    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) */
.admin-nav-item.admin-nav-sub {
    padding-left: 28px;
    font-size: 0.82rem;
    opacity: 0.85;
}
.admin-nav-item.admin-nav-sub.active {
    background: rgba(79,70,229,0.22);
    color: #c4b5fd;
    box-shadow: none;
}

.admin-nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-nav-icon svg {
    width: 18px;
    height: 18px;
}

.admin-nav-label {
    white-space: nowrap;
}

/* ── Main content area ────────────────────────────────────── */
.admin-content {
    margin-left: 230px;
    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: 200px;
    }
    .admin-content {
        margin-left: 200px;
        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: 520px;
    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: 180px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    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: 40px 12px;
}

.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);
}

.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: 8px 10px;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.admin-login-container .btn-primary {
    width: 100%;
    margin-top: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.admin-login-container .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.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;
}

/* Страница Всички новини */

.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: 2.2rem;
    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-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: 48px 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: 36px 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: 20px;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    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;
}

/* 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);
}

/* ═══ 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: 18px;
}

.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;
}

.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-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);
}

.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;
}

.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;
}

.news-view-image-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(15,23,42,0.16);
}

/* Публична страница Галерия */

.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;
    }

    .site-title {
        font-size: 1.1rem;
    }

    .site-subtitle {
        font-size: 0.68rem;
    }

    .site-nav .container {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding-top: 4px;
        padding-bottom: 4px;
        position: relative;
    }

    .nav-search-btn {
        margin-left: 4px;
        order: 3;
    }

    .nav-auth-btns {
        margin-left: auto;
        order: 2;
        gap: 3px;
        flex-shrink: 1;
        min-width: 0;
    }

    .nav-auth-hello {
        font-size: .68rem;
        max-width: none;
        overflow: visible;
        text-overflow: unset;
        white-space: nowrap;
    }

    .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;
        gap: 0;
        padding: 6px 0;
    }

    .site-nav.is-open .site-nav-list {
        display: flex;
    }

    .site-nav-item {
        width: 100%;
    }

    .site-nav-item > a {
        padding: 11px 20px;
        font-size: 0.88rem;
    }

    .site-nav-item > a::after {
        display: none;
    }

    /* Submenus: always visible and indented on mobile */
    .site-nav-submenu {
        display: block;
        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-submenu a {
        padding: 10px 20px 10px 36px;
        font-size: 0.84rem;
        border-radius: 0;
    }
}

@media (max-width: 720px) {
    .home-hero { grid-template-columns: 1fr; }
    .news-view-title { font-size: 1.8rem; }
    .news-view-content { padding: 18px 16px; }
    .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; }
}

.news-video video {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* ══════════════════════════════════════════════════════════
   SEARCH PAGE
   ══════════════════════════════════════════════════════════ */
.search-page {
    padding: 32px 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-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-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-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;
    }
}