/*
 * Card Base Styles
 *
 * Shared styles for card components (project cards, news cards).
 * Each card type layers its own overrides on top of these base styles.
 */

/* Card container */
.c-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    padding: 20px;
    background: transparent;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    transition: box-shadow 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.c-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--black, #212121);
    clip-path: inset(50% round 16px);
    transition: clip-path 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}
.c-card:hover::after,
.c-card.is-in-view::after {
    clip-path: inset(0% round 16px);
}
.c-card:hover,
.c-card.is-in-view {
    box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease 0.4s, transform 0.3s ease, color 0.3s ease;
    transform: translateY(-6px);
    color: #fff;
}

/* Link wrapper */
.c-card__link {
    display: block;
    position: relative;
    z-index: 1;
    color: var(--text-colour, #00253F);
    text-decoration: none;
}
.c-card__link:hover,
.c-card__link:focus {
    color: var(--text-colour, #00253F);
    text-decoration: none;
}
.c-card:hover .c-card__link,
.c-card.is-in-view .c-card__link {
    color: #fff;
}

/* Media container */
.c-card__media {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--grey-light, #f5f5f5);
}
.c-card__image {
    position: absolute;
    inset: 0;
}
.c-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    will-change: transform;
}
.c-card:hover .c-card__image img,
.c-card.is-in-view .c-card__image img {
    transform: scale(1.05);
}

/* Content area */
.c-card__content {
    padding: 16px 0 0;
}

/* Title  */
.c-card .c-card__title, .c-client-card .c-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 26px;
    font-style: normal;
    font-weight: 500;
    line-height: 30px;
    letter-spacing: -1.04px;
    text-transform: uppercase;
    margin: 0;
}
.c-card .c-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta info (shared by project cards, client cards, etc.) */
.c-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 400;
}
.c-card__separator {
    flex-shrink: 0;
}
.c-card__separator circle {
    transition: fill 0.3s ease;
}

/* Arrow animation */
.c-card__arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.c-card__arrow path:first-child {
    stroke-dasharray: 14;
    stroke-dashoffset: 14;
    transition: stroke-dashoffset 0.4s ease 0s;
}
.c-card__arrow path:last-child {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset 0.35s ease 0.15s;
}
.c-card:hover .c-card__arrow,
.c-card.is-in-view .c-card__arrow {
    opacity: 1;
    transform: translateX(0);
}
.c-card:hover .c-card__arrow path:first-child,
.c-card.is-in-view .c-card__arrow path:first-child {
    stroke-dashoffset: 0;
}
.c-card:hover .c-card__arrow path:last-child,
.c-card.is-in-view .c-card__arrow path:last-child {
    stroke-dashoffset: 0;
}

/* Decorative Blok Logo */
.c-card svg.blok-logo-card-decoration {
    opacity: 0;
    position: absolute;
    z-index: -1;
    inset: auto -20px -20px auto;
    transform: translateY(52px);
    transition: none;
    transition-delay: 0;
}
.c-card:hover svg.blok-logo-card-decoration,
.c-card.is-in-view svg.blok-logo-card-decoration {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease-out;
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 575px) {
    .c-card {
        padding: 15px;
    }
    .c-card__media {
        border-radius: 12px;
    }
    .c-card__content {
        padding: 12px 0 0;
    }
    .c-card__arrow {
        width: 14px;
        height: 14px;
    }
}
