/* ════════════════════════════════════════
   SA PORTFOLIO WIDGET — Sabbir Ahmed
════════════════════════════════════════ */

.sa-pf-wrap {
    display: block;
}

/* ── Filter Tabs ── */
.sa-pf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.sa-pf-tab {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.70);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.sa-pf-tab:active {
    transform: scale(0.96);
}

.sa-pf-tab:hover {
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.90);
}

.sa-pf-tab.is-active {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
}

/* ── Grid ── */
.sa-pf-grid {
    display: grid;
}

/* ── Card ── */
.sa-pf-card {
    position: relative;
    background: #111118;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sa-pf-card.sa-pf-hidden {
    display: none;
}

/* ── Filter transition states ── */

/* Card base — always transition opacity + transform */
.sa-pf-card {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        opacity 0.28s ease,
        scale 0.28s ease;
	 z-index: 1;
	 position: relative;
}
.sa-pf-card:before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.8) 20%, rgba(255, 255, 255, 0.2) 35%);
    -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: 1;
}

/* Leaving — fade out + scale down */
.sa-pf-card.sa-pf-leaving {
    opacity: 0;
    transform: scale(0.94);
    pointer-events: none;
}

/* Entering — start invisible + slightly shifted up */
.sa-pf-card.sa-pf-entering {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
}

/* ── Image ── */
.sa-pf-card__image-wrap {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sa-pf-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.sa-pf-card__no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* ── Play Button ── */
.sa-pf-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    border-radius: 50%;
    z-index: 5;
    cursor: pointer;
    text-decoration: none;
    pointer-events: auto;
    /* Always visible — no opacity/display hide */
}

.sa-pf-play svg {
    width: 68px;
    height: 68px;
    display: block;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.50));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.sa-pf-play:hover svg {
    transform: scale(1.10);
    filter: drop-shadow(0 2px 16px rgba(0,0,0,0.70)) brightness(1.25);
}

/* ── Card Body ── */
.sa-pf-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* ── Badge ── */
.sa-pf-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.80);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    width: fit-content;
}

/* ── Title ── */
.sa-pf-card__title {
    margin: 0;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.sa-pf-card__title a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sa-pf-card__title a:hover {
    opacity: 0.80;
}

/* ── Excerpt ── */
.sa-pf-card__excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.60);
}

/* ── CTA Button ── */
.sa-pf-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s ease;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    /* bg + border injected via scoped inline CSS in render() */
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .sa-pf-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    .sa-pf-card__title {
        font-size: 20px;
    }
    .sa-pf-card__body {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .sa-pf-card__title {
        font-size: 18px;
    }
    .sa-pf-card__excerpt {
        font-size: 13px;
    }
}

/* ════════════════════════════════════════
   1-COLUMN STICKY STACK
════════════════════════════════════════ */

/* The grid needs enough scroll space — cards stack up */
.sa-pf-grid[data-columns="1"] {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* All col1 cards: transition helpers for visual depth */
.sa-pf-card.sa-pf-col1 {
    will-change: transform;
    /* override generic transition — sticky mode doesn't get lift hover */
    transition:
        box-shadow 0.35s ease,
        opacity 0.28s ease;
}

/* Rounded corners preserved on sticky cards */
.sa-pf-card.sa-pf-col1 {
    border-radius: 20px !important;
    overflow: hidden;
}

/* Subtle top-peek shadow when a card is underneath another */
.sa-pf-card.sa-pf-col1:not(:last-child) {
    box-shadow:
        0 -2px 0 0 rgba(255,255,255,0.06),
        0 20px 60px rgba(0,0,0,0.45);
}

/* Last card rolls over the rest — stronger shadow */
.sa-pf-card.sa-pf-col1:last-child {
    box-shadow: 0 -8px 32px rgba(0,0,0,0.70);
}

/* Image on the left: ensure it fills height */
.sa-pf-card.sa-pf-col1 .sa-pf-card__image-wrap {
    position: relative;
    overflow: hidden;
}

.sa-pf-card.sa-pf-col1 .sa-pf-card__image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play button centred over left-side image in 1col */
.sa-pf-card.sa-pf-col1 .sa-pf-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}