/* =============================================================
   ARCADE GAMES PAGE
   1. Static grid gallery (same layout as the Action Games page)
   2. Hero intro section
   3. Topic cards and category links
   4. Full-width conclusion band
   ============================================================= */

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

/* ---------- Gallery viewport and track ---------- */
.auto-gallery__viewport {
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

.auto-gallery__track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 per row */
    gap: 18px;
    width: 100%;
    padding: 10px 0;
}

/* ---------- Gallery cards ---------- */
.auto-gallery__card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 300 / 170;      /* keeps the original image shape */
    overflow: hidden;
    border-radius: 11px;
    background: #16161f;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    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(255, 163, 26, 0.12);
    outline: none;
}

.auto-gallery__card:focus-visible {
    box-shadow: 0 0 0 3px #ffb547, 0 10px 28px rgba(0, 0, 0, 0.4);
}

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

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

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

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

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

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

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

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

/* ===========================================================
   TOPIC CARDS
   =========================================================== */
.topic-card {
    max-width: 1100px;
    margin: 24px auto;
    padding: 36px clamp(20px, 4vw, 44px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 163, 26, 0.06) 0%, rgba(15, 23, 42, 0.6) 100%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    transition: border-color 0.25s ease;
}

.topic-card:hover {
    border-color: rgba(255, 163, 26, 0.4);
}

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

.topic-card p:last-child {
    margin-bottom: 0;
}

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

.topic-card h2::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #ffb547, #84cc16, #f97316);
}

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

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

.topic-card ul:last-child {
    margin-bottom: 0;
}

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

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

/* ---------- Purple card variant ---------- */
.topic-card--purple {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(160deg, #3b0c98 0%, #5a10e4 100%);
    box-shadow: 0 8px 28px rgba(255, 163, 26, 0.35);
}

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

.topic-card--purple.topic-card--transparent {
    border-color: rgba(255, 255, 255, 0.08);
    background: transparent;
    box-shadow: none;
}

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

.topic-card--purple h2::before {
    background: #ffa31a;
}

.topic-card--purple h3,
.topic-card--purple li::before {
    color: #ffa31a;
}

/* ---------- Yellow card variant ---------- */
.topic-card--yellow {
    border-color: #e0b400;
    background: #ffa31a;
    box-shadow: 0 8px 28px rgba(240, 188, 0, 0.25);
}

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

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

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

.topic-card--yellow h2::before {
    background: #0b0b11;
}

.topic-card--yellow h3,
.topic-card--yellow li::before {
    color: var(--accent-ink);
}

/* ---------- Cross-category link ---------- */
.inline-category-link {
    color: #ffb547;
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.inline-category-link:hover,
.inline-category-link:focus-visible {
    color: #84cc16;
}

.inline-category-link:focus-visible {
    border-radius: 3px;
    outline: 2px solid #ffb547;
    outline-offset: 3px;
}

/* ===========================================================
   CONCLUSION
   =========================================================== */
.arc-conclusion {
    margin: 24px 0 0;
    padding: 56px 24px;
    color: #0b0b11;
    background: #ffa31a;
    text-align: center;
}

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

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

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .auto-gallery__card,
    .auto-gallery__card img,
    .auto-gallery__title {
        transition: none;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .auto-gallery {
        padding: 40px 14px 20px;
    }

    .auto-gallery__track {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .auto-gallery__card {
        border-radius: 10px;
    }

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

    .topic-card {
        margin: 18px 14px;
        padding: 26px 18px;
        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;
    }

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