/* ==========================================================================
   Friendsware Solutions — Blog
   Listing (/Blog) and article (/Blog/{slug}) pages.

   The site body carries .dark-scheme and the theme sets colours aggressively
   (lots of !important), so everything here is scoped under .fw-blog and pins
   its own colours. Long-form copy sits on a light surface for readability,
   matching the white blog cards on the homepage.
   ========================================================================== */

.fw-blog {
    --fw-accent: #e2660a;
    --fw-accent-soft: rgba(226, 102, 10, 0.1);
    --fw-ink: #1a1d21;
    --fw-ink-soft: #52585f;
    --fw-line: #e4e6ea;
    --fw-surface: #ffffff;

    /* On desktop the theme header is transparent and absolutely positioned, so content would
       render underneath it. This clears a typical desktop header; blog.js then syncs the
       exact measured height. */
    padding: 190px 0 80px;
}

/* Below 993px designesia swaps in the in-flow mobile header, which occupies its own space —
   the desktop offset would leave a large empty gap. Matches the theme's own breakpoint. */
@media (max-width: 992px) {
    .fw-blog {
        padding-top: 40px;
    }
}

/* Own container rather than the theme's .container: these pages must never be able to push
   the document wider than the viewport, which is what produced horizontal scroll on mobile. */
.fw-blog-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.fw-blog *,
.fw-blog *::before,
.fw-blog *::after {
    box-sizing: border-box;
}

.fw-blog img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   Page header (shared by listing and article)
   -------------------------------------------------------------------------- */

.fw-blog-head {
    max-width: 820px;
    margin: 0 auto 36px;
    text-align: center;
}

.fw-blog-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fw-accent) !important;
    margin-bottom: 14px;
}

.fw-blog-head h1 {
    font-size: 2.4rem;
    line-height: 1.25;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 16px;
}

.fw-blog-head p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72) !important;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Listing grid
   -------------------------------------------------------------------------- */

.fw-blog-grid {
    display: grid;
    /* auto-fit (not auto-fill) collapses the empty tracks, so justify-content can centre a
       short run of posts instead of leaving them stranded at the left edge. The max track
       size stops a single card from stretching across the whole row. */
    grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
    justify-content: center;
    gap: 26px;
    max-width: 1120px;
    margin: 0 auto;
}

.fw-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--fw-surface);
    border: 1px solid var(--fw-line);
    border-radius: 12px;
    padding: 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fw-blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(226, 102, 10, 0.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.fw-blog-card-tag {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fw-accent) !important;
    background: var(--fw-accent-soft);
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 16px;
}

.fw-blog-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.42;
    color: var(--fw-ink) !important;
    margin: 0 0 12px;
}

.fw-blog-card p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--fw-ink-soft) !important;
    margin: 0 0 20px;
}

.fw-blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.82rem;
    color: #7b8189 !important;
    margin-bottom: 18px;
}

.fw-blog-card-meta span + span::before {
    content: "•";
    margin-right: 8px;
    color: #c3c8ce;
}

.fw-blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    width: fit-content;
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--fw-accent);
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.25s ease;
}

.fw-blog-link:hover {
    background: #c4570a;
    color: #ffffff !important;
}

.fw-blog-empty {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

.fw-article {
    max-width: 840px;
    margin: 0 auto;
    background: var(--fw-surface);
    border: 1px solid var(--fw-line);
    border-radius: 16px;
    padding: 48px 56px 56px;
}

.fw-article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 840px;
    margin: 0 auto 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
}

.fw-article-back:hover {
    color: var(--fw-accent) !important;
}

.fw-article-header {
    border-bottom: 1px solid var(--fw-line);
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.fw-article-header h1 {
    font-size: 2.15rem;
    line-height: 1.28;
    font-weight: 800;
    color: var(--fw-ink) !important;
    margin: 14px 0 18px;
}

.fw-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.88rem;
    color: #7b8189 !important;
}

.fw-article-meta span + span::before {
    content: "•";
    margin-right: 8px;
    color: #c3c8ce;
}

/* Body copy ---------------------------------------------------------------- */

.fw-article-body {
    font-size: 1.04rem;
    line-height: 1.78;
    color: #2b3037 !important;
}

.fw-article-body p {
    color: #2b3037 !important;
    margin: 0 0 20px;
}

.fw-article-body h2 {
    font-size: 1.55rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--fw-ink) !important;
    margin: 44px 0 16px;
    padding-left: 16px;
    border-left: 4px solid var(--fw-accent);
}

.fw-article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fw-ink) !important;
    margin: 30px 0 12px;
}

.fw-article-body strong {
    color: var(--fw-ink) !important;
    font-weight: 700;
}

.fw-article-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.fw-article-body ul li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    color: #2b3037 !important;
}

.fw-article-body ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fw-accent);
}

.fw-article-body a {
    color: var(--fw-accent) !important;
    text-decoration: underline;
}

/* FAQ block ---------------------------------------------------------------- */

.fw-article-faq {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--fw-line);
}

.fw-article-faq h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--fw-ink) !important;
    margin: 0 0 24px;
}

.fw-faq-item {
    border-left: 3px solid var(--fw-accent-soft);
    padding-left: 18px;
    margin-bottom: 22px;
}

.fw-faq-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fw-ink) !important;
    margin: 0 0 8px;
}

.fw-faq-item p {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #2b3037 !important;
    margin: 0;
}

/* Closing call to action --------------------------------------------------- */

.fw-article-cta {
    margin-top: 44px;
    padding: 28px 30px;
    border-radius: 12px;
    background: #f7f8f9;
    border: 1px solid var(--fw-line);
}

.fw-article-cta h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--fw-ink) !important;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
}

.fw-article-cta p {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--fw-ink-soft) !important;
    margin: 0 0 18px;
}

/* Keyword footer ----------------------------------------------------------- */

.fw-article-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--fw-line);
}

.fw-article-topics span {
    font-size: 0.8rem;
    color: var(--fw-ink-soft) !important;
    background: #f2f3f5;
    border-radius: 999px;
    padding: 6px 13px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .fw-blog {
        padding-bottom: 56px;
    }

    .fw-blog-head h1 {
        font-size: 1.75rem;
    }

    .fw-blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fw-article {
        padding: 30px 22px 36px;
        border-radius: 12px;
    }

    .fw-article-header h1 {
        font-size: 1.6rem;
    }

    .fw-article-body {
        font-size: 1rem;
    }

    .fw-article-body h2 {
        font-size: 1.3rem;
        margin-top: 34px;
    }
}
