/* Variabili per Dark Mode */
:root {
    --bg-color: #f5f5f5;
    --text-color: #000;
    --description-color: #333;
    --border-color: #ddd;
    --border-strong: #000;
    --project-bg: #fafafa;
    --hover-bg: #e8e8e8;
    --active-bg: #000;
    --active-text: #fff;
    --scrollbar-track: #f1f1f1;
    --scrollbar-thumb: #888;
    --scrollbar-hover: #555;
}

[data-theme="dark"] {
    --bg-color: #0D0D0D;
    --text-color: #fff;
    --description-color: #f1f1f1;
    --border-color: #333;
    --border-strong: #fff;
    --project-bg: #222;
    --hover-bg: #333;
    --active-bg: #333;
    --active-text: #fff;
    --scrollbar-track: #333;
    --scrollbar-thumb: #666;
    --scrollbar-hover: #888;
}

/* Definizione font personalizzati */
@font-face {
    font-family: 'SuisseIntl';
    src: url('assets/font_suisseIntl/SuisseIntl-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SuisseIntl';
    src: url('assets/font_suisseIntl/SuisseIntl-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'SuisseIntl';
    src: url('assets/font_suisseIntl/SuisseIntl-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'SuisseMono';
    src: url('assets/font_suissmono/Suisse BPtestFont Mono-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SuisseMono';
    src: url('assets/font_suissmono/Suisse BPtestFont Mono-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'SuisseMono';
    src: url('assets/font_suissmono/Suisse BPtestFont Mono-Thin.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SuisseMono', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== VISTA PRINCIPALE ===== */
.vista {
    display: none;
    min-height: 100vh;
}

.vista.active {
    display: block;
}

/* Header principale */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0px 20px;
    background-color: var(--bg-color);
    position: relative;
    transition: background-color 0.3s ease;
}

.luli, .professione {
    font-size: 13px;
/*     text-transform: uppercase; */
    letter-spacing: 0.2px;
    line-height: normal;
    font-family: 'SuisseIntl', Arial, sans-serif;
}

.bottoni {
    text-align: right;
}

.bottoni h1 {
    font-size: 140px;
    font-weight: bold;
    line-height: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-family: 'SuisseIntl', Arial, sans-serif;
}

.sottotitolo {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    font-family: 'SuisseIntl', Arial, sans-serif;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 0px 0 5px 0;
    display: inline-block;
/*     background-color: green; */
    margin-left: 1034px;
}

.aggiornamento {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    font-family: 'SuisseIntl', Arial, sans-serif;
    padding: 0px 0 5px 0;
    margin-left: 20px;
    display: inline-block;
/*     background-color: red; */
}


/* Contenitore per sottotitolo e aggiornamento */
.sottotitolo + .aggiornamento {
    margin-left: 524px;
 /*    background-color: burlywood; */
}



.sottotitolo2:hover {
    opacity: 0.7;
}

.sottotitolo:hover {
    opacity: 0.7;
}

/* Navigation styles */
.navigazione {
    margin-bottom: 20px;
}

.elemento-nav {
    font-size: 140px;
    font-weight: bold;
    line-height: 0.9;
    text-transform: uppercase;
    font-family: 'SuisseIntl', Arial, sans-serif;
    cursor: pointer;
    transition: color 0.3s ease, opacity 0.3s ease;
    color: #ccc;
    display: inline-block;
}

/* Dark mode navigation contrast improvement */
[data-theme="dark"] .elemento-nav {
    color: #535353;
}

.elemento-nav.active {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.elemento-nav:hover {
    opacity: 0.7;
}

/* Main content */
main {
    padding: 40px 20px 40px 20px;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

/* Rimuovi padding-top quando un progetto è espanso per posizionare tabella in alto */
main:has(.dettaglio-progetto.espanso) {
    padding-top: 0;
}

/* Nascondi header principale quando un progetto è espanso */
body:has(.dettaglio-progetto.espanso) header {
    display: none;
}

/* Nascondi sezione dark mode e aggiornamento quando un progetto è espanso */
body:has(.dettaglio-progetto.espanso) .theme-section {
    display: none;
}

/* Content sections */
.sezione-contenuto {
    display: none;
}

.sezione-contenuto.active {
    display: block;
}

/* Tabella progetti */
.tabella-progetti {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 60px;
    table-layout: fixed;
/*     background-color: violet; */
}

/* Header fissi quando un progetto è espanso */
.tabella-progetti:has(.dettaglio-progetto.espanso) th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.tabella-progetti th {
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-strong);
    font-family: 'SuisseIntl', Arial, sans-serif;
/*     background-color: firebrick; */
}


.tabella-progetti td {
    padding: 10px 15px 6px 6px;
    font-family: 'SuisseIntl', Arial, sans-serif;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
/*     text-transform: uppercase; */
}

.riga-progetto {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.riga-progetto:hover {
    background-color: var(--hover-bg);
}

.riga-progetto.active {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-weight: bold;
}

.riga-progetto.active td {
    font-weight: 500;
    border-bottom: none;
    /* background-color: rgba(233, 233, 233, 0.475) */
}

/* Righe espandibili */
.dettaglio-progetto {
    display: none;
}

.dettaglio-progetto.espanso {
    display: table-row;
}

.dettaglio-progetto td {
    padding: 0 !important;
}

.contenuto-progetto {
    padding: 5px 20px 20px 5px;
    margin: 0px 0px 0px 0px;
/*     border-left: 3px solid #000; */
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
}

.tabella-progetti th:first-child,
.tabella-progetti td:first-child {
    width: 21%;
    padding: 0 5px;
}

.tabella-progetti th:nth-child(2),
.tabella-progetti td:nth-child(2) {
    width: 22%;
    padding-left: 42px;
}

.tabella-progetti th:last-child,
.tabella-progetti td:last-child {
    width: 37%;
    text-align: left;
    padding-left: 105px;
    padding-right: 15px;
/*     background-color: rebeccapurple; */
}

/* Sezione About */
.about-section {
    display: flex;
    margin-top: 40px;
    padding: 0 20px;
}

.about-left {
    width: 300px;
    margin-left: 0px;
   /*  background-color: crimson; */

}

.about-right {
    width: 300px;
    margin-left: calc(50% - 300px + 15px);
   /*  background-color: teal; */
}

.about-section h3 {
    font-size: 13px;
    margin-bottom: 15px;
    font-weight: medium;
    font-family: 'SuisseIntl', Arial, sans-serif;
}

.about-section p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--description-color);
    background-color: red;
    transition: color 0.3s ease;
}

/* New About Content Layout */
.contenuto-about {
    display: flex;
    gap: 0;
    margin-top: 10px;
    padding: 0 0px;
    align-items: flex-start;
 /*    background-color: brown; */
}

.colonna-about {
    width: 428px;
    flex-shrink: 0;
    margin-right: 60px;
 /*    background-color: red; */
}

.colonna-about2 {
    flex: 1;
    max-width: 450px;
    margin-right: 78px;
 /*    background-color: gold; */
}

.colonna-about3 {
    width: 675px;
    flex-shrink: 0;
}

.foto-profilo {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
}

.colonna-about h3,
.colonna-about2 h3,
.colonna-about3 h3 {
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
    font-family: 'SuisseIntl', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.colonna-about p,
.colonna-about2 p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    transition: color 0.3s ease;
}

.colonna-about a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.colonna-about a:hover {
    text-decoration: underline;
}

.colonna-about3 h3 {
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: normal;
    font-family: 'SuisseIntl', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.colonna-about p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--description-color);
}

.colonna-about2 p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--description-color);
}

.colonna-about3 p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--description-color);
}


.sottotitolo2 {
    font-size: 12px;
/*     text-transform: uppercase; */
    letter-spacing: 0.2px;
    font-family: 'SuisseIntl', Arial, sans-serif;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 5px 0;
    margin-top: 5px;
    display: inline-block;
    position: fixed;
    margin-top: 190px;
/*     background-color: red; */
}

.aggiornamento2 {
    font-size: 12px;
/*     text-transform: uppercase; */
    letter-spacing: 0.2px;
    font-family: 'SuisseIntl', Arial, sans-serif;
    padding: 5px 0;
    margin-top: 5px;
    margin-left: 20px;
    display: inline-block;
    position: fixed;
}

/* ===== VISTA DETTAGLIATA ===== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 40px;
    background-color: #f5f5f5;
}



.detail-nav {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.detail-title {
    text-align: right;
}

.detail-title h1 {
    font-size: 48px;
    font-weight: bold;
    line-height: 0.9;
    margin-bottom: 10px;
}

/* Main content dettaglio */
.detail-main {
    padding: 0 40px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-info {
    margin-bottom: 40px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table td {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.riga-progetto-dettaglio {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.riga-progetto-dettaglio:hover {
    background-color: var(--hover-bg);
}

.nome-progetto {
    font-weight: bold;
}

/* Galleria immagini */
.galleria-immagini {
    flex: 1;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0px;
    max-width: calc(79% - 20px);
    margin-left: 10px;
}

.contenitore-immagini {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
    width: max-content;
}

.segnaposto-immagine {
    flex: 0 0 300px;
    width: 300px;
    height: 400px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    border: 1px solid #ccc;
}

.immagine-progetto {
    flex: 0 0 auto;
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.immagine-progetto:hover {
    transform: scale(1.02);
}

/* Styling per video nelle gallerie */
.immagine-progetto[controls] {
    border: none;
}

.immagine-progetto video,
video.immagine-progetto {
    width: auto;
    height: 400px;
    object-fit: contain;
}

/* Nascondi controlli video e assicura autoplay e loop */
.contenuto-progetto video,
.galleria-immagini video,
.immagine-progetto video,
video.immagine-progetto,
.lightbox video,
#lightbox-video {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.contenuto-progetto video::-webkit-media-controls,
.galleria-immagini video::-webkit-media-controls,
.immagine-progetto video::-webkit-media-controls,
video.immagine-progetto::-webkit-media-controls,
.lightbox video::-webkit-media-controls,
#lightbox-video::-webkit-media-controls {
    display: none !important;
    -webkit-appearance: none !important;
}

.contenuto-progetto video::-webkit-media-controls-enclosure,
.galleria-immagini video::-webkit-media-controls-enclosure,
.immagine-progetto video::-webkit-media-controls-enclosure,
video.immagine-progetto::-webkit-media-controls-enclosure,
.lightbox video::-webkit-media-controls-enclosure,
#lightbox-video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Regole specifiche aggiuntive per Safari */
.contenuto-progetto video::-webkit-media-controls-panel,
.galleria-immagini video::-webkit-media-controls-panel,
.immagine-progetto video::-webkit-media-controls-panel,
video.immagine-progetto::-webkit-media-controls-panel,
.lightbox video::-webkit-media-controls-panel,
#lightbox-video::-webkit-media-controls-panel {
    display: none !important;
}

.contenuto-progetto video::-webkit-media-controls-play-button,
.galleria-immagini video::-webkit-media-controls-play-button,
.immagine-progetto video::-webkit-media-controls-play-button,
video.immagine-progetto::-webkit-media-controls-play-button,
.lightbox video::-webkit-media-controls-play-button,
#lightbox-video::-webkit-media-controls-play-button {
    display: none !important;
}



/* Lightbox Gallery */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 25px;
    font-weight: lighter;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'SuisseIntl', Arial, sans-serif;
    z-index: 10001;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-counter {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 10px;
    font-family: 'SuisseIntl', Arial, sans-serif;
  /*   text-transform: uppercase; */
    letter-spacing: 0.2px;
}

.lightbox-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
/*     background: rgba(255, 255, 255, 0.9); */
    color: rgb(255, 255, 255);
    padding: 4px 8px;
 /*    border-radius: 3px; */
    font-family: 'SuisseIntl', Arial, sans-serif;
    font-size: 9px;
    font-weight: medium;
 /*    text-transform: uppercase; */
    letter-spacing: 0.2px;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lightbox.active .lightbox-cursor {
    opacity: 1;
}

.lightbox.active {
    cursor: none;
}

/* Altezza uniforme per tutte le immagini dei progetti */
.dettaglio-progetto .immagine-progetto {
    height: 400px !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    flex: 0 0 auto;
}

/* Scrollbar nascosta */
.galleria-immagini::-webkit-scrollbar {
    display: none;
}



/* Per Firefox */
.galleria-immagini {
    scrollbar-width: none;
}

/* .galleria-immagini::-webkit-scrollbar-thumb:hover {
    background: #000000;
} */

/* Descrizione progetto */
.descrizione-progetto {
    width: 27%;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    margin: 0;
    padding-right: 10px;
}

.descrizione-progetto p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--description-color);
    transition: color 0.3s ease;
}

.spiegazione {
    font-family: 'SuisseMono', monospace;
}



.progetti-aggiuntivi .riga-progetto-dettaglio {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.progetti-aggiuntivi .riga-progetto-dettaglio:hover {
    background-color: var(--hover-bg);
}

/* Responsive */
@media (max-width: 768px) {
    header, .detail-header {
        flex-direction: column;
        gap: 20px;
        text-align: left;
    }
    
    .bottoni, .detail-title {
        text-align: left;
    }
    
    .elemento-nav {
        font-size: 36px;
    }
    
    .bottoni h1, .detail-title h1 {
        font-size: 36px;
    }
    
    main, .detail-main {
        padding: 0 10px 40px 10px;
    }
    
    header {
        padding: 20px 10px;
    }
    
    .about-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .contenuto-about {
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
        padding: 0 10px;
    }
    
    .colonna-about,
    .colonna-about2,
    .colonna-about3 {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
    }
    
    .foto-profilo {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    .segnaposto-immagine {
        flex: 0 0 250px;
        width: 250px;
        height: 300px;
    }
    
    .immagine-progetto {
        flex: 0 0 auto;
        max-width: 300px;
        max-height: 300px;
        width: auto;
        height: auto;
    }
    
    .contenuto-progetto {
        padding: 20px 10px;
        flex-direction: column;
    }
    
    .descrizione-progetto {
        width: 100%;
        position: static;
        margin-bottom: 20px;
        padding-right: 0;
    }
    
    .galleria-immagini {
        max-width: 100%;
    }
    
    .tabella-progetti th:first-child,
    .tabella-progetti td:first-child {
        width: 50%;
    }
    
    .tabella-progetti th:nth-child(2),
    .tabella-progetti td:nth-child(2) {
        width: 30%;
        padding-left: 20px;
    }
    
    .tabella-progetti th:last-child,
    .tabella-progetti td:last-child {
        width: 20%;
        text-align: left;
        padding-left: 30px;
    }
}


/* cambiare luciana millenaar con Project e About, che quando tocchi uno c'è la lista di
progetti e nell'altro le info. togliere i due about sotto oppure tenerne solo uno se non cambio il nome.
nei poster non c'è bisogno di avere cosi tante foto. 
pagina di video mokeup, non sarebbe male per i siti ecc. 
la barra sotto lo scroll di immagini toglierla. 
aggiungere info x social media. */
