/* --- IMPOSTAZIONI GENERALI --- */
:root {
    --primary-color: #E1B000;
    --primary-dark: #C79B00;
    --text-color: #212529;
    --background-color: #ffffff;
    --sidebar-bg: #2a2a2a;
    --sidebar-text: #ffffff;
    --border-color: #dee2e6;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Altezza dell'header mobile + spazio */
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
}

.page-container {
    display: flex;
    min-height: 100vh;
}

/* --- HEADER MOBILE (Nascosto su desktop) --- */
.mobile-header {
    display: none; /* Nascosto di default, visibile solo su mobile */
    position: sticky;
    top: 0;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 0 1rem;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    z-index: 1001; /* Sopra il contenuto, ma sotto la sidebar quando è aperta */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.mobile-logo {
    height: 40px;
    width: 40px;
}

#mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- BARRA LATERALE (SIDEBAR) --- */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out; /* Per animazione mobile */
    z-index: 2000;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-image {
    width: 100px;
    height: auto;
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    margin: 0.5rem 0 0;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.report-button {
    display: block;
    background-color: var(--primary-color);
    color: #000;
    text-decoration: none;
    padding: 0.75rem 1rem;
    margin-top: 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.report-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.03);
}

.report-button i {
    margin-right: 0.5rem;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.sidebar-nav .nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.sidebar-nav .nav-link {
    color: #f8f9fa;
    text-decoration: none;
    display: block;
    padding: 0.6rem 1.5rem;
    margin: 0.1rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: #000;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.sidebar-footer a {
    color: var(--sidebar-text);
    text-decoration: none;
}

/* --- CONTENUTO PRINCIPALE --- */
.main-content {
    flex-grow: 1;
    padding: 2rem 4rem;
    margin-left: 280px;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.breadcrumb {
    color: #6c757d;
}

.shop-button {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.shop-button:hover {
    background-color: var(--primary-dark);
}

section {
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.8rem;
    color: #000;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin: 2.5rem 0 1.5rem 0;
}

h1:first-of-type {
    margin-top: 0;
}

h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin: 2.5rem 0 1rem 0;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 2rem 0 1rem 0;
}

p,
li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    max-width: 800px;
}

ul,
ol {
    padding-left: 25px;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

strong {
    color: #000;
}

.callout-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.callout-box .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.instruments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.instrument-card {
    text-align: center;
    margin: 0;
}

.instrument-card img {
    width: 225px;
    height: 225px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.instrument-card figcaption {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* --- STILE PER IL POPUP DI NOTIFICA --- */
#copy-popup {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--sidebar-bg);
    color: var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#copy-popup.show {
    visibility: visible;
    opacity: 1;
}


/*
================================================================
--- RESPONSIVE DESIGN (con menu a tendina) ---
================================================================
*/
@media (max-width: 992px) {
    /* Mostra l'header mobile e nasconde il layout a colonne */
    .mobile-header {
        display: flex;
    }

    .page-container {
        flex-direction: column;
    }

    /* Nascondi la sidebar fuori dallo schermo di default */
    .sidebar {
        transform: translateX(-100%);
    }

    /* Classe 'open' per mostrare la sidebar */
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Il contenuto principale ora occupa tutto lo spazio */
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    /* Adatta griglia e immagini */
    .instruments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .instrument-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 600px) {
    /* Riduci padding e font */
    .main-content {
        padding: 1.5rem 1rem;
    }

    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    /* Griglia a colonna singola */
    .instruments-grid {
        grid-template-columns: 1fr;
    }

    .instrument-card img {
        width: 70%;
        max-width: 250px;
    }
}