/* =============================================================
   SPORTS GAMES PAGE
   1. Auto-scrolling gallery
   2. Hero intro section
   3. Topic cards (paragraph + h2 + h3 + bullets)
   4. Conclusion (full-width yellow band above FAQs)
   ============================================================= */

/* ---------- Gallery header ---------- */
.auto-gallery {
    padding: 60px 20px 30px;
}

.auto-gallery__header {
    max-width: 1240px;
    margin: 0 auto 28px;
    text-align: center;
}

.auto-gallery__header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}

.auto-gallery__header h2 span {
    background: linear-gradient(90deg, #f9d800, #84cc16, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.auto-gallery__header p {
    margin: 10px auto 0;
    color: #9ca3af;
    font-size: 1rem;
    max-width: 620px;
}

/* ---------- Viewport (clips the moving track) ---------- */
.auto-gallery__viewport {
    overflow: hidden;
    width: 100%;
    /* Soft fade at the edges so cards don't pop in/out abruptly */
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 60px, black calc(100% - 60px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 60px, black calc(100% - 60px), transparent 100%);
}

/* ---------- Track (the part that actually scrolls) ---------- */
.auto-gallery__track {
    display: flex;
    gap: 16px;
    width: max-content;          /* let it grow beyond viewport */
    padding: 10px 0;
    animation: auto-gallery-scroll 32s linear infinite;
    will-change: transform;
}

/* Pause when the user hovers anywhere over the gallery */
.auto-gallery:hover .auto-gallery__track,
.auto-gallery:focus-within .auto-gallery__track {
    animation-play-state: paused;
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
    .auto-gallery__track {
        animation: none;
    }
}

/* ---------- Card (the actual link) ---------- */
.auto-gallery__card {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 300px;
    height: 170px;
    border-radius: 11px;
    overflow: hidden;
    text-decoration: none;
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s ease;
}

.auto-gallery__card:hover,
.auto-gallery__card:focus-visible {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.12);
    outline: none;
}

.auto-gallery__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.auto-gallery__card:hover img {
    transform: scale(1.08);
}

/* Title overlay shown on hover */
.auto-gallery__title {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 16px 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.auto-gallery__card:hover .auto-gallery__title,
.auto-gallery__card:focus-visible .auto-gallery__title {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Keyframes ----------
   Track has 2 duplicated sets, so translating by -50% wraps seamlessly. */
@keyframes auto-gallery-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===========================================================
   2. HERO INTRO SECTION
   =========================================================== */
.act-intro {
    padding: 30px 20px 50px;
}

.act-intro__inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.act-intro__inner h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 18px;
}

.act-intro__inner h1 span {
    background: linear-gradient(90deg, #f9d800, #84cc16, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.act-intro__inner p {
    color: #cfcfcf;
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    line-height: 1.75;
    margin: 0;
}

/* ===========================================================
   3. TOPIC CARDS — paragraph + h2 + h3 + bullets
   =========================================================== */
.topic-card {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 36px clamp(20px, 4vw, 44px);
    margin: 24px auto;
    max-width: 1100px;
    /* Soft glow that follows the page palette */
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.topic-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
}

.topic-card p {
    color: #cfcfcf;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0 0 22px;
}

.topic-card h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.875rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin: 0 0 8px;
    position: relative;
    padding-left: 16px;
}

/* Accent bar before each h2 — matches the .accent-line pattern used in index.html */
.topic-card h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #f9d800, #84cc16, #f97316);
}

.topic-card h3 {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 700;
    color: #a855f7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 18px 0 14px;
}

.topic-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 22px;
}

.topic-card ul li {
    position: relative;
    padding: 6px 0 6px 28px;
    color: #e5e7eb;
    font-size: 0.975rem;
    line-height: 1.55;
}

.topic-card ul li::before {
    content: "▸";
    position: absolute;
    left: 6px;
    top: 6px;
    color: #f9d800;
    font-size: 0.85rem;
    line-height: 1.55;
}

/* ===========================================================
   3b. PURPLE TOPIC-CARD VARIANT — brand color override
   =========================================================== */
.topic-card--purple {
    background: linear-gradient(160deg, #5A10E4 0%, #7c3aed 100%);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 28px rgba(90, 16, 228, 0.35);
}

.topic-card--purple:hover {
    border-color: rgba(255, 255, 255, 0.32);
}

.topic-card--purple p {
    color: #f1f1f8;
}

.topic-card--purple h2 {
    color: #ffffff;
}

/* Bright yellow bar — pops nicely on deep purple */
.topic-card--purple h2::before {
    background: #FECB01;
}

/* ---------- Transparent purple override (no card fill, body bg shows through) ---------- */
.topic-card--purple.topic-card--transparent {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.topic-card--purple h3 {
    color: #FECB01;                /* yellow sub-heading for contrast */
}

.topic-card--purple ul li {
    color: #f1f1f8;
}

/* Yellow bullet markers */
.topic-card--purple ul li::before {
    color: #FECB01;
}

/* ===========================================================
   4. YELLOW TOPIC-CARD VARIANT — overrides .topic-card
   =========================================================== */
.topic-card--yellow {
    background: #FECB01;
    border-color: #e0b400;
    box-shadow: 0 8px 28px rgba(240, 188, 0, 0.25);
}

.topic-card--yellow:hover {
    border-color: #c89e00;
}

/* Dark text on yellow for contrast */
.topic-card--yellow p {
    color: #1a1a1a;
}

.topic-card--yellow h2 {
    color: #0d0d16;
}

/* Swap the gradient bar for a dark one (gradient won't show on yellow) */
.topic-card--yellow h2::before {
    background: #0d0d16;
}

.topic-card--yellow h3 {
    color: #5A10E4;                /* deep purple still pops on yellow */
}

.topic-card--yellow ul li {
    color: #1a1a1a;
}

/* Swap the bullet marker from yellow to dark purple */
.topic-card--yellow ul li::before {
    color: #5A10E4;
}

/* ===========================================================
   5. CONCLUSION — full-width yellow band
   =========================================================== */
.act-conclusion {
    background: #FECB01;           /* site accent yellow */
    color: #0d0d16;                /* dark text on yellow for contrast */
    margin: 24px 0 0;              /* no left/right margin — full bleed */
    padding: 56px 24px;            /* generous padding all around */
    text-align: center;
}

.act-conclusion__inner {
    max-width: 960px;
    margin: 0 auto;
}

.act-conclusion h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 24px;
    color: #0d0d16;
}

.act-conclusion h2 span {
    color: #5A10E4;                /* deep purple "clus" matches brand */
}

.act-conclusion p {
    font-size: clamp(0.95rem, 1.3vw, 1.0625rem);
    line-height: 1.8;
    margin: 0 0 18px;
    color: #1a1a1a;
}

.act-conclusion p:last-child {
    margin-bottom: 0;
}

/* ---------- Mobile ---------- */
/* ===========================================================
   RESPONSIVE — combine gallery + topic-card + hero + conclusion overrides
   =========================================================== */
@media (max-width: 768px) {
    .auto-gallery {
        padding: 40px 14px 20px;
    }

    .auto-gallery__card {
        width: 260px;
        height: 147px;
        border-radius: 14px;
    }

    .auto-gallery__track {
        gap: 14px;
        animation-duration: 26s;   /* slightly faster on small screens */
    }

    .auto-gallery__viewport {
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 30px, black calc(100% - 30px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, black 30px, black calc(100% - 30px), transparent 100%);
    }

    .act-intro {
        padding: 20px 16px 36px;
    }

    .topic-card {
        padding: 26px 18px;
        margin: 18px 14px;
        border-radius: 16px;
    }

    .topic-card h2 {
        font-size: 1.25rem;
    }

    .topic-card h3 {
        font-size: 1rem;
    }

    .topic-card ul {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .act-conclusion {
        padding: 40px 18px;
        margin-top: 18px;
    }
}
