/* ============================================================
   BOOKZIGN CORE — Public knowledge page styles (PACK_002)
   ============================================================ */

.bz-public {
    margin: 0;
    background: #f8fafc;
    color: #1e293b;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Preview bar (admin only) ---------- */
.bz-preview-bar {
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    background: #0f172a;
    color: #e2e8f0;
    font-size: .85rem;
}

/* ---------- Header ---------- */
.bz-pub-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.bz-pub-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #1e293b;
    text-decoration: none;
}

.bz-pub-brand:hover { color: #4f46e5; }

.bz-pub-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: .95rem;
}

/* ---------- Article ---------- */
.bz-pub-main { flex: 1; padding: 2rem 0 3rem; }

.bz-article { max-width: 780px; }

.bz-article-title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.bz-article-excerpt {
    font-size: 1.12rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.bz-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
    font-size: .85rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.bz-article-figure {
    margin: 0 0 1.75rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 45px -20px rgba(15, 23, 42, .35);
}

.bz-article-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.bz-article-content {
    font-size: 1.03rem;
    line-height: 1.8;
    color: #334155;
}

.bz-article-content h2,
.bz-article-content h3,
.bz-article-content h4 { margin-top: 1.8em; margin-bottom: .6em; font-weight: 700; color: #1e293b; }
.bz-article-content p { margin-bottom: 1.1em; }
.bz-article-content img { max-width: 100%; height: auto; border-radius: .6rem; }
.bz-article-content a { color: #4f46e5; }
.bz-article-content blockquote {
    margin: 1.4em 0;
    padding: .9rem 1.2rem;
    border-left: 4px solid #7c3aed;
    background: #f5f3ff;
    border-radius: 0 .6rem .6rem 0;
    color: #4c1d95;
}
.bz-article-content table { width: 100%; margin-bottom: 1.2em; border-collapse: collapse; }
.bz-article-content td,
.bz-article-content th { border: 1px solid #e2e8f0; padding: .5rem .75rem; }

/* ---------- Bookzign Insight callout ---------- */
.bz-insight {
    margin: 2rem 0;
    border-radius: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
    position: relative;
    overflow: hidden;
}

.bz-insight::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
}

.bz-insight-label {
    font-weight: 700;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    margin-bottom: .6rem;
}

.bz-insight-body { color: #3730a3; line-height: 1.7; }
.bz-insight-body p:last-child { margin-bottom: 0; }

/* ---------- Affiliate card (PACK_003) ---------- */
.bz-aff-card {
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px -22px rgba(79, 70, 229, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}

.bz-aff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px -22px rgba(79, 70, 229, .45);
}

.bz-aff-cover {
    flex: 0 0 220px;
    max-width: 220px;
    background: #f1f5f9;
}

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

.bz-aff-body {
    flex: 1;
    min-width: 240px;
    padding: 1.4rem 1.5rem;
}

.bz-aff-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
}

.bz-aff-tag {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    padding: .25rem .6rem;
    border-radius: 999px;
}

.bz-aff-meta {
    font-size: .7rem;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .18rem .55rem;
    background: #f8fafc;
}

.bz-aff-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: .35rem;
}

.bz-aff-desc {
    color: #475569;
    font-size: .92rem;
    line-height: 1.55;
    margin-bottom: .9rem;
}

.bz-aff-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff !important;
    font-weight: 700;
    font-size: .9rem;
    padding: .6rem 1.15rem;
    border-radius: .6rem;
    text-decoration: none;
    box-shadow: 0 10px 22px -10px rgba(124, 58, 237, .8);
    transition: filter .15s ease;
}

.bz-aff-btn:hover { filter: brightness(1.08); }

.bz-aff-note { color: #94a3b8; }

@media (max-width: 575.98px) {
    .bz-aff-cover { flex: 0 0 100%; max-width: 100%; max-height: 190px; }
}

/* ---------- FAQ ---------- */
.bz-faq { margin-top: 2.5rem; }

.bz-faq .accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: .75rem !important;
    overflow: hidden;
    margin-bottom: .6rem;
}

.bz-faq .accordion-button { font-weight: 600; }
.bz-faq .accordion-button:not(.collapsed) {
    background: #eef2ff;
    color: #3730a3;
    box-shadow: none;
}

/* ---------- Footer ---------- */
.bz-pub-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1.1rem 0;
    color: #64748b;
}

@media (max-width: 575.98px) {
    .bz-pub-main { padding: 1.25rem 0 2rem; }
    .bz-article-meta { gap: .6rem; }
}

/* ------------------------------------------------------------
| PACK_004 — Relationship zones (Recommended / Articles / Resources)
------------------------------------------------------------ */
.bz-rec,
.bz-rel-articles,
.bz-rel-resources { margin-top: 2.5rem; }

/* Compact card grid reused by all three zones */
.bz-rel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* When the grid follows the primary hero card, tighten the rhythm */
.bz-rec .bz-aff-card { margin: 0 0 1rem; }

.bz-rel-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    overflow: hidden;
    box-shadow: 0 12px 26px -20px rgba(79, 70, 229, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}

.bz-rel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px -20px rgba(79, 70, 229, .5);
}

.bz-rel-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.bz-rel-thumb-ic {
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

.bz-rel-thumb-gift {
    color: #0d9488;
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

.bz-rel-body { padding: 1rem 1.1rem 1.15rem; }

.bz-rel-title {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.35;
    margin-bottom: .4rem;
}

.bz-rel-link { color: #0f172a; text-decoration: none; }
.bz-rel-link:hover { color: #4f46e5; }

.bz-rel-desc {
    color: #475569;
    font-size: .86rem;
    line-height: 1.55;
    margin-bottom: .85rem;
}

.bz-rel-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff !important;
    font-weight: 700;
    font-size: .8rem;
    padding: .45rem .9rem;
    border-radius: .55rem;
    text-decoration: none;
    transition: filter .15s ease;
}

.bz-rel-btn:hover { filter: brightness(1.08); }

.bz-rel-btn-alt {
    background: #fff;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe;
    box-shadow: none;
}

.bz-rel-btn-alt:hover { background: #eef2ff; }

@media (max-width: 575.98px) {
    .bz-rel-grid { grid-template-columns: 1fr; }
    .bz-rel-thumb { height: 100px; }
}

/* ------------------------------------------------------------
| PACK_005 — Resource page / success page
------------------------------------------------------------ */
.bz-res-card {
    margin: 1.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px -22px rgba(13, 148, 136, .35);
}

.bz-res-cover {
    flex: 0 0 240px;
    max-width: 240px;
    background: #f1f5f9;
}

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

.bz-res-cover-ic {
    display: grid;
    place-items: center;
    min-height: 200px;
    font-size: 3.4rem;
    color: #0d9488;
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

.bz-res-body {
    flex: 1;
    min-width: 260px;
    padding: 1.6rem 1.7rem;
}

.bz-res-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: .55rem;
}

.bz-res-tag {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    padding: .25rem .6rem;
    border-radius: 999px;
}

.bz-res-meta {
    font-size: .7rem;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .18rem .55rem;
    background: #f8fafc;
}

.bz-res-type {
    font-weight: 800;
    color: #0f766e;
    border-color: #99f6e4;
    background: #f0fdfa;
}

.bz-res-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: .4rem;
}

.bz-res-desc {
    color: #475569;
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: .8rem;
}

.bz-res-stats {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

/* Email gate + CTA inside the card */
.bz-gate { max-width: 460px; }

.bz-gate-btn {
    border: 0;
    border-radius: 0 .6rem .6rem 0 !important;
}

.bz-gate .form-control { border-radius: .6rem 0 0 .6rem; }

.bz-gate .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 .2rem rgba(20, 184, 166, .18);
}

.bz-gate-wide { font-size: 1rem; }

/* Success page */
.bz-success {
    margin-top: 1.5rem;
    text-align: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2.4rem 1.6rem 2.2rem;
    box-shadow: 0 18px 40px -24px rgba(13, 148, 136, .4);
}

.bz-success-ic {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 2rem;
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    margin-bottom: 1rem;
    box-shadow: 0 12px 24px -10px rgba(13, 148, 136, .7);
}

.bz-dl-btn {
    font-size: 1.05rem;
    padding: .8rem 1.6rem;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    box-shadow: 0 10px 22px -10px rgba(13, 148, 136, .8);
}

@media (max-width: 575.98px) {
    .bz-res-cover { flex: 0 0 100%; max-width: 100%; max-height: 190px; }
    .bz-gate .input-group { flex-wrap: nowrap; }
    .bz-gate-wide { width: 100%; justify-content: center; }
}

/* ------------------------------------------------------------
| PACK_007 — Homepage & Content Hub
------------------------------------------------------------ */
.bz-hub-search { max-width: 260px; }
.bz-hub-search-input { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
.bz-hub-search .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* Hero */
.bz-hero-pub {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%);
    border-radius: 1.25rem;
    color: #fff;
    padding: 3rem 2.25rem;
    margin-top: .5rem;
    position: relative;
    overflow: hidden;
}
.bz-hero-pub::after {
    content: "";
    position: absolute;
    right: -70px; top: -70px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.bz-hero-pub h1 {
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.bz-hero-pub p { color: #e0e7ff; font-size: 1.05rem; max-width: 620px; }
.bz-hero-btn {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #4338ca !important;
    font-weight: 700;
    padding: .7rem 1.4rem;
    border-radius: .7rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.bz-hero-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .45); }
.bz-hero-img {
    border-radius: 1rem;
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .5);
    max-height: 240px;
    width: 100%;
    object-fit: cover;
}

/* Sections */
.bz-hub-sec { margin-top: 2.75rem; }
.bz-hub-sec-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.015em; }

/* Badges */
.bz-hub-badge {
    display: inline-flex;
    align-items: center;
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .12rem .55rem;
}
.bz-hub-badge-feat { color: #a16207; background: #fefce8; border-color: #fde68a; }
.bz-hub-badge-new  { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.bz-hub-badge-gift { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; }

/* Category tiles */
.bz-hub-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .9rem;
}
.bz-hub-cat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    padding: 1rem 1.1rem;
    color: #0f172a;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.bz-hub-cat:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 14px 28px -18px rgba(79, 70, 229, .5);
    color: #0f172a;
}
.bz-hub-cat-ic {
    width: 2.1rem; height: 2.1rem;
    display: grid; place-items: center;
    border-radius: .6rem;
    color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

/* CTA band */
.bz-cta-band {
    background: linear-gradient(135deg, #0f172a, #312e81);
    border-radius: 1.25rem;
    color: #fff;
    padding: 2.5rem 2.25rem;
}
.bz-cta-band h2 { font-weight: 800; letter-spacing: -.02em; }
.bz-cta-band p { color: #c7d2fe; max-width: 560px; }
.bz-cta-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff !important;
    font-weight: 700;
    padding: .7rem 1.4rem;
    border-radius: .7rem;
    text-decoration: none;
    transition: filter .15s ease;
    white-space: nowrap;
}
.bz-cta-btn:hover { filter: brightness(1.1); }

/* Search */
.bz-search-form .form-control { border-radius: .7rem 0 0 .7rem; padding: .8rem 1.1rem; }
.bz-search-form .btn { border-radius: 0 .7rem .7rem 0; padding: .8rem 1.3rem; font-weight: 700; }

@media (max-width: 575.98px) {
    .bz-hero-pub { padding: 2rem 1.4rem; }
    .bz-cta-band { padding: 1.8rem 1.4rem; }
    .bz-hub-search { max-width: 170px; }
}
