﻿/* =======================================================
   GALLERIA — NEON CLUB (match HOME)
   no bootstrap
   ======================================================= */

/* Base: forza sfondo scuro (evita bianco) */
:root {
    --container-w: 1240px;
    --acc-1: #7A5AF8; /* viola */
    --acc-2: #AF83DC; /* lilla */
    --hot: #FF4D8D;
    --bg: #0A0A1A;
    --txt: #E6E6FA;
    --txt-dim: #D8D8F0;
}

html, body {
    background: var(--bg) !important;
    color: var(--txt) !important;
    overflow-x: clip;
}

@supports not (overflow-x:clip) {
    html, body {
        overflow-x: hidden;
    }
}

.section {
    max-width: var(--container-w);
    margin-top: -60px;
    padding: 24px 16px;
    box-sizing: border-box;
}

.gal-page {
    background: var(--bg);
    min-height: 100vh;
}

/* ---------- HERO CARD ---------- */
.gal-hero {
    margin-top: 64px;
}
/* lascia spazio al menu sticky se ce l’hai */

.gal-heroCard {
    position: relative;
    border-radius: 20px;
    padding: 22px 18px 16px;
    background: linear-gradient(180deg, rgba(16,16,38,.92), rgba(10,10,30,.94));
    border: 1px solid rgba(175,131,220,.26);
    box-shadow: 0 10px 26px rgba(175,131,220,.16), inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
}

    .gal-heroCard::before {
        content: "";
        position: absolute;
        inset: -2px;
        pointer-events: none;
        background: conic-gradient(from 180deg, transparent, rgba(175,131,220,.30), rgba(122,90,248,.28), transparent);
        opacity: .65;
        filter: blur(12px);
        animation: galSpin 6.2s linear infinite;
    }

    .gal-heroCard::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(900px 260px at 20% 0%, rgba(122,90,248,.22), transparent 55%), radial-gradient(900px 260px at 80% 0%, rgba(175,131,220,.18), transparent 55%);
    }

@keyframes galSpin {
    to {
        transform: rotate(360deg);
    }
}

.gal-kicker,
.gal-title,
.gal-h2 {
    font-family: 'Orbitron',system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.gal-kicker {
    position: relative;
    margin: 0 0 .25rem;
    color: #AF83DC;
    font-weight: 900;
    letter-spacing: .12em;
    font-size: .9rem;
}

.gal-title {
    position: relative;
    margin: 0 0 .35rem;
    font-weight: 900;
    font-size: clamp(1.35rem, 2.3vw, 2.35rem);
    text-shadow: 0 0 14px rgba(175,131,220,.35);
}

.gal-subtitle {
    position: relative;
    margin: 0 0 14px;
    color: var(--txt-dim);
    line-height: 1.6;
    max-width: 900px;
}

/* ---------- TABS (non link, bottoni) ---------- */
.gal-tabs {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.gal-tab {
    appearance: none;
    border: 1px solid rgba(175,131,220,.45);
    background: rgba(10,10,26,.35);
    color: var(--txt);
    border-radius: 999px;
    padding: 10px 12px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
    transition: transform .15s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

    .gal-tab:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(175,131,220,.28);
        border-color: rgba(175,131,220,.85);
        background: rgba(16,16,38,.58);
    }

    .gal-tab.is-active {
        border-color: transparent;
        color: #0A0A1A;
        background: linear-gradient(90deg, var(--acc-1), var(--acc-2));
        box-shadow: 0 12px 28px rgba(122,90,248,.35), 0 0 18px rgba(175,131,220,.18);
    }

.gal-pill {
    display: inline-flex;
    min-width: 34px;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    color: #EDEBFF;
    font-weight: 900;
}

.gal-tab.is-active .gal-pill {
    background: rgba(10,10,26,.25);
    border-color: rgba(10,10,26,.18);
    color: #0A0A1A;
}

/* ---------- BAR (titolo + shuffle) ---------- */
.gal-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    margin-bottom: 12px;
}

.gal-h2 {
    margin: 0;
    font-weight: 900;
    font-size: clamp(1.1rem, 2vw, 1.7rem);
    text-shadow: 0 0 10px rgba(175,131,220,.35);
}

.gal-hint {
    margin: 6px 0 0;
    color: var(--txt-dim);
    font-size: .95rem;
}

.gal-random {
    appearance: none;
    border: 1px solid rgba(175,131,220,.55);
    background: rgba(10,10,26,.45);
    color: #fff;
    font-weight: 900;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,.35);
    transition: transform .15s ease, box-shadow .25s ease, border-color .25s ease;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .82rem;
    white-space: nowrap;
}

    .gal-random:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(175,131,220,.22);
        border-color: rgba(175,131,220,.9);
    }

/* ---------- GRID ---------- */
.gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

/* Card hidden: non vedere tutto all’avvio */
.gal-card.is-hidden {
    display: none;
}

/* ---------- CARD FOTO ---------- */
.gal-card {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(16,16,38,.55);
    border: 1px solid rgba(175,131,220,.18);
    box-shadow: 0 10px 24px rgba(0,0,0,.35), 0 0 18px rgba(175,131,220,.10);
    transform: translateY(10px);
    opacity: 0;
    animation: galReveal .55s ease forwards;
    animation-delay: calc(var(--i) * 18ms);
    will-change: transform, opacity;
}

@keyframes galReveal {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gal-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(from 180deg, transparent, rgba(175,131,220,.30), rgba(122,90,248,.22), transparent);
    opacity: 0;
    transition: opacity .25s ease;
}

.gal-card:hover::before {
    opacity: 1;
}

.gal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,.45), 0 0 24px rgba(175,131,220,.18);
    border-color: rgba(175,131,220,.55);
}

.gal-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    filter: brightness(1.02) contrast(1.06) saturate(1.08);
    transform: scale(1.02);
    transition: transform .35s ease, filter .35s ease;
}

.gal-card:hover .gal-img {
    transform: scale(1.07);
    filter: brightness(1.08) contrast(1.08) saturate(1.12);
}

/* Overlay */
.gal-overlay {
    position: absolute;
    inset: auto 10px 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(10,10,26,.15), rgba(10,10,26,.78));
    border: 1px solid rgba(175,131,220,.25);
    box-shadow: 0 10px 20px rgba(0,0,0,.35);
    color: #fff;
    backdrop-filter: blur(4px) saturate(1.1);
    -webkit-backdrop-filter: blur(4px) saturate(1.1);
    transform: translateY(6px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease, border-color .25s ease;
}

.gal-card:hover .gal-overlay {
    transform: translateY(0);
    opacity: 1;
    border-color: rgba(175,131,220,.55);
}

.gal-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
    background: linear-gradient(90deg, rgba(122,90,248,.95), rgba(175,131,220,.95));
    color: #0A0A1A;
}

.gal-badgeHot {
    background: linear-gradient(90deg, rgba(255,77,141,.95), rgba(175,131,220,.95));
}

.gal-badgeGlow {
    background: linear-gradient(90deg, rgba(77,255,179,.9), rgba(175,131,220,.95));
}

.gal-id {
    font-weight: 900;
    letter-spacing: .03em;
    opacity: .95;
}

/* ---------- Floating back-to-top ---------- */
.gal-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #0A0A1A;
    font-weight: 900;
    background: linear-gradient(135deg, var(--acc-1), var(--acc-2));
    box-shadow: 0 14px 28px rgba(122,90,248,.35), 0 0 20px rgba(175,131,220,.22);
    border: 1px solid rgba(230,230,250,.35);
    transition: transform .15s ease, box-shadow .25s ease;
}

    .gal-fab:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(122,90,248,.45), 0 0 26px rgba(175,131,220,.28);
    }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .gal-grid {
        grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    }

    .gal-img {
        height: 210px;
    }
}

@media (max-width: 560px) {
    .gal-hero {
        margin-top: 52px;
    }

    .gal-heroCard {
        padding: 18px 14px 14px;
    }

    .gal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gal-img {
        height: 170px;
    }

    .gal-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gal-random {
        width: 100%;
        text-align: center;
        padding: 12px 12px;
    }

    .gal-tab {
        width: 100%;
        justify-content: space-between;
    }
}

/* riduci animazioni se utente lo chiede */
@media (prefers-reduced-motion: reduce) {
    .gal-heroCard::before {
        animation: none;
    }

    .gal-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .gal-img {
        transition: none;
    }

    .gal-overlay {
        transition: none;
        opacity: 1;
        transform: none;
    }
}


.gal-tab {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
