/* ------------------------- 1vw è uguale a: 15.92px ------------------------ */
:root {
  --padding: 54px; /* 30 + 24*/
  --black: #151515; /* -> opacity: 50% - 10% */
  --gray: #717182;
  --gray2: #e5e5e5;
  --white: #fafafa;
  --white_80: rgba(255, 255, 255, 0.8);
  --white2: #f9f9fa;

 
/* NUOVE VARIABILI FONT-SIZE (Scala in PX - Desktop) */
  --font-xs: 0.75rem;    /* Tag, dettagli 12px*/
  --font-s: 0.875rem;     /* Bottoni, Small Text 14px*/
  --font-base: 1rem;  /* Corpo del testo 16px*/
  --font-m: 2rem;     /* Sottotitoli grandi 32px*/
  --font-l: 2.25rem;     /* Titoli Sezione h2 36px*/
  --font-xl: 3rem;    /* Titoli Principali h1 52px*/
  --font-xxl: 18.75rem;  /* Titolo Starting View 300px*/

  --border-radius: 6px;
}

/*questa classe blocca la selezione*/
.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

::selection {
  background: var(--black);
  color: var(--white);
}


[data-scroll-container] {
    perspective: 1px; 
    transform-style: preserve-3d;
    min-height: 100vh;
}


@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Variable.ttf");
  font-display: swap;
  box-sizing: border-box;

}

main.touch {
   position: relative;
   height: auto;
}

@font-face {
  font-family: "Horgen";
  src: url("fonts/Devant\ Horgen.otf");
  font-display: swap;
}

/* #region body and Common*/
body {
  margin: 0;
  color: var(--black);
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Satoshi";
  font-optical-sizing: auto;
  letter-spacing: -0.03rem;
}

html, body {
  -moz-osx-font-smoothing: grayscale !important;
  -webkit-font-smoothing: inherit !important;
  overflow: hidden;
}


html {
  background-color: var(--black); /*forza la navbar di sisteam android ad essere nera*/
}

.c-scrollbar{ 
  z-index: 1001 !important; /* scrollbar over everything */
}

a {
  text-decoration: none;
  color: var(--black);
}

h1,
h2 {
  font-optical-sizing: auto;
  margin: 0;
  color: var(--black);
  font-weight: 500;

}

h1 {
  font-size: var(--font-xl);
}

h4{
  margin: 0;
  font-weight: 500;
}

p {
  color: var(--black);
  margin: 0;
  font-optical-sizing: auto;
  font-weight: 500;
  letter-spacing: 0;
}

section {
  width: 100%;
  min-height: 100%;
  z-index: 2 !important;
}

/* ------------------ button ------------------*/

.button {
  position: relative;
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 12px 43px;
  border-radius: var(--border-radius);
  font-size: var(--font-s);
  border: 1px var(--gray2) solid;
  color: var(--black);
  overflow: hidden;
  box-sizing: border-box;
}

.button:hover .text span {
  transform: translateY(-110%);
}

.button:hover .ripple span {
  transform: translateY(0);
  border-radius: 0;
  transition-duration: 0.5s, 0.9s;
  
}

.button .ripple {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.button .ripple span {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateY(101%);
  background-color: var(--black);
  border-radius: 30% 30% 0 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0, 1),
    border-radius 0.5s cubic-bezier(0.4, 0, 0, 1);
}

.button .text {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.button .text span {
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.button .text span::after {
  content: attr(data-text);
  position: absolute;
  top: 110%;
  left: 0;
  color: var(--white);
}

.button.reverse {
  border: 1px var(--white) solid;
  color: var(--white);
}

.button.black {
  color: var(--white);
  background-color: var(--black);
  border: solid 1px var(--black);
  padding: 11px 44px;
}

.button.white{
  color: var(--black);
  background-color: var(--white);
  border: none;
  border: solid 1px var(--white);
}

.button.reverse .ripple span,
.button.black .ripple span {
  background-color: var(--white);
}

.button.reverse .text span::after,
.button.black .text span::after {
  color: var(--black);
}

.button.small {
  font-size: var(--font-s); /* testo più piccolo */
  padding: 7px 14px; /* padding ridotto */
}

.button.round {
  border-radius: 50px;
  aspect-ratio: 1/1;
  padding: 10px 18px; /* padding ridotto */
}

/* ------------------ Title 1 ------------------*/
.MainTitle{
  color: var(--gray);
  font-size: var(--font-xl);
  margin: 120px 0;
}

.MainTitle span{
  color: var(--black);
}

@media (max-width: 800px) {

}
/* ------------------ Tag ------------------*/
.TagWrapper {
  width: 65%;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: left;
  flex-wrap: wrap;
  gap: 10px;
}

.TagWrapper span {
  font-size: var(--font-xs);
  padding: 10px 14px;
  border-radius: var(--border-radius);
  border: solid 1px rgba(10, 10, 10, 0.2);
}

/* ------------------ Arrow ------------------*/
.arrow-icon {
  display: inline-flex;
  vertical-align: middle;
  color: var(--black); /* oppure qualsiasi colore */
  width: 16px; /* dimensione base */
  height: 16px;
}

.arrow-icon svg {
  width: 100%;
  height: 100%;
  rotate: -45deg;
}

/* #endregion */

/* #region Loading */

.loading-screen {
  position: fixed;
  height: 100vh;
  width: 100vw;
  z-index: 100000;
  background-color: var(--black);
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  --transition-duration: 1.2s;
}

.loading-screen svg {
  width: 8%;
}


@media (max-width: 800px) {
  .loading-screen svg {
    width: 20%;
  }
}

.loading-screen svg path:first-child {
  stroke-dashoffset: 147px;
  stroke-dasharray: 147px;
  -webkit-transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0s;
  transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0s;
}

.loading-screen svg path:nth-child(2) {
  stroke-dashoffset: 62px;
  stroke-dasharray: 62px;
  -webkit-transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s;
  transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s;
}

.loading-screen svg path:nth-child(3) {
  stroke-dashoffset: 62px;
  stroke-dasharray: 62px;
  -webkit-transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s;
  transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s;
}

.loading-screen svg path:nth-child(4) {
  stroke-dashoffset: 62px;
  stroke-dasharray: 62px;
  -webkit-transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.30000000000000004s;
  transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.30000000000000004s;
}

.loading-screen svg path:nth-child(5) {
  stroke-dashoffset: 62px;
  stroke-dasharray: 62px;
  -webkit-transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s;
  transition: stroke-dashoffset var(--transition-duration)
    cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s;
}

.loading-screen svg path.active {
  stroke-dashoffset: 0px;
}

/* #endregion */

/* #region Header */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  padding: calc(var(--padding) - 20px) 30px;
  box-sizing: border-box;
  z-index: 999;

  font-size: var(--font-base);
  font-family: "Satoshi";
  font-optical-sizing: auto;
  letter-spacing: -0.03rem;
  font-weight: 400;
}

header {
  background: transparent;
  mix-blend-mode: difference;
}

header * {
  color: var(--white);
}

header nav {
  display: flex;
  flex-direction: row;
}

header .OutRange {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;

  /* distanza costante dai bordi */
  padding: 0.5rem 1.5rem;
  box-sizing: border-box;
}

header > .OutRange { /* scritta MOSCAFOLIO*/
  font-size: var(--font-base); 
}


header .Link {
  color: var(--black);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

header nav a {
  position: relative;
  color: var(--white);
  mix-blend-mode: difference;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 5px;
  height: 5px;
  background-color: var(--black);
  border-radius: 50%;
  transform: translateX(-50%) scale(0);
  transition: transform 0.2s ease-in-out;
  background-color: var(--white);

}

header nav a.hovered::after {
  transform: translateX(-50%) scale(1);
}

header nav a.active::after {
  transform: translateX(-50%) scale(1);
}

a.disabled {
  pointer-events: none;
  cursor: default;
  user-select: none;
}

/* Responsive*/

/* Hamburger button */
header .hamburger {
  display: none; /* visibile solo sotto 800px */
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  width: 1.5rem;
  height: 2rem;
  gap: 5px;
  z-index: 1001; /* sopra il menu */
  margin-right: 12px;
  color: var(--black);
}

header .hamburger span {
  display: block;
  height: 2px;
  background-color: var(--black);
  border-radius: 2px;
  transition: all 0.3s ease;
}

header nav {
  display: flex;
  flex-direction: row;
}

/* Mobile */
@media screen and (max-width: 800px) {

  header{
    position: sticky;
    top: 0;
    left: 0;
    padding: calc(var(--padding) - 20px) 0px;
    mix-blend-mode: normal;
    color: var(--black);
    background-color: transparent ;
  }

   header *{
    color: var(--black);
   }

  header nav a {
    mix-blend-mode: normal;
    color: var(--black);
  }

  header nav {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    gap: 2rem;
  }

  header nav.active {
    transform: translateX(0); /* appare a tutto schermo */
  }

  header .hamburger {
    display: flex;
  }

  header .OutRange {
    padding-left: 12px;
    font-size: 18px;
    font-weight: 500;
  }
}

/* Animazione hamburger → X */
header .hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
header .hamburger.open span:nth-child(2) {
  opacity: 0;
}
header .hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


@media screen and (max-width: 800px) {
  .resources, 
  .ItemPage {
    margin-top: -65px; 
    position: relative; 
    z-index: 1;
  }
}

/* #endregion */

/* #region Footer */
footer {
  width: 100%;
  height: 700px;
  background-color: var(--black);
  order: 9999;
  color: var(--white);
  background: var(--black);
}

.footer_wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

footer .footer_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 100px/2));
}

footer h1 {
  color: var(--white);
  font-size: var(--font-xl);
  white-space: nowrap;
}

footer .footer_content p {
  color: var(--white);
  opacity: 50%;
  font-size: var(--font-m);
}

footer .icons_wrapper {
  width: calc(100% - var(--padding) * 2);
  display: flex;
  justify-content: left;
  gap: 16px;
  position: absolute;
  bottom: 111px; /*altezza footer_bottom + padding*/
  left: var(--padding);
}

footer .icons_wrapper a{
  cursor: pointer;
  pointer-events: all;
}

footer .icons_wrapper img{
  height: 20px;
}

footer .button {
  margin-top: 16px;
}

footer hr {
  width: calc(100% - var(--padding) * 2);
  height: 1px;
  background-color: var(--white);
  opacity: 10%;
  margin: 0;  
  position: absolute;
  bottom: 81px; /*altezza footer_bottom*/
  left: var(--padding);
}

footer .footer_bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 30px calc(var(--padding));
  box-sizing: border-box;
  position: absolute;
  bottom: 0%;
}

footer .footer_bottom p {
  color: var(--white);
}

@media (max-width: 800px) {

  :root {
    --padding: 30px;
  }
  footer{
    height: 70vh;
  }
  footer h1{
    font-size: var(--font-l);
  }

  footer .footer_content p {
    color: var(--white);
    opacity: 50%;
    font-size: var(--font-base);
  }

  footer .icons_wrapper img{
  height: 16px;
}
}

/* #endregion */

/* #region MAIN */

.StartingView {
  width: 100vw;
  height: 100vh;
  background-color: var(--white2);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  position: relative;
}

.StartingView .HeroWrapper{
  position: relative;
  z-index: 2;
}

.StartingView h1 {
  font-family: "Horgen";
  font-size: 300px;
  line-height: 72%;
  color: var(--white);
  overflow: hidden;
  margin-left: 80px;
}

.StartingView h4{
  color: var(--white);
  opacity: 70%;
  margin-left: 83px;
  font-size: 22px;
}

.StartingView .buttonWrapper{
  margin-left: 83px;
  margin-top: 40px;
}

.StartingView .ScrollDown{
  color: var(--white);
  position: absolute;
  z-index: 2; 
  font-size: var(--font-base);
  bottom: 16px;
  align-self: center;
}

.StartingView img {
  object-fit: cover;
  width: 100%;
  position: absolute;
  z-index: 1;
}




/*------ About Me ------*/

.mainContent{
  background-color: var(--white);
}

.AboutMeParagraph{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-direction: column;
  font-size: var(--font-base);
  background-color: var(--white);
  position: relative;
  z-index: 1;
  height: 100vh;
  width: 100%;
  box-sizing: border-box; 
}

.AboutMeParagraph p{
  max-width: 750px;
  padding-right: 30px;
  box-sizing: border-box;
  font-size: 32px;
  text-align: center;
}

.AboutMeParagraph .buttonWrapper{
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 8px;
}


/*------ Selected Works ------*/
.SelectedWorks{
  background-color: var(--white);
  margin-top: 80px;
  padding: 0;
  position: relative;
  z-index: 1;
}

.WorksWrapper{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  width: 100vw;
  margin:0;
  padding:0;
}

.WorksWrapper .work{
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;

}

.WorksWrapper .work > img{
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0.8)
}

.WorksWrapper .work .nextProjectWrapper{
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
}

.WorksWrapper .work .number{
  position: absolute;
  right: 40px;
  bottom: 32px;
  color: var(--white);
  font-size: 22px;
}

.sticky-archive-btn {
  position: absolute;
  top: calc(10vh - 62px);
  left: 20px ;
  z-index: 3;      
  opacity: 0;
}

/*------ Resources ------*/

.Resources {
  position: relative;
  width: 100%;
  height: 100vh;
  background-color: var(--white);
}

.Resources .outer-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  border: 1px solid var(--gray2);
  transform: translate(-50%, -50%);
}

.Resources .inner-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid var(--gray2);
  transform: translate(-50%, -50%);
}

.Resources .icons-rotator {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 520px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.Resources .icon-container {
  position: absolute;
  width: 42px;
  height: 42px;
  background: #E2E2E2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.Resources .icon {
  width: 26px;
  height: 26px;
  border-radius: 6px; 
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Il raggio R è 270px */
/* Offset per il 60°: X = 234px, Y = 135px */

/* --- Icona Top (0°) --- */
.Resources .top {
  top: calc(50% - 270px); /* 50% - R */
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Icona Top-Right (60°) --- */
.Resources .top-right {
  top: calc(50% - 135px);    /* 50% - 135px */
  left: calc(50% + 234px);   /* 50% + 234px */
  transform: translate(-50%, -50%);
}

/* --- Icona Bottom-Right (120°) --- */
.Resources .bottom-right {
  top: calc(50% + 135px);    /* 50% + 135px */
  left: calc(50% + 234px);   /* 50% + 234px */
  transform: translate(-50%, -50%);
}

/* --- Icona Bottom (180°) --- */
.Resources .bottom {
  top: calc(50% + 270px); /* 50% + R */
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Icona Bottom-Left (240°) --- */
.Resources .bottom-left {
  top: calc(50% + 135px);    /* 50% + 135px */
  left: calc(50% - 234px);   /* 50% - 234px */
  transform: translate(-50%, -50%);
}

/* --- Icona Top-Left (300°) --- */
.Resources .top-left {
  top: calc(50% - 135px);    /* 50% - 135px */
  left: calc(50% - 234px);   /* 50% - 234px */
  transform: translate(-50%, -50%);
}

.Resources .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.Resources .content h1{
  font-size: 48px;
  margin: 0;
  color: var(--black);
  line-height: 52px;
}

.Resources .content .sub {
  margin: 24px 0;
  font-size: var(--font-base);
  color: var(--gray);
}

.Resources .content .note {
  margin-top: 16px;
  font-size: var(--font-s);
  color: var(--gray);
}



@media (max-width: 800px) {
}


/* #endregion */

/* #region Resources*/
.resources {
  background-color: var(--white);
  z-index: 1;
}

.resources .MainTitle {
  margin: calc(3.2rem + 120px) auto 120px auto;
  max-width: 1060px;
}

.featured {
  background-color: var(--white2);
  width: 100%;
  padding: 60px 0 50px 0;
}

.featured > h1 {
  font-size: var(--font-l);
  margin: 0 auto 20px auto;
  max-width: 1060px;
}

.featured .SpotlightWrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 20px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  font-size: var(--font-l);
  margin: 0 auto 0px auto;
  max-width: 1060px;
}

.featured .SpotlightWrapper .item {
  flex: 0 0 auto;
}

.featured .item,
.grid-container .item {
  background-color: var(--white);
  border: 1px solid var(--gray2);
  width: 250px;
  height: 160px;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: var(--border-radius);
  transition: transform 0.2s ease-in-out;
}

.featured .item:hover,
.grid-container .item:hover {
  transform: translateY(-5px);
}

.featured .item h1,
.grid-container .item h1 {
  font-size: var(--font-base);
  color: var(--black);
}

.featured .item p,
.grid-container .item p {
  font-size: var(--font-s);
  color: var(--gray);
  height: 3.6rem; /* line_height * 3 linee*/

}

.featured .item .upperRow,
.grid-container .item .upperRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.featured .item .upperRow div:nth-child(2),
.grid-container .item .upperRow div:nth-child(2) {
  font-size: var(--font-base);
  color: var(--gray);
  transition: color 0.2s ease-in-out;
}

.featured .item:hover .upperRow div:nth-child(2),
.grid-container .item:hover .upperRow div:nth-child(2) {
  color: var(--black);
}

.featured .item .upperRow .upperRowTags,
.grid-container .item .upperRow .upperRowTags {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 5px;
  width: 100%;
}

.featured .item .upperRow .tag,
.grid-container .item .upperRow .tag {
  border: 1px solid var(--gray2);
  border-radius: var(--border-radius);
  font-size: var(--font-xs);
  color: var(--gray);
  padding: 2px 6px;
  box-sizing: border-box;
  white-space: nowrap; /* Evita che i tag vadano a capo male */
}

.featured .item .upperRow .paid,
.grid-container .item .upperRow .paid {
  border-radius: var(--border-radius);
  font-size: var(--font-xs) !important;
  color: var(--white) !important;
  background-color: #36454F;
  border: 1px solid #36454F;
  padding: 2px 6px;
  box-sizing: border-box;
}

.RefreshWrap {
  width: 100% !important;
  max-width: 1060px;
  margin: 0 auto 40px auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 120px;
}

.RefreshWrap a {
  padding: 7px 11px;
  transform: translateY(2.5px);
}

.resourceTitle {
  font-size: var(--font-l);
}

.button_filter_container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 auto 20px auto;
  max-width: 1060px;
}

.button_filter_container .button {
  white-space: nowrap;
  min-width: fit-content;
  border: 1px solid var(--gray2);
  cursor: pointer;
}

#refreshBtn {
  cursor: pointer;
}

.button_filter_container .button.active .text span {
  transform: translateY(-110%);
}

.button_filter_container .button.active .ripple span {
  transform: translateY(0);
  border-radius: 0;
  transition-duration: 0.5s, 0.9s;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto 20px auto;
  min-height: 520px;
  align-content: start;
  box-sizing: border-box;
}

.grid-container .item {
  width: 100%;
  aspect-ratio: 250/160;
  background-color: var(--white);
  border: 1px solid var(--gray2);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-radius: var(--border-radius);
  transition: transform 0.2s ease-in-out, opacity 0.3s ease;
  opacity: 0;
  display: none;
  gap: 12px;
}


.item.show {
  transform: scale(1);
  opacity: 1;
  display: flex;
}


@media (max-width: 1100px) {
  .featured > h1{
    margin-left: calc(var(--padding) * 1.5);
  }

  .featured .SpotlightWrapper {
    margin-left: calc(var(--padding) * 1.5);
  }

  .resources .MainTitle {
    margin-left: calc(var(--padding) * 1.5);
    margin-right: calc(var(--padding) * 1.5);
  }

  .resources .grid-container {
    padding: 0 calc(var(--padding) * 1.5);
    margin: 0px;
    height: auto;
  }

  .resources .button_filter_container {
    padding: 0 calc(var(--padding) * 1.5);
  }

  .resourceTitle {
    width: auto !important;
  }

  .RefreshWrap {
    margin-left: 0px;
    padding: 0 calc(var(--padding) * 1.5);
    box-sizing: border-box;
  }
}

@media (max-width: 960px) {
  .resources .MainTitle br {
    display: none;
  }
}


@media (max-width: 861.5px) {
  .featured > h1{
    margin-left: 20px;
  }

  .featured .SpotlightWrapper {
    margin-left: 20px;
  }

  .resources .MainTitle {
    margin-left: 20px;
    margin-right: 20px;
  }

  .resources .grid-container {
    padding: 0 20px;
    margin-bottom: 60px;
    height: auto; 
  }

  .resources .button_filter_container {
    padding: 0 20px;
  }

  .RefreshWrap {
    padding: 0 20px;
  }

  .button_filter_container {
    gap: 12px;
  }

  .button_filter_container .button,
  .button_filter_container .text {
    font-size: var(--font-base);
  }

  .featured {
    padding: 60px 0;
  }
}

@media (max-width: 690px) {
  .resources .MainTitle br {
    display: none;
  }
}

@media (max-width: 600px) {
  .resources .MainTitle {
    font-size: var(--font-l);
    margin: 120px 12px 80px 12px; 
  }

  .resourceTitle, .featured > h1 {
    font-size: var(--font-m);
  }

  .grid-container {
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    padding: 0 12px; 
    height: auto;
  }

  .grid-container .item {
    width: 100%; 
    height: auto;
    aspect-ratio: auto; 
    padding: 12px;
    justify-content: center;
    gap: 20px
  }

  .grid-container .item p {
    font-size: var(--font-s);   
    color: var(--gray);
  }

  .grid-container .item h1 {
    font-size: calc(var(--font-base) - 2px); 
  }

  .grid-container .item .upperRow .tag {
    font-size: 10px; 
    padding: 2px 4px;
  }

  /* Allineamento filtri e titoli */
  .resources .button_filter_container,
  .RefreshWrap,
  .resources .grid-container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .featured > h1{
      margin-left: 12px;
  }
  
  .featured .SpotlightWrapper {
      margin-left: 12px;
  }
}
/* #endregion */

/* #region ItemPage */
.ItemPage {
  width: 100%;
  box-sizing: border-box;
}

.ItemPage img {
  object-fit: cover;
  display: block;
}

.ItemPage .topImageWrapper {
  width: 100%;
  height: 640px;
  overflow: hidden;
  position: relative;
  background-color: var(--gray2);
  margin: 0;
}

/* PARALLAX ATTIVO SU DESKTOP */
.ItemPage .topImageWrapper img {
  width: 100%;
  height: 120%; 
  object-fit: cover;
  position: absolute;
  top: -10%;
  left: 0;
}

.ItemPage .StartingParagraphWrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 40px;
  margin-bottom: 240px;
  margin-left: 40px;
  margin-right: 140px;
  box-sizing: border-box;
}

.ItemPage .StartingParagraphWrapper h1 {
  font-size: var(--font-l);
  color: var(--black);
  max-width: 550px;
  flex: 1;
}

.ItemPage .StartingParagraphWrapper h1 span {
  color: var(--gray);
}

.ItemPage .StartingParagraphWrapper .right {
  max-width: 490px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 32px;
  flex: 1;
}

.ItemPage .StartingParagraphWrapper .right p {
  text-align: justify;
}

.ItemPage .StartingParagraphWrapper .InfoTagsWrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 20px;
}

.ItemPage .StartingParagraphWrapper .infoWrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 4px;
}

.ItemPage .StartingParagraphWrapper .infoWrapper h4 {
  font-size: var(--font-base);
  color: var(--black);
}

.ItemPage .StartingParagraphWrapper .infoWrapper p {
  font-size: var(--font-base);
  color: var(--gray);
}

.ItemPage .StartingParagraphWrapper .right a {
  text-decoration: underline;
  cursor: pointer;
}

.ItemPage .ThreeImagesWrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  padding: 0 20px;
  margin-bottom: 80px;
}

.ItemPage .ThreeImagesWrapper .SquareImgWrapper {
  background-color: var(--gray2);
  width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 1/1;
  position: relative;
}

/* PARALLAX ATTIVO SU DESKTOP */
.ItemPage .ThreeImagesWrapper .SquareImgWrapper img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  top: -10%;
  left: 0;
}

.ItemPage .MainParagraphWrapper {
  width: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-left: 40px;
  margin-right: 120px;
  margin-bottom: 120px;
}

.ItemPage .MainParagraphWrapper h4 {
  color: var(--black);
  font-size: var(--font-base);
  min-width: 150px;
}

.ItemPage .MainParagraphWrapper p {
  color: var(--black);
  font-size: var(--font-base);
  max-width: 620px;
  text-align: justify;
}

.ItemPage .OtherImagesWrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
  box-sizing: border-box;
}

.ItemPage .OtherImagesWrapper .wideImgWrapper {
  width: 100%;
  aspect-ratio: 2/1;
  background-color: var(--gray2);
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}

/* PARALLAX ATTIVO SU DESKTOP (-20%) */
.ItemPage .OtherImagesWrapper .wideImgWrapper img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  position: absolute;
  top: -20%;
  left: 0;
}

.ItemPage .OtherImagesWrapper .TwoSquareImgWrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
}

.ItemPage .OtherImagesWrapper .TwoSquareImgWrapper .SquareImgWrapper {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius);
  background-color: var(--gray2);
  overflow: hidden;
  position: relative;
}

/* PARALLAX ATTIVO SU DESKTOP (110% / -5%) */
.ItemPage .OtherImagesWrapper .TwoSquareImgWrapper .SquareImgWrapper img {
  width: 105%;
  height: 110%;
  object-fit: cover;
  position: absolute;
  top: -5%;
  left: 0; /* Aggiunto left per sicurezza */
}

.nextProjectWrapper {
  width: 100%;
  height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.nextProjectWrapper .NextButton {
  text-decoration: underline;
  font-size: var(--font-xl);
  font-weight: 600;
  cursor: pointer;
  padding: 60px 120px;
  color: white;
  mix-blend-mode: difference;
  position: relative;
  z-index: 3;
}

.hover-reveal-img {
  position: fixed;
  top: 0;
  z-index: 1;
  left: 0;
  pointer-events: none;
  border-radius: 6px;
  width: 300px;
  height: 300px;
  background-color: var(--gray2);
  will-change: transform;
  object-fit: cover;
}

/* --- MEDIA QUERIES --- */

@media (max-width: 1024px) {
  .ItemPage .StartingParagraphWrapper {
    margin-right: 40px;
    margin-bottom: 120px;
  }

  .ItemPage .MainParagraphWrapper {
    margin-right: 40px;
  }

  .ItemPage .topImageWrapper {
    height: 480px;
  }
}

@media (max-width: 850px) {
  .ItemPage .StartingParagraphWrapper {
    flex-direction: column;
    gap: 60px;
    margin-bottom: 100px;
  }

  .ItemPage .StartingParagraphWrapper .right {
    width: 100%;
    max-width: none;
  }

  .ItemPage .MainParagraphWrapper {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 100px;
  }

  .ItemPage .MainParagraphWrapper p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 650px) {
  .ItemPage .topImageWrapper {
    height: 350px;
  }

  .ItemPage .ThreeImagesWrapper .SquareImgWrapper img,
  .ItemPage .OtherImagesWrapper .wideImgWrapper img,
  .ItemPage .OtherImagesWrapper .TwoSquareImgWrapper .SquareImgWrapper img {
    height: 100%;
    top: 0;
    width: 100%;
  }

  /* Gestione Margini e Padding a 20px */
  .ItemPage .StartingParagraphWrapper {
    margin: 40px 20px 80px 20px;
  }

  .ItemPage .ThreeImagesWrapper {
    padding: 0 20px;
  }

  .ItemPage .MainParagraphWrapper {
    margin: 0 20px 80px 20px;
  }
  
  .ItemPage .OtherImagesWrapper {
    padding: 0 20px;
  }

  /* Typography e Layout */
  .ItemPage .StartingParagraphWrapper h1 {
    font-size: calc(var(--font-l) - 4px);
  }

  .ItemPage .StartingParagraphWrapper .right p {
    text-align: left;
  }

  .ItemPage .ThreeImagesWrapper {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
  }

  /* 3 Immagini quadrate in colonna */
  .ItemPage .OtherImagesWrapper .wideImgWrapper {
    aspect-ratio: 1/1; 
    width: 100%;
  }

  .ItemPage .OtherImagesWrapper .TwoSquareImgWrapper {
    flex-direction: column;
    width: 100%;
    gap: 8px; /* Mantiene lo stesso gap verticale tra i quadrati */
  }

  .ItemPage .OtherImagesWrapper .TwoSquareImgWrapper .SquareImgWrapper {
    width: 100%;
  }

  .nextProjectWrapper {
    height: 300px;
  }

  .nextProjectWrapper .NextButton {
    font-size: calc(var(--font-xl) / 1.5);
    padding: 20px;
    text-align: center;
  }

  .hover-reveal-img {
    display: none;
  }
}

/* #endregion */

/* #region Works */

.Works .MainTitle{
  margin: calc(1.6rem + 120px) 20px 120px 20px ;
  max-width: 650;
}

.works-filters{
  margin-left: 20px;
}

.AllWorks{
  background-color: var(--white);
  margin-bottom: 40px;
  padding: 0 20px;
}

.AllWorks .WorksGrid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 8px; /* distanza tra colonne */
  row-gap: 8px;    /* distanza tra righe */
}

.AllWorks .WorksGrid .work {
  overflow: hidden;
  position: relative;
}


.AllWorks .WorksGrid .imageWrapper {
  overflow: hidden;
  border-radius: var(--border-radius);
  aspect-ratio: 1;
  transition: all 0.4s ease;
  background-color: var(--gray2);
  position: relative;
  width: 100%;;

}

.AllWorks .WorksGrid .imageWrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0)); /* Gradiente dal basso */
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1; 
}

.AllWorks .WorksGrid .imageWrapper img {
  object-fit: cover;
  width: 110%;
  height: 110%;
  position: absolute;
  top: -5%;
  display: block;
  will-change: transform, opacity, filter; /* Prepara la GPU */
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              margin-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              margin-top 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.AllWorks .WorksGrid .projectName {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%); /* Parte leggermente più in basso */
  color: #fff;
  font-size: 1.5rem; /* Adatta alle tue variabili, es: var(--font-l) */
  font-weight: 600;
  text-align: center;
  opacity: 0;
  z-index: 2; /* Sopra l'overlay */
  transition: all 0.4s ease;
  width: 90%; /* Per evitare che vada a capo troppo presto */
  pointer-events: none; /* Il click passa attraverso al link padre */
}


.AllWorks .WorksGrid .tags {
  position: absolute;
  bottom: 8px; 
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  z-index: 3; 
  transition: all 0.4s ease 0.1s; 
  filter: blur(4px);
}

.AllWorks .WorksGrid .tags span {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--black);
  font-size: var(--font-s);
  padding: 4px 10px;
  border-radius: var(--border-radius); 
  white-space: nowrap;
}

.AllWorks .WorksGrid .work:hover .tags {
  opacity: 1;
  filter: blur(0px);
}

.AllWorks .WorksGrid .work:hover .imageWrapper img {
  width: 112%;
  height: 112%;
  margin-left: -1%;
  margin-top: -1%;
}

.AllWorks .WorksGrid .work:hover .imageWrapper::after {
  opacity: 1;
}

/* 3. Mostra Nome Progetto (Sale e appare) */
.AllWorks .WorksGrid .work:hover .projectName {
  opacity: 1;
  transform: translate(-50%, -50%); /* Si centra perfettamente */
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .Works .MainTitle br{
    display: none;
  }
}

@media (max-width: 600px) {
  .Works .MainTitle {
    font-size: var(--font-l);
  }
}

@media (max-width: 426px) {
  .Works .MainTitle{
    margin: calc(1.6rem + 80px) 12px 80px 12px;
  }

  .works-filters{
    margin-left: 12px;
  }

  .AllWorks{
    padding: 0 12px;
  }
}

/* TABLET: Da 600px in su (2 colonne) */
@media (min-width: 800px) {
  .AllWorks .WorksGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* DESKTOP: Da 1200px in su (3 colonne - come il tuo originale) */
@media (min-width: 1200px) {
  .AllWorks .WorksGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* #endregion*/

/* #region Contact */
.Contact{
  box-sizing: border-box;
  padding: 0 80px;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end; 
  flex-direction: column;
}

.Contact h1{
  font-size: 350px;
  font-family: "Horgen";
  letter-spacing: -4%;
  line-height: 350px;
  margin-bottom: 0px;
  transform: translateX(-8px);
}

.Contact h1 span{
  font-size: 280px;
  position: absolute;
}

.Contact > a{
  font-size: var(--font-xl);
  color: var(--gray);
  text-decoration: underline;
  cursor: pointer;
  margin-top: -20px;
}

.Contact .SocialWrapper{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  margin-top: 160px;
  margin-bottom: 80px;
}

.Contact .SocialWrapper h4{
  color: var(--black);
  font-size: var(--font-base);
  margin-bottom: 24px;
}

.Contact .SocialWrapper .SocialLinkWrapper{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 80px; /* spazio orizzontale */
  row-gap: 40px;    /* spazio verticale tra le righe */
  color: var(--gray);
  max-width: 400px;
}

.Contact .SocialWrapper .SocialLinkWrapper a{
  font-size: var(--font-base);
  color: var(--gray);
  cursor: pointer;
  align-self: flex-start;
  width: 60px;
}

@media (max-width: 1400px) {
  .Contact h1{
    font-size: 280px;
  }
  
  .Contact h1 span{
    font-size: 230px;
  }
}

@media (max-width: 1150px) {
  .Contact{
    padding: 0 20px;
  }

  .Contact h1{
    font-size: 200px;
    margin-bottom: 0px;
    line-height: 240px;
  }

  .Contact h1 span{
    font-size: 160px;
  }

  .Contact > a{
    font-size: var(--font-l);
  }
}

@media (max-width: 768px) {

  .Contact h1{
    width: 400px;
    line-height: 200px;
    margin-bottom: 60px;
  }

  .Contact .SocialWrapper{
    margin-top: 120px;
  }
}

@media (max-width: 475px) {
  .Contact h1 {
    font-size: 100px;
    margin-bottom: 40px;
    line-height: 90px;
  }

  .Contact h1 span{
    font-size: 80px;
  }
  

  .Contact > a{
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .Contact .SocialWrapper .SocialLinkWrapper{
    column-gap: 40px;
  }
}

@media (max-width: 380px) {
  .Contact > a{
    font-size: 22px;
  }
}

/* #endregion*/

/* #region AboutMe */

.About {
  box-sizing: border-box;
  padding: 0 80px;
  width: 100%; 
}

.About .MainTitle{
  margin: calc(1.6rem + 120px) 0px 120px 0px ;
  max-width: 650px;
}

.About .FotoSection {
  display: flex;
  align-items: flex-start; 
  justify-content: flex-start;
  gap: 80px;
  margin-bottom: 80px;
}

.About .FotoSection .ImgWrapper {
  aspect-ratio: 2/3;
  width: 44%; 
  min-width: 300px;
  background-color: var(--gray2);
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative; 
  flex-shrink: 0; 
}

.About .FotoSection .ImgWrapper img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center center;
  position: absolute; 
  top: -10%;
  left: 0;
}

.About .FotoSection .TextWrapper {
  display: flex;
  align-items: flex-start; 
  justify-content: space-between;
  flex-direction: column;
  gap: 60px;
  flex: 1; 
  max-width: 500px; 
}

.About .FotoSection .TextWrapper .tagsWrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap; 
  gap: 20px; 
}

.About .FotoSection .TextWrapper .tagsWrapper .SingleTagWrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.About .FotoSection .TextWrapper .tagsWrapper .tag {
  color: var(--gray);
  font-size: var(--font-base);
  font-weight: 500;
}

.About .FotoSection .TextWrapper .tagsWrapper .tag2 {
  color: var(--black);
  font-size: var(--font-base);
  font-weight: 500;
}

.About .FotoSection .TextWrapper .p_plus_cv p {
  text-align: justify;
  line-height: 1.5; 
}

.About .FotoSection .TextWrapper .p_plus_cv {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.About .FotoSection .TextWrapper .p_plus_cv .button {
  align-self: flex-start; 
}

@media (max-width: 1024px) {
  .About {
    padding: 0 40px; 
  }

  .About .FotoSection {
    gap: 40px; 
  }

  .About .FotoSection .ImgWrapper {
    width: 45%; 
    min-width: auto; 
  }

  .About .FotoSection .TextWrapper {
    width: auto; 
    gap: 40px;
    max-width: none;
  }

  .About .FotoSection .TextWrapper .p_plus_cv {
    gap: 30px;
  }

  .About .MainTitle br {
    display: none;
  }

  .About .MainTitle {
    margin-bottom: 60px;
  }
}

@media (max-width: 768px) {
  .About {
    padding: 0 24px;
  }
  
  .About .FotoSection {
     gap: 30px;
  }
}

@media (max-width: 650px) {
  .About {
    padding: 0 20px;
  }

  .About .MainTitle {
    font-size: calc(var(--font-l) - 1px);
    margin: calc(0.8rem + 120px) 0px 100px 0px;
  }

  .About .FotoSection {
    flex-direction: column;
    gap: 60px;
  }

  .About .FotoSection .ImgWrapper {
    width: 100%;
  }

  .About .FotoSection .ImgWrapper img {
    height: 100%;
    top: 0;
  }

  .About .FotoSection .TextWrapper {
    width: 100%;
    align-items: flex-start;
    padding-right: 8px;
    box-sizing: border-box;
  }

  .About .FotoSection .TextWrapper .p_plus_cv p {
    text-align: left; 
  }
  
  .About .FotoSection .TextWrapper .p_plus_cv .button {
    align-self: flex-start; 
  }
}
/* #endregion */