/* ========== ARCHITRAVE THEME BASE ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    --bg: #0a0a0a;
    --text: #e0e0e0;
    --border: #222;
    --accent: #c9a87b;
    --accent-muted: #7b9ac9;
    --sidebar-width: 280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========== SIDEBAR & HEADER ========== */
.sidebar {
    width: var(--sidebar-width);
    background: #0d0d0d;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; height: 100vh;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    margin-bottom: 1rem;
    display: block;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: #666;
}

.sidebar-footer a {
    color: #888;
    text-decoration: none;
}

.lang-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.sidebar.open { left: 0; }
.sidebar-logo { text-align: center; margin-bottom: 2rem; }
.sidebar-logo img { max-width: 220px; height: auto; }

.hamburger {
    display: none; /* Nascosto su desktop */
    position: fixed; top: 1rem; left: 1rem;
    z-index: 1001; background: #1a1a1a;
    border: 1px solid var(--border); border-radius: 8px;
    padding: 0.5rem; cursor: pointer;
    width: 44px; height: 44px;
    flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 999; }
.sidebar-overlay.active { display: block; }

/* --- Modifica .main-content per gestire lo spazio della sidebar --- */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    margin-left: calc(var(--sidebar-width) + 2rem); /* Spazio per la sidebar fissa */
    padding: 3rem 2rem 3rem;
}

/* --- Modifica la Media Query (max-width: 768px) --- */
@media (max-width: 768px) {
    .hamburger { 
        display: flex; /* Visibile solo su mobile */
    }
    .sidebar { 
        left: -280px; /* Nascosta di default su mobile */
    }
    .sidebar.open {
        left: 0 !important; /* Forza l'apertura tramite JS */
    }
    .main-content { 
        margin-left: 0; /* Rimuove il margine su mobile */
        padding: 5rem 1.5rem 2rem; 
    }
}

.page-title {
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    color: #c9a87b;
}

.btn {
    display: inline-block;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}
.btn:hover { background-color: var(--text); color: var(--bg); border-color: var(--text); }
.btn-disabled { opacity: 0.4; cursor: not-allowed; }
.btn-disabled:hover { background: transparent; color: var(--text); border-color: var(--border); }

/* ========== RELATED GRID ========== */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-title { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--accent); }
.buttons-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .buttons-grid { grid-template-columns: 1fr; }
    .page-title, .article-title { font-size: 2rem; }
    .main-content { margin-left: 0; padding: 5rem 1.5rem 2rem; }
    .sidebar { left: -280px; }
}