/* =====================================================================
   CHANNEL SOFTECH — BLOG PAGE (blogs.php)
   Headings, eyebrow labels, sub text and buttons come from the shared
   common.css and buttons.css, so the blog matches every other page.

   1. Page tokens
   2. Banner (home page line artwork)
   3. Featured article
   4. Shared pieces — tags, meta, author
   5. Topic filters
   6. Article cards
   7. Phone slider
   8. Call to action — popular reads + trust strip
   9. Tablet and phone
   10. Reduced motion
   ===================================================================== */

/* ---------- 1. PAGE TOKENS ---------- */
.cs-blog {
    --blog-line: #dbe9f1;
    --blog-soft: #f1f9fd;
    --blog-ink: var(--cs-c-title, #393939);
    --blog-text: var(--cs-c-text, #73777a);
    --blog-blue: var(--cs-c-blue, #0870af);
    --blog-cyan: var(--cs-c-cyan, #159dd3);
    --blog-ease: cubic-bezier(0.22, 1, 0.36, 1);
    /* plain colour behind images while they load */
    --blog-img-bg: #eaf4f9;
}

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

/* ---------- 2. BANNER ---------- */
.cs-blog-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(56px, 7vw, 96px) 0 clamp(120px, 12vw, 170px);
    background: var(--cs-seam, #fcfdfe);
}

.cs-blog-hero__bg {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.6;
    background: url(../images/bg-banner-1.webp) center top / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.cs-blog-hero__copy {
    max-width: 780px;
    margin-inline: auto;
}

.cs-blog-hero__points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.cs-blog-hero__points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 22px rgba(8, 72, 112, 0.07);
    color: var(--blog-ink);
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cs-blog-hero__points i {
    color: var(--blog-blue);
    font-size: 16px;
}

/* ---------- 3. FEATURED ARTICLE ---------- */
.cs-blog-featured {
    position: relative;
    z-index: 2;
    margin-top: clamp(-130px, -9vw, -80px); /* card overlaps the banner */
    padding-bottom: clamp(20px, 3vw, 40px);
}

.cs-blog-feature {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: clamp(22px, 3vw, 32px);
    background: #fff;
    box-shadow:
        0 40px 80px -30px rgba(8, 72, 112, 0.35),
        0 6px 18px rgba(8, 72, 112, 0.06);
}

/* thin brand line along the top of the card */
.cs-blog-feature::before {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--cs-accent-gradient);
    content: "";
}

.cs-blog-feature__cover {
    position: relative;
    display: block;
    height: 100%;
    min-height: 440px;
    overflow: hidden;
    background: var(--blog-img-bg);
}

/* the whole image fills the cover */
.cs-blog-feature__cover img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s var(--blog-ease);
}

/* soft shade so the badges stay readable */
.cs-blog-feature__cover::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 30, 45, 0.28) 0%, transparent 30%),
        linear-gradient(0deg, rgba(10, 30, 45, 0.25) 0%, transparent 28%);
    pointer-events: none;
    content: "";
}

.cs-blog-feature:hover .cs-blog-feature__cover img {
    transform: scale(1.04);
}

.cs-blog-feature__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: clamp(26px, 4vw, 54px);
}

.cs-blog-feature__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.cs-blog-feature__title {
    margin: 16px 0 0;
    font-size: var(--cs-fs-title);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.cs-blog-feature__title a {
    color: var(--blog-ink);
    background-image: var(--cs-accent-gradient);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.45s var(--blog-ease), color 0.25s ease;
}

.cs-blog-feature__title a:hover {
    color: var(--blog-blue);
    background-size: 100% 2px;
}

.cs-blog-feature__excerpt {
    margin: 14px 0 0;
    color: var(--blog-text);
    font-size: var(--cs-fs-subtext);
    line-height: 1.75;
}

.cs-blog-feature__points {
    display: grid;
    gap: 9px;
    margin: 20px 0 0;
    padding: 18px 20px;
    border: 1px solid var(--blog-line);
    border-radius: 16px;
    background: var(--blog-soft);
    list-style: none;
}

.cs-blog-feature__points li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--blog-ink);
    font-size: 14px;
    font-weight: 500;
}

.cs-blog-feature__points i {
    color: var(--blog-blue);
    font-size: 17px;
}

.cs-blog-feature__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--blog-line);
}

/* ---------- 4. SHARED PIECES ---------- */
/* tag on a cover */
.cs-blog-tag {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 16px rgba(8, 72, 112, 0.1);
    color: var(--blog-blue);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cs-blog-tag--featured {
    top: 22px;
    left: 22px;
    padding: 8px 14px;
    border-color: transparent;
    background: var(--cs-grad-brand);
    color: #fff;
    box-shadow: 0 10px 22px rgba(8, 112, 175, 0.3);
}

.cs-blog-tag--topic {
    top: 22px;
    right: 22px;
    left: auto;
    padding: 8px 14px;
    color: var(--blog-blue);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cs-blog-topic {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 8px;
    background: #e8f5fb;
    color: var(--blog-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cs-blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--blog-text);
    font-size: 13px;
    line-height: 1.5;
}

.cs-blog-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cs-blog-meta i {
    color: var(--blog-blue);
}

.cs-blog-author {
    display: flex;
    align-items: center;
    gap: 11px;
}

.cs-blog-author strong,
.cs-blog-author div > span {
    display: block;
}

.cs-blog-author strong {
    color: var(--blog-ink);
    font-size: 15px;
    font-weight: 600;
}

.cs-blog-author div > span {
    margin-top: 2px;
    color: var(--blog-text);
    font-size: 13px;
}

.cs-blog-avatar {
    display: inline-grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--cs-grad-brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cs-blog-avatar--lg {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    font-size: 13px;
    box-shadow: 0 0 0 4px #e8f5fb;
}

/* author photo uploaded in the admin panel (fills the round avatar) */
.cs-author-photo {
    overflow: hidden;
    background: #e8f5fb;
}

.cs-author-photo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ---------- 5. TOPIC FILTERS ---------- */
.cs-blog-list {
    position: relative;
    padding: var(--cs-section-y) 0 calc(var(--cs-section-y) + 10px);
    background:
        radial-gradient(ellipse at 0% 100%, rgba(21, 157, 211, 0.08), transparent 45%),
        linear-gradient(180deg, #fff 0%, var(--blog-soft) 100%);
}

.cs-blog-topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 34px;
}

.cs-blog-topics button,
.cs-blog-topics a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--blog-line);
    border-radius: 50px;
    background: #fff;
    color: var(--blog-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        border-color 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.cs-blog-topics button i,
.cs-blog-topics a i {
    color: var(--blog-blue);
    font-size: 15px;
    transition: color 0.25s ease;
}

.cs-blog-topics button:hover,
.cs-blog-topics a:hover {
    border-color: rgba(8, 112, 175, 0.35);
    color: var(--blog-blue);
    transform: translateY(-2px);
}

.cs-blog-topics button[aria-pressed="true"],
.cs-blog-topics a[aria-current="page"] {
    border-color: transparent;
    background: var(--cs-btn-gradient, var(--cs-grad-brand));
    box-shadow: 0 8px 20px rgba(8, 112, 175, 0.26);
    color: #fff;
}

.cs-blog-topics button[aria-pressed="true"] i,
.cs-blog-topics a[aria-current="page"] i {
    color: #fff;
}

.cs-blog-topics button:focus-visible,
.cs-blog-topics a:focus-visible {
    outline: 2px solid var(--blog-cyan);
    outline-offset: 3px;
}

/* ---------- 6. ARTICLE CARDS ---------- */
.cs-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 28px);
}

.cs-blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--blog-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 72, 112, 0.07);
    transition:
        transform 0.4s var(--blog-ease),
        box-shadow 0.4s var(--blog-ease),
        border-color 0.3s ease;
}

/* brand line that grows along the bottom on hover */
.cs-blog-card::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--cs-accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--blog-ease);
    content: "";
}

.cs-blog-card.is-entering {
    animation: csBlogIn 0.45s var(--blog-ease) both;
    animation-delay: var(--card-delay, 0ms);
}

@keyframes csBlogIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.cs-blog-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--blog-img-bg);
}

/* the whole image fills the cover */
.cs-blog-card__cover img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s var(--blog-ease);
}

.cs-blog-card__time {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 50px;
    background: rgba(25, 38, 47, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cs-blog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 22px 18px;
}

.cs-blog-card__title {
    margin: 9px 0 8px;
    font-size: var(--cs-fs-card-title);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.cs-blog-card__title a {
    color: var(--blog-ink);
    transition: color 0.25s ease;
}

/* the whole card is clickable through the title link */
.cs-blog-card__title a::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
}

.cs-blog-card__body > p {
    display: -webkit-box;
    margin: 0 0 18px;
    overflow: hidden;
    color: var(--blog-text);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* simple "Read Article" text link */
.cs-blog-card__link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
    color: var(--blog-blue);
    font-size: 14px;
    font-weight: 600;
}

.cs-blog-card__link i {
    font-size: 12px;
    transition: transform 0.35s var(--blog-ease);
}

.cs-blog-card__link:hover,
.cs-blog-card__link:focus-visible {
    color: #065a8c;
}

@media (hover: hover) {
    .cs-blog-card:hover {
        border-color: rgba(8, 112, 175, 0.25);
        box-shadow: 0 26px 50px -18px rgba(8, 72, 112, 0.28);
        transform: translateY(-6px);
    }

    .cs-blog-card:hover::after {
        transform: scaleX(1);
    }

    .cs-blog-card:hover .cs-blog-card__cover img {
        transform: scale(1.05);
    }

    .cs-blog-card:hover .cs-blog-card__title a {
        color: var(--blog-blue);
    }

    .cs-blog-card:hover .cs-blog-card__link i {
        transform: translateX(5px);
    }
}

.cs-blog-card__title a:focus-visible {
    outline: none;
}

.cs-blog-card:has(.cs-blog-card__title a:focus-visible) {
    outline: 2px solid var(--blog-cyan);
    outline-offset: 3px;
}

.cs-blog-empty {
    margin: 0;
    padding: 26px;
    border: 1px dashed var(--blog-line);
    border-radius: 16px;
    background: #fff;
    color: var(--blog-text);
    text-align: center;
}

.cs-blog-more {
    margin-top: 34px;
    text-align: center;
}

/* ---------- 7. PHONE SLIDER (controls hidden on bigger screens) ---------- */
.cs-blog-slider__nav {
    display: none;
}

/* ---------- 8. CALL TO ACTION — popular reads + trust strip ---------- */
.cs-blog-cta {
    padding: 10px 0 var(--cs-section-y);
    background: var(--blog-soft);
}

.cs-blog-cta__panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(28px, 4.6vw, 64px) clamp(22px, 4.6vw, 64px) 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: clamp(24px, 3vw, 36px);
    background:
        radial-gradient(circle at 0% 0%, rgba(21, 157, 211, 0.35), transparent 38%),
        linear-gradient(135deg, #0b2235 0%, #0c3654 45%, #0870af 100%);
    box-shadow:
        0 40px 80px -30px rgba(6, 50, 80, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* soft dotted texture */
.cs-blog-cta__panel::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
    mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
    content: "";
}

/* floating colour glows */
.cs-blog-cta__glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.cs-blog-cta__glow--one {
    top: -120px;
    right: 8%;
    width: 340px;
    height: 340px;
    background: rgba(21, 157, 211, 0.45);
    animation: csBlogGlow 9s ease-in-out infinite alternate;
}

.cs-blog-cta__glow--two {
    bottom: -140px;
    left: 30%;
    width: 300px;
    height: 300px;
    background: rgba(8, 112, 175, 0.5);
    animation: csBlogGlow 11s ease-in-out infinite alternate-reverse;
}

@keyframes csBlogGlow {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-40px, 30px) scale(1.15);
    }
}

/* "Free 30-minute strategy call" badge */
.cs-blog-cta__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    color: #dff6fc;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cs-blog-cta__pulse {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3ee08f;
}

.cs-blog-cta__pulse::after {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: rgba(62, 224, 143, 0.45);
    animation: csBlogPulse 1.8s ease-out infinite;
    content: "";
}

@keyframes csBlogPulse {
    from {
        opacity: 1;
        transform: scale(0.6);
    }

    to {
        opacity: 0;
        transform: scale(1.8);
    }
}

.cs-blog-cta .cs-title {
    margin: 18px 0 0;
    text-align: left;
    text-wrap: balance;
}

.cs-blog-cta .cs-subtext {
    max-width: 560px;
    margin: 14px 0 0;
    text-align: left;
}

.cs-blog-cta__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 28px;
    padding: 0;
    list-style: none;
}

.cs-blog-cta__checks li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.cs-blog-cta__checks i {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--cs-c-cyan, #159dd3);
    color: #fff;
    font-size: 12px;
}

/* popular reads: white card floating on the panel */
.cs-blog-reads {
    position: relative;
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow:
        0 30px 60px -20px rgba(0, 20, 35, 0.55),
        0 0 0 8px rgba(255, 255, 255, 0.06);
}

.cs-blog-reads__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--blog-line);
}

.cs-blog-reads__head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--blog-ink);
    font-size: 18px;
    font-weight: 700;
}

.cs-blog-reads__head h3 i {
    color: #ff7a45;
}

.cs-blog-reads__head span {
    padding: 4px 10px;
    border-radius: 50px;
    background: #e8f5fb;
    color: var(--blog-blue);
    font-size: 11px;
    font-weight: 600;
}

.cs-blog-reads ol {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: reads;
}

.cs-blog-read {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px;
    border-radius: 16px;
    color: var(--blog-ink);
    transition:
        background 0.3s ease,
        transform 0.35s var(--blog-ease);
}

.cs-blog-read__img {
    position: relative;
    flex: 0 0 92px;
    height: 68px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--blog-img-bg);
    counter-increment: reads;
}

.cs-blog-read__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--blog-ease);
}

/* 1, 2, 3 ranking number on the image */
.cs-blog-read__img::after {
    position: absolute;
    top: 5px;
    left: 5px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 6px;
    background: var(--cs-grad-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    content: counter(reads);
}

.cs-blog-read__text {
    flex: 1;
    min-width: 0;
}

.cs-blog-read__text small {
    display: block;
    color: var(--blog-blue);
    font-size: 11px;
    font-weight: 600;
}

.cs-blog-read__text strong {
    display: block;
    margin-top: 3px;
    color: var(--blog-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.38;
}

.cs-blog-read__go {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: #eef7fc;
    color: var(--blog-blue);
    font-size: 12px;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.35s var(--blog-ease);
}

.cs-blog-read:hover {
    background: #f2f9fd;
    color: var(--blog-ink);
}

.cs-blog-read:hover .cs-blog-read__img img {
    transform: scale(1.08);
}

.cs-blog-read:hover .cs-blog-read__go {
    background: var(--cs-grad-brand);
    color: #fff;
    transform: rotate(-45deg);
}

.cs-blog-read:focus-visible {
    outline: 2px solid var(--blog-cyan);
    outline-offset: 2px;
}

/* trust strip along the bottom of the panel */
.cs-blog-cta__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: clamp(30px, 4vw, 48px) calc(clamp(22px, 4.6vw, 64px) * -1) 0;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.14);
    list-style: none;
}

.cs-blog-cta__stats li {
    padding: 20px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.cs-blog-cta__stats li:last-child {
    border-right: 0;
}

.cs-blog-cta__stats strong {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 700;
    line-height: 1.1;
}

.cs-blog-cta__stats strong i {
    color: #ffc845;
    font-size: 0.7em;
}

.cs-blog-cta__stats span {
    display: block;
    margin-top: 4px;
    color: rgba(223, 246, 252, 0.8);
    font-size: 13px;
}

/* ---------- 9. TABLET AND PHONE ---------- */
@media (max-width: 991.98px) {
    .cs-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cs-blog-feature__cover {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
}

/* phones: topics scroll sideways, articles become a swipe slider */
@media (max-width: 767.98px) {
    .cs-blog-hero__points li {
        font-size: 13px;
    }

    .cs-blog-topics {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
        margin-bottom: 24px;
        padding: 4px calc(var(--bs-gutter-x, 1.5rem) * 0.5) 8px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent);
        mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent);
    }

    .cs-blog-topics::-webkit-scrollbar {
        display: none;
    }

    .cs-blog-topics button,
    .cs-blog-topics a {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 7px 15px;
        font-size: 13px;
        scroll-snap-align: start;
    }

    .cs-blog-topics button:hover,
    .cs-blog-topics a:hover {
        transform: none;
    }

    .cs-blog-grid {
        display: flex;
        gap: 14px;
        margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
        padding: 6px calc(var(--bs-gutter-x, 1.5rem) * 0.5) 22px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .cs-blog-grid::-webkit-scrollbar {
        display: none;
    }

    .cs-blog-grid:focus-visible {
        outline: none;
    }

    .cs-blog-card {
        flex: 0 0 86%;
        scroll-snap-align: start;
    }

    .cs-blog-slider__nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        margin-top: 4px;
    }

    .cs-blog-slider__btn {
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        border: 1px solid var(--blog-line);
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 6px 16px rgba(8, 72, 112, 0.1);
        color: var(--blog-blue);
        font-size: 15px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition:
            background 0.25s ease,
            color 0.25s ease,
            opacity 0.25s ease;
    }

    .cs-blog-slider__btn:not(:disabled):active,
    .cs-blog-slider__btn:not(:disabled):hover {
        border-color: transparent;
        background: var(--cs-grad-brand);
        color: #fff;
    }

    .cs-blog-slider__btn:disabled {
        opacity: 0.4;
        cursor: default;
    }

    .cs-blog-slider__dots {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .cs-blog-slider__dots span {
        width: 7px;
        height: 7px;
        border-radius: 50px;
        background: #c5dce8;
        transition:
            width 0.35s var(--blog-ease),
            background 0.3s ease;
    }

    .cs-blog-slider__dots span.is-active {
        width: 22px;
        background: var(--blog-blue);
    }

    .cs-blog-more {
        display: none;
    }

    .cs-blog-cta .cs-btn-group .cs-btn {
        width: 100%;
    }

    .cs-blog-cta__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cs-blog-cta__stats li:nth-child(2) {
        border-right: 0;
    }

    .cs-blog-cta__stats li:nth-child(-n + 2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }
}

@media (max-width: 575.98px) {
    .cs-blog-hero {
        padding-bottom: 110px;
    }

    .cs-blog-hero__points {
        gap: 8px;
    }

    .cs-blog-hero__points li {
        padding: 7px 13px;
    }

    .cs-blog-featured {
        margin-top: -70px;
    }

    .cs-blog-tag--featured {
        top: 14px;
        left: 14px;
    }

    /* topic badge moves to the bottom right of the image on phones */
    .cs-blog-tag--topic {
        top: auto;
        right: 14px;
        bottom: 14px;
        padding: 6px 11px;
        font-size: 11px;
    }

    .cs-blog-feature__body {
        padding: 22px 18px 24px;
    }

    .cs-blog-feature__title {
        font-size: 24px;
    }

    .cs-blog-feature__points {
        padding: 14px 15px;
    }

    .cs-blog-feature__footer .cs-btn {
        width: 100%;
    }

    .cs-blog-card__body {
        padding: 17px 17px 15px;
    }

    .cs-blog-reads {
        padding: 16px;
    }

    .cs-blog-read__img {
        flex-basis: 78px;
        height: 60px;
    }

    .cs-blog-read__go {
        display: none;
    }
}

/* ---------- 10. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    .cs-blog *,
    .cs-blog *::before,
    .cs-blog *::after {
        transition: none !important;
        animation: none !important;
    }

    .cs-blog-card:hover,
    .cs-blog-card:hover .cs-blog-card__cover img,
    .cs-blog-feature:hover .cs-blog-feature__cover img {
        transform: none;
    }
}

/* topics are links (/blog/category/...) */
.cs-blog-topics a {
    text-decoration: none;
}
