/* =========================================================
   BIBLIOTEKA.KG LIBRARY NAVIGATION WIDGET
   Используется для SectionsWidget и CategoriesWidget
   ========================================================= */

.library-nav-widget {
    position: relative;
    color: var(--text);
}

.library-nav-header {
    position: relative;
    margin-bottom: 22px;
}

.library-nav-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 7px 12px;
    color: var(--bg);
    background: var(--accent);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.library-nav-header h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 850;
    line-height: 1.12;
}

.library-nav-header p {
    max-width: 820px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.library-nav-total {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 8px 11px;
    color: var(--bg);
    background: var(--accent);
    font-size: 13px;
    font-weight: 850;
}

/* =========================================================
   CARD
   ========================================================= */

.library-nav-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background: rgba(var(--surface-rgb), var(--glass-alpha));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: var(--shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.library-nav-card:hover {
    transform: translateY(-3px);
    border-color: rgba(103, 232, 249, .45);
    box-shadow:
        0 0 0 1px rgba(103, 232, 249, .18),
        0 18px 38px rgba(0, 0, 0, .16);
}

html.theme-dark .library-nav-card:hover,
body.theme-dark .library-nav-card:hover {
    box-shadow:
        0 0 0 1px rgba(103, 232, 249, .22),
        0 0 28px rgba(103, 232, 249, .18),
        0 18px 38px rgba(0, 0, 0, .34);
}

.library-nav-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    height: 170px;
    min-height: 170px;
    background:
        radial-gradient(420px 180px at 50% 0%, rgba(103, 232, 249, .10), transparent 60%),
        rgba(var(--surface-rgb), .82);
    text-decoration: none;
}

.library-nav-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform .28s ease,
        filter .28s ease;
}

.library-nav-card:hover .library-nav-thumb img {
    transform: scale(1.035);
    filter: saturate(1.08);
}

.library-nav-count {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    color: var(--bg);
    background: var(--accent);
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(103, 232, 249, .22);
}

.library-nav-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.library-nav-title {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.25;
}

.library-nav-title a {
    color: var(--text);
    text-decoration: none;
}

.library-nav-title a:hover,
.library-nav-title a:focus {
    color: var(--accent);
    text-shadow: 0 0 16px rgba(103, 232, 249, .32);
}

.library-nav-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.library-nav-link-btn {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: auto;
    padding: 8px 12px;
    color: var(--bg) !important;
    background: var(--accent);
    border: 1px solid var(--accent);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(103, 232, 249, .18);
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.library-nav-link-btn:hover,
.library-nav-link-btn:focus {
    color: var(--accent) !important;
    background: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(103, 232, 249, .36);
    transform: translateY(-1px);
}

.library-nav-link-btn i {
    font-size: 12px;
}

/* =========================================================
   OWL
   ========================================================= */

.library-nav-widget .owl-stage {
    display: flex;
}

.library-nav-widget .owl-item {
    display: flex;
}

.library-nav-carousel-item {
    width: 100%;
    height: 100%;
    padding: 4px;
}

.library-nav-widget .owl-theme .owl-nav {
    margin-top: 14px;
}

.library-nav-widget .owl-theme .owl-nav [class*='owl-'] {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bg) !important;
    background: var(--accent) !important;
    border: 1px solid var(--accent) !important;
    box-shadow: 0 8px 18px rgba(0, 227, 248, .18);
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.library-nav-widget .owl-theme .owl-nav [class*='owl-']:hover {
    color: var(--accent) !important;
    background: var(--bg) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 18px rgba(103, 232, 249, .38);
    transform: translateY(-1px);
}

.library-nav-widget .owl-theme .owl-dots .owl-dot span {
    background: rgba(var(--tint-rgb), .35);
}

.library-nav-widget .owl-theme .owl-dots .owl-dot.active span,
.library-nav-widget .owl-theme .owl-dots .owl-dot:hover span {
    background: var(--accent);
}

/* =========================================================
   EMPTY / PAGER
   ========================================================= */

.library-nav-empty {
    padding: 24px;
    color: var(--muted);
    background: rgba(var(--surface-rgb), var(--glass-alpha));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: var(--shadow);
}

.library-nav-pager {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

/* =========================================================
   Без закруглений
   ========================================================= */

.library-nav-kicker,
.library-nav-total,
.library-nav-card,
.library-nav-thumb,
.library-nav-thumb img,
.library-nav-count,
.library-nav-link-btn,
.library-nav-empty,
.library-nav-widget .owl-theme .owl-nav [class*='owl-'] {
    border-radius: 0 !important;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 767.98px) {
    .library-nav-thumb {
        height: 150px;
        min-height: 150px;
    }
}

@media (max-width: 575.98px) {
    .library-nav-header {
        margin-bottom: 18px;
    }

    .library-nav-thumb {
        height: 140px;
        min-height: 140px;
    }

    .library-nav-body {
        padding: 16px;
    }

    .library-nav-title {
        font-size: 16px;
    }

    .library-nav-link-btn {
        min-height: 36px;
        font-size: 12px;
        padding: 8px 10px;
    }
}