.blog-project-card,
.blog-project-card * {
    box-sizing: border-box;
}

.blog-project-card {
    position: relative;
    width: 100%;
    min-width: 346px;
    max-width: 420px;
    flex: 1;
    overflow: hidden;
    border: 0;
    border-radius: 11px;
    background: var(--uicolor2, #111b59);
    color: #ffffff;
    isolation: isolate;
}

.blog-project-card__link {
    position: relative;
    width: 100%;
    aspect-ratio: 1.428571 / 1;
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

/* Match the card height in the home page blog carousel while keeping the archive grid width. */
.blog-archive .blog-project-card__link {
    height: clamp(294px, 25.2vw, 421.4px);
}

.blog-project-card__media,
.blog-project-card__image,
.blog-project-card__shade {
    position: absolute;
    inset: 0;
    display: block;
}

.blog-project-card__media {
    z-index: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(239, 24, 36, .28), transparent 60%),
        var(--uicolor2, #111b59);
}

.blog-project-card__image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.015);
    transition: transform .65s cubic-bezier(.2, .75, .25, 1);
}

.blog-project-card__image--primary {
    z-index: 1;
    opacity: 1;
}

.blog-project-card__shade {
    z-index: 3;
    background: linear-gradient(180deg, rgba(8, 17, 71, 0) 35%, rgba(8, 17, 71, .16) 53%, rgba(var(--uicolor-code) / 80%) 100%);
    pointer-events: none;
}

.blog-project-card__arrow {
    position: absolute;
    z-index: 5;
    top: 34px;
    left: 34px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--uicolor);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .12);
    transition: background-color .25s ease, transform .4s cubic-bezier(.2, .75, .25, 1);
}

.blog-project-card__arrow.blog-project-card__arrow--home {
    width: 78px;
    height: 78px;
}

.blog-project-card__arrow:hover .button-arrow-hover svg:last-child {
    transform: translatex(0) translatey(0) translatez(0) scale(1);
}

.blog-project-card__arrow:hover .button-arrow-hover svg:first-child {
    transform: translatex(200%) translatey(-200%) translatez(0) scale(0);
}

.blog-project-card__arrow:hover {
    background-color: var(--uicolor2);
}

.blog-project-card__arrow:hover span.button-arrow-hover svg:first-child {
    transform: translatex(200%) translatey(-200%) translatez(0) scale(0);
}

.blog-project-card__content {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 23px;
    padding: 30px 40px 34px;
    direction: rtl;
    text-align: start;
}

.blog-project-card__category {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    min-height: 39px;
    padding: 8px 10px;
    overflow: hidden;
    border-radius: 6px;
    background: #ffffff;
    color: var(--Text-color, #0a165e);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-project-card__category-label:last-child:not(:first-child)::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-inline: 8px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

.blog-project-card__title {
    max-width: 92%;
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-size: 23px;
    font-weight: 600;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-project-card:hover .blog-project-card__image,
.blog-project-card:focus-within .blog-project-card__image {
    transform: scale(1.075);
}

.blog-project-card:hover .blog-project-card__arrow,
.blog-project-card:focus-within .blog-project-card__arrow {
    transform: rotate(8deg) scale(1.08);
}

.blog-project-card__arrow:hover span.button-arrow-hover svg:last-child {
    transform: translatex(0) translatey(0) translatez(0) scale(1);
}

.blog-project-card__link:focus-visible {
    outline: 3px solid var(--uicolor, #ef1824);
    outline-offset: -3px;
}

@media (max-width: 980px) {
    .blog-archive .blog-project-card__link {
        height: min(51.8vw, 364px);
    }

    .blog-project-card__arrow {
        top: 24px;
        right: 24px;
        width: 64px;
        height: 64px;
    }

    .blog-project-card__content {
        gap: 15px;
        padding: 26px;
    }
}

@media (max-width: 761px) {
    .blog-project-card {
    max-width: 100%;
}
}

@media (max-width: 720px) {
    .blog-archive .blog-project-card__link {
        height: min(60.2vw, 308px);
    }
}

@media (max-width: 620px) {
    .blog-project-card__link {
        aspect-ratio: 4 / 3;
    }

    .blog-archive .blog-project-card__link {
        height: min(64.5vw, 330px);
    }

    .blog-project-card__arrow {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }

    .blog-project-card__category {
        min-height: 34px;
        padding: 7px 12px;
        font-size: 11px;
    }

    .blog-project-card__title {
        max-width: 100%;
        font-size: 17px;
    }
}

@media (max-width: 460px) {
    .blog-project-card {
    min-width: 100%;
}
}

@media (max-width: 430px) {
    .blog-archive .blog-project-card__link {
        height: calc(75vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-project-card__image,
    .blog-project-card__arrow {
        transition-duration: 1ms;
    }
}

.blog-project-card__category-label {
    color: inherit;
    text-decoration: none;
}

.blog-project-card__category-label:hover {
    text-decoration: underline;
    cursor: pointer;
}