/* ================= MODERN BLOG SECTION ================= */
.cs-blog-modern {
    background: var(--cs-white, #ffffff);
}

.cs-blog-modern,
.cs-blog-modern * {
    box-sizing: border-box;
}

/* blog cards — headings come from common.css */
.cs-blog-modern .cs-section-head {
    max-width: 900px;
    margin: 0 auto 42px;
    text-align: center;
}

.cs-blog-modern .cs-eyebrow {
    justify-content: center;
}

.cs-blog-modern .cs-subtext {
    max-width: 740px;
    margin-right: auto;
    margin-left: auto;
}

/* ================= BOOTSTRAP GRID ================= */
.cs-blog-modern__list {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.cs-blog-modern__list > li {
    display: flex;
    min-width: 0;
}

/* ================= CARD ================= */
.cs-blog-modern__card {
    --blog-accent: var(--cs-primary, #0870af);
    --blog-soft: #edf6fc;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 10px 10px 0;
    border: 1px solid var(--cs-border, #e5eff2);
    border-radius: 24px;
    background: var(--cs-white, #ffffff);
    box-shadow:
        0 2px 4px rgb(16 53 74 / 2%),
        0 14px 36px rgb(16 53 74 / 5%);
    transition:
        transform 250ms ease,
        border-color 250ms ease,
        box-shadow 250ms ease;
}

.cs-blog-modern__card--social {
    --blog-accent: var(--cs-cyan, #0f6d93);
    --blog-soft: #edf6fb;
}

.cs-blog-modern__card--ads {
    --blog-accent: var(--cs-green, #105374);
    --blog-soft: #edf5f8;
}

/* ================= IMAGE ================= */
.cs-blog-modern__image {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 17px;
    background: var(--cs-light, #f1fbfe);
}

.cs-blog-modern__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

.cs-blog-modern__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgb(16 53 74 / 10%));
    pointer-events: none;
}

/* ================= BODY ================= */
.cs-blog-modern__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 20px 14px 18px;
}

/* Category */
.cs-blog-modern__category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 17px;
    border: 1px solid rgba(8, 112, 175, 0.14);
    border-radius: 50px;
    background: linear-gradient(145deg, var(--case-light-blue), rgba(48, 164, 237, 7%));
    color: var(--blog-accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.cs-blog-modern__category::before {
    content: "";
    flex: 0 0 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

/* Admin, date and reading time */
.cs-blog-modern__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 15px;
    width: 100%;
    margin: 16px 0 15px;
    color: #717475;
    font-size: 13px;
    line-height: 1.5;
}

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

.cs-blog-modern__meta i {
    color: var(--blog-accent);
    font-size: 12px;
}

/* Title */
.cs-blog-modern__body h3 {
    margin: 0 0 7px;
    font-size: clamp(17px, 1.55vw, 21px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.45px;
    overflow-wrap: break-word;
}

.cs-blog-modern__body h3 a {
    color: var(--cs-heading, #393939);
    text-decoration: none;
    transition: color 200ms ease;
}

/* Description */
.cs-blog-modern__body > p {
    margin: 0 0 12px;
    color: var(--cs-text, #74787b);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

/* ================= ARTICLE LINK ================= */
.cs-blog-modern__read {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cs-border, #e5eff2);
    color: var(--blog-accent);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.cs-blog-modern__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blog-soft);
    color: var(--blog-accent);
    transition:
        background-color 200ms ease,
        color 200ms ease;
}

.cs-blog-modern__arrow i {
    font-size: 13px;
    transition: transform 200ms ease;
}

/* ================= HOVER AND FOCUS ================= */
@media (hover: hover) {
    .cs-blog-modern__card:hover {
        transform: translateY(-5px);
        border-color: #bfdce9;
        box-shadow: 0 20px 44px rgb(16 53 74 / 10%);
    }

    .cs-blog-modern__card:hover .cs-blog-modern__image img {
        transform: scale(1.045);
    }

    .cs-blog-modern__body h3 a:hover {
        color: var(--blog-accent);
    }

    .cs-blog-modern__read:hover .cs-blog-modern__arrow {
        background: var(--blog-accent);
        color: #ffffff;
    }

    .cs-blog-modern__read:hover .cs-blog-modern__arrow i {
        transform: translateX(2px);
    }
}

.cs-blog-modern a:focus-visible {
    outline: 3px solid var(--cs-primary, #0870af);
    outline-offset: 5px;
    border-radius: 4px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1199.98px) {
    .cs-blog-modern__body {
        padding: 22px 12px 20px;
    }

    .cs-blog-modern__meta {
        gap: 9px 12px;
    }

    .cs-blog-modern__body h3 {
        font-size: 20px;
    }
}

@media (max-width: 767.98px) {
    .cs-blog-modern .cs-section-head {
        margin-bottom: 30px;
    }

    .cs-blog-modern__body {
        padding: 24px 16px 22px;
    }

    .cs-blog-modern__body h3 {
        font-size: 22px;
    }
}

@media (max-width: 575.98px) {
    .cs-blog-modern__card {
        padding: 8px 8px 0;
        border-radius: 20px;
    }

    .cs-blog-modern__image {
        border-radius: 14px;
    }

    .cs-blog-modern__body {
        padding: 22px 14px 20px;
    }

    .cs-blog-modern__meta {
        margin: 14px 0 17px;
    }

    .cs-blog-modern__body h3 {
        font-size: 21px;
    }
}

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
    .cs-blog-modern__card,
    .cs-blog-modern__image img,
    .cs-blog-modern__body h3 a,
    .cs-blog-modern__arrow,
    .cs-blog-modern__arrow i {
        transition: none;
    }

    .cs-blog-modern__card:hover,
    .cs-blog-modern__card:hover .cs-blog-modern__image img,
    .cs-blog-modern__read:hover .cs-blog-modern__arrow i {
        transform: none;
    }
}
