/* SA Portfolio Carousel — Sabbir Ahmed */
.sa-pc-section {
    position: relative;
    width: 100%;
    padding: 40px 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── Stage ── */
.sa-pc-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.sa-pc-track {
    display: flex;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: stretch;
}

.sa-pc-stage[data-effect="fade"] .sa-pc-track {
    position: relative;
}
.sa-pc-stage[data-effect="fade"] .sa-pc-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.sa-pc-stage[data-effect="fade"] .sa-pc-slide.is-current {
    opacity: 1;
    position: relative;
}

.sa-pc-stage.is-grab { cursor: grab; }
.sa-pc-stage.is-dragging { cursor: grabbing; }
.sa-pc-stage.is-dragging .sa-pc-track { transition: none; }

/* ── Slide ── */
.sa-pc-slide {
    flex-shrink: 0;
    box-sizing: border-box;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ── Card ── */
.sa-pc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.sa-pc-card > * {
    width: 100%;
}

.sa-pc-card[href]:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
    border-radius: 16px;
}

.sa-pc-card__image {
    width: 100%;
    aspect-ratio: 235 / 150;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    position: relative;
    box-sizing: border-box;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1) {
    .sa-pc-card__image {
        height: 150px;
    }
}

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

.sa-pc-card:hover .sa-pc-card__image img {
    transform: scale(1.05);
}

.sa-pc-card__no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    font-weight: 500;
}

.sa-pc-card__no-image::before {
    content: '\1F5BC';  /* picture frame emoji as placeholder */
    font-size: 32px;
    opacity: 0.4;
}

.sa-pc-card__label {
    margin-top: 14px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.sa-pc-card__meta {
    margin-top: 4px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    line-height: 1.4;
}

/* ── Edge fade masks ── */
.sa-pc-edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    pointer-events: none;
    z-index: 5;
}

.sa-pc-edge--left  { left: 0; }
.sa-pc-edge--right { right: 0; }

/* ── Arrows ── */
.sa-pc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.25s ease, transform 0.25s ease;
}

.sa-pc-arrow:hover {
    background: rgba(255,255,255,0.2);
}

.sa-pc-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

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

.sa-pc-arrow--prev { left: 24px; }
.sa-pc-arrow--next { right: 24px; }

.sa-pc-arrow svg {
    width: 20px;
    height: 20px;
}

/* ── Dots (chunky pills) ── */
.sa-pc-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.sa-pc-dot {
    width: 36px;
    height: 6px;
    background: rgba(255,255,255,0.18);
    border: 0;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sa-pc-dot:hover {
    background: rgba(255,255,255,0.3);
}

.sa-pc-dot.is-active {
    background: #ffffff;
    width: 50px;
}

.sa-pc-dot:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .sa-pc-track,
    .sa-pc-card__image img,
    .sa-pc-arrow,
    .sa-pc-dot,
    .sa-pc-slide {
        transition: none !important;
    }
}


/* Cloned slides for infinite loop — visually identical, hidden from screen readers */
.sa-pc-slide.is-clone {
    /* Visible but flagged via JS clone class */
}
