.dg-blog-glid,
.dg-blog-glid * {
    box-sizing: border-box;
}

.dg-blog-glid {
    --dg-columns: 3;
    --dg-gap: 24px;
    --dg-accent: #0a7d0a;
    --dg-card-bg: #ffffff;
    --dg-image-ratio: 16 / 10;
    --dg-soft-border: rgba(16, 24, 40, 0.08);
    --dg-text-dark: #101828;
    --dg-text-muted: #667085;
    width: 100%;
}

.dg-blog-header {
    max-width: 820px;
}

.dg-blog-heading {
    margin: 0 0 10px;
    color: var(--dg-text-dark);
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.dg-blog-subtitle {
    margin: 0;
    color: var(--dg-text-muted);
    font-size: 16px;
    line-height: 1.7;
}

.dg-blog-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}

.dg-filter-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.dg-filter-btn:hover,
.dg-filter-btn.is-active {
    transform: translateY(-1px);
}

.dg-blog-posts {
    gap: var(--dg-gap);
}

.dg-blog-layout-grid .dg-blog-posts,
.dg-blog-layout-magazine .dg-blog-posts,
.dg-blog-layout-compact .dg-blog-posts,
.dg-blog-layout-overlay .dg-blog-posts {
    display: grid;
    grid-template-columns: repeat(var(--dg-columns), minmax(0, 1fr));
}

.dg-blog-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--dg-card-bg);
    border: 1px solid var(--dg-soft-border);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    isolation: isolate;
}

.dg-blog-card.dg-hidden {
    display: none !important;
}

.dg-blog-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--dg-image-ratio);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(10, 125, 10, .10), rgba(16, 24, 40, .08));
    text-decoration: none;
}

.dg-blog-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.dg-blog-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}

.dg-blog-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--dg-accent);
    font-weight: 900;
    font-size: 40px;
    letter-spacing: -.08em;
}

.dg-blog-card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dg-blog-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.dg-blog-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dg-blog-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
}

.dg-dot {
    opacity: .45;
}

.dg-blog-title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.dg-blog-title a {
    text-decoration: none;
    transition: color .2s ease;
}

.dg-blog-title a:hover {
    color: var(--dg-accent) !important;
}

.dg-blog-excerpt {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.65;
}

.dg-blog-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-top: auto;
    padding: 11px 15px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.dg-blog-button:hover {
    transform: translateY(-1px);
}

.dg-blog-empty {
    border: 1px dashed var(--dg-soft-border);
    border-radius: 16px;
    padding: 24px;
    color: var(--dg-text-muted);
    background: rgba(16, 24, 40, .02);
}

.dg-hover-lift .dg-blog-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 55px rgba(16, 24, 40, .14);
}

.dg-hover-zoom .dg-blog-card:hover .dg-blog-thumb img,
.dg-hover-lift .dg-blog-card:hover .dg-blog-thumb img,
.dg-hover-glow .dg-blog-card:hover .dg-blog-thumb img {
    transform: scale(1.055);
}

.dg-hover-glow .dg-blog-card:hover {
    border-color: color-mix(in srgb, var(--dg-accent) 45%, transparent);
    box-shadow: 0 22px 60px color-mix(in srgb, var(--dg-accent) 20%, transparent);
}

/* Magazine Hero */
.dg-blog-layout-magazine .dg-first-card {
    grid-column: span 2;
    grid-row: span 2;
}

.dg-blog-layout-magazine .dg-first-card .dg-blog-thumb {
    aspect-ratio: 16 / 12;
}

.dg-blog-layout-magazine .dg-first-card .dg-blog-title {
    font-size: clamp(28px, 4vw, 44px);
}

/* Masonry Cards */
.dg-blog-layout-masonry .dg-blog-posts {
    columns: var(--dg-columns);
    column-gap: var(--dg-gap);
}

.dg-blog-layout-masonry .dg-blog-card {
    display: inline-flex;
    width: 100%;
    margin: 0 0 var(--dg-gap);
    break-inside: avoid;
}

.dg-blog-layout-masonry .dg-card-2 .dg-blog-thumb,
.dg-blog-layout-masonry .dg-card-5 .dg-blog-thumb,
.dg-blog-layout-masonry .dg-card-8 .dg-blog-thumb {
    aspect-ratio: 4 / 5;
}

/* Editorial List */
.dg-blog-layout-list .dg-blog-posts {
    display: flex;
    flex-direction: column;
}

.dg-blog-layout-list .dg-blog-card {
    display: grid;
    grid-template-columns: minmax(220px, 34%) 1fr;
}

.dg-blog-layout-list .dg-blog-thumb {
    min-height: 100%;
    aspect-ratio: auto;
}

.dg-blog-layout-list.dg-no-images .dg-blog-card {
    display: block;
}

/* Timeline */
.dg-blog-layout-timeline .dg-blog-posts {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 30px;
}

.dg-blog-layout-timeline .dg-blog-posts::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(var(--dg-accent), transparent);
}

.dg-blog-layout-timeline .dg-blog-card {
    overflow: visible;
}

.dg-blog-layout-timeline .dg-blog-card::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 26px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--dg-accent);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--dg-accent) 18%, transparent);
}

/* Compact News */
.dg-blog-layout-compact .dg-blog-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: stretch;
}

.dg-blog-layout-compact .dg-blog-thumb {
    aspect-ratio: auto;
    height: 100%;
    min-height: 130px;
}

.dg-blog-layout-compact .dg-blog-card-inner {
    padding: 16px !important;
}

.dg-blog-layout-compact .dg-blog-title {
    font-size: 17px;
    margin-bottom: 8px;
}

.dg-blog-layout-compact .dg-blog-excerpt,
.dg-blog-layout-compact .dg-blog-button {
    display: none;
}

/* Image Overlay */
.dg-blog-layout-overlay .dg-blog-card {
    min-height: 360px;
    justify-content: flex-end;
    background: #111827;
}

.dg-blog-layout-overlay .dg-blog-thumb {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    border-radius: inherit !important;
}

.dg-blog-layout-overlay .dg-blog-thumb::after {
    opacity: 1;
}

.dg-blog-layout-overlay .dg-blog-card-inner {
    margin-top: auto;
    color: #fff;
}

.dg-blog-layout-overlay .dg-blog-title a,
.dg-blog-layout-overlay .dg-blog-meta,
.dg-blog-layout-overlay .dg-blog-excerpt,
.dg-blog-layout-overlay .dg-blog-meta a {
    color: #fff !important;
}

.dg-blog-layout-overlay .dg-blog-excerpt,
.dg-blog-layout-overlay .dg-blog-meta {
    opacity: .9;
}

/* Scroll Slider */
.dg-blog-layout-slider .dg-blog-posts {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.dg-blog-layout-slider .dg-blog-card {
    min-width: min(420px, 85vw);
    scroll-snap-align: start;
}

.dg-blog-layout-slider .dg-blog-thumb::after {
    opacity: .6;
}

.dg-blog-layout-slider .dg-blog-card-inner {
    position: absolute;
    inset: auto 0 0 0;
    color: #fff;
}

.dg-blog-layout-slider .dg-blog-title a,
.dg-blog-layout-slider .dg-blog-meta,
.dg-blog-layout-slider .dg-blog-excerpt,
.dg-blog-layout-slider .dg-blog-meta a {
    color: #fff !important;
}

.dg-blog-layout-slider .dg-blog-thumb {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    border-radius: inherit !important;
}

.dg-no-images .dg-blog-thumb {
    display: none !important;
}

@media (max-width: 1024px) {
    .dg-blog-glid {
        --dg-columns: 2;
    }

    .dg-blog-layout-magazine .dg-first-card {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 767px) {
    .dg-blog-glid {
        --dg-columns: 1;
        --dg-gap: 18px;
    }

    .dg-blog-layout-masonry .dg-blog-posts {
        columns: 1;
    }

    .dg-blog-layout-list .dg-blog-card,
    .dg-blog-layout-compact .dg-blog-card {
        display: flex;
        flex-direction: column;
    }

    .dg-blog-layout-list .dg-blog-thumb,
    .dg-blog-layout-compact .dg-blog-thumb {
        aspect-ratio: var(--dg-image-ratio);
        min-height: auto;
    }

    .dg-blog-heading {
        font-size: 30px;
    }

    .dg-blog-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .dg-filter-btn {
        white-space: nowrap;
    }
}
