/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold: #b8960c;
    --gold-light: #d4af37;
    --dark: #0a0a0a;
    --dark2: #111111;
    --dark3: #1a1a1a;
    --text: #e8e8e8;
    --text-dim: #888;
    --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--dark);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===== NAVBAR ===== */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    height: 64px;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(184, 150, 12, 0.15);
}

.nav-logo a {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0 auto;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 0 1.1rem;
    height: 64px;
    line-height: 64px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #aaa;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--text);
}

.nav-menu > li > a .arrow {
    font-size: 0.6rem;
    opacity: 0.6;
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.nav-menu > li > a .arrow:hover { opacity: 1; }

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    background: var(--dark2);
    border: 1px solid rgba(184, 150, 12, 0.2);
    border-top: 2px solid var(--gold);
    min-width: 180px;
    list-style: none;
    z-index: 100;
    white-space: nowrap;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #aaa;
    transition: color 0.2s, background 0.2s;
}

.dropdown-menu li a:hover {
    color: var(--gold-light);
    background: rgba(184, 150, 12, 0.06);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 2px;
    margin-left: 1.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #888;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover, .lang-btn.active {
    border-color: var(--gold);
    color: var(--gold-light);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
}

/* ===== SLIDER ===== */
#slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.slide {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: row;
}

.slide.active {
    display: flex;
}

.slide-image {
    flex: 0 0 65%;
    position: relative;
    overflow: hidden;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    will-change: transform;
}

.slide-info {
    flex: 0 0 35%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 2.5rem 6rem;
    position: relative;
}

.label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}

.slide-info h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 0.8rem;
}

.slide-info .serie {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--gold);
    margin-bottom: 1.2rem;
}

.slide-info .desc {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.7;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.meta-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: 0.2rem;
}

.meta-value {
    display: block;
    font-size: 0.82rem;
    color: var(--text);
}

.cta {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 0.2rem;
    align-self: flex-start;
    transition: color 0.2s, border-color 0.2s;
}

.cta:hover {
    color: var(--gold-light);
    border-color: var(--gold-light);
}

/* Slider controls */
.slider-controls {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35%;
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.08);
}


.dots {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

/* ===== INTRO ===== */
#intro {
    background: var(--dark2);
    padding: 6rem 4rem;
    border-top: 1px solid rgba(184, 150, 12, 0.15);
}

.intro-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 5rem;
    align-items: center;
}

.label-gold {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--gold);
    display: block;
    margin-bottom: 1rem;
}

.intro-text h2 {
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #fff;
}

.intro-text p {
    font-size: 0.92rem;
    color: #999;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 520px;
}

.btn-outline {
    display: inline-block;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 0.7rem 1.5rem;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--dark);
}

.intro-image {
    aspect-ratio: 3/4;
    overflow: hidden;
    border: 1px solid rgba(184, 150, 12, 0.2);
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(20%);
}

/* ===== ARCHIVIO ===== */
#archivio {
    padding: 6rem 4rem;
    background: var(--dark);
    border-top: 1px solid rgba(184, 150, 12, 0.15);
}

.archivio-header {
    text-align: center;
    margin-bottom: 3rem;
}

.archivio-header h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
}

.filtri {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filtro {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #888;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filtro:hover, .filtro.active {
    border-color: var(--gold);
    color: var(--gold-light);
}

.archivio-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: rgba(255,255,255,0.05);
}

.opera-card {
    background: var(--dark);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s;
}

.opera-card.hidden { display: none; }

.opera-card:hover { transform: translateY(-4px); }

.card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.opera-card:hover .card-img img {
    transform: scale(1.06);
}

.card-info {
    padding: 1rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.card-serie {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
    display: block;
    margin-bottom: 0.3rem;
}

.card-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.card-anno {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.archivio-footer {
    text-align: center;
    margin-top: 3rem;
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark2);
    border-top: 1px solid rgba(184, 150, 12, 0.15);
    padding: 2rem;
    text-align: center;
}

footer p {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.social-icons a {
    color: #555;
    transition: color 0.2s;
    width: 20px;
    height: 20px;
}

.social-icons a:hover { color: var(--gold-light); }

.social-icons svg {
    width: 20px;
    height: 20px;
}

/* ===== LANG BLOCKS ===== */
.lang-block { display: none; }
body:not([data-lang]) .lang-it,
body[data-lang="it"]  .lang-it { display: block; }
body[data-lang="en"]  .lang-en { display: block; }
body[data-lang="zh"]  .lang-zh { display: block; }

/* ===== SOCIAL BAR ===== */
.social-bar {
    position: absolute;
    bottom: 4.5rem;
    right: 0;
    width: 35%;
    padding: 0.8rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.social-bar a {
    color: #555;
    transition: color 0.2s;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
}

.social-bar a:hover { color: var(--gold-light); }

.social-bar svg { width: 18px; height: 18px; }

.social-bar .social-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #444;
    margin-right: 0.3rem;
}

/* visibilità per lingua */
.social-east { display: none; }
.social-west { display: flex; gap: 1.2rem; align-items: center; justify-content: center; }

body[data-lang="zh"] .social-west { display: none; }
body[data-lang="zh"] .social-east { display: flex; gap: 1.2rem; align-items: center; justify-content: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .nav-menu { display: none; }
    .hamburger { display: block; }

    /* Lang switcher nascosto nella navbar su mobile */
    .lang-switcher { display: none; }

    /* Pulsanti lingua nel menu mobile */
    .lang-mobile-item {
        list-style: none;
        display: flex;
        gap: 0.5rem;
        padding: 0.8rem 0 0.4rem;
        border-top: 1px solid rgba(184,150,12,0.15);
        margin-top: 0.4rem;
    }
    .lang-mobile-item .lang-btn {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .slide { flex-direction: column; }
    .slide-image { flex: 0 0 55%; }
    .slide-info {
        flex: 0 0 45%;
        padding: 1.5rem 1.5rem 7rem;
        overflow-y: auto;
    }
    .slider-controls { width: 100%; bottom: 48px; }
    #slider { margin-top: 106px; height: calc(100vh - 106px); min-height: unset; }

    /* Social bar su mobile */
    .social-bar {
        width: 100%;
        bottom: 0;
        padding: 0.5rem 1.5rem;
        border-top: 1px solid rgba(255,255,255,0.06);
        background: rgba(10,10,10,0.95);
    }

    .social-label { display: none; }

    /* Dots sopra i controlli su mobile */
    .slider-controls {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.6rem 1rem 0.6rem;
    }

    .dots {
        order: -1;
        width: 100%;
        flex: none;
        justify-content: center;
        margin-bottom: 0.2rem;
    }

    .dot { width: 5px; height: 5px; }

    .intro-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .intro-image { max-width: 320px; }

    #intro, #archivio { padding: 4rem 1.5rem; }

    .archivio-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 600px) {
    .slide-image { flex: 0 0 45%; }
    .slide-info { flex: 0 0 55%; }
    .slide-info h1 { font-size: 1.4rem; }
    .meta-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
}
