/* ==========================================================================
   BadgeBox Magazine — listing + article styles (uses tokens from modernize.css)
   ========================================================================== */

.bb-mag-body {
    --m-blue: var(--bb-blue, #0098ea);
    --m-blue-dark: var(--bb-blue-hover, #008bd7);
    --m-ink: var(--dark-blue, #0d2a5a);
    --m-grey: var(--grey, #5b6b86);
    --m-line: #e6eef6;
    background: #fff;
    font-family: "PlusJakartaSans-Regular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--m-ink);
}

/* Clear separation before the (blue) footer on every magazine page */
.bb-mag-body #footer { margin-top: 56px; }

/* Nav transition + logo positioning (colours/logo handled site-wide in
   modernize.css via the shared .bb-nav-solid body class). */
#nav-bar { transition: background-color .3s ease; }
#nav-logo { background-repeat: no-repeat; background-position: left center; }

/* Hero ------------------------------------------------------------------- */
.bb-mag-hero {
    padding: 148px 0 60px;
    background:
        radial-gradient(900px 460px at 82% -10%, #eaf7ff 0%, rgba(234,247,255,0) 60%),
        linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
    text-align: center;
}
.bb-mag-kicker {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0,152,234,.10);
    border: 1px solid rgba(0,152,234,.22);
    color: var(--m-blue-dark);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.bb-mag-hero h1 {
    margin: 18px auto 0;
    max-width: 760px;
    font-family: "PlusJakartaSans-Bold", sans-serif;
    font-weight: 700;
    color: var(--m-ink);
    font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.8rem);
    line-height: 1.12;
    letter-spacing: -.02em;
    text-transform: none;
}
.bb-mag-hero p {
    margin: 16px auto 0;
    max-width: 620px;
    color: var(--m-grey);
    font-size: 1.08rem;
    line-height: 1.55;
}

/* Grid + cards ----------------------------------------------------------- */
.bb-mag-main { padding: 64px 0 100px; }
.bb-mag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.bb-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -22px rgba(13,42,90,.5);
    transition: transform .2s var(--bb-ease, ease), box-shadow .2s var(--bb-ease, ease);
}
.bb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px -26px rgba(13,42,90,.55);
}
.bb-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #eaf7ff, #d8ecfb);
    overflow: hidden;
}
.bb-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bb-card__emoji { font-size: 3.2rem; }
.bb-card__cat {
    position: absolute;
    top: 12px; left: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: var(--m-blue-dark);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px -6px rgba(13,42,90,.4);
}
.bb-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bb-card__title { margin: 0; font-size: 1.2rem; line-height: 1.32; font-weight: 700; text-transform: none; }
.bb-card__title a { color: var(--m-ink); text-decoration: none; }
.bb-card__title a:hover { color: var(--m-blue); }
.bb-card__excerpt { margin: 0; color: var(--m-grey); font-size: .95rem; line-height: 1.55; }
.bb-card__meta { margin-top: auto; padding-top: 12px; color: #93a1b8; font-size: .82rem; display: flex; gap: 8px; align-items: center; }

/* Pager ------------------------------------------------------------------ */
.bb-mag-pager { margin-top: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.bb-pager__btn,
.bb-pager__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--m-line);
    background: #fff;
    color: var(--m-ink);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
.bb-pager__btn:hover,
.bb-pager__num:hover { border-color: var(--m-blue); color: var(--m-blue); transform: translateY(-1px); }
.bb-pager__num.is-current { background: var(--m-blue); border-color: var(--m-blue); color: #fff; }
.bb-mag-empty { text-align: center; color: var(--m-grey); padding: 60px 0; }

/* Article ---------------------------------------------------------------- */
.bb-article__head { padding: 140px 0 32px; background: linear-gradient(180deg,#f7fcff,#fff); }
.bb-article__crumbs { font-size: .85rem; color: var(--m-grey); margin-bottom: 14px; }
.bb-article__crumbs a { color: var(--m-blue-dark); text-decoration: none; }
.bb-article__title {
    margin: 0;
    max-width: 820px;
    font-family: "PlusJakartaSans-Bold", sans-serif;
    font-weight: 700;
    color: var(--m-ink);
    font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem);
    line-height: 1.14;
    letter-spacing: -.02em;
    text-transform: none;
}
.bb-article__meta { margin-top: 14px; color: #93a1b8; font-size: .9rem; display: flex; gap: 8px; flex-wrap: wrap; }
.bb-article__cover { margin: 0 auto; max-width: 1000px; padding: 0 16px; }
.bb-article__cover img { width: 100%; height: auto; max-height: 460px; object-fit: cover; border-radius: 18px; display: block; }
.bb-article__cover figcaption { margin-top: 10px; font-size: .78rem; color: #9aa7bb; text-align: right; }
.bb-article__cover figcaption a { color: #9aa7bb; }

/* the shared .container is floated globally — keep magazine blocks in normal flow */
.bb-mag-body .container { float: none !important; }
.bb-article > * { float: none !important; }
.bb-article__head, .bb-article__cover, .bb-article__layout, .bb-article__related { clear: both; }

.bb-article__layout { padding-top: 48px; padding-bottom: 64px; }
.bb-article__body { max-width: 960px; width: 100%; margin: 0 auto; font-size: 1.075rem; line-height: 1.72; color: #2b3a52; }
.bb-article__body h2 { margin: 1.9em 0 .5em; font-size: 1.6rem; font-weight: 700; color: var(--m-ink); letter-spacing: -.01em; text-transform: none; }
.bb-article__body h3 { margin: 1.5em 0 .4em; font-size: 1.22rem; font-weight: 700; color: var(--m-ink); text-transform: none; }
.bb-article__body p { margin: 0 0 1.1em; }
.bb-article__body ul, .bb-article__body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.bb-article__body li { margin: .35em 0; }
.bb-article__body a { color: var(--m-blue-dark); text-decoration: underline; text-underline-offset: 2px; }
.bb-article__body blockquote { margin: 1.4em 0; padding: .6em 1.2em; border-left: 4px solid var(--m-blue); background: #f4fbff; border-radius: 0 10px 10px 0; color: var(--m-ink); }
.bb-article__body code { background: #eef4fb; padding: .12em .4em; border-radius: 5px; font-size: .92em; }

.bb-article__tags { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bb-article__tags li { background: #f0f5fa; color: var(--m-grey); padding: 5px 11px; border-radius: 8px; font-size: .82rem; }

.bb-article__cta {
    margin: 40px 0 0;
    padding: 30px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--m-blue), var(--m-blue-dark));
    color: #fff;
    text-align: center;
}
.bb-article__cta h2 { margin: 0 0 8px; color: #fff; font-size: 1.4rem; }
.bb-article__cta p { margin: 0 0 18px; color: rgba(255,255,255,.92); }
.bb-article__cta-btn {
    display: inline-block;
    background: #fff;
    color: var(--m-blue-dark);
    font-weight: 700;
    padding: 13px 28px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.bb-article__cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(0,0,0,.4); color: var(--m-blue-dark); }

.bb-article__related { padding: 56px 0 80px; background: #f7fafd; margin-top: 56px; }
.bb-article__related h2 { text-align: center; margin: 0 0 30px; font-size: 1.6rem; color: var(--m-ink); }
.bb-mag-404 { text-align: center; padding: 140px 0 100px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 991px) { .bb-mag-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
    .bb-mag-grid { grid-template-columns: 1fr; }
    .bb-mag-hero { padding-top: 104px; }
    .bb-article__head { padding-top: 96px; }
}
