.pec-card {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    margin: 24px 0;
    padding: 18px;
    border: 2px dotted #a8a8a8;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}

.pec-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    align-self: center;
    border-radius: 9px;
    overflow: hidden;
    text-decoration: none;
}

.pec-card__image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

.pec-card__content {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
}

.pec-card__title {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    font-size: clamp(20px, 2.1vw, 28px);
    line-height: 1.25;
}

.pec-card__title a {
    color: inherit;
    text-decoration: none;
}

.pec-card__title a:hover,
.pec-card__title a:focus {
    text-decoration: underline;
}

.pec-card__meta {
    display: -webkit-box;
    margin: 0 0 16px;
    overflow: hidden;
    color: #5d6470;
    font-size: 15px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.pec-card__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 17px;
    border-radius: 7px;
    overflow: hidden;
    background: #1d2327;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transform: translateZ(0);
    animation: pec-button-pulse 1.8s ease-in-out infinite;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.pec-card__button::before {
    position: absolute;
    top: -50%;
    left: -70%;
    width: 38%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0)
    );
    content: "";
    pointer-events: none;
    transform: rotate(18deg);
    animation: pec-button-shine 2.4s ease-in-out infinite;
}

.pec-card__button > span {
    position: relative;
    z-index: 1;
}

.pec-card__button > span:last-child {
    animation: pec-button-arrow 1s ease-in-out infinite;
}

.pec-card__button:hover,
.pec-card__button:focus {
    color: #fff !important;
    opacity: 0.94;
    transform: translateY(-1px) scale(1.01);
}

@keyframes pec-button-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(29, 35, 39, 0.28);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(29, 35, 39, 0);
        transform: scale(1.025);
    }
}

@keyframes pec-button-shine {
    0%,
    35% {
        left: -70%;
    }

    65%,
    100% {
        left: 135%;
    }
}

@keyframes pec-button-arrow {
    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(4px);
    }
}

@media (max-width: 640px) {
    .pec-card {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 14px;
    }

    .pec-card__content {
        display: contents;
    }

    .pec-card__title {
        order: 1;
        margin: 0;
        font-size: 21px;
    }

    .pec-card__media {
        order: 2;
        aspect-ratio: 16 / 9;
    }

    .pec-card__meta {
        order: 3;
        margin: 0;
    }

    .pec-card__button {
        order: 4;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pec-card__button,
    .pec-card__button::before,
    .pec-card__button > span:last-child {
        animation: none;
    }
}
