    @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

    /* Aggiungi questi stili per risolvere il problema */
    body, html {
      width: 100%;
      max-width: 100%;
    }
    



#logo_fisso {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

#logo_fisso.visible {
  transform: translateY(0);
  opacity: 1;
}

.modal { backdrop-filter: blur(4px);z-index:9999999!important  }
.modal-content {aspect-ratio: 1 / 1}
.modal-body a { font-size:14px }
.modal-header { padding:0!important }

    #max_w {
      position: fixed; /* Cambiato da absolute a fixed */
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: -1;
      overflow: hidden; /* Importante: nasconde il contenuto che esce */
    }

.video-bg {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.video-bg.visible {
  opacity: 1;
}

    .video-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: -1;
      transform-origin: center; /* Centro come punto di trasformazione */
    }

    /* Mantieni il resto del CSS esistente */
    .swiper-wrapper { width:100%;margin:0 auto; }
    .mySwiper { width: 100%; height: 50svh;  }
    .mySwiper,.mySwiper2 {overflow: visible;}
    .swiper-slide img {
      display: block;
      width: 100%;
      margin: 0 auto;
    }
    .max{ max-width:1400px } 
    .max_02{ max-width:1000px; }
    .mySwiper2 .swiper-slide {
      height: 50svh;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .mySwiper .swiper-slide-next,.mySwiper .swiper-slide-prev 
      { 
        filter:blur(20px); opacity:0!important
      }
    .mySwiper2 .swiper-slide-next,.mySwiper2 .swiper-slide-prev 
      { 
        filter:blur(0)!important; opacity: 1!important
      }
    @keyframes fadeInVideo {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    /* --- LOGO SVG --- */
    .home svg {
      width: 500px;
      height: auto;
      mix-blend-mode: difference;
      transform-origin:  center;
    }



    @media (max-width: 991px) {
      #log p { font-size:18px; letter-spacing:2px; mix-blend-mode:difference; }
      .home svg { width: 300px!important;}
      .video-bgd { transform:scale(1.0)!important; }
      .role { height:120px }
      .altezza { min-height:auto!important } 

      .m_fix { margin-top:-10px }
      
    }
    .home path, .home rect, .home circle, .home polygon, .home polyline {
      stroke: #fff;
      fill: transparent;
      stroke-dasharray: 5100;
      stroke-dashoffset: 5100;
      animation:
        draw 7s ease-in-out forwards,
        fillIn 3s ease forwards 1s,
        fadeStroke 3s ease forwards 1s;
    }
    @keyframes draw {
      to { stroke-dashoffset: 0; }
    }
    @keyframes fillIn {
      from { fill: transparent; }
      to { fill: #fff; }
    }
    @keyframes fadeStroke {
      from { stroke-opacity: 1; }
      to { stroke-opacity: 0; }
    }
    /* --- LAYOUT --- */
    body {
      font-family: "Montserrat", sans-serif;
      background: #000;
      margin: 0;
      overflow-x: clip;
      width: 100%;
      color: #fff;
    }
    h1,h2,h3 { font-weight:400; letter-spacing:.7px; }
    h2 { font-size:24px;margin-bottom:0!important }
    h3 {font-size: 18px; line-height: 120%}
    p { font-size:14px; margin-bottom:12px;line-height:130%; font-weight:300 }
    p>em { font-weight:600!important }
    .role { height:60px }
    .small_box p { font-size:12px; }
    .small_box p>em { font-weight:400!important;margin-bottom:0; margin-top:20px }
    #portfolio h2,  #servizi h2 { font-size:36px }
    #professionisti h3 { font-size:20px;  }
    #servizi h3 { font-size:16px; font-weight:300;margin-bottom:0!important }
    h3 sup { font-size:9px; margin-left:8px }
    .altezdza { height:100%;min-height:100svh }



/* Contenitore titolo + pulsante */
.header-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Pulsante */
.toggle-box {
  background: none;
  border: none;
  cursor: pointer!important;
  position: absolute;
  top:4px;
  right:14px;
  opacity: .5;
}


  .small_box {
    display: none;
  }
  
  .small_box.open {
    display: block;
  }


.border { border-color:#808080 !important }
header { z-index:9999!important; backdrop-filter:blur(3px); }
footer { backdrop-filter:blur(3px); }
footer p { font-size:12px }
a.menu { color:#fff;text-decoration:none;text-transform:uppercase;letter-spacing:1px }
.active { border-bottom:1px solid #fff!important; pointer-events:none; }
#myVideo { object-fit: cover; }

@media (max-width: 991px) {
  a.menu { font-size:11px;}
  #Livello_1 {
    width: 240px;
  }
  .audio-btn {
    transform:translateX(-50%);
    left:50%;
    bottom:60px;
    cursor:pointer!important;
    font-size: 12px;
    z-index: 999999999;
    mix-blend-mode: difference;
    width: max-content;
  }
}

@media (min-width: 992px) {
  #log p { font-size:25px; letter-spacing:2px; mix-blend-mode:difference; }
  a.menu { font-size:14px;}
  #Livello_1 {
    width: 360px;
  }
  .audio-btn {
    transform:translateX(-50%);
    left:50%;
    bottom:0;
    cursor:pointer!important;
    font-size: 12px;
    z-index: 999999999;
    mix-blend-mode: difference;
  }
}
.small_text p, .small_text a { margin-bottom:0!important; font-size:14px!important;letter-spacing:initial!important; }
/* Blocco Scroll Pagina quando la Card è centrata su Mobile */
body.dp-modal-open {
  overflow: hidden !important;
}

/* Layout Container */
.dashboard-container {
  background-color: #000000;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Griglia Post Responsive */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1100px) {
  .posts-grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
  }
}

/* ==========================================================================
   STILI DEDICATI ESCLUSIVAMENTE A MOBILE (Zero Bordi Bianchi / Highlights)
   ========================================================================== */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px 12px !important;
  }
  .posts-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px;
    margin-bottom: 24px;
  }
  .post-card-back {
    padding: 10px 12px 6px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .post-back-content-box {
    flex: 1 1 auto !important;
    max-height: calc(100% - 32px) !important;
  }
  
  .post-back-caption {
    font-size: 8.5px !important;
    line-height: 1.6 !important;
  }

  /* Segnale minimal per girare la card su mobile */
  .dp-flip-hint {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 26px !important;
    padding-top: 6px !important;
    padding-bottom: 2px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
    font-size: 8px !important;
    font-weight: 500 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    pointer-events: none !important;
    margin-top: 4px !important;
    flex-shrink: 0 !important;
    width: 100% !important;
  }

  .dp-hint-icon {
    opacity: 1 !important;
    flex-shrink: 0;
  }
  
  /* ZERO BORDI LUMINOSI / BIANCHI SU MOBILE IN QUALSIASI STATO */
  .post-card-front,
  .post-card-back,
  .post-card-container:hover .post-card-front,
  .post-card-container:hover .post-card-back,
  .post-card-container:active .post-card-front,
  .post-card-container:active .post-card-back,
  .post-card-container:focus .post-card-front,
  .post-card-container:focus .post-card-back,
  .post-card-container.mobile-animating .post-card-front,
  .post-card-container.mobile-animating .post-card-back,
  .post-card-container.mobile-rewinding .post-card-front,
  .post-card-container.mobile-rewinding .post-card-back {
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
  }
}

/* Card 3D Flip Base */
.post-card-container {
  background-color: transparent;
  height: auto;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  touch-action: manipulation !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

.post-card-inner {
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.post-card-container.flipped .post-card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.post-card-front,
.post-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background-color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
  -webkit-tap-highlight-color: transparent !important;
}

/* Hover abilitato SOLTANTO su Desktop con mouse fisico */
@media (hover: hover) and (pointer: fine) {
  .post-card-container:hover .post-card-front,
  .post-card-container:hover .post-card-back {
    border-color: #ffffff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
  }
}

.post-card-front {
  height: 100%;
  position: relative;
  width: 100%;
  z-index: 10;
  pointer-events: auto;
}

.post-card-back {
  height: 100%;
  justify-content: space-between;
  left: 0;
  padding: 20px 16px;
  position: absolute;
  top: 0;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Sblocco dinamico dello z-index */
.post-card-container.flipped .post-card-back {
  z-index: 10 !important;
  pointer-events: auto !important;
}

.post-card-container.flipped .post-card-front {
  z-index: 1 !important;
  pointer-events: none !important;
}

/* Fronte Card (Solo Immagine 4:5) */
.post-image-container {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #111111;
}

.post-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Retro Card (Didascalia Centrata con Scroll Touch Nativo) */
.post-back-content-box {
  flex: 1;
  display: block !important;
  padding: 8px 4px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior: contain !important;
  max-height: 100% !important;
  width: 100% !important;
}

.post-back-caption {
  font-size: 12px;
  line-height: 1.65;
  color: #FFFFFF;
  font-weight: 400;
  font-family: 'Montserrat', sans-serif;
  text-align: left;
  margin: 0;
  width: 100%;
  word-break: break-word;
  white-space: pre-wrap !important;
}

.dp-flip-hint {
  display: none;
}

/* State Caricamento */
.dp-loading-box {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* Sfondo Sfuocato al 40% (z-index: 998) */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: none !important;
}

.mobile-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Card Mobile in volo al centro (z-index: 1000 - SOPRA lo sfondo sfuocato) */
.post-card-container.mobile-animating {
  position: fixed !important;
  z-index: 10000 !important;
  margin: 0 !important;
  transform-origin: 50% 50% !important;
  will-change: transform, height;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s ease !important;
}

/* Card Mobile in riavvolgimento alla griglia (z-index: 997 - DIETRO lo sfondo sfuocato per 0-scatti) */
.post-card-container.mobile-rewinding {
  position: fixed !important;
  z-index: 997 !important;
  margin: 0 !important;
  transform-origin: 50% 50% !important;
  will-change: transform, height;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.nav-link { color:#fff!important }
#dotsandpulse-instagram-feed { padding-top:120px }
