/* SA Video Card — Sabbir Ahmed */
.sa-vc {
    position: relative;
    background: #0F1218;
    border-radius: 24px;
    padding: 16px 16px 20px;
    box-sizing: border-box;
    color: #ffffff;
    isolation: isolate;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
}

a.sa-vc { color: inherit; }

a.sa-vc:focus-visible,
a.sa-vc__image:focus-visible,
a.sa-vc__play:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.sa-vc--clickable { cursor: pointer; }

/* ── Gradient Border via ::before mask ── */
.sa-vc--border-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.55) 0%,
        rgba(255,255,255,0.20) 30%,
        rgba(255,255,255,0.05) 70%,
        rgba(255,255,255,0.10) 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

/* ── Image ── */
.sa-vc__image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    text-decoration: none;
    z-index: 1;
}

@supports not (aspect-ratio: 1) {
    .sa-vc__image { height: 320px; }
}

.sa-vc__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image overlay (darkening / gradient) */
.sa-vc__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1;
    pointer-events: none;
    display: block;
}

.sa-vc__no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* ── Inline player iframe (when active) ── */
.sa-vc__image.is-playing iframe,
.sa-vc__image.is-playing video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 5;
    background: #000;
}
.sa-vc__image.is-playing img,
.sa-vc__image.is-playing .sa-vc__play,
.sa-vc__image.is-playing .sa-vc__overlay {
    display: none;
}

/* ── Play Button ── */
.sa-vc__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.92);
    color: #000000;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    border: 0;
    padding: 0;
}

.sa-vc:hover .sa-vc__play,
.sa-vc__play:hover {
    background: #ffffff;
}

.sa-vc__play:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.sa-vc__play svg {
    width: 36%;
    height: 36%;
    margin-left: 4%; /* visual centering of triangle */
    fill: currentColor;
    display: block;
}

/* Pulse ring */
.sa-vc__play::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    z-index: -1;
    opacity: 0;
}

.sa-vc--pulse .sa-vc__play::before {
    animation: sa-vc-pulse 2s ease-out infinite;
}

@keyframes sa-vc-pulse {
    0%   { opacity: 0.5; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.6); }
}

/* ── Label ── */
.sa-vc__label {
    margin: 16px 0 0;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

/* Image zoom on hover (default subtle) */
.sa-vc:hover .sa-vc__image img {
    transform: scale(1.05);
}

/* Mobile */
@media (max-width: 767px) {
    .sa-vc { padding: 12px 12px 16px; }
    .sa-vc__label { font-size: 16px; }
    .sa-vc__play { width: 60px; height: 60px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sa-vc, .sa-vc__image img, .sa-vc__play, .sa-vc--pulse .sa-vc__play::before {
        transition: none !important;
        animation: none !important;
    }
    .sa-vc:hover .sa-vc__image img { transform: none; }
    .sa-vc__play:hover { transform: translate(-50%, -50%); }
}
