@charset "UTF-8";

/* Font */
@font-face {
  font-family: Goulong;
  src: url('font/font/Goulong.ttf') format('truetype');
}


body {
  background-color: black;
}

/* Reset base */
body, div, p, a, ul {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

p, a {
  background-color: #fff;
}

a {
  text-decoration: none;
  color: black;
  width: fit-content;
}

h1 {
  font-size: 20px;
  background-color: white;
  margin: 0;
  font-weight: 500;
}

/* Layout globale */
html, body, .grandecapo, .assoluto {
  height: 100%;
  min-height: 100%;
}


.grandecapo {
  margin: 0 auto;
  overflow: hidden;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Navbar */
.header {
  display: flex;
  flex-direction: row;
  color: black;
  margin-left: 4vw;
  margin-top: 40px;
  z-index: 1;
}


.io {
  font-size: 20px;
  height: fit-content;
}

.io span {
  font-size: 16px;
  font-weight: bold;
}

.navbar {
  display: flex;
  flex-direction: column;
  margin-left: 60px;
}

.nav_archivio {
  margin-left: 140px;
}

.nav_contatti {
  margin-left: 200px;
}

.header .menu-btn {
  display: none;
}


/* Liste */
ul {
  list-style: none;
  padding-inline-start: 0;
}

.tuttosotto {
  display: flex;
  justify-content: space-between;
}


/* ===============================
   GALLERIA PROGETTI (GRID + TRANSITION)
   =============================== */

/* Container scroll (mantieni overflow e altezza) */
.scroll {
  overflow-x: visible;
  overflow-y: visible;
  margin-top: 15px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  height: 80vh;        /* importante: dà altezza alla grid */
}
::-webkit-scrollbar { display: none; }

/* Grid: layout orizzontale, colonne generate dinamicamente via JS */
.grid {
  display: flex; /* uso flex invece di grid per animare larghezze */
  height: 100%;
  gap: 0;
}

.progetto {
  position: relative;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  flex: 1; /* larghezza dinamica quando chiusa */
  transition: flex 0.5s ease; /* animazione fluida apertura/chiusura */
}

.progetto.open {
  flex: 0 0 90vw; /* quando aperto prende 90% larghezza */
  z-index: 5;
  cursor: default;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}

@media (max-width: 600px) {
  .video-wrapper .overlay {
    display: block;
  }
}

@media (min-width: 601px) {
  .video-wrapper .overlay {
    display: none;
  }
}


.progetto.open .cover { opacity: 0; }

.dettagli {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  /* padding: 20px; */
  overflow-y: auto;
  transition: opacity 0.35s ease;
  padding: 10px;
}

.progetto.open .dettagli {
  opacity: 1;
}


/* Tooltip */
#tooltip {
  position: fixed;
  pointer-events: none;
  background: rgb(0,0,0);
  color: white;
  padding: 5px 10px;
  font-size: 20px;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  letter-spacing: 1.5px;
}

/* Fermo immobile */
.fermoimmobilecapito {
  display: block;
  position: absolute;
  margin-left: 4vw;
  bottom: 150px;
  font-size: 20px;
  max-width: 450px;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
.hidden { display: none !important; }

/* Testo */
.light { font-weight: 100; font-family: helvetica; }
.project { font-size: 20px; margin: 0 0 5px 10px; }
.cathegory { font-size: 15px; font-weight: 600; }




/* PROGETTO APERTO */
/* Container dettagli */
.first-row {
  display: flex;
  height: 100%;
  gap: 20px;
  align-items: flex-end;
}

.text-left {
  flex: 1;
  overflow: hidden;
  margin: 0 0 20px 20px;
}

.titolo{
  font-size: 1.7rem;
  font-weight: 300;
}

.categoria {
  padding-bottom: 20px;
}

.data {
  padding-top: 20px;
  font-size: 15px;
  font-weight: 700;
}

.descrizione {
  max-width: 600px;
}


.images-column {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.images-column img {
  max-height: 100%;
  max-width: 100%;
  object-fit: scale-down;
}

.images-column video {
  max-height: 100%;
  max-width: 100%;
  object-fit: scale-down;
}

img{
   pointer-events:none;
 }

.progetto.open {
  position: relative; /* serve per ancorare il pulsante */
  overflow: visible;
}

.close-btn {
  position: absolute;
  top: -25px;
  right: 5px;
  background: white;
  border: none;
  width: fit-content;
  height: 25px;
  font-size: 15px;
  cursor: pointer;
  z-index: 10;
  text-decoration: underline;
}


.close-btn:hover {
  background: black;
  color: white;
  border: 1px solid white;
}


/* Responsive semplificato */
@media (max-width: 600px) {
  .navbar { flex-direction: column; margin-left: 0;}
  .io { margin-bottom: 20px; font-size: 18px;;}
  .io, .grandecapo p, .grandecapo h1{background-color: unset; color: white;}
  .grandecapo { width: 95%; margin: auto; overflow-y: unset;}
  .fermoimmobilecapito { position: unset;  margin: 20px 0 20px 0; height: unset; overflow-y: unset;}
  .project { font-size: 17px; }
  .scroll {height: unset; overflow-y: unset;margin-bottom: 60px;}
  body {height: unset; overflow-y: unset;;
  }

  .header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 20px 0;
  }
  /* Layout verticale delle colonne */
  .grid {
    flex-direction: column;
    height: unset;
    row-gap: 40px;
  }

  /* Progetto aperto e cover */
  .progetto .cover {
    width: 100%;
    aspect-ratio: 1/1; /* cover quadrata */
    object-fit: cover;
  }

  .cover {
    width: 100%;
    aspect-ratio: 2/1;
    rotate: (45deg);
  }

  .cover_inside video {
    aspect-ratio: 1/1;
    object-fit: cover;
  }

  img.cover_inside {
    aspect-ratio: 1/1;
    width: 100%;
    object-fit: cover;
  }

  #contenuto {
    margin-bottom: 10px;
  }

  /* Colonna aperta */
  .progetto.open {
    flex: 0 0 90vw; /* mantiene larghezza animata */
    min-height: auto;   /* altezza segue il contenuto */
    z-index: 5;
    overflow-y: scroll;
  }

  /* Container dettagli verticale */
  .first-row {
    flex-direction: column !important;
    height: auto;
  }

  /* Colonna immagini scrollabile orizzontale */
  .images-column {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .images-column img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .video-wrapper {
  position: relative;
  display: inline-block;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.video-wrapper .overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}


  /* Nascondi tooltip su touch */
  #tooltip {
    display: none !important;
  }

.header .io {
  display: block;
  float: left;
  text-decoration: none;
}

.header ul {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  background-color: var(--color-bg);
}

.header li a {
  display: block;
  text-decoration: none;
}



/* Nav Menu */
.header .menu {
  clear: both;
  max-height: 0;
  transition: max-height .2s ease-out;
}

/* Menu Icon */
.header .menu-icon {
  cursor: pointer;
  display: inline-block;
  float: right;
  padding: 20px 0;
  position: relative;
  user-select: none;
}

.header .menu-icon .navicon {
  background: white;
  display: block;
  height: 2px;
  width: 18px;
  position: relative;
  transition: background .2s ease-out;

}
  
.header .menu-icon .navicon:before,
.header .menu-icon .navicon:after {
  background: white;
  content: '';
  display: block;
  height: 100%;
  position: absolute;
  transition: all .2s ease-out;
  width: 100%;
}

.header .menu-icon .navicon:before {
  top: 5px;
}

.header .menu-icon .navicon:after {
  top: -5px;
}

/* Menu Button */
.header .menu-btn {
  display: none;
}

.header .menu-btn:checked ~ .menu {
  max-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.menu li a{
  padding: 10px;
}

.header .menu-btn:checked ~ .menu-icon .navicon {
  background: transparent;
}

.header .menu-btn:checked ~ .menu-icon .navicon:before {
  transform: rotate(-45deg);
}

.header .menu-btn:checked ~ .menu-icon .navicon:after {
  transform: rotate(45deg);
}

.header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before,
.header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after {
  top: 0;
}

.info-mobile {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  bottom: 0;
  width: 100%;
  height: 25px;
  border-bottom: white 1px solid;
}
.apri-btn {
  background-color: rgb(255, 254, 254);
  cursor: pointer;
  color: rgb(0, 0, 0);
  border-radius: 0;
  border: none;
  font-size: 16px;
  width: fit-content;
  height: 25px;
  padding: 0px 15px 2px 20px;
  z-index: 1000;

}

.project {
  margin-left: 0;
  font-size: 20px;
}

/*PROGETTO APERTO*/
h2{
  background-color: white;
  font-size: 25px;
  margin: 0 0 5px 0;
}
.categoria {
  margin: 10px 0;
  padding: 0;
}

.cathegory{
  color: black !important;
}
.data{
  padding: 0;
  margin-bottom: 20px;
}
.data, .categoria {
  width: fit-content;
}

}