/* SA Project Hero — Sabbir Ahmed */
.sa-ph {
    position: relative;
    width: 100%;
    min-height: 480px;
    padding: 60px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    isolation: isolate;
}

/* ── Background ── */
.sa-ph__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}

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

.sa-ph__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1;
}

/* ── Play Button (centered) ── */
.sa-ph__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    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-ph__play:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background: #ffffff;
}

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

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

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

.sa-ph--pulse .sa-ph__play::before {
    animation: sa-ph-pulse 2s ease-out infinite;
}

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

/* ── Content (heading + desc) ── */
.sa-ph__content {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.sa-ph__heading {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.sa-ph__desc {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    line-height: 1.6;
    max-width: 600px;
}

/* ── Back Link (positioned) ── */
.sa-ph__back {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.10);
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 100px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sa-ph__back:hover {
    background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.7);
    transform: translateY(-1px);
}

.sa-ph__back:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.sa-ph__back svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* Back link positions */
.sa-ph--back-tr .sa-ph__back { top: 24px; right: 24px; }
.sa-ph--back-tl .sa-ph__back { top: 24px; left: 24px; }
.sa-ph--back-br .sa-ph__back { bottom: 24px; right: 24px; }
.sa-ph--back-bl .sa-ph__back { bottom: 24px; left: 24px; }

/* When back is bottom-left, content needs space — push text up */
.sa-ph--back-bl .sa-ph__content { padding-bottom: 50px; }

/* ── Mobile ── */
@media (max-width: 767px) {
    .sa-ph {
        padding: 30px 24px;
        min-height: 360px;
    }
    .sa-ph__heading {
        font-size: 24px;
    }
    .sa-ph__desc {
        font-size: 14px;
    }
    .sa-ph__play {
        width: 60px;
        height: 60px;
    }
    .sa-ph__back {
        font-size: 13px;
        padding: 8px 14px;
    }
    /* On mobile, back link always at bottom-right or move below content for clarity */
    .sa-ph--back-tr .sa-ph__back,
    .sa-ph--back-tl .sa-ph__back {
        top: 16px;
    }
    .sa-ph--back-tr .sa-ph__back { right: 16px; }
    .sa-ph--back-tl .sa-ph__back { left: 16px; }
    .sa-ph--back-br .sa-ph__back { bottom: 16px; right: 16px; }
    .sa-ph--back-bl .sa-ph__back { bottom: 16px; left: 16px; }
}

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