/* Jolixo — Homepage: hero, game rows and the Trending/Genres panel. */

/* homepage layout */
.home-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr) 320px;
    gap:28px;
    align-items:start;
}

.home-main {
    min-width:0;
}

.home-main .home-section {
    margin:34px 0;
}

.home-main .section-header {
    align-items:center;
}

.home-main .section-header h2,.aside-head h2 {
    margin:0;
    font-size:22px;
    letter-spacing:-.03em;
}

.home-main .game-grid {
    grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
}

/* hero: image-led, copy bottom-left */
.hero-carousel {
    border-radius:26px;
    border:1px solid var(--border);
    background:var(--soft);
}

.hero-viewport {
    height:clamp(340px,30vw,460px);
}

.hero-slide:before {
    background:linear-gradient(0deg,rgba(9,12,22,.92) 0%,rgba(9,12,22,.55) 38%,rgba(9,12,22,0) 70%),linear-gradient(90deg,rgba(9,12,22,.5),transparent 55%);
}

.hero-copy {
    top:auto;
    bottom:34px;
    transform:none;
    left:34px;
    right:34px;
    max-width:520px;
    color:#fff;
}

.hero-tags {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:14px;
}

.hero-tags span {
    padding:5px 12px;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
    color:#fff;
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.18);
    backdrop-filter:blur(8px);
}

.hero-copy h2 {
    font-size:clamp(2rem,3.4vw,3.2rem);
    color:#fff!important;
    margin-bottom:10px;
}

.hero-copy p {
    color:rgba(255,255,255,.78);
    max-width:420px;
    margin-bottom:20px;
}

.hero-cta .btn svg {
    width:16px;
    height:16px;
    fill:currentColor;
}

.hero-controls {
    left:auto;
    right:28px;
    bottom:30px;
    gap:16px;
    justify-content:flex-end;
}

.hero-arrows button {
    background:rgba(255,255,255,.12);
    border-color:rgba(255,255,255,.2);
    color:#fff;
    backdrop-filter:blur(8px);
}

.slide-dots button {
    background:rgba(255,255,255,.35);
}

/* horizontal game row */
.row-nav {
    display:flex;
    align-items:center;
    gap:8px;
}

.row-nav .more-link {
    margin-right:6px;
}

.row-nav button {
    width:38px;
    height:38px;
    border-radius:50%;
    border:1px solid var(--border);
    background:var(--surface);
    color:var(--ink);
    font-size:15px;
    transition:background .18s;
}

.row-nav button:hover {
    background:var(--soft);
}

.row-track {
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:clamp(150px,15vw,196px);
    gap:18px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    padding:4px 2px 8px;
    margin:0 -2px;
}

.row-track::-webkit-scrollbar {
    display:none;
}

.row-track .game-card {
    scroll-snap-align:start;
}

/* right panel */
.home-aside {
    position:sticky;
    top:120px;
    display:grid;
    gap:20px;
}

.aside-card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:22px;
    padding:20px;
}

.aside-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:14px;
}

.rank-list,.genre-list {
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    gap:6px;
}

.rank-list a {
    display:flex;
    align-items:center;
    gap:12px;
    padding:6px;
    border-radius:14px;
    transition:background .18s;
}

.rank-list a:hover,.genre-list a:hover {
    background:var(--soft);
}

.rank {
    width:20px;
    text-align:center;
    font-weight:900;
    color:var(--muted);
    font-size:13px;
}

.rank-list li:first-child .rank {
    color:var(--coral);
}

.rank-list img {
    width:52px;
    height:52px;
    border-radius:12px;
    object-fit:cover;
    flex:none;
    background:var(--soft);
}

.rank-text {
    min-width:0;
    display:grid;
}

.rank-text strong {
    font-size:13px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.rank-text small {
    font-size:11px;
    color:var(--muted);
    font-weight:700;
}

.genre-list a {
    display:flex;
    align-items:center;
    gap:12px;
    padding:8px;
    border-radius:12px;
    font-weight:700;
    font-size:14px;
}

.genre-ico {
    width:32px;
    height:32px;
    border-radius:10px;
    display:grid;
    place-items:center;
    background:rgba(255,119,87,.12);
    color:var(--coral);
}

.genre-list small {
    margin-left:auto;
    font-size:11px;
    font-weight:800;
    color:var(--muted);
    background:var(--soft);
    padding:3px 9px;
    border-radius:999px;
}

[data-theme=dark] .promo-strip {
    background:linear-gradient(110deg,rgba(255,119,87,.16),rgba(232,63,111,.1));
    border-color:rgba(255,119,87,.25);
}

[data-theme=dark] .promo-icon {
    background:rgba(255,119,87,.18);
    color:var(--coral);
}

@media(max-width:1350px) {
    .home-layout {
        grid-template-columns:minmax(0,1fr) 280px;
        gap:22px;
    }
}

@media(max-width:1150px) {
    .home-layout {
        grid-template-columns:1fr;
    }
    .home-aside {
        position:static;
        grid-template-columns:1fr 1fr;
    }
}

@media(max-width:760px) {
    .home-aside {
        grid-template-columns:1fr;
    }
    .hero-copy {
        left:20px;
        right:20px;
        bottom:56px;
    }
    .hero-controls {
        left:20px;
        right:16px;
        bottom:16px;
        justify-content:space-between;
    }
    .row-track {
        grid-auto-columns:42%;
        gap:13px;
    }
    .theme-toggle {
        width:38px;
        height:38px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .app-shell,.menu-toggle {
        transition:none;
    }
}
