/* ============================================================
   Bloggen: /Blogg och /Blogg/{slug}
   Samma uttryck som startsidans hero (.hero-proposal i index.css):
   lila accent, piller-etiketter, mjuka lavendelytor.
   Ämnesfärgerna sätts med .topic-* (se Blog/BlogTopic.cs).
   ============================================================ */

.blog {
    --b-accent: #5B3FD6;
    --b-accent-2: #6D4BEF;
    --b-ink: #1E1B2E;
    --b-ink-soft: #6B6680;
    --b-muted: #9A95AD;
    --b-line: #ECE6F4;
    --b-surface: #ffffff;
    --b-page: #FAF9FD;
    --b-shadow: 0 10px 34px -18px rgba(91, 63, 214, .28);
    --b-shadow-hover: 0 22px 44px -20px rgba(91, 63, 214, .38);
    background: var(--b-page);
    color: var(--b-ink);
}

/* ---------- Ämnesteman ---------- */
.topic-stress {
    --t-bg1: #EEE8FC;
    --t-bg2: #E4ECFB;
    --t-ink: #6D4BEF;
}

.topic-oro {
    --t-bg1: #E2F0F7;
    --t-bg2: #E9E6FB;
    --t-ink: #2F7FA6;
}

.topic-metoden {
    --t-bg1: #F4E7FB;
    --t-bg2: #FCEEF3;
    --t-ink: #9341CF;
}

.topic-arbetsgivare {
    --t-bg1: #E3F3EC;
    --t-bg2: #E5EDFB;
    --t-ink: #23845F;
}

/* ---------- Gemensamt ---------- */
.blog-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--b-surface);
    color: var(--t-ink, var(--b-accent-2));
    border: 1px solid var(--b-line);
    border-radius: 999px;
    padding: .35rem .85rem .35rem .7rem;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 4px 18px -10px rgba(91, 63, 214, .35);
}

    .blog-pill .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
    }

.blog-meta {
    font-size: .88rem;
    color: var(--b-muted);
}

.blog-art {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--t-bg1), var(--t-bg2));
    color: var(--t-ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Mjuka cirklar i bakgrunden, samma idé som startsidans dekor */
    .blog-art::before,
    .blog-art::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        border: 1px solid currentColor;
        opacity: .14;
    }

    .blog-art::before {
        width: 220px;
        height: 220px;
        right: -60px;
        top: -70px;
    }

    .blog-art::after {
        width: 140px;
        height: 140px;
        left: -40px;
        bottom: -50px;
    }

    .blog-art.has-img {
        background: #E9E6FB;
    }

        .blog-art.has-img::before,
        .blog-art.has-img::after {
            display: none;
        }

        .blog-art.has-img img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .4s ease;
        }

    a:hover .blog-art.has-img img {
        transform: scale(1.04);
    }

    .blog-art .bi {
        position: relative;
        font-size: 2.4rem;
        width: 4.5rem;
        height: 4.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 1.25rem;
        background: rgba(255, 255, 255, .75);
        box-shadow: 0 10px 30px -14px rgba(30, 27, 46, .35);
    }

/* ---------- /Blogg: hero ---------- */
.blog-hero {
    background: radial-gradient(ellipse 60% 80% at 80% 40%, #E6E4FB 0%, transparent 70%),
                linear-gradient(135deg, #F3F0FB 0%, #EEF1FB 100%);
    padding: 70px 0 90px;
    position: relative;
    overflow: hidden;
}

.blog-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 2rem;
    align-items: center;
}

.blog-hero .blog-pill {
    margin-bottom: 1.4rem;
}

.blog-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.035em;
    color: var(--b-ink);
    margin: 0 0 1.1rem;
}

    .blog-hero h1 .accent {
        display: inline-block;
        background: linear-gradient(90deg, #6D4BEF 0%, #8B6CF6 45%, #5B8DEF 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        padding-bottom: .08em;
    }

.blog-hero p {
    color: var(--b-ink-soft);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 0 1.75rem;
}

.blog-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: linear-gradient(135deg, #6D4BEF, #5B3FD6);
    color: #fff;
    text-decoration: none;
    padding: .85rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 14px 30px -10px rgba(91, 63, 214, .55);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .blog-hero-cta:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 18px 36px -10px rgba(91, 63, 214, .6);
    }

.blog-hero-art img {
    display: block;
    width: 100%;
    height: auto;
    /* Tonar ut bildens egen bakgrund mot sidans */
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
}

.blog-hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 60px;
    fill: var(--b-page);
}

/* ---------- /Blogg: utvalt inlägg ---------- */
.blog-list {
    padding: 3rem 0 4rem;
}

.blog-section-title {
    display: flex;
    align-items: center;
    gap: .85rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--b-ink);
    margin: 0 0 1.25rem;
}

    .blog-section-title::before {
        content: "";
        width: 40px;
        height: 3px;
        border-radius: 3px;
        background: linear-gradient(90deg, #6D4BEF, #5B8DEF);
    }

.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.75rem;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--b-line);
    background: var(--b-surface);
    color: var(--b-ink);
    border-radius: 999px;
    padding: .55rem 1.05rem;
    font-weight: 600;
    font-size: .95rem;
    box-shadow: 0 4px 16px -10px rgba(91, 63, 214, .35);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

    .blog-chip .bi {
        color: var(--t-ink, var(--b-accent-2));
    }

    .blog-chip:hover {
        border-color: #D8CDF6;
    }

    .blog-chip.active {
        background: linear-gradient(135deg, #6D4BEF, #5B3FD6);
        border-color: transparent;
        color: #fff;
    }

        .blog-chip.active .bi {
            color: #fff;
        }

.blog-item[hidden] {
    display: none !important;
}

.blog-feature {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--b-surface);
    border: 1px solid var(--b-line);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--b-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    margin-bottom: 2.5rem;
}

    .blog-feature:hover {
        transform: translateY(-4px);
        box-shadow: var(--b-shadow-hover);
        color: inherit;
    }

    .blog-feature .blog-art {
        min-height: 270px;
    }

        .blog-feature .blog-art.has-img img {
            object-position: 50% 50%;
        }

        .blog-feature .blog-art .bi {
            font-size: 3rem;
            width: 6rem;
            height: 6rem;
            border-radius: 1.6rem;
        }

    .blog-feature .body {
        padding: 2.5rem 2.75rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: .9rem;
    }

    .blog-feature h3 {
        font-size: clamp(1.6rem, 2.6vw, 2.2rem);
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: -.02em;
        color: var(--b-ink);
        margin: 0;
    }

    .blog-feature p {
        color: var(--b-ink-soft);
        font-size: 1.08rem;
        line-height: 1.65;
        margin: 0;
    }

.blog-readlink {
    font-weight: 600;
    color: var(--b-accent-2);
}

    .blog-readlink .bi {
        transition: transform .2s ease;
        display: inline-block;
    }

a:hover .blog-readlink .bi {
    transform: translateX(4px);
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.1rem;
    align-items: center;
}

    .blog-meta .bi {
        margin-right: .2rem;
    }

.blog-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, #6D4BEF, #5B3FD6);
    color: #fff;
    border-radius: 999px;
    padding: .6rem 1.2rem;
    font-weight: 600;
    margin-top: .4rem;
    box-shadow: 0 12px 26px -12px rgba(91, 63, 214, .6);
}

    .blog-btn .bi {
        transition: transform .2s ease;
    }

a:hover .blog-btn .bi {
    transform: translateX(4px);
}

/* ---------- Kort ---------- */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--b-surface);
    border: 1px solid var(--b-line);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--b-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .blog-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--b-shadow-hover);
        color: inherit;
    }

    .blog-card .blog-art {
        height: 190px;
    }

        /* Illustrationerna har luft upptill (glödlampor, flaggor): visa mer av överkanten */
        .blog-card .blog-art.has-img img {
            object-position: 50% 30%;
        }

    .blog-card .body {
        padding: 1.5rem 1.6rem 1.6rem;
        display: flex;
        flex-direction: column;
        gap: .6rem;
        flex: 1;
    }

    .blog-card h3 {
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1.25;
        color: var(--b-ink);
        margin: 0;
    }

    .blog-card p {
        color: var(--b-ink-soft);
        line-height: 1.6;
        margin: 0;
    }

    .blog-card .blog-readlink {
        margin-top: auto;
        padding-top: .4rem;
    }

    .blog-card .top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        flex-wrap: wrap;
    }

    .blog-card .blog-pill {
        box-shadow: none;
        background: color-mix(in srgb, var(--t-bg1) 70%, white);
        border-color: transparent;
    }

/* ---------- Inlägg: sidhuvud ---------- */
.post-hero {
    background: linear-gradient(135deg, var(--t-bg1) 0%, var(--t-bg2) 100%);
    padding: 3rem 0 3.25rem;
    position: relative;
    overflow: hidden;
}

    .post-hero::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        border: 1px solid var(--t-ink);
        opacity: .12;
        right: -120px;
        top: -180px;
    }

    .post-hero .inner,
    .post-wrap {
        max-width: 760px;
        margin: 0 auto;
        padding: 0 1rem;
        position: relative;
    }

.post-breadcrumb {
    font-size: .9rem;
    margin-bottom: 1.5rem;
    color: var(--b-ink-soft);
}

    .post-breadcrumb a {
        color: var(--t-ink);
        text-decoration: none;
        font-weight: 600;
    }

        .post-breadcrumb a:hover {
            text-decoration: underline;
        }

.post-hero .blog-pill {
    margin-bottom: 1.1rem;
}

.post-hero h1 {
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -.025em;
    color: var(--b-ink);
    margin-bottom: .9rem;
}

.post-hero .blog-meta {
    color: var(--b-ink-soft);
}

.post-cover {
    margin: 2rem 0 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 40px -22px rgba(30, 27, 46, .45);
    aspect-ratio: 2.6 / 1;
    background: #E9E6FB;
}

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

/* ---------- Inlägg: brödtext ---------- */
.post-wrap {
    padding-top: 2.75rem;
    padding-bottom: 1rem;
}

.article-body {
    color: #3B3850;
    font-size: 1.12rem;
    line-height: 1.8;
}

    .article-body > p:first-child {
        font-size: 1.28rem;
        line-height: 1.7;
        color: var(--b-ink);
    }

    .article-body h2 {
        font-weight: 700;
        color: var(--b-ink);
        font-size: 1.6rem;
        letter-spacing: -.015em;
        margin: 2.75rem 0 .9rem;
    }

    .article-body p {
        margin-bottom: 1.15rem;
    }

    .article-body ul {
        margin-bottom: 1.25rem;
        padding-left: 1.2rem;
    }

    .article-body li {
        margin-bottom: .55rem;
    }

        .article-body li::marker {
            color: var(--b-accent-2);
        }

    .article-body a {
        color: var(--b-accent-2);
        text-decoration: underline;
        text-decoration-color: rgba(109, 75, 239, .35);
        text-underline-offset: 3px;
        text-decoration-thickness: 1.5px;
    }

        .article-body a:hover {
            text-decoration-color: currentColor;
        }

    .article-body strong {
        color: var(--b-ink);
    }

    /* ---------- Övningarna som kort ---------- */
    .article-body ul.tool-list {
        list-style: none;
        padding: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin: 1.5rem 0 1.75rem;
    }

    .article-body .tool-list li {
        margin: 0;
        background: var(--b-surface);
        border: 1px solid var(--b-line);
        border-radius: 18px;
        padding: 1.25rem 1.3rem 1.3rem;
        font-size: 1rem;
        line-height: 1.65;
        box-shadow: var(--b-shadow);
    }

        .article-body .tool-list li > .bi {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.6rem;
            height: 2.6rem;
            border-radius: .85rem;
            font-size: 1.2rem;
            color: var(--b-accent-2);
            background: #F1ECFD;
            margin-bottom: .8rem;
        }

        /* Udda antal: sista kortet tar hela bredden i stället för att lämna ett hål */
        .article-body .tool-list li:last-child:nth-child(odd) {
            grid-column: 1 / -1;
        }

        .article-body .tool-list li > strong:first-of-type {
            display: block;
            font-size: 1.08rem;
            margin-bottom: .3rem;
        }

/* ---------- CTA ---------- */
.post-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #F3F0FB 0%, #EEF1FB 100%);
    border: 1px solid var(--b-line);
    border-radius: 24px;
    padding: 2rem 2.25rem;
    margin: 3rem 0 1.25rem;
}

    .post-cta .nova {
        flex: 0 0 auto;
        width: 3.75rem;
        height: 3.75rem;
        border-radius: 1.1rem;
        background: linear-gradient(135deg, #b8b4f2, #855ae7);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6rem;
        box-shadow: 0 14px 30px -12px rgba(91, 63, 214, .55);
    }

    .post-cta p {
        margin: 0;
        color: var(--b-ink);
        font-size: 1.08rem;
        line-height: 1.55;
        flex: 1;
    }

.post-cta-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--b-accent);
    color: #fff;
    text-decoration: none;
    padding: .85rem 1.4rem;
    border-radius: 14px;
    font-weight: 600;
    box-shadow: 0 14px 30px -10px rgba(91, 63, 214, .5);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .post-cta-btn:hover {
        transform: translateY(-2px);
        color: #fff;
        box-shadow: 0 18px 36px -10px rgba(91, 63, 214, .55);
    }

.article-disclaimer {
    font-size: .85rem;
    color: var(--b-muted);
    border-top: 1px solid var(--b-line);
    padding-top: 1.25rem;
    margin-top: 2rem;
}

/* ---------- Läs vidare ---------- */
.post-related {
    padding: 3.5rem 0 4.5rem;
    margin-top: 2.5rem;
    background: linear-gradient(180deg, #F3F0FB 0%, var(--b-page) 100%);
    border-top: 1px solid var(--b-line);
}

    .post-related h2 {
        font-size: 1.6rem;
        font-weight: 700;
        letter-spacing: -.015em;
        color: var(--b-ink);
        margin-bottom: 1.5rem;
    }

.post-back {
    text-align: center;
    margin-top: 2.5rem;
}

    .post-back a {
        color: var(--b-accent-2);
        font-weight: 600;
        text-decoration: none;
    }

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
    .blog-hero-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero-art {
        order: -1;
        max-width: 460px;
        margin: -1rem auto -1rem;
    }

    .blog-hero {
        padding: 40px 0 80px;
    }
}

@media (max-width: 767.98px) {
    .post-cover {
        aspect-ratio: 16 / 9;
    }

    .blog-feature {
        grid-template-columns: 1fr;
    }

        .blog-feature .blog-art {
            min-height: 170px;
        }

        .blog-feature .body {
            padding: 1.6rem 1.5rem 1.75rem;
        }

    .article-body ul.tool-list {
        grid-template-columns: 1fr;
    }

    .post-cta {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.5rem;
    }

    .post-hero {
        padding: 2rem 0 2.25rem;
    }
}

/* ---------- Mörkt läge ---------- */
.dark-mode .blog {
    --b-ink: #F4F2FA;
    --b-ink-soft: #C4C0D4;
    --b-muted: #9792AA;
    --b-line: #3D3A4E;
    --b-surface: #2A2836;
    --b-page: #222831;
    --b-accent-2: #A58BFF;
    --b-shadow: 0 10px 34px -18px rgba(0, 0, 0, .6);
    --b-shadow-hover: 0 22px 44px -20px rgba(0, 0, 0, .7);
}

.dark-mode .topic-stress {
    --t-bg1: #2E2850;
    --t-bg2: #262B45;
    --t-ink: #B9A6FF;
}

.dark-mode .topic-oro {
    --t-bg1: #1F3442;
    --t-bg2: #2A2848;
    --t-ink: #8CCBEA;
}

.dark-mode .topic-metoden {
    --t-bg1: #3A2648;
    --t-bg2: #3B2633;
    --t-ink: #D7A6F5;
}

.dark-mode .topic-arbetsgivare {
    --t-bg1: #1E3A30;
    --t-bg2: #23304A;
    --t-ink: #8ED6B4;
}

.dark-mode .post-related {
    background: linear-gradient(180deg, #2A2640 0%, var(--b-page) 100%);
}

.dark-mode .blog-hero h1 .accent {
    background-image: linear-gradient(90deg, #B9A6FF 0%, #A58BFF 45%, #8CB4FF 100%);
}

.dark-mode .blog-hero-art img,
.dark-mode .blog-art.has-img img,
.dark-mode .post-cover img {
    filter: brightness(.88) saturate(.95);
}

.dark-mode .blog-hero,
.dark-mode .post-cta {
    background: linear-gradient(135deg, #2A2640 0%, #232A3E 100%);
}

.dark-mode .blog-art .bi {
    background: rgba(255, 255, 255, .08);
}

.dark-mode .blog-card .blog-pill {
    background: rgba(255, 255, 255, .06);
}

.dark-mode .article-body {
    color: #D6D3E2;
}

.dark-mode .article-body .tool-list li > .bi {
    background: rgba(165, 139, 255, .14);
}
