/* ── SCREENSHOTS GALLERY SECTION ── */
.screenshots-bg {
    position: relative;
    background-image: url('../images/screenshort1.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.screenshots-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 0;
}

.screenshots-bg .section-wrap {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    padding: 72px 32px;
}

/* ── Header ── */
.screenshots-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 44px;
    gap: 20px;
}

.screenshots-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.screenshots-sub {
    color: rgba(255, 255, 255, 0.62);
    font-size: 1rem;
    line-height: 1.5;
}

/* ── Light / Dark Tabs ── */
.screenshots-tabs {
    display: flex;
    gap: 28px;
    flex-shrink: 0;
    align-items: center;
    padding-bottom: 4px;
}

.ss-tab {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px 0 10px;
    position: relative;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.ss-tab.active {
    color: #fff;
}

.ss-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: #e53e3e;
}

/* ── Carousel wrapper ── */
.screenshots-carousel {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ss-track-outer {
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
}

.ss-track {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* 4 slides visible on desktop */
.ss-slide {
    flex: 0 0 calc(25% - 15px);
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    transition: transform 0.3s;
}

.ss-slide:hover {
    transform: translateY(-6px);
}

.ss-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Arrows ── */
.ss-arrow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #222;
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding-bottom: 2px;
}

.ss-arrow:hover:not([data-disabled="true"]) {
    background: #fff;
    transform: scale(1.1);
}

.ss-arrow[data-disabled="true"] {
    opacity: 0.3;
    cursor: default;
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .ss-slide          { flex: 0 0 calc(50% - 10px); }
    .screenshots-title { font-size: 1.9rem; }
}

@media (max-width: 768px) {
    /* background-attachment: fixed doesn't work on iOS */
    .screenshots-bg { background-attachment: scroll; }

    /* ── Switch to native horizontal scroll on mobile ── */
    .ss-arrow { display: none; }

    .screenshots-carousel { gap: 0; }

    .ss-track-outer {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-radius: 0;
        /* Break out of section-wrap 16px padding to reach screen edges */
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-bottom: 8px;
    }

    .ss-track-outer::-webkit-scrollbar { display: none; }

    /* Disable JS transform on mobile — use native scroll instead */
    .ss-track {
        transition: none !important;
        transform: none !important;
        width: max-content;
        gap: 14px;
    }

    .ss-slide {
        flex: 0 0 72vw;
        scroll-snap-align: start;
    }

    /* 16px trailing space after last slide */
    .ss-slide:last-child { margin-right: 16px; }
}

@media (max-width: 640px) {
    .screenshots-bg .section-wrap { padding: 52px 16px; }
    .screenshots-header            { flex-direction: column; align-items: flex-start; }
    .screenshots-title             { font-size: 1.6rem; }
}

/* ── Page-indicator dots ── */
.ss-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    padding: 10px;
    min-height: 36px;
}

.ss-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    transition: background 0.3s ease, width 0.3s ease;
}

.ss-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.ss-dot.active {
    width: 30px;
    border-radius: 5px;
    background: #ffffff;
    cursor: default;
}

@media (max-width: 640px) {
    .ss-dots          { gap: 8px; margin-top: 24px; }
    .ss-dot           { width: 8px; height: 8px; }
    .ss-dot.active    { width: 24px; }
}
