/* ==========================================================================
   VOLABLOG — design system & UI layer (sits on top of Bootstrap 5).
   Editorial, modern, Nigeria-first. Responsive + animated.
   ========================================================================== */

:root {
    /* Brand palette */
    --vb-ink: #0b1220;
    --vb-ink-soft: #1e293b;
    --vb-muted: #64748b;
    --vb-line: #e7ebf0;
    --vb-bg: #f7f9fc;
    --vb-surface: #ffffff;

    --vb-green: #0f9d58;
    --vb-green-600: #0c854a;
    --vb-green-700: #0a6e3d;
    --vb-title: #b3261e;        /* editorial red — all post headlines */
    --vb-title-hover: #861812;
    --vb-accent: #f4b740;       /* premium / featured amber */
    --vb-accent-600: #e0a528;
    --vb-violet: #7c3aed;
    --vb-danger: #ef4444;

    --vb-grad: linear-gradient(135deg, #0f9d58 0%, #0a6e3d 55%, #0b3b27 100%);
    --vb-grad-soft: linear-gradient(135deg, rgba(181,23,158,.10), rgba(124,58,237,.10));
    --vb-grad-accent: linear-gradient(135deg, #f7c948, #f0932b);
    --vb-grad-title: linear-gradient(135deg, #d92d20 0%, #861812 100%);

    --vb-radius: 16px;
    --vb-radius-sm: 11px;
    --vb-shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
    --vb-shadow: 0 10px 30px -12px rgba(16,24,40,.18);
    --vb-shadow-lg: 0 24px 60px -20px rgba(16,24,40,.30);

    /* Bootstrap overrides */
    --bs-primary: var(--vb-green);
    --bs-primary-rgb: 15, 157, 88;
    --bs-link-color: var(--vb-green-600);
    --bs-link-hover-color: var(--vb-green-700);
    --bs-body-color: #15233b;
    --bs-body-bg: var(--vb-bg);
    --bs-border-color: var(--vb-line);
    --bs-body-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--bs-body-font-family);
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(15,157,88,.07), transparent 60%),
        radial-gradient(1000px 480px at -10% 0%, rgba(109,93,252,.06), transparent 55%),
        var(--vb-bg);
    background-attachment: fixed;
    color: var(--bs-body-color);
}

h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6, .navbar-brand {
    font-family: 'Sora', 'Inter', sans-serif;
    letter-spacing: -.02em;
}

a { text-decoration: none; }

/* ----- Selection & scrollbar ----- */
::selection { background: rgba(15,157,88,.22); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #c8d2de; border-radius: 99px; border: 3px solid var(--vb-bg); }
::-webkit-scrollbar-thumb:hover { background: #aab8c8; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.vb-nav {
    background: rgba(255,255,255,.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .35s ease, background .35s ease, border-color .35s ease;
}
.vb-nav.is-stuck {
    box-shadow: var(--vb-shadow);
    border-bottom-color: var(--vb-line);
    background: rgba(255,255,255,.9);
}
.vb-brand {
    font-weight: 800;
    font-size: 1.4rem;
    background: var(--vb-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.vb-brand .vb-dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--vb-grad); box-shadow: 0 0 0 4px rgba(15,157,88,.16);
    -webkit-text-fill-color: initial;
    animation: vb-pulse 2.4s infinite;
}
@keyframes vb-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(15,157,88,.16); }
    50% { transform: scale(1.18); box-shadow: 0 0 0 7px rgba(15,157,88,.06); }
}
.vb-nav .nav-link {
    font-weight: 600; color: var(--vb-ink-soft);
    border-radius: 10px; padding: .45rem .8rem;
    position: relative; transition: color .2s ease, background .2s ease;
}
.vb-nav .nav-link:hover { color: var(--vb-green-700); background: rgba(15,157,88,.08); }

/* Topics dropdown — show every category in a tidy 2-column scrollable menu */
.dropdown-menu.vb-topics.show { display: grid; }
.vb-topics { grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 0 .35rem; min-width: 340px; max-height: 72vh; overflow-y: auto; }
.vb-topics .dropdown-item { transition: background .15s ease, color .15s ease; }
.vb-topics .dropdown-item:hover { background: rgba(179,38,30,.08); color: var(--vb-title); }
@media (max-width: 575.98px) { .vb-topics { grid-template-columns: 1fr; min-width: 220px; max-height: 60vh; } }
.vb-nav .nav-link.active { color: var(--vb-green-700); }
.vb-nav .nav-link.active::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .15rem;
    height: 2px; border-radius: 2px; background: var(--vb-grad);
}
.vb-bell { position: relative; }
.vb-bell .badge { font-size: .6rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn { font-weight: 600; border-radius: 11px; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    --bs-btn-bg: var(--vb-green); --bs-btn-border-color: var(--vb-green);
    --bs-btn-hover-bg: var(--vb-green-600); --bs-btn-hover-border-color: var(--vb-green-600);
    --bs-btn-active-bg: var(--vb-green-700); --bs-btn-active-border-color: var(--vb-green-700);
    box-shadow: 0 8px 18px -8px rgba(15,157,88,.6);
}
.btn-primary:hover { box-shadow: 0 12px 24px -8px rgba(15,157,88,.7); }
.btn-gradient {
    background: var(--vb-grad); color: #fff; border: 0;
    box-shadow: 0 10px 24px -10px rgba(10,110,61,.75);
}
.btn-gradient:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 16px 30px -10px rgba(10,110,61,.8); }
.btn-outline-primary {
    --bs-btn-color: var(--vb-green-700); --bs-btn-border-color: var(--vb-green);
    --bs-btn-hover-bg: var(--vb-green); --bs-btn-hover-border-color: var(--vb-green);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card { border: 1px solid var(--vb-line); border-radius: var(--vb-radius); background: var(--vb-surface); }
.vb-card {
    overflow: hidden; height: 100%;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
    box-shadow: var(--vb-shadow-sm);
}
.vb-card:hover { transform: translateY(-8px); box-shadow: var(--vb-shadow-lg); border-color: rgba(179,38,30,.4); }
.vb-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--vb-grad-soft); }
/* Show the whole image (any aspect ratio, never cropped) over a blurred,
   zoomed copy of itself so square/portrait uploads fill the frame cleanly. */
.vb-card__media-fill { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(18px) saturate(1.15); transform: scale(1.15); z-index: 0; }
.vb-card__media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.vb-card:hover .vb-card__media img { transform: scale(1.06); }
.vb-card__title a { color: var(--vb-title); font-weight: 700; background-image: linear-gradient(var(--vb-title-hover), var(--vb-title-hover)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease, color .2s ease; }
.vb-card:hover .vb-card__title a { color: var(--vb-title-hover); background-size: 100% 2px; }
/* Grid (non-lead) cards: smaller title + tighter body. The lead card overrides
   these with its own larger sizing further down. */
.vb-card__title.h5 { font-size: 1.02rem; line-height: 1.3; }
.vb-card .card-body { padding: .9rem 1.1rem; }

/* Lead variant — same card structure, sized up for the front-page hero slot */
/* Hero shows the whole image (blurred-fill, like the grid cards) but in a
   taller, more square-friendly frame so the image reads large, not cropped. */
.vb-card--lead .vb-card__media { aspect-ratio: 4 / 3; }
.vb-card--lead .card-body { padding: 1.4rem 1.6rem; }
.vb-card--lead .vb-card__title { font-size: clamp(1.15rem, 2vw, 1.65rem); line-height: 1.15; }
.vb-card--lead .vb-card__title.h5 { font-size: clamp(1.15rem, 2vw, 1.65rem); }
.vb-card--lead p.vb-meta { font-size: .98rem; }

/* On desktop/laptop, give the hero image a tall, prominent slice of the viewport
   so the whole image (blurred-fill) reads large, while still leaving room for the
   stories below to peek through. */
@media (min-width: 992px) {
    .vb-card--lead .vb-card__media { aspect-ratio: auto; height: clamp(300px, 42vh, 500px); }
}

.vb-meta { font-size: .8rem; color: var(--vb-muted); }

/* Views + read-more (post card footer) */
.vb-views { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--vb-muted); }
.vb-views svg { color: var(--vb-green-600); }
/* Compact engagement counts shown on post cards (views/likes/comments/shares):
   a single plain row of small icon + number, never button-like or wrapping.
   Note: distinct from the admin `.vb-stat(s)` metric cards below. */
.vb-pstats { display: inline-flex; align-items: center; gap: .7rem; flex-wrap: nowrap; }
.vb-pstat { display: inline-flex; align-items: center; gap: .22rem; font-size: .74rem; font-weight: 600; color: var(--vb-muted); white-space: nowrap; }
.vb-pstat svg { width: 13px; height: 13px; opacity: .7; }
.vb-readmore { display: inline-flex; align-items: center; gap: .25rem; font-size: .82rem; font-weight: 700; color: var(--vb-title); transition: gap .2s ease, color .2s ease; }
.vb-readmore:hover { color: var(--vb-title-hover); gap: .5rem; }
.vb-readmore--sm { font-size: .72rem; margin-top: .3rem; }
.vb-headline:hover .vb-readmore--sm, .vb-ranked:hover .vb-readmore--sm { gap: .5rem; }

/* Search bar */
.vb-searchbar { position: relative; display: flex; align-items: center; gap: .5rem; }
.vb-searchbar__icon { position: absolute; left: .8rem; color: var(--vb-muted); pointer-events: none; }
.vb-searchbar__input {
    border: 1px solid var(--vb-line); background: #fff; border-radius: 999px;
    padding: .5rem .9rem .5rem 2.3rem; font-size: .9rem; width: 100%; min-width: 200px;
    transition: border-color .2s ease, box-shadow .2s ease, width .25s ease;
}
.vb-searchbar__input:focus { outline: 0; border-color: var(--vb-green); box-shadow: 0 0 0 .2rem rgba(15,157,88,.15); }
@media (min-width: 992px) { .vb-searchbar__input { width: 210px; } .vb-searchbar__input:focus { width: 260px; } }

.vb-searchbar--lg .vb-searchbar__input { padding: .8rem 1rem .8rem 2.8rem; font-size: 1.05rem; border-radius: 14px; min-width: 0; }
.vb-searchbar--lg .vb-searchbar__icon { left: 1rem; }
.vb-searchbar--lg { gap: .6rem; }
.vb-searchbar--lg .btn { border-radius: 14px; padding-left: 1.4rem; padding-right: 1.4rem; }

.vb-searchhero { background: var(--vb-grad-soft); border: 1px solid var(--vb-line); border-radius: var(--vb-radius); padding: 1.75rem; }
.vb-card .border-top { border-color: var(--vb-line) !important; padding-top: .7rem; }
.vb-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--vb-shadow-sm); }

/* Chips / badges */
.vb-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    padding: .3rem .6rem; border-radius: 999px;
    background: rgba(15,157,88,.1); color: var(--vb-green-700);
}
.vb-chip--accent { background: rgba(244,183,64,.18); color: #9a6b00; }
.vb-chip--violet { background: rgba(109,93,252,.14); color: #4a3ad6; }
.vb-chip--dark { background: rgba(15,18,32,.06); color: var(--vb-ink-soft); }
.vb-badge-float { position: absolute; top: .7rem; left: .7rem; z-index: 2; }
.vb-badge-premium {
    background: var(--vb-grad-accent); color: #3a2a00; box-shadow: var(--vb-shadow);
}

/* ==========================================================================
   Editorial / magazine layout
   ========================================================================== */
/* Side rail panel (Top stories, Most read) */
.vb-rail { background: #fff; border: 1px solid var(--vb-line); border-radius: var(--vb-radius); padding: 1.1rem 1.25rem; box-shadow: var(--vb-shadow-sm); display: flex; flex-direction: column; }
.vb-rail__title { font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .35rem; padding-bottom: .65rem; border-bottom: 2px solid var(--vb-title); display: inline-block; flex: 0 0 auto; }
/* Scrollable story list — fills the rail height, scrolls when stories overflow */
.vb-rail__scroll { flex: 1 1 auto; min-height: 0; max-height: 540px; overflow-y: auto; padding-right: .5rem; margin-right: -.5rem; scrollbar-width: thin; scrollbar-color: var(--vb-line) transparent; }
.vb-rail__scroll::-webkit-scrollbar { width: 6px; }
.vb-rail__scroll::-webkit-scrollbar-track { background: transparent; }
.vb-rail__scroll::-webkit-scrollbar-thumb { background: var(--vb-line); border-radius: 3px; }
.vb-rail__scroll::-webkit-scrollbar-thumb:hover { background: var(--vb-muted); }

/* Compact headline (hero rail) */
.vb-headline { display: flex; gap: .8rem; align-items: center; padding: .85rem .6rem; margin: 0 -.6rem; border-bottom: 1px solid var(--vb-line); border-radius: 10px; position: relative; transition: background-color .25s ease, transform .25s ease; }
.vb-headline::before { content: ""; position: absolute; left: 0; top: .55rem; bottom: .55rem; width: 3px; border-radius: 3px; background: var(--vb-grad-title); transform: scaleY(0); transition: transform .25s ease; }
.vb-headline:hover { background: rgba(179,38,30,.06); transform: translateX(4px); }
.vb-headline:hover::before { transform: scaleY(1); }
.vb-headline:last-child { border-bottom: 0; padding-bottom: 0; }
.vb-headline:first-of-type { padding-top: .5rem; }
.vb-headline__media { flex-shrink: 0; width: 84px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--vb-grad-soft); }
.vb-headline__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.vb-headline:hover .vb-headline__media img { transform: scale(1.08); }
.vb-headline__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.vb-headline__cat { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--vb-green-700); }
.vb-headline__title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--vb-title); transition: color .2s ease; }
.vb-headline:hover .vb-headline__title { color: var(--vb-title-hover); }
.vb-headline__excerpt { font-size: .8rem; line-height: 1.4; color: var(--vb-ink); margin-top: .1rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Horizontal story row (Latest column) */
.vb-stories { display: flex; flex-direction: column; }
.vb-storyrow { display: flex; gap: 1.1rem; padding: 1.25rem .9rem; margin: 0 -.9rem; border-bottom: 1px solid var(--vb-line); border-radius: var(--vb-radius); transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease, border-color .3s ease; }
.vb-storyrow:hover { background: var(--vb-surface); box-shadow: var(--vb-shadow); transform: translateY(-3px); border-bottom-color: transparent; }
.vb-stories > div:first-child .vb-storyrow { padding-top: .4rem; }
.vb-storyrow__media { position: relative; flex-shrink: 0; width: 220px; aspect-ratio: 16/11; border-radius: var(--vb-radius-sm); overflow: hidden; background: var(--vb-grad-soft); }
.vb-storyrow__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.vb-storyrow:hover .vb-storyrow__media img { transform: scale(1.08); }
.vb-storyrow__body { min-width: 0; display: flex; flex-direction: column; }
.vb-storyrow__title { font-family: 'Sora', sans-serif; font-size: 1.3rem; font-weight: 700; line-height: 1.2; margin: 0 0 .4rem; }
.vb-storyrow__title a { color: var(--vb-title); transition: color .2s ease; }
.vb-storyrow__title a:hover { color: var(--vb-title-hover); }
@media (max-width: 575.98px) {
    .vb-storyrow { flex-direction: column; gap: .7rem; }
    .vb-storyrow__media { width: 100%; aspect-ratio: 16/9; }
    .vb-storyrow__title { font-size: 1.12rem; }
}

/* Ranked "most read" */
.vb-ranked { display: flex; gap: .8rem; align-items: center; padding: .7rem .6rem; margin: 0 -.6rem; border-bottom: 1px solid var(--vb-line); border-radius: 10px; position: relative; transition: background-color .25s ease, transform .25s ease; }
.vb-ranked:last-child { border-bottom: 0; padding-bottom: .7rem; }
.vb-ranked::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px; background: var(--vb-grad-title); transform: scaleY(0); transition: transform .25s ease; }
.vb-ranked:hover { background: rgba(179,38,30,.06); transform: translateX(4px); }
.vb-ranked:hover::before { transform: scaleY(1); }
.vb-ranked__num { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--vb-title); opacity: .35; width: 1.4em; text-align: center; flex-shrink: 0; transition: opacity .25s ease; }
.vb-ranked:hover .vb-ranked__num { opacity: .85; }
.vb-ranked__media { flex-shrink: 0; width: 54px; height: 54px; border-radius: 9px; overflow: hidden; background: var(--vb-grad-soft); }
.vb-ranked__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.vb-ranked:hover .vb-ranked__media img { transform: scale(1.07); }
.vb-ranked__body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.vb-ranked__title { font-weight: 700; font-size: .92rem; line-height: 1.25; color: var(--vb-title); transition: color .2s ease; }
.vb-ranked:hover .vb-ranked__title { color: var(--vb-title-hover); }
.vb-ranked__excerpt { font-size: .8rem; line-height: 1.4; color: var(--vb-ink); margin-top: .1rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Subscribe / CTA card */
.vb-cta { background: var(--vb-grad); color: #fff; border-radius: var(--vb-radius); padding: 1.4rem 1.25rem; position: relative; overflow: hidden; box-shadow: var(--vb-shadow); }
.vb-cta::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); }
.vb-cta__badge { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: .6rem; }

/* ==========================================================================
   Category pills
   ========================================================================== */
.vb-pills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.vb-pills::-webkit-scrollbar { display: none; }
.vb-pill {
    white-space: nowrap; font-weight: 600; font-size: .88rem;
    padding: .45rem .95rem; border-radius: 999px;
    background: #fff; border: 1px solid var(--vb-line); color: var(--vb-ink-soft);
    transition: all .2s ease;
}
.vb-pill:hover { border-color: var(--vb-green); color: var(--vb-green-700); transform: translateY(-2px); }
.vb-pill.active { background: var(--vb-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(15,157,88,.6); }

/* ==========================================================================
   Breaking-news ticker
   ========================================================================== */
.vb-ticker {
    display: flex; align-items: stretch; gap: 0; overflow: hidden;
    background: #fff; border: 1px solid var(--vb-line); border-radius: 12px;
    box-shadow: var(--vb-shadow-sm);
}
.vb-ticker__label {
    display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
    background: var(--vb-title); color: #fff; font-weight: 800; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .06em; padding: .65rem 1rem;
    clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    padding-right: 1.5rem;
}
.vb-ticker__pulse {
    width: 9px; height: 9px; border-radius: 50%; background: #fff;
    box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: vb-blink 1.4s infinite;
}
@keyframes vb-blink {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); opacity: 1; }
    70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); opacity: .6; }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); opacity: 1; }
}
.vb-ticker__viewport { overflow: hidden; flex: 1; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.vb-ticker__track { display: inline-flex; align-items: center; white-space: nowrap; padding-left: 1rem; animation: vb-marquee 45s linear infinite; will-change: transform; }
.vb-ticker:hover .vb-ticker__track { animation-play-state: paused; }
@keyframes vb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.vb-ticker__item { display: inline-flex; align-items: center; gap: .5rem; color: var(--vb-ink); font-weight: 600; font-size: .9rem; padding: .65rem .25rem; }
.vb-ticker__item:hover { color: var(--vb-title); }
.vb-ticker__cat { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--vb-green-700); background: rgba(15,157,88,.1); padding: .12rem .45rem; border-radius: 999px; }
.vb-ticker__sep { color: var(--vb-line); padding: 0 .9rem; }
.vb-chip--breaking { background: var(--vb-title); color: #fff; }
@media (prefers-reduced-motion: reduce) { .vb-ticker__track { animation: none; } .vb-ticker__viewport { overflow-x: auto; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.vb-hero { position: relative; border-radius: 26px; overflow: hidden; color: #fff; box-shadow: var(--vb-shadow-lg); }
.vb-hero__bg { position: absolute; inset: 0; }
.vb-hero__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 8s ease; }
.vb-hero:hover .vb-hero__bg img { transform: scale(1.12); }
.vb-hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,15,26,.15) 0%, rgba(8,15,26,.55) 45%, rgba(8,15,26,.92) 100%); }
.vb-hero__body { position: relative; padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(340px, 46vw, 520px); }
.vb-hero__title { font-size: clamp(1.6rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.07; max-width: 18ch; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.vb-hero__excerpt { max-width: 56ch; color: rgba(255,255,255,.86); }

/* Headline-led front-page lead — bold headline + standfirst, supporting image */
.vb-lead { background: var(--vb-surface); border: 1px solid var(--vb-line); border-radius: var(--vb-radius); padding: clamp(1.1rem, 2.6vw, 1.9rem); box-shadow: var(--vb-shadow-sm); }
.vb-lead__media { display: block; border-radius: var(--vb-radius-sm); overflow: hidden; aspect-ratio: 16 / 11; background: var(--vb-grad-soft); }
.vb-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.vb-lead:hover .vb-lead__media img { transform: scale(1.05); }
.vb-lead__title { font-family: 'Sora', sans-serif; font-weight: 800; letter-spacing: -.02em; line-height: 1.06; font-size: clamp(1.7rem, 3vw, 2.6rem); margin: .1rem 0 .7rem; }
.vb-lead__title a { color: var(--vb-ink); background-image: linear-gradient(var(--vb-title), var(--vb-title)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease, color .2s ease; }
.vb-lead:hover .vb-lead__title a, .vb-lead__title a:hover { color: var(--vb-title); background-size: 100% 2px; }
.vb-lead__standfirst { color: var(--vb-ink-soft); font-size: clamp(1rem, 1.4vw, 1.14rem); line-height: 1.55; max-width: 62ch; margin-bottom: .9rem; }
.vb-lead__byline .vb-avatar { width: 30px; height: 30px; }

.vb-section-title { font-weight: 800; font-size: 1.5rem; display: flex; align-items: center; gap: .6rem; }
.vb-section-title::before { content: ""; width: 6px; height: 1.4rem; border-radius: 4px; background: var(--vb-grad); display: inline-block; }

/* ==========================================================================
   Article (post detail)
   ========================================================================== */
.vb-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1080; background: var(--vb-grad-accent); box-shadow: 0 0 12px rgba(244,183,64,.7); transition: width .1s linear; }
.vb-article { max-width: 760px; margin: 0 auto; }
.vb-article__cover { width: 100%; border-radius: var(--vb-radius); box-shadow: var(--vb-shadow); margin: 1.25rem 0; }

/* Article media slider — lead image as a slider, gallery thumbnails beneath */
.vb-slider { margin: 1.25rem 0; }
.vb-slider__stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--vb-radius); overflow: hidden; background: #0b1220; box-shadow: var(--vb-shadow); }
.vb-slider__slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.vb-slider__slide.is-active { opacity: 1; pointer-events: auto; }
/* Show the whole image/video on the dark stage (letterboxed) so any aspect
   ratio — square, portrait or landscape — is fully visible and never cropped. */
img.vb-slider__img { object-fit: contain; }
.vb-slider__media { width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; display: block; }
.vb-slider__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.vb-slider__nav:hover { background: rgba(0,0,0,.72); }
.vb-slider__nav--prev { left: .6rem; }
.vb-slider__nav--next { right: .6rem; }
.vb-slider__count { position: absolute; bottom: .6rem; right: .7rem; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; }
.vb-slider__thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; padding-bottom: .25rem; }
.vb-slider__thumb { position: relative; flex: 0 0 auto; width: 76px; height: 56px; border: 2px solid transparent; border-radius: .55rem; overflow: hidden; padding: 0; cursor: pointer; background: none; opacity: .55; transition: opacity .2s ease, border-color .2s ease; }
.vb-slider__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vb-slider__thumb:hover { opacity: 1; }
.vb-slider__thumb.is-active { opacity: 1; border-color: var(--vb-title); }
.vb-slider__playbadge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; background: rgba(0,0,0,.3); text-shadow: 0 1px 3px rgba(0,0,0,.7); pointer-events: none; }

.vb-prose { font-size: 1.12rem; line-height: 1.85; color: #24344d; }
.vb-prose p { margin-bottom: 1.25rem; }
.vb-prose h2, .vb-prose h3 { margin-top: 2rem; }
.vb-engagement { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; border-top: 1px solid var(--vb-line); border-bottom: 1px solid var(--vb-line); padding: .9rem 0; margin: 1.6rem 0; }
.vb-comment { border-radius: var(--vb-radius-sm); border: 1px solid var(--vb-line); background: #fff; padding: 1rem 1.1rem; margin-bottom: .8rem; transition: box-shadow .25s ease; }
.vb-comment:hover { box-shadow: var(--vb-shadow-sm); }
.vb-reply { margin-top: .7rem; margin-left: 1.1rem; padding-left: .9rem; border-left: 2px solid var(--vb-line); }

.vb-paywall { border: 1px solid rgba(244,183,64,.5); background: linear-gradient(180deg, #fffdf6, #fff8e8); border-radius: var(--vb-radius); }

/* ==========================================================================
   Footer
   ========================================================================== */
.vb-footer { background: var(--vb-ink); color: #b9c5d6; margin-top: 4rem; }
.vb-footer a { color: #cdd8e6; transition: color .2s ease; }
.vb-footer a:hover { color: #fff; }
.vb-footer h6 { color: #fff; font-weight: 700; letter-spacing: .02em; }
.vb-footer .vb-brand { font-size: 1.5rem; }

/* ==========================================================================
   Auth (login) split layout
   ========================================================================== */
.vb-auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.vb-auth__aside { position: relative; background: var(--vb-grad); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.vb-auth__aside::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%); }
.vb-auth__form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
@media (max-width: 820px) { .vb-auth { grid-template-columns: 1fr; } .vb-auth__aside { display: none; } }

.form-control, .form-select { border-radius: 11px; border-color: var(--vb-line); padding: .6rem .85rem; transition: border-color .2s ease, box-shadow .2s ease; }
.form-control:focus, .form-select:focus { border-color: var(--vb-green); box-shadow: 0 0 0 .2rem rgba(15,157,88,.16); }

/* ==========================================================================
   Animations — reveal on scroll, page fade-in
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    .vb-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
    .vb-reveal.is-visible { opacity: 1; transform: none; }
    .vb-stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }
    main { animation: vb-fade-up .5s ease both; }
}
@keyframes vb-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination { gap: .35rem; }
.page-link {
    border: 1px solid var(--vb-line); border-radius: 11px !important;
    color: var(--vb-ink-soft); font-weight: 600; min-width: 42px; text-align: center;
    padding: .5rem .8rem; transition: all .2s ease;
}
.page-link:hover { background: rgba(15,157,88,.08); color: var(--vb-green-700); border-color: var(--vb-green); transform: translateY(-2px); }
.page-link:focus { box-shadow: 0 0 0 .2rem rgba(15,157,88,.18); }
.page-item.active .page-link {
    background: var(--vb-grad); border-color: transparent; color: #fff;
    box-shadow: 0 8px 18px -8px rgba(15,157,88,.6);
}
.page-item.disabled .page-link { background: transparent; border-color: var(--vb-line); color: #c2ccd8; opacity: .7; }

/* ==========================================================================
   Dashboard shell (admin + role dashboards)
   ========================================================================== */
.vb-shell { display: flex; min-height: 100vh; background: var(--vb-bg); }
.vb-sidebar {
    width: 252px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--vb-line);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.vb-sidebar__brand { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--vb-line); }
.vb-sidebar__nav { padding: .75rem; display: grid; gap: .15rem; }
.vb-sidebar__label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #9aa7b6; font-weight: 700; padding: .9rem .75rem .35rem; }
.vb-navitem {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 11px;
    color: var(--vb-ink-soft); font-weight: 600; font-size: .92rem; transition: all .18s ease;
}
.vb-navitem:hover { background: rgba(15,157,88,.08); color: var(--vb-green-700); }
.vb-navitem.active { background: var(--vb-grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(15,157,88,.7); }
.vb-navitem .ic { width: 20px; text-align: center; font-size: 1.05rem; }
.vb-sidebar__foot { margin-top: auto; padding: .75rem; border-top: 1px solid var(--vb-line); }

.vb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vb-topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
    padding: .85rem 1.5rem; background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--vb-line);
}
.vb-topbar h1 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.vb-content { padding: 1.5rem; animation: vb-fade-up .4s ease both; }

/* Stat cards */
.vb-stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.vb-stat { background: #fff; border: 1px solid var(--vb-line); border-radius: var(--vb-radius); padding: 1.15rem 1.25rem; box-shadow: var(--vb-shadow-sm); transition: transform .25s ease, box-shadow .25s ease; }
.vb-stat:hover { transform: translateY(-4px); box-shadow: var(--vb-shadow); }
.vb-stat__label { font-size: .78rem; font-weight: 600; color: var(--vb-muted); text-transform: uppercase; letter-spacing: .04em; }
.vb-stat__value { font-family: 'Sora', sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin-top: .3rem; }
.vb-stat__icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--vb-grad-soft); }
.vb-stat--accent .vb-stat__value { color: var(--vb-green-700); }

.vb-panel { background: #fff; border: 1px solid var(--vb-line); border-radius: var(--vb-radius); box-shadow: var(--vb-shadow-sm); }
.vb-panel__head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--vb-line); display: flex; align-items: center; justify-content: space-between; }
.vb-panel__head h2 { font-size: 1rem; font-weight: 800; margin: 0; }

/* mini bar chart */
.vb-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.vb-bars .bar { flex: 1; background: var(--vb-grad); border-radius: 6px 6px 0 0; min-height: 4px; transition: height .6s cubic-bezier(.2,.7,.2,1); opacity: .85; }
.vb-bars .bar:hover { opacity: 1; }

.vb-table { width: 100%; }
.vb-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--vb-muted); font-weight: 700; }
.vb-table td, .vb-table th { padding: .7rem .9rem; border-bottom: 1px solid var(--vb-line); vertical-align: middle; }
.vb-table tr:last-child td { border-bottom: 0; }

@media (max-width: 991.98px) {
    .vb-sidebar { position: fixed; left: 0; top: 0; z-index: 1045; transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--vb-shadow-lg); }
    .vb-sidebar.open { transform: none; }
    .vb-backdrop { position: fixed; inset: 0; background: rgba(8,15,26,.4); z-index: 1044; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
    .vb-backdrop.open { opacity: 1; pointer-events: auto; }
}
@media (min-width: 992px) { .vb-burger { display: none; } }

/* Empty state */
.vb-empty { text-align: center; padding: 4rem 1rem; color: var(--vb-muted); }
.vb-empty__icon { font-size: 3rem; opacity: .5; }

/* Ad slot */
.ad-slot { border: 1px dashed var(--vb-line); border-radius: var(--vb-radius-sm); padding: .6rem; background: #fff; }
.ad-slot img { border-radius: 8px; }

/* ==========================================================================
   Premium polish — top-blog refresh: cohesive motion, depth & responsiveness
   ========================================================================== */

/* Consistent, snappy micro-interactions across interactive elements */
a, .btn, .vb-chip, .vb-pill, .vb-readmore, .vb-navitem, .vb-card__title a {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease,
                box-shadow .28s ease, transform .28s cubic-bezier(.2,.7,.2,1), gap .2s ease;
}

/* Cards — refined depth + a soft red-purple→violet gradient ring on hover */
.vb-card { background: var(--vb-surface); border: 1px solid var(--vb-line); border-radius: var(--vb-radius); position: relative; }
.vb-card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
    background: var(--vb-grad-title);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.vb-card:hover::after { opacity: .9; }
.vb-card--lead { box-shadow: var(--vb-shadow); }

/* Section titles — gradient accent bar (red-purple → violet) */
.vb-section-title::before { background: var(--vb-grad-title); }

/* Rail heading underline picks up the title hue */
.vb-rail__title { border-bottom-color: transparent; background: var(--vb-grad-title) bottom / 100% 2px no-repeat; }

/* Gradient CTA buttons (pricing, paywall, hero) */
.btn-gradient {
    background: var(--vb-grad-title); border: 0; color: #fff !important; font-weight: 600;
    box-shadow: 0 8px 20px -10px rgba(124,58,237,.6);
}
.btn-gradient:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 26px -12px rgba(124,58,237,.7); }

/* Category pills — active state echoes the title gradient */
.vb-pill.active { background: var(--vb-grad-title); color: #fff; border-color: transparent; }

/* Animated underline for the lead card title */
.vb-card--lead .vb-card__title a { background-image: var(--vb-grad-title); }

/* Subtle entrance for the first paint (hero + nav) */
.vb-nav { animation: vb-fade-up .5s ease both; }

/* ----- Responsive refinements (tablet → phone → small) ----- */
@media (max-width: 991.98px) {
    .vb-section-title { font-size: 1.3rem; }
    .vb-rail { margin-top: .5rem; }
    .vb-rail__scroll { max-height: none; } /* let it flow when stacked under the lead */
}
@media (max-width: 767.98px) {
    body { font-size: .98rem; }
    .vb-prose { font-size: 1.05rem; line-height: 1.78; }
    .vb-card--lead .vb-card__title, .vb-card--lead .vb-card__title.h5 { font-size: 1.25rem; }
    .vb-article h1 { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
    .vb-engagement { flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
    .vb-card__media { aspect-ratio: 16 / 9; }
    .vb-pills { gap: .4rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; -webkit-overflow-scrolling: touch; }
    .vb-pill { flex: 0 0 auto; }
    .vb-card .card-body { padding: 1rem 1.05rem; }
    .vb-slider__thumb { width: 64px; height: 48px; }
}

/* Respect reduced-motion: disable transforms/entrance for those who opt out */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .vb-card:hover { transform: none; }
}
