
:root {
    --elm-ng-primary: #0B285B;
    --elm-ng-blue: #0B4DA2;
    --elm-ng-accent: #FFB21C;
    --elm-ng-muted: #66758D;
    --elm-ng-border: #E3EAF4;
}

.elm-news-grid {
    direction: rtl;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    font-family: inherit;
}

.elm-news-grid--cols-1 { grid-template-columns: 1fr; }
.elm-news-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.elm-news-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.elm-news-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.elm-news-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--elm-ng-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 40px -26px rgba(11, 40, 91, .55);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.elm-news-card:hover {
    transform: translateY(-7px);
    border-color: rgba(11, 77, 162, .25);
    box-shadow: 0 24px 60px -28px rgba(11, 40, 91, .72);
}

.elm-news-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #EFF5FC, #DDE9F8);
}

.elm-news-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s ease;
}

.elm-news-card:hover .elm-news-card__media img {
    transform: scale(1.055);
}

.elm-news-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.elm-news-card__placeholder svg {
    width: 64px;
    fill: rgba(11, 40, 91, .28);
}

.elm-news-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px 22px;
}

.elm-news-card__badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-top: -15px;
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--elm-ng-accent);
    color: var(--elm-ng-primary) !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none !important;
    box-shadow: 0 8px 20px -12px rgba(255, 178, 28, .9);
}

.elm-news-card__title {
    width: 100%;
    margin: 0 0 9px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.75;
    text-align: right;
}

.elm-news-card__title a {
    color: var(--elm-ng-primary);
    text-decoration: none !important;
}

.elm-news-card__title a:hover {
    color: var(--elm-ng-blue);
}

.elm-news-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #77849A;
    font-size: 12px;
}

.elm-news-card__calendar {
    position: relative;
    width: 15px;
    height: 14px;
    border: 1.7px solid var(--elm-ng-accent);
    border-radius: 3px;
}

.elm-news-card__calendar::before {
    content: "";
    position: absolute;
    top: 3px;
    right: 2px;
    left: 2px;
    height: 1px;
    background: var(--elm-ng-accent);
}

.elm-news-card__calendar::after {
    content: "";
    position: absolute;
    top: -3px;
    right: 3px;
    width: 2px;
    height: 5px;
    border-radius: 2px;
    background: var(--elm-ng-accent);
    box-shadow: 6px 0 0 var(--elm-ng-accent);
}

.elm-news-card__excerpt {
    width: 100%;
    margin: 0 0 17px;
    color: var(--elm-ng-muted);
    font-size: 13px;
    line-height: 2;
    text-align: right;
}

.elm-news-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    margin-top: auto;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--elm-ng-blue);
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.elm-news-card__button:hover {
    background: var(--elm-ng-accent);
    color: var(--elm-ng-primary) !important;
    transform: translateX(-2px);
}

.elm-news-card__arrow {
    font-size: 17px;
    line-height: 1;
}

.elm-news-grid__empty {
    direction: rtl;
    padding: 30px;
    border: 1px dashed var(--elm-ng-border);
    border-radius: 16px;
    background: #fff;
    color: var(--elm-ng-muted);
    text-align: center;
}

@media (max-width: 1024px) {
    .elm-news-grid,
    .elm-news-grid--cols-3,
    .elm-news-grid--cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .elm-news-grid,
    .elm-news-grid--cols-2,
    .elm-news-grid--cols-3,
    .elm-news-grid--cols-4 {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .elm-news-card__body {
        padding-right: 17px;
        padding-left: 17px;
    }

    .elm-news-card__title {
        font-size: 17px;
    }
}
