/* ===== FastLinkIt /blog public-page styling =====

   Layered on TOP of the library's _content/PSC.Blazor.Components.Blog/css/blog.css
   so we only override host-specific flourishes (hero spacing, sidebar stickiness,
   CTA card) and keep the library cards / tag cloud / archive intact.
*/

/* Tighten the hero for the blog (the landing hero is taller). */
.fli-blog-hero {
    padding: 7rem 1.5rem 4.5rem;
}

/* Search box floats on top of the hero background. */
.fli-blog-hero-search {
    max-width: 520px;
    margin: 1.25rem auto 0;
}

.fli-blog-hero-search .input-group {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    border-radius: .5rem;
    overflow: hidden;
}

.fli-blog-hero-search .form-control {
    border: 0;
    padding: .85rem 1rem;
    font-size: 1rem;
}

.fli-blog-hero-search .btn {
    border: 0;
    padding-inline: 1.2rem;
}

/* ===== Featured sections ===== */

.fli-blog-featured-section {
    padding-top: 3.5rem;
    padding-bottom: 1rem;
}

.fli-blog-featured-strip {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    background: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
    border-bottom: 1px solid var(--bs-border-color);
}

/* BlogFeaturedPosts returns no markup when nothing is flagged, but the
   wrapping <section> still takes padding + background, leaving a grey
   band under the hero. Collapse the wrapper when the inner block isn't
   there. Widely supported — Chrome 105+, Safari 15.4+, Firefox 121+. */
.fli-blog-featured-section:not(:has(.blog-block-featured)),
.fli-blog-featured-strip:not(:has(.blog-block-featured)) {
    display: none;
}

.fli-blog-featured-strip .blog-block-featured h3 {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
}

/* ===== Main + sidebar ===== */

.fli-blog-main {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.fli-blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* The sidebar used to be sticky with an inner scrollbar, but on blog-home
   the stacked widgets always exceeded `calc(100vh - 7rem)` and forced a
   visible scrollbar even at the top of the page. Let it flow with the main
   column instead — losing the always-in-view behaviour is a fair trade
   for not having a scrollbar on first paint. */

/* ===== CTA banner ===== */

.fli-blog-cta {
    padding: 3rem 0 5rem;
}

.fli-blog-cta-card {
    background: linear-gradient(135deg, #7209b7 0%, #560bad 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 14px 40px rgba(114, 9, 183, .2);
}

.fli-blog-cta-text h3 {
    margin: 0 0 .25rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.fli-blog-cta-text p {
    color: rgba(255, 255, 255, .85);
}

.fli-blog-cta-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ===== Tweaks that sit nicely under LandingLayout ===== */

/* The library's .blog-public sets a max-width that's narrower than our hero;
   drop it on the category/tag/post pages so they line up with the landing
   container. */
.fli-landing .blog-public {
    max-width: none;
}

/* ===== Boxed post page — matches /privacy / /terms shell ===== */

.blog-post-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
}

.blog-post-card .card-body {
    padding: 2rem;
}

@media (min-width: 768px) {
    .blog-post-card .card-body {
        padding: 3rem 3.25rem;
    }
}

/* Hero image sits flush to the top of the card. */
.blog-post-card .blog-post-hero {
    margin: -2rem -2rem 1.75rem;
    border-radius: 0;
    max-height: 440px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .blog-post-card .blog-post-hero {
        margin: -3rem -3.25rem 2rem;
    }
}

.blog-post-card .blog-post-hero img {
    max-height: 440px;
}

/* ===== Reading-column typography polish ===== */

.blog-post-card .blog-post-body {
    font-size: 1.08rem;
    line-height: 1.78;
}

/* Drop-cap on the first paragraph — subtle and only above sm so it
   doesn't eat a line on mobile. */
@media (min-width: 576px) {
    .blog-post-card .blog-post-body > p:first-of-type::first-letter {
        float: left;
        font-size: 3.25rem;
        line-height: 1;
        padding: .35rem .6rem 0 0;
        font-weight: 700;
        color: var(--bs-primary);
    }
}

.blog-post-card .blog-post-body h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
}

.blog-post-card .blog-post-body h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
}

.blog-post-card .blog-post-body h2:first-child,
.blog-post-card .blog-post-body h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.blog-post-card .blog-post-body blockquote {
    font-style: italic;
    font-size: 1.05rem;
    border-left-width: 4px;
    border-left-color: var(--bs-primary);
    background: var(--bs-tertiary-bg);
    padding: 1rem 1.25rem;
    border-radius: .25rem;
}

.blog-post-card .blog-post-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: .5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.blog-post-card .blog-post-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: .95em;
}

.blog-post-card .blog-post-excerpt {
    background: var(--bs-tertiary-bg);
    border-left-width: 4px;
    padding: 1rem 1.25rem;
    border-radius: .25rem;
    font-size: 1.15rem;
}

.blog-post-card a.badge {
    padding: .45em .8em;
    font-size: .82em;
    transition: background-color .15s, color .15s;
}

.blog-post-card a.badge:hover {
    background: var(--bs-primary) !important;
    color: #fff !important;
}
