.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.video-card {
    display: flex;
    flex-direction: column;
    background-color: #FBF7EF;
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
}

/* Custom player */

.custom-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #2B2420;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.custom-player__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #2B2420;
}

.custom-player__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(43, 36, 32, 0) 55%,
        rgba(43, 36, 32, 0.75) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-player.is-paused .custom-player__shade,
.custom-player.is-hover .custom-player__shade,
.custom-player.is-touch .custom-player__shade {
    opacity: 1;
}

.custom-player__big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #FBF7EF;
    color: #96774B;
    box-shadow: 0 8px 32px rgba(43, 36, 32, 0.28);
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
    cursor: pointer;
}

.custom-player__big-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
    background-color: #F4EDE0;
}

.custom-player__big-play-icon {
    display: block;
    width: 0;
    height: 0;
    margin-left: 5px;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #96774B;
}

.custom-player.is-playing .custom-player__big-play {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.custom-player__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.custom-player.is-paused .custom-player__controls,
.custom-player.is-hover .custom-player__controls,
.custom-player.is-touch .custom-player__controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-player__btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(251, 247, 239, 0.14);
    color: #FBF7EF;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.custom-player__btn:hover {
    background: rgba(251, 247, 239, 0.28);
    color: #F4EDE0;
}

.custom-player__icon {
    width: 18px;
    height: 18px;
}

.custom-player__icon--pause,
.custom-player__icon--muted,
.custom-player__icon--fs-close {
    display: none;
}

.custom-player.is-playing .custom-player__icon--play {
    display: none;
}

.custom-player.is-playing .custom-player__icon--pause {
    display: block;
}

.custom-player.is-muted .custom-player__icon--volume {
    display: none;
}

.custom-player.is-muted .custom-player__icon--muted {
    display: block;
}

.custom-player.is-fullscreen .custom-player__icon--fs-open {
    display: none;
}

.custom-player.is-fullscreen .custom-player__icon--fs-close {
    display: block;
}

.custom-player__progress-wrap {
    position: relative;
    flex: 1;
    height: 18px;
    display: flex;
    align-items: center;
}

.custom-player__progress-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 999px;
    background: rgba(251, 247, 239, 0.28);
    overflow: hidden;
    pointer-events: none;
}

.custom-player__progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #96774B 0%, #C4A574 100%);
    transition: width 0.05s linear;
}

.custom-player__progress {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.custom-player__progress::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

.custom-player__progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 2px solid #FBF7EF;
    border-radius: 50%;
    background: #96774B;
    box-shadow: 0 2px 6px rgba(43, 36, 32, 0.35);
    transition: transform 0.15s ease;
}

.custom-player__progress:active::-webkit-slider-thumb {
    transform: scale(1.15);
}

.custom-player__progress::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
}

.custom-player__progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #FBF7EF;
    border-radius: 50%;
    background: #96774B;
    box-shadow: 0 2px 6px rgba(43, 36, 32, 0.35);
    cursor: pointer;
}

.custom-player__time {
    flex-shrink: 0;
    min-width: 78px;
    color: #FBF7EF;
    font-size: 12px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    text-align: right;
}

.custom-player.is-fullscreen {
    border-radius: 0;
}

.custom-player.is-fullscreen .custom-player__video {
    object-fit: contain;
}

/* Card body */

.video-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px 20px;
}

.video-card__meta {
    display: flex;
    align-items: center;
}

.video-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.video-card__badge--review {
    color: #6B4F2C;
    background-color: rgba(150, 119, 75, 0.16);
}

.video-card__badge--interview {
    color: #2B2420;
    background-color: rgba(43, 36, 32, 0.08);
}

.video-card__title {
    margin: 0;
    color: #2B2420;
    font-family: 'EB Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: none;
}

.video-card__desc {
    margin: 0;
    color: #2B2420;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.5;
}

.video-empty {
    margin: 0;
    padding: 48px 24px;
    text-align: center;
    color: #2B2420;
    font-size: 18px;
    font-weight: 300;
    background-color: #FBF7EF;
    border-radius: 24px;
}

@media (max-width: 990px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .video-card {
        border-radius: 16px;
    }

    .video-card__body {
        padding: 14px 16px 16px;
    }

    .video-card__title {
        font-size: 20px;
    }

    .video-card__desc {
        font-size: 14px;
    }

    .custom-player__big-play {
        width: 60px;
        height: 60px;
    }

    .custom-player__big-play-icon {
        border-width: 10px 0 10px 16px;
        margin-left: 4px;
    }

    .custom-player__controls {
        gap: 8px;
        padding: 10px 12px;
    }

    .custom-player__time {
        display: none;
    }

    .custom-player__btn {
        width: 30px;
        height: 30px;
    }

    .custom-player__icon {
        width: 16px;
        height: 16px;
    }
}
