/* ==================================================
   NAKBYTE - CORE STYLESHEET
   DARK / INDUSTRIAL / CYBER / EDITORIAL
   ================================================== */

/* IMPORTAZIONE DEI FONT */
@font-face {
    font-family: 'Rockwellness';
    src: url('../fonts/Rockwell-Font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Rocket-Titoli';
    src: url('../fonts/rocket_wildness/ROCKET%20WILDNESS.ttf') format('truetype');
}

:root {
    --bg-black: #050505;
    --bg-dark: #0A0A0D;
    --text-white: #F2F2F2;
    --text-grey: #8A8A8A;
    --grid-color: #1A1A20;
    --accent-purple: #6D28D9;
    --accent-electric: #8B5CF6;
    --accent-blue: #312E81;
    --accent-magenta: #C026D3;

    /* ASSEGNAZIONE FONT: ROCKET PER I TITOLI, ROCKWELL PER I TESTI */
    --font-heading: 'Rocket-Titoli', sans-serif;
    --font-body: 'Rockwellness', sans-serif;
    --font-mono: monospace; 

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* APPLICAZIONE DEL COLORE VIOLA AI TITOLI */
h2, h3 {
    color: var(--accent-purple);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-black);
    color: var(--text-grey);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Sottile griglia tecnica cybernetica */
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

/* Titoli maggiori: più robusti e solidi */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-weight: bold; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Regola base per tutti i paragrafi: più piccoli, leggeri e in stampatello */
p {
    font-family: var(--font-body);
    font-weight: normal; /* mantenuto leggero rispetto ai titoli */
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
    line-height: 1.8;
}

a {
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-electric);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* ==================================================
   HEADER & NAVIGATION
   ================================================== */
header {
    width: 100%;
    position: relative;
    padding: 60px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    border-bottom: 1px solid var(--grid-color);
    background: radial-gradient(circle at center, rgba(49, 46, 129, 0.1) 0%, transparent 60%);
}
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.site-logo {
    width: 700px;
    height: auto;
    /* Aumenta il contrasto e aggiungi un'ombra esterna netta */
    filter: grayscale(100%) contrast(160%) drop-shadow(4px 6px 8px rgba(0, 0, 0, 0.9));
    transition: var(--transition-smooth);
}

.site-logo:hover {
    filter: grayscale(0%) contrast(100%);
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.3);
}

.site-title {
    font-size: 3.5rem;
    font-weight: bold; /* Robusto */
    letter-spacing: 4px;
    text-transform: uppercase;
}

.site-title-image {
    display: block;
    width: 600px;
    max-width: 65vw;
    height: auto;
    object-fit: contain;
}

.binary-code {
    width: 100%;
    text-align: center; /* Forza il testo al centro */
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-grey);
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 15px;
}
.tech-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-electric);
    text-align: center;
    line-height: 1.8;
    margin-bottom: 40px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 10px 20px;
    background: rgba(10, 10, 13, 0.8);
}

nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: bold; /* Un po' di spessore per farsi leggere sul video */
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--accent-purple);
    transition: var(--transition-smooth);
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

nav a.active {
    color: var(--accent-electric);
}

/* 1. Ricalcola gli spazi verticali riducendo i vuoti inutili */
body:not(.home-video-bg) header {
    padding: 40px 20px 20px; 
}

/* 2. Rende il logo proporzionato per un'intestazione classica */
body:not(.home-video-bg) .site-logo {
    width: 350px; 
}

/* 3. Avvicina il logo al codice binario sottostante */
body:not(.home-video-bg) .logo-container {
    margin-bottom: 15px; 
}
/* ==================================================
   LAYOUT & CONTAINERS
   ================================================== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 60px 20px;
}

section, article {
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   HOME PAGE
   ================================================== */
.home-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 500px;
    background-image: url('../images/cropped-Nakbyte-4-scaled-2.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
    border: 1px solid var(--grid-color);
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-black) 0%, rgba(5,5,5,0.6) 50%, var(--bg-black) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 40px;
    background: rgba(10, 10, 13, 0.7);
    backdrop-filter: blur(5px);
    border-left: 2px solid var(--accent-purple);
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    color: var(--text-white);
    font-family: var(--font-mono);
}

/* ==================================================
   PAGINE INTERNE (BIO, ASCOLTA, CONTATTI)
   ================================================== */
.page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--grid-color);
    padding-bottom: 20px;
}

.page-title {
    font-size: 2.5rem;
}

.editorial-block {
    margin-bottom: 50px;
    max-width: 800px;
}

.editorial-block h3 {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-electric);
    margin-bottom: 15px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.editorial-block p {
    font-size: 0.85rem;
    font-weight: normal;
    margin-bottom: 20px;
    color: var(--text-white);
    text-align: justify;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.8;
}

.links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.links-list a {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: bold;
    padding: 15px 25px;
    border: 1px solid var(--grid-color);
    background: var(--bg-dark);
}

.links-list a:hover {
    border-color: var(--accent-purple);
    background: rgba(109, 40, 217, 0.1);
}

/* ==================================================
   VIDEO YOUTUBE RESPONSIVE (PAGINA ASCOLTA)
   ================================================== */
.video-archive {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Spazio verticale tra i video */
    max-width: 800px; /* Si allinea con i testi della pagina */
    margin-top: 40px;
    margin-bottom: 50px;
}

/* Crea la scatola per il formato 16:9 */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Proporzione per video 16:9 */
    height: 0;
    overflow: hidden;
    border: 1px solid var(--grid-color); /* Cornice cyber coerente col sito */
    background: var(--bg-dark);
}

/* Forza l'iframe a riempire tutta la scatola */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- 2. PAGINA BIO --- */
.bio-page {
    /* Percorso dell'immagine: */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/guitar.png');
    
    /* Proprietà dell'immagine (non modificare se vuoi che copra tutto lo schermo): */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--bg-black);
}

/* --- 2. PAGINA CONTATTI --- */
.contatti-page {
    /* Gradiente scuro al 70% sovrapposto all'immagine */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/revolution.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--bg-black);
}
/* --- 3. PAGINA LIVE --- */
.live-page {
    /* Gradiente scuro al 70% sovrapposto all'immagine */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/evolution.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--bg-black);
}

/* --- 3. PAGINA /LISTEN/SEE --- */
.listen-see-page {    /* Gradiente scuro al 70% sovrapposto all'immagine */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/obliquus.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--bg-black);
}

/* --- 3. PAGINA INCLINED --- */
.inclined-page {    /* Gradiente scuro al 70% sovrapposto all'immagine */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/inclined.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--bg-black);
}

/* --- 3. PAGINA CODES --- */
.codes-page {    /* Gradiente scuro al 70% sovrapposto all'immagine */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/n.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--bg-black);
}



/* --- 3. PAGINA GALLERIA --- */
.galleria-page {
    /* Per usare un colore uniforme solido senza griglia: */
    /* background-image: none; */
    /* background-color: #0A0A0D; */
}

/* --- 4. FUTURE PAGINE (CODES, INCLINED, PROJECTS) --- */
.codes-page {
    /* Inserisci qui le stesse regole se vuoi personalizzarla */
}
.inclined-page {}
.projects-page {}
/* ==================================================
   GALLERIA FOTOGRAFICA
   ================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-item {
    position: relative;
    background: var(--bg-dark);
    border: 1px solid var(--grid-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 30px rgba(109, 40, 217, 0.1);
    transform: translateY(-5px);
}

.gallery-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* NESSUN RITAGLIO */
.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    filter: grayscale(30%);
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    filter: grayscale(0%);
}

.gallery-caption {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: normal;
    text-transform: uppercase;
    color: var(--text-grey);
    border-top: 1px solid var(--grid-color);
    padding-top: 10px;
    text-align: left;
}

/* ==================================================
   TIMELINE LIVE (ARCHIVIO EDITORIALE)
   ================================================== */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-event {
    display: flex;
    margin-bottom: 80px;
    position: relative;
}

/* Linea verticale della timeline */
.timeline-event::before {
    content: '';
    position: absolute;
    left: 100px;
    top: 30px;
    bottom: -80px;
    width: 1px;
    background-color: var(--grid-color);
}

.timeline-event:last-child::before {
    display: none;
}

.timeline-date {
    width: 100px;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-weight: bold;
    color: var(--accent-electric);
    font-size: 1.2rem;
    line-height: 1.2;
    padding-right: 20px;
}

.timeline-date span {
    display: block;
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--text-grey);
}

.timeline-content {
    flex-grow: 1;
    padding-left: 40px;
    position: relative;
}

/* Nodo (pallino) sulla linea */
.timeline-content::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 5px;
    width: 9px;
    height: 9px;
    background-color: var(--accent-magenta);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-magenta);
}

.timeline-header {
    margin-bottom: 20px;
}

.timeline-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.timeline-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-bottom: 5px;
}

.timeline-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain; /* NESSUN RITAGLIO */
    background: var(--bg-dark);
    border: 1px solid var(--grid-color);
    padding: 10px;
    margin-bottom: 20px;
    filter: grayscale(50%);
    transition: var(--transition-smooth);
}

.timeline-event:hover .timeline-image {
    filter: grayscale(0%);
    border-color: rgba(139, 92, 246, 0.4);
}

.timeline-text-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
}

.timeline-text-wrapper.show {
    max-height: 3000px;
}

.timeline-text {
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-white);
    padding: 20px;
    background: rgba(26, 26, 32, 0.3);
    border-left: 2px solid var(--accent-blue);
    margin-bottom: 20px;
    white-space: pre-wrap;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.8;
}

.timeline-links {
    margin-top: 15px;
}

.timeline-links a {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-electric);
    margin-right: 15px;
    word-break: break-all;
}

.read-more-btn {
    background: transparent;
    border: 1px solid var(--accent-purple);
    color: var(--accent-electric);
    font-family: var(--font-mono);
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
    margin-top: 10px;
}

.read-more-btn:hover {
    background: var(--accent-purple);
    color: var(--text-white);
    box-shadow: 0 0 15px rgba(109, 40, 217, 0.4);
}

/* ==================================================
   FOOTER
   ================================================== */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--grid-color);
    font-family: var(--font-mono);
    font-weight: normal;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #555;
    margin-top: 60px;
    background: var(--bg-black);
}

/* ==================================================
   RESPONSIVE DESIGN & MOBILE MENU
   ================================================== */

/* 1. GESTIONE FLUIDA LOGO E TITOLI (Per tutti gli schermi) */
.site-logo {
    max-width: 90vw;
    height: auto;
}
body:not(.home-video-bg) .site-logo {
    max-width: 70vw; /* Si adatta dinamicamente sulle pagine interne */
}
.site-title-image {
    width: 100%;
    /* clamp(minimo, ottimale, massimo) calcola la dimensione perfetta in tempo reale */
    width: clamp(280px, 80vw, 600px) !important;
    height: auto;
}

/* 2. STILE DEL PULSANTE HAMBURGER */
.hamburger-menu {
    display: none; 
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    position: relative; /* FONDAMENTALE */
    z-index: 100001;      /* DEVE ESSERE PIU ALTO DI 999 */
    margin-top: 10px;
    margin-bottom: 20px;
}

.hamburger-menu span {
    display: block;
    width: 35px;
    height: 3px;
    background-color: var(--accent-electric);
    transition: var(--transition-smooth);
}
/* Animazione Hamburger quando cliccato */
.hamburger-menu.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 3. BREAKPOINT TABLET (Schermi sotto i 900px) */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Disabilita il parallasse (fixed) su iOS/Mobile per evitare bug di zoom sugli sfondi */
    body, .bio-page, .contatti-page, .galleria-page {
        background-attachment: scroll !important;
    }

    /* Trasforma il menu in un overlay fullscreen cyber/dark */
    .hamburger-menu {
        display: flex; /* Mostra l'hamburger */
    }
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 999;
        opacity: 0;
        pointer-events: none; /* Disattivato quando invisibile */
        transition: opacity 0.4s ease-in-out;
    }
    nav.open {
        opacity: 1;
        pointer-events: auto; /* Attivato quando visibile */
    }
    nav a {
        font-size: 1.5rem; /* Aumenta l'area di tap per smartphone */
    }
}

/* 4. BREAKPOINT SMARTPHONE (Schermi sotto i 768px e 480px) */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
    }
    .timeline-event {
        flex-direction: column;
    }
    .timeline-event::before {
        left: 15px;
        top: 50px;
        bottom: -40px;
    }
    .timeline-date {
        width: 100%;
        margin-bottom: 15px;
        padding-left: 30px;
    }
    .timeline-content {
        padding-left: 30px;
    }
    .timeline-content::before {
        left: 11px;
        top: 50px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 15px 20px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h2 {
        font-size: 1.8rem;
    }
    .page-title {
        font-size: 2rem;
        text-align: center;
    }
    .binary-code {
        font-size: 0.65rem; /* Ridotto per evitare scroll orizzontale */
        letter-spacing: 1px;
    }
    /* Rimuove l'effetto hover bianco/nero fisso sui dispositivi touch */
    .gallery-image-wrapper img, .timeline-image {
        filter: grayscale(0%);
    }
}
/* ==================================================
   HOME VIDEO BACKGROUND & CINEMATIC ADAPTATIONS
   ================================================== */

.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none; /* Assicura che il video non blocchi mai i click */
}

.video-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente per attenuare la luminosità, più intenso sopra e sotto per favorire i testi */
    background: linear-gradient(
        to bottom, 
        rgba(5, 5, 5, 0.45) 0%, 
        rgba(5, 5, 5, 0.25) 30%, 
        rgba(5, 5, 5, 0.25) 70%, 
        rgba(5, 5, 5, 0.45) 100%
    );
    z-index: -1;
}

/* Modifiche esclusive per la Home Page con il video */
.home-video-bg {
    background-image: none; /* Rimuove la griglia di default per non interferire con il video */
    background-color: transparent;
}

.home-video-bg header {
    /* Mantiene le ombre ma con fondo trasparente */
    background: radial-gradient(circle at center, rgba(10, 10, 13, 0.5) 0%, transparent 70%);
}

.home-video-bg .site-title {
    /* Ombra decisa per garantire leggibilità massima contro i movimenti del video */
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 0, 0, 0.7);
}

.home-video-bg nav a {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.home-video-bg .home-hero {
    background-image: none; /* Rimuove l'immagine statica della hero */
    border: none;
}

.home-video-bg .home-hero::before {
    display: none; /* Rimuove il gradiente solido di default della hero per mostrare il video */
}

.home-video-bg .hero-content {
    /* Aggiunge un effetto blur/sfondo semi-trasparente per mantenere leggibile il testo OBLIQUUS EXPERIENCE */
    background: rgba(10, 10, 13, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.home-video-bg footer {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(4px);
}

/* ==================================================
   MENU HAMBURGER MOBILE - CORREZIONE
   ================================================== */

@media (max-width: 900px) {

    /* Pulsante hamburger */
    .hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    background: transparent;
    border: none;
}

    .hamburger-menu span {
    display: block;
    width: 35px;
    height: 3px;
    background-color: var(--accent-electric);
    transition: var(--transition-smooth);
    pointer-events: none; /* Fondamentale per far passare il click al bottone e aprire la lista schede */
}

    /* Menu chiuso */
    #mobile-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: rgba(5, 5, 5, 0.99) !important;

        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 25px !important;

        z-index: 100000 !important;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transition: opacity 0.3s ease-in-out,
                    visibility 0.3s ease-in-out !important;

        padding: 20px !important;
        box-sizing: border-box !important;
    }

    /* Menu aperto */
    #mobile-nav.open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Voci del menu */
    #mobile-nav a {
        font-size: 1.4rem !important;
        color: var(--text-white) !important;
        text-align: center !important;
        position: relative !important;
        z-index: 100002 !important;
    }
}

/* ==================================================
   ADATTAMENTO MOBILE - PAGINE INTERNE (CONTATTI, ecc.)
   ================================================== */
@media (max-width: 768px) {

    /* meno margine ai lati: più spazio per il contenuto */
    main {
        padding: 25px 20px 20px;
    }

    /* il titolo si rimpicciolisce in base alla larghezza dello schermo e va a capo */
    .page-title {
        font-size: clamp(1.3rem, 7vw, 2rem);
        letter-spacing: 1px;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .editorial-block {
        max-width: 100%;
    }

    .editorial-block h3 {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    /* testo a sinistra invece che giustificato: niente buchi tra le parole */
    .editorial-block p {
        text-align: left;
        font-size: 0.8rem;
        letter-spacing: 1px;
        overflow-wrap: anywhere;
    }

    /* i riquadri dei link occupano tutta la larghezza e vanno a capo */
    .links-list a {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        font-size: 0.85rem;
        padding: 12px 15px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* nessun elemento può superare la larghezza dello schermo */
    img, iframe, video, table {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px 15px 15px;
    }
    .page-title {
        font-size: clamp(1.2rem, 6.5vw, 1.6rem);
    }
    .links-list a {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
}