/* BeeFixPro Blog Library v17
   A compact, serious editorial layout with restrained gold accents. */

body.blog-page {
    --library-ink: #25221e;
    --library-copy: #676057;
    --library-canvas: #f4f5f3;
    --library-paper: #ffffff;
    --library-line: #dedbd4;
    --library-gold: #eda711;
    --library-gold-deep: #956000;
    --library-shadow: 0 22px 54px rgba(35, 31, 25, .09);
}

/* Compact photographic hero */
body.blog-page .editorial-hero {
    padding: 132px 0 54px;
    background: linear-gradient(180deg, #fafbf9 0%, #f2f3f1 100%) !important;
}

body.blog-page .blog-hero__shell {
    position: relative;
    display: flex;
    min-height: 510px;
    align-items: center;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(63, 58, 50, .12);
    border-radius: 30px;
    background: #dedbd3;
    box-shadow: 0 28px 74px rgba(31, 28, 23, .13);
}

body.blog-page .blog-hero__shell::before {
    z-index: 4;
    width: 23%;
    height: 3px;
}

body.blog-page .blog-hero__media {
    position: absolute;
    z-index: 0;
    inset: 0;
    min-height: 0;
}

body.blog-page .blog-hero__media::before {
    z-index: 1;
    inset: 0;
    width: auto;
    background:
        linear-gradient(90deg, rgba(247, 247, 244, .98) 0%, rgba(247, 247, 244, .93) 34%, rgba(247, 247, 244, .46) 53%, rgba(247, 247, 244, .03) 71%),
        linear-gradient(0deg, rgba(23, 20, 17, .10), transparent 44%);
}

body.blog-page .blog-hero__media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: 63% center;
    filter: saturate(.88) contrast(.98);
}

body.blog-page .editorial-hero__content {
    position: relative;
    z-index: 3;
    width: min(54%, 660px);
    margin: 28px;
    padding: 31px 34px 29px;
    border: 1px solid rgba(255, 255, 255, .80);
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 22px 58px rgba(28, 25, 21, .11);
    backdrop-filter: blur(6px);
}

body.blog-page .editorial-hero__content .editorial-kicker {
    margin-bottom: 14px;
    font-size: 11px;
}

body.blog-page .editorial-hero h1 {
    max-width: 560px;
    font-size: clamp(44px, 4.5vw, 65px);
    line-height: .93;
}

body.blog-page .editorial-hero__lead {
    max-width: 545px;
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.58;
}

body.blog-page .editorial-hero__actions {
    gap: 10px;
    margin-top: 20px;
}

body.blog-page .editorial-button {
    min-height: 48px;
    padding: 11px 18px;
    font-size: 12px;
}

body.blog-page .editorial-hero__facts {
    gap: 7px;
    margin-top: 18px;
}

body.blog-page .editorial-hero__facts li {
    padding: 8px 10px;
    font-size: 11px;
}

body.blog-page .blog-hero__note {
    right: 22px;
    bottom: 22px;
    max-width: 315px;
    padding: 13px 15px;
    border-color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .92);
}

/* Directory header and four concise highlights */
body.blog-page .blog-directory {
    padding: 66px 0 88px;
    background:
        radial-gradient(circle at 92% 7%, rgba(237, 167, 17, .045), transparent 22%),
        var(--library-canvas);
}

body.blog-page .blog-directory__tools {
    margin-bottom: 25px;
}

body.blog-page .blog-directory__tools h2 {
    font-size: clamp(36px, 3.7vw, 52px);
}

body.blog-page .blog-featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

body.blog-page .blog-featured-card {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 11px;
    overflow: hidden;
    border: 1px solid var(--library-line);
    border-radius: 19px;
    background: var(--library-paper);
    box-shadow: 0 12px 30px rgba(32, 28, 23, .06);
}

body.blog-page .blog-featured-card::before,
body.blog-page .blog-featured-card::after {
    display: none;
}

body.blog-page .blog-featured-card__media {
    position: relative;
    display: block;
    height: 118px;
    overflow: hidden;
    border-radius: 13px;
    background: #e8e6e1;
}

body.blog-page .blog-featured-card__media::after {
    position: absolute;
    inset: auto 0 0;
    height: 36%;
    background: linear-gradient(0deg, rgba(26, 23, 19, .16), transparent);
    content: "";
}

body.blog-page .blog-featured-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

body.blog-page .blog-featured-card__content {
    display: flex;
    min-height: 139px;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 13px 5px 4px;
}

body.blog-page .blog-featured-card__category {
    margin-bottom: 7px;
    padding: 5px 8px;
    border-radius: 999px;
}

body.blog-page .blog-featured-card h3 {
    font-size: clamp(17px, 1.25vw, 20px);
    line-height: 1.08;
}

body.blog-page .blog-featured-card__more {
    margin-top: auto;
    padding-top: 11px;
}

body.blog-page .blog-featured-card:hover .blog-featured-card__media img {
    transform: scale(1.035);
}

/* Five premium library volumes */
body.blog-page .blog-category.library-volume,
body.blog-page .blog-category.library-volume:nth-of-type(2n),
body.blog-page .blog-category.library-volume:nth-of-type(3n),
body.blog-page #category-7.library-volume {
    margin-top: 13px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--library-line);
    border-radius: 20px;
    background: var(--library-paper);
    box-shadow: 0 10px 28px rgba(34, 30, 25, .05);
}

.library-volume__trigger {
    display: grid;
    width: 100%;
    grid-template-columns: 44px 54px minmax(0, 1fr) auto 42px;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    border: 0;
    background: #fff;
    color: var(--library-ink);
    cursor: pointer;
    text-align: left;
    transition: background .22s ease, box-shadow .22s ease;
}

.library-volume__trigger:hover {
    background: #faf9f6;
}

.library-volume__number {
    color: #aaa298;
    font-family: "Barlow", sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
}

.library-volume__icon,
.library-volume__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.library-volume__icon {
    width: 50px;
    height: 50px;
    border: 1px solid #e7dfce;
    border-radius: 15px;
    background: #faf5e9;
    color: var(--library-gold-deep);
    font-size: 17px;
}

.library-volume__copy {
    min-width: 0;
}

.library-volume__copy small,
.library-volume__title,
.library-volume__description {
    display: block;
}

.library-volume__copy small {
    margin-bottom: 2px;
    color: var(--library-gold-deep);
    font-family: "Barlow", sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.library-volume__title {
    overflow: hidden;
    color: var(--library-ink);
    font-family: "Barlow", sans-serif;
    font-size: clamp(20px, 1.85vw, 27px);
    font-weight: 800;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-volume__description {
    overflow: hidden;
    margin-top: 4px;
    color: var(--library-copy);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-volume__count {
    padding: 8px 11px;
    border: 1px solid #e5e1da;
    border-radius: 999px;
    background: #f7f7f4;
    color: #6f685e;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.library-volume__chevron {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f2f1ed;
    color: #625c53;
    font-size: 12px;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.library-volume.is-open {
    border-color: rgba(177, 119, 13, .34);
    box-shadow: 0 18px 42px rgba(37, 32, 25, .08);
}

.library-volume.is-open .library-volume__trigger {
    background: linear-gradient(90deg, #fff 0%, #fbfaf6 100%);
    box-shadow: inset 3px 0 0 var(--library-gold);
}

.library-volume.is-open .library-volume__chevron {
    background: #f6e9ca;
    color: var(--library-gold-deep);
    transform: rotate(180deg);
}

.library-volume__panel {
    padding: 0 18px 20px;
    animation: libraryReveal .26s ease both;
}

.library-volume__panel[hidden],
.library-book[hidden],
.blog-featured-card[hidden],
.library-volume[hidden] {
    display: none !important;
}

.library-shelf {
    position: relative;
    overflow-x: auto;
    padding: 26px 24px 39px;
    border: 1px solid #dfdcd4;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .34)),
        #eeeee9;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-color: #b69a68 #e5e3dd;
    scrollbar-width: thin;
}

.library-shelf::before,
.library-shelf::after {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 16px;
    left: 0;
    content: "";
    pointer-events: none;
}

.library-shelf::before {
    height: 11px;
    border-top: 1px solid rgba(255, 255, 255, .65);
    background: linear-gradient(180deg, #7a6e5e 0%, #51483d 100%);
    box-shadow: 0 8px 12px rgba(37, 31, 23, .22);
}

.library-shelf::after {
    bottom: 27px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(224, 170, 68, .85), transparent);
}

.library-shelf::-webkit-scrollbar {
    height: 8px;
}

.library-shelf::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #e5e3dd;
}

.library-shelf::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #aa9166;
}

.library-shelf__books {
    position: relative;
    z-index: 2;
    display: flex;
    width: max-content;
    min-width: 100%;
    align-items: flex-end;
    gap: 13px;
}

.library-book {
    position: relative;
    display: flex;
    width: 172px;
    height: 248px;
    flex: 0 0 172px;
    flex-direction: column;
    overflow: hidden;
    padding: 17px 16px 15px 20px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px 12px 12px 4px;
    background: #37342f;
    box-shadow: -5px 8px 14px rgba(31, 27, 22, .18), inset 4px 0 0 rgba(255, 255, 255, .08);
    color: #fff;
    scroll-snap-align: start;
    transform: perspective(800px) rotateY(-3deg);
    transform-origin: left center;
    transition: transform .24s ease, box-shadow .24s ease;
}

.library-book::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 1px;
    background: rgba(255, 255, 255, .20);
    content: "";
}

.library-book::after {
    position: absolute;
    top: 7px;
    right: 4px;
    bottom: 7px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .72) 0 2px, rgba(232, 226, 214, .72) 2px 3px);
    content: "";
    opacity: .6;
}

.library-book:nth-child(5n + 2) {
    border-color: #d4c4a8;
    background: linear-gradient(145deg, #f2eadc, #e3d7c4);
    box-shadow: -5px 8px 14px rgba(62, 52, 39, .13), inset 4px 0 0 rgba(117, 91, 49, .12);
    color: #302b25;
}

.library-book:nth-child(5n + 3) {
    background: linear-gradient(145deg, #8b7a67, #6c5e50);
}

.library-book:nth-child(5n + 4) {
    border-color: #ddcda8;
    background: linear-gradient(145deg, #fbf8ef, #eee5d2);
    box-shadow: -5px 8px 14px rgba(62, 52, 39, .13), inset 4px 0 0 rgba(172, 119, 26, .16);
    color: #302b25;
}

.library-book:nth-child(5n) {
    background: linear-gradient(145deg, #5c5146, #423b34);
}

.library-book__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    color: #f1b83c;
    font-size: 16px;
}

.library-book:nth-child(5n + 2) .library-book__top,
.library-book:nth-child(5n + 4) .library-book__top {
    color: var(--library-gold-deep);
}

.library-book__chapter {
    font-family: "Barlow", sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
}

.library-book strong {
    display: -webkit-box;
    overflow: hidden;
    font-family: "Barlow", sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.06;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.library-book small {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 11px;
    color: rgba(255, 255, 255, .67);
    font-size: 9px;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.library-book:nth-child(5n + 2) small,
.library-book:nth-child(5n + 4) small {
    color: #746b5f;
}

.library-book__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    color: inherit;
    font-family: "Barlow", sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.library-book:nth-child(5n + 2) .library-book__cta,
.library-book:nth-child(5n + 4) .library-book__cta {
    border-top-color: rgba(83, 68, 47, .16);
}

.library-book:hover,
.library-book:focus-visible {
    z-index: 3;
    color: #fff;
    box-shadow: -7px 15px 24px rgba(31, 27, 22, .25), inset 4px 0 0 rgba(255, 255, 255, .10);
    transform: perspective(800px) rotateY(0) translateY(-8px);
}

.library-book:nth-child(5n + 2):hover,
.library-book:nth-child(5n + 2):focus-visible,
.library-book:nth-child(5n + 4):hover,
.library-book:nth-child(5n + 4):focus-visible {
    color: #302b25;
}

.blog-empty {
    border-color: #ddd8ce;
    background: #fff;
}

@keyframes libraryReveal {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1199px) {
    body.blog-page .blog-hero__shell {
        min-height: 485px;
    }

    body.blog-page .editorial-hero__content {
        width: min(58%, 610px);
        margin: 22px;
        padding: 28px;
    }

    body.blog-page .blog-featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.blog-page .blog-featured-card {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr);
    }

    body.blog-page .blog-featured-card__media {
        height: 100%;
        min-height: 148px;
    }

    body.blog-page .blog-featured-card__content {
        min-height: 148px;
        padding: 10px 12px;
    }
}

@media (max-width: 991px) {
    body.blog-page .editorial-hero {
        padding: 112px 0 48px;
    }

    body.blog-page .blog-hero__shell {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    body.blog-page .blog-hero__media {
        position: relative;
        inset: auto;
        order: -1;
        width: 100%;
        min-height: 330px;
    }

    body.blog-page .blog-hero__media::before {
        background: linear-gradient(0deg, rgba(255, 255, 255, .18), transparent 40%);
    }

    body.blog-page .blog-hero__media img {
        min-height: 330px;
        object-position: 59% center;
    }

    body.blog-page .editorial-hero__content {
        width: 100%;
        margin: 0;
        padding: 32px;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        backdrop-filter: none;
    }

    body.blog-page .blog-hero__note {
        right: 16px;
        bottom: 16px;
        left: auto;
    }

    .library-volume__trigger {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto 38px;
        gap: 11px;
    }
}

@media (max-width: 767px) {
    body.blog-page .editorial-hero {
        padding: 96px 0 34px;
    }

    body.blog-page .blog-hero__shell {
        border-radius: 23px;
    }

    body.blog-page .blog-hero__media,
    body.blog-page .blog-hero__media img {
        min-height: 286px;
    }

    body.blog-page .editorial-hero__content {
        padding: 28px 21px 25px;
    }

    body.blog-page .editorial-hero h1 {
        font-size: clamp(40px, 11.8vw, 54px);
        text-align: left;
    }

    body.blog-page .editorial-hero__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    body.blog-page .editorial-hero__actions .editorial-button {
        width: auto;
        min-width: 0;
        padding-inline: 12px;
    }

    body.blog-page .editorial-hero__facts {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    body.blog-page .editorial-hero__facts::-webkit-scrollbar {
        display: none;
    }

    body.blog-page .editorial-hero__facts li {
        flex: 0 0 auto;
    }

    body.blog-page .blog-hero__note {
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-width: none;
    }

    body.blog-page .blog-directory {
        padding: 52px 0 70px;
    }

    body.blog-page .blog-directory__tools {
        gap: 20px;
    }

    body.blog-page .blog-featured {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    body.blog-page .blog-featured-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        padding: 9px;
    }

    body.blog-page .blog-featured-card__media {
        min-height: 128px;
    }

    body.blog-page .blog-featured-card__content {
        min-height: 128px;
        padding: 5px 9px 3px 12px;
    }

    body.blog-page .blog-featured-card h3 {
        font-size: 17px;
        -webkit-line-clamp: 3;
    }

    .library-volume__trigger {
        grid-template-columns: 42px minmax(0, 1fr) 36px;
        gap: 10px;
        padding: 13px 14px;
    }

    .library-volume__number,
    .library-volume__count {
        display: none;
    }

    .library-volume__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 14px;
    }

    .library-volume__title {
        font-size: 19px;
    }

    .library-volume__description {
        display: -webkit-box;
        overflow: hidden;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
    }

    .library-volume__panel {
        padding: 0 10px 12px;
    }

    .library-shelf {
        margin-right: -1px;
        padding: 20px 15px 35px;
    }

    .library-book {
        width: 148px;
        height: 222px;
        flex-basis: 148px;
        padding: 15px 13px 13px 18px;
    }

    .library-book__top {
        margin-bottom: 15px;
    }

    .library-book strong {
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    body.blog-page .blog-hero__media,
    body.blog-page .blog-hero__media img {
        min-height: 248px;
    }

    body.blog-page .blog-hero__media img {
        object-position: 61% center;
    }

    body.blog-page .blog-hero__note {
        grid-template-columns: 34px 1fr;
        padding: 10px 11px;
    }

    body.blog-page .blog-hero__note-icon {
        width: 34px;
        height: 34px;
    }

    body.blog-page .blog-featured-card {
        grid-template-columns: 102px minmax(0, 1fr);
    }

    body.blog-page .blog-featured-card h3 {
        font-size: 16px;
    }

    .library-volume__copy small {
        font-size: 8px;
    }

    .library-volume__title {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .library-volume__panel {
        animation: none;
    }

    .library-book,
    body.blog-page .blog-featured-card__media img {
        transition: none;
    }

    .library-shelf {
        scroll-behavior: auto;
    }
}
