/* SA Video Hero — Sabbir Ahmed */
.sa-vh {
    position: relative;
    background: #1A1F36;
    border-radius: 28px;
    padding: 20px;
    box-sizing: border-box;
    isolation: isolate;
    width: 100%;
    color: #ffffff;
}

/* Gradient border via ::before mask */
.sa-vh--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.10) 30%,
        rgba(255,255,255,0.05) 70%,
        rgba(255,255,255,0.20) 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;
}

/* ── HEADER ── */
.sa-vh__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px 16px;
    position: relative;
    z-index: 1;
}

.sa-vh__avatars {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.sa-vh__avatar {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #2a2f4a;
    border: 2px solid #1A1F36;
    box-sizing: border-box;
    position: relative;
}

.sa-vh__avatar + .sa-vh__avatar { margin-left: -10px; }

.sa-vh__header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.sa-vh__rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sa-vh__star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sa-vh__star svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.sa-vh__star--filled { color: #ffffff; }
.sa-vh__star--empty  { color: rgba(255,255,255,0.25); }
.sa-vh__star--half   { color: #ffffff; }

.sa-vh__rating-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.85);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    margin-left: 4px;
}

.sa-vh__subtext {
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    line-height: 1.4;
    margin-top: 2px;
}

/* ── VIDEO BLOCK ── */
.sa-vh__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a0a;
    z-index: 1;
    display: block;
}

@supports not (aspect-ratio: 1) {
    .sa-vh__video { padding-bottom: 56.25%; height: 0; }
}

.sa-vh__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.sa-vh__no-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2a1f4a 0%, #1a1f36 50%, #0f1a30 100%);
    z-index: 1;
}

.sa-vh__video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.20);
    z-index: 2;
    pointer-events: none;
}

/* ── Pill Badge ── */
.sa-vh__pill {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}

.sa-vh__video--pill-tl .sa-vh__pill { top: 16px; left: 16px; }
.sa-vh__video--pill-tr .sa-vh__pill { top: 16px; right: 16px; }

/* ── Center Play Button ── */
.sa-vh__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.25);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0;
}

.sa-vh:hover .sa-vh__play,
.sa-vh__play:hover {
    background: rgba(255,255,255,0.4);
}

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

.sa-vh__play:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.sa-vh__play svg {
    width: 38%;
    height: 38%;
    margin-left: 6%;
    fill: currentColor;
    display: block;
}

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

.sa-vh--pulse .sa-vh__play::before {
    animation: sa-vh-pulse 2.2s ease-out infinite;
}

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

/* ── Bottom Gradient Layer ── */
.sa-vh__bottom-bg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

/* ── Bottom Content ── */
.sa-vh__bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    padding: 0 28px 26px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sa-vh__small-icon {
    flex-shrink: 0;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sa-vh__small-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.sa-vh__bottom-text {
    min-width: 0;
    flex: 1;
}

.sa-vh__heading {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.sa-vh__desc {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.5;
}

/* Inline player */
.sa-vh__video.is-playing iframe,
.sa-vh__video.is-playing video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 10;
    background: #000;
}
.sa-vh__video.is-playing .sa-vh__thumb,
.sa-vh__video.is-playing .sa-vh__play,
.sa-vh__video.is-playing .sa-vh__pill,
.sa-vh__video.is-playing .sa-vh__bottom,
.sa-vh__video.is-playing .sa-vh__bottom-bg,
.sa-vh__video.is-playing::after {
    display: none;
}

/* Mobile */
@media (max-width: 767px) {
    .sa-vh { padding: 14px; }
    .sa-vh__header { padding: 6px 8px 12px; gap: 10px; }
    .sa-vh__avatar { width: 26px; height: 26px; }
    .sa-vh__rating-pill { font-size: 10px; }
    .sa-vh__subtext { font-size: 12px; }
    .sa-vh__pill { font-size: 11px; padding: 6px 14px; }
    .sa-vh__play { width: 48px; height: 48px; }
    .sa-vh__heading { font-size: 16px; }
    .sa-vh__desc { font-size: 12px; }
    .sa-vh__bottom { padding: 0 16px 16px; gap: 10px; }
    .sa-vh__small-icon svg { width: 22px; height: 22px; }
}

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