/* ==========================================================================
   CORE SETUP & PRELOADER
   ========================================================================== */
:root {
    --bg-dark: #020f23;
    --accent: #3450f5;
    --text-white: #ffffff;
    --card-bg: #04204b;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden !important; 
    width: 100%;
    position: relative;
}

#preloader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-dark) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

#preloader.loaded, 
#preloader.preloader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.preloader-content { width: 80%; max-width: 500px; text-align: center; }
.preloader-bar {
    width: 100%; height: 4px; background: rgba(255,255,255,0.1);
    border-radius: 4px; overflow: hidden; margin: 20px 0;
}
.preloader-fill { width: 0%; height: 100%; background: var(--accent); transition: width 0.3s ease; }



/* ==========================================================================
   SITE HEADER & MENU 
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 82px;
    padding: 0 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
}

.site-logo img {
    height: clamp(65px, 9vw, 110px);
    width: auto;
    display: block;
    transition: height 0.3s ease; 
}

#menu-toggle {
    display: none;
}

.menu-btn-wrapper {
    cursor: pointer;
    z-index: 2100;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto !important;
    transform: scale(1.55);
    transform-origin: right center;
}

.menu-text {
    font-weight: 400; 
    text-transform: none; 
    letter-spacing: 1px;
    font-size: 14px;
    color: #fff;
    transition: color 0.3s ease;
}

.menu-btn-wrapper:hover .menu-text {
    color: var(--accent);
}

.main-nav {
    position: fixed;
    inset: 0;
    background-color: #020f23 !important; 
    
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.6s ease;
    z-index: 1900;
}

#menu-toggle:checked ~ .main-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.main-nav ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.main-nav ul li {
    margin: 15px 0;
}

.main-nav ul li a {
    font-size: clamp(22px, 3.5vw, 36px);
    font-weight: 400; 
    color: #fff;
    text-decoration: none;
    text-transform: none; 
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
}

.main-nav ul li a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}


.main-nav ul li .submenu-toggle {
    font-size: clamp(22px, 3.5vw, 36px);
    font-weight: 400; 
    color: #fff;
    text-decoration: none;
    text-transform: none; 
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.4s ease;
}

.main-nav ul li .submenu-toggle:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

/* ==========================================================================
   MENU DROPDOWN 
   ========================================================================== */

.main-nav ul li.menu-item-has-children {
    position: relative;
}

.main-nav .sub-menu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.4s ease, padding 0.4s ease;
    opacity: 0;
    background-color: rgba(2, 15, 35, 0.95);
    border-radius: 8px;
}

.main-nav .sub-menu li {
    margin: 10px 0;
}

.main-nav .sub-menu li a {
    font-size: clamp(16px, 2.5vw, 22px) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.main-nav .sub-menu li a:hover {
    color: var(--accent) !important;
    transform: none;
}

.main-nav ul li.menu-item-has-children.open .sub-menu {
    max-height: 250px;
    opacity: 1;
    margin-top: 15px;
    padding: 10px 0;
}

/* ==========================================================================
   HERO SLIDER: .vc_row.swipe.full (Desktop & Mobile)
   ========================================================================== */
.vc_row.swipe.full {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.vc_row.swipe.full .hero-swiper {
    width: 100%;
    height: 100%;
}

.vc_row.swipe.full .swiper-slide {
    width: 100%;
    height: 100%;
}

.vc_row.swipe.full .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Frecce di navigazione manuale */
.vc_row.swipe.full .swiper-button-next,
.vc_row.swipe.full .swiper-button-prev {
    color: #fff;
    background: rgba(2, 15, 35, 0.4);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

/* Sposta la freccia sinistra verso l'interno */
.vc_row.swipe.full .swiper-button-prev {
    left: 30px !important; 
}

/* Sposta la freccia destra verso l'interno */
.vc_row.swipe.full .swiper-button-next {
    right: 30px !important;
}

.vc_row.swipe.full .swiper-button-next:hover,
.vc_row.swipe.full .swiper-button-prev:hover {
    background: var(--accent);
}

.vc_row.swipe.full .swiper-button-next:after,
.vc_row.swipe.full .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* Paginazione a pallini/barrette */
.vc_row.swipe.full .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.vc_row.swipe.full .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent) !important;
    width: 30px;
    border-radius: 6px;
    transition: width 0.3s ease;
}











/* Stili specifici per la seconda slide Hero */
.hero-slide-corporate {
  position: relative;
  width: 100%;
  height: 100vh !important; /* Forza l'altezza al 100% della viewport */
  min-height: 100% !important;
  overflow: hidden;
  display: flex !important;
  align-items: center !important;       /* Centra verticalmente */
  justify-content: flex-start !important; /* Mantiene l'allineamento a sinistra */
}

.hero-corporate-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center right;
  z-index: 1;
}

.hero-corporate-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.hero-corporate-content {
  position: relative !important;        
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  margin-left: 15%;           /* Distanza dal bordo sinistro */
  max-width: 900px;
  z-index: 3;
}

.hero-corporate-title {
  color: #ffffff;
  font-size: clamp(72px, 3.8vw, 48px);
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-corporate-desc {
  color: #ffffff;
  font-size: clamp(50px, 1.4vw, 18px); /* Corretto il clamp che aveva i valori invertiti */
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}



@media (max-width: 768px) {
  /* Forziamo lo Swiper e le slide a gestire correttamente l'altezza su mobile */
  .vc_row.swipe.full,
  .vc_row.swipe.full .swiper,
  .vc_row.swipe.full .swiper-wrapper {
    height: 100vh !important;
  }

  .vc_row.swipe.full .swiper-slide {
    display: flex;
    flex-direction: column;
    height: 100vh !important;
    background-color: var(--bg-dark); /* Sfondo scuro di riempimento */
  }

  /* 1. Regola per le slide normali (come la prima e la terza) */
  .vc_row.swipe.full .swiper-slide > img {
    width: 100% !important;
    height: 55vh !important; /* Mostra la foto originale sopra senza tagliarla */
    object-fit: contain !important; /* Mantiene le proporzioni originali al 100% */
    object-position: center bottom !important;
    background-color: var(--bg-dark);
  }

  /* 2. Regola per la seconda slide (Corporate con testo) */
  .hero-slide-corporate .hero-corporate-bg {
    position: relative !important;
    width: 100% !important;
    height: 55vh !important; /* Stessa altezza della foto sopra per coerenza */
    background-size: contain !important; /* Mantiene la foto originale intera */
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
  }

  .hero-slide-corporate .hero-corporate-overlay {
    display: none !important; /* Rimuove il gradiente sovrapposto su mobile */
  }

  /* Posizionamento del blocco testo sotto l'immagine per la seconda slide */
  .hero-slide-corporate .hero-corporate-content {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    padding: 20px 25px !important;
    background-color: var(--bg-dark);
    z-index: 3;
    text-align: left;
  }

  .hero-slide-corporate .hero-corporate-title {
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }

  .hero-slide-corporate .hero-corporate-desc {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
}

/* ==========================================================================
   ADATTAMENTO MOBILE (Mantiene la larghezza piena al 100vw)
   ========================================================================== */
@media (max-width: 768px) {
    .vc_row.swipe.full {
        width: 100vw !important;
        height: 100vh !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
    }

    .vc_row.swipe.full .swiper-button-next,
    .vc_row.swipe.full .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .vc_row.swipe.full .swiper-button-next:after,
    .vc_row.swipe.full .swiper-button-prev:after {
        font-size: 14px;
    }
}


/* ==========================================================================
  GALLERY & PORTFOLIO (MOBILE FIX) 
   ========================================================================== */
.gallery-item {
    border: 1px solid #c4c4c4;
}


.home-gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 0 5%;
    max-width: 1600px;
    margin: 0 auto;
}

.hg-medium { grid-column: span 6; }
.hg-large  { grid-column: span 12; }
.hg-tall   { grid-column: span 6; grid-row: span 2; }
.hg-small  { grid-column: span 3; }

@media (max-width: 768px) {
    .home-gallery__grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 20px !important;
    }
    .hg-card, .hg-medium, .hg-large, .hg-tall, .hg-small {
        width: 100% !important;
        height: 350px !important;
        margin-bottom: 20px !important;
    }
    .site-header { height: 70px !important; }
}

.hg-card { position: relative; perspective: 1000px; }
.hg-front, .hg-back {
    position: absolute; inset: 0; border-radius: 4px;
    backface-visibility: hidden; transition: transform 0.7s var(--ease);
}
.hg-back {
    background: var(--accent); transform: rotateY(180deg);
    display: flex; flex-direction: column; justify-content: center;
    padding: 20px; text-align: center;
}
.hg-card:hover .hg-front, .hg-card:active .hg-front { transform: rotateY(-180deg); }
.hg-card:hover .hg-back, .hg-card:active .hg-back { transform: rotateY(0deg); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.vc_row { width: 100%; position: relative; clear: both; display: block; }
.vc_row.full { width: 100vw; margin-left: calc(50% - 50vw); }
.vc_row.full img { width: 100%; display: block; }
.vc_row::after { content: ""; display: table; clear: both; }


section.vc_row.dark-section.forza-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

section.vc_row.dark-section.forza-fullscreen .container {
    width: 100% !important;
    max-width: 1240px !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    margin: 0 auto !important;
}

section.vc_row.dark-section.forza-fullscreen h2.has-mask {
    margin-bottom: 100px !important; /* Cambia questo valore a piacimento (es. 10px per ridurlo, 40px per aumentarlo) */
}


section.vc_row.dark-section.row_padding_top.row_padding_bottom:not(.forza-fullscreen) {
    min-height: 70vh !important;
    height: 70vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

section.vc_row.dark-section.row_padding_top.row_padding_bottom:not(.forza-fullscreen) .container {
    width: 100% !important;
    max-width: 1240px !important;
    margin: 0 auto !important;
}


/* ==========================================================================
   GALLERY PROGETTI 
   ========================================================================== */

.portfolio-category {
    width: 100%;
    padding: 80px 0;
    background-color: #ffffff !important; 
    margin-bottom: 0 !important;
    display: block;
    clear: both;
    overflow: hidden; 
}

.portfolio-category + .portfolio-category {
    padding-top: 40px; 
}

.category-header {
    width: 100% !important;
    max-width: 1600px;
    margin: 0 auto 50px auto;
    padding: 0 5%;
    box-sizing: border-box;
}

.category-header h3 {
    color: #020f23 !important;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 300;
    text-transform: none;
    letter-spacing: 1px;
    margin: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 35px; 
    width: 100% !important;
    max-width: 1600px; 
    margin: 0 auto;
    padding: 0 5%; 
    box-sizing: border-box;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 4 / 5 !important;
    background-color: #f9f9f9;
    transition: transform 0.6s var(--ease);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; 
    display: block;
    transition: transform 1.2s var(--ease);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 15, 35, 0.5); 
    display: flex;
    align-items: center;      
    justify-content: center;   
    opacity: 0;
    transition: all 0.5s var(--ease);
    z-index: 2;
    backdrop-filter: blur(4px);
}

.btn-preview {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 2px;
    padding: 14px 35px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    background: transparent;
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .overlay {
    opacity: 1; 
}

.gallery-item:hover .btn-preview {
    background-color: #3450f5; 
    border-color: #3450f5;
    color: #ffffff;
}

@media (max-width: 1200px) {
    .category-header {
        margin-bottom: 30px;
    }
    .portfolio-grid {
        gap: 20px; 
    }
}

@media (max-width: 768px) {
    .portfolio-category { padding: 50px 0; }
    .category-header { margin-bottom: 30px; padding: 0 20px; }
    .portfolio-grid { 
        grid-template-columns: 1fr; 
        width: 100%; 
        padding: 0 20px; 
    }
    .gallery-item {
        aspect-ratio: 2 / 3; 
        margin-bottom: 60px;
    }
}


/* ==========================================================================
   ONE_HALF 
   ========================================================================== */

.one_half {
    width: 47%; 
    float: left;
    margin-right: 6%; 
    margin-bottom: 60px; 
}

.one_half.last {
    margin-right: 0 !important; 
}

.one_half img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.6s var(--ease);
}

.one_half:hover img {
    transform: scale(1.03);
}

.vc_row::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 768px) {
    .one_half {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 30px;
    }
}



.row_padding_top { padding-top: 100px; }
.row_padding_bottom { padding-bottom: 100px; }
.dark-section { background: var(--bg-dark); color: #fff; }

h2.has-mask { font-size: 3.5rem; font-weight: 700; line-height: 1.1; margin-bottom: 30px; }
p.bigger { font-size: 1.4rem; font-weight: 300; opacity: 0.9; }
figcaption { margin-top: 15px; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; }



/* ==========================================================================
  TESTO SCORREVOLE
   ========================================================================== */
.creative-quote { overflow: hidden; white-space: nowrap; padding: 60px 0; width: 100%; }
.creative-quote__wrapper { display: inline-flex; animation: marquee 35s linear infinite; }
.creative-quote__text {
    font-size: clamp(30px, 6vw, 80px);
    font-weight: 300;
    color: var(--accent);
    padding-right: 80px;
    text-transform: uppercase;
    padding-right: 200px;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }


/* ==========================================================================
   STRUTTURA VIDEO UNIVERSALE 
   ========================================================================== */

.vc_row.full.video-trigger-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    display: block;
    clear: both; 
}

.video-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.video-scroll-autoplay {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 768px) {
    .vc_row.full.video-trigger-section {
        width: 100%;
        left: 0;
        margin-left: 0;
        margin-right: 0;
    }
}


/* ==========================================================================
   GALLERY PROGETTI 
   ========================================================================== */

.portfolio-category {
    width: 100%;
    padding: 80px 0 80px 0;
    background-color: #ffffff !important; 
}

.category-header {
    width: 100%; 
    max-width: 1600px;
    margin: 0 auto 50px auto;
    padding: 0;
}

.category-header h3 {
    color: #020f23 !important;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 300;
    text-transform: none;
    letter-spacing: 1px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    width: 150%; 
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 3 / 4; 
    background-color: #f9f9f9;
    transition: transform 0.6s var(--ease);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s var(--ease);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 15, 35, 0.5); 
    display: flex;
    align-items: center;      
    justify-content: center;   
    opacity: 0;
    transition: all 0.5s var(--ease);
    z-index: 2;
    backdrop-filter: blur(4px);
}

.btn-preview {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 2px;
    padding: 14px 35px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    background: transparent;
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .overlay {
    opacity: 1; 
}

.gallery-item:hover .btn-preview {
    background-color: #3450f5; 
    border-color: #3450f5;
    color: #ffffff;
}

@media (max-width: 768px) {
    .portfolio-grid { 
        grid-template-columns: 1fr; 
        width: 90%; 
    }
    .gallery-item {
        aspect-ratio: 1 / 1.1; 
    }
}



/* =========================
   SWIPER 
   ========================= */

.swiper-full-wrapper {
    width: 100%;
    position: relative;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.swiper-gallery-compact {
    width: 100vw; 
    max-width: 1400px; 
    padding: 50px 0 80px 0;
    overflow: visible !important;
}

.swiper-gallery-compact .swiper-slide {
    opacity: 0.2;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.swiper-gallery-compact .swiper-slide img {
    width: 100%;
    aspect-ratio: 4 / 5; 
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.swiper-gallery-compact .swiper-slide-active {
    opacity: 1;
    transform: scale(1.1); 
    z-index: 10;
}

.swiper-gallery-compact .swiper-button-prev,
.swiper-gallery-compact .swiper-button-next {
    color: #fff;
    width: 50px;
    height: 50px;
    background: #020f23;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    top: 50%;
    transform: translateY(-50%);
}

.swiper-gallery-compact .swiper-button-prev:after,
.swiper-gallery-compact .swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
}

.swiper-gallery-compact .swiper-button-prev:hover,
.swiper-gallery-compact .swiper-button-next:hover {
    color: #3450f5; 
}

.swiper-gallery-compact .swiper-pagination-bullet-active {
    background: #3450f5 !important;
    width: 30px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .swiper-gallery-compact {
        width: 100%;
        padding: 30px 0 60px 0;
    }
    .swiper-gallery-compact .swiper-slide-active {
        transform: scale(1.05);
    }
}








/* ==========================================================================
   NEXT PROJECT (FULLSCREEN)
   ========================================================================== */

#next-project {
  width: 100%;
  height: 100vh; /* Forza l'altezza al 100% dello schermo */
  padding: 0;
  margin: 0;
  background-color: #020f23;
  position: relative;
  overflow: hidden; 
  display: block;
}

#next-project a {
  display: flex;
  width: 100%;
  height: 100%; /* Occupa l'intera altezza del padre */
  min-height: 100vh; /* Assicura che sia almeno alto quanto la schermata */
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
}

.next-project-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); 
  will-change: transform;
}

.next-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(2, 15, 35, 0.7) 100%);
  z-index: 1;
  transition: opacity 0.5s ease;
}

.next-caption {
  position: relative;
  z-index: 2;
  transition: transform 0.6s ease;
  padding: 0 20px;
  text-align: center; /* Consigliato per centrare meglio i testi in fullscreen */
}

#next-project a:hover .next-project-image {
  transform: scale(1.1); 
}

#next-project a:hover .next-overlay {
  background: rgba(2, 15, 35, 0.5); 
}

#next-project a:hover .next-caption {
  transform: translateY(-5px); 
}

.next-hero-subtitle span {
  display: block;
  font-size: 30px;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 5px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.next-hero-title span {
  font-size: clamp(40px, 7vw, 90px);
  font-weight: 400;
  line-height: 1.1;
  display: block;
  text-transform: none;
}

@media (max-width: 768px) {
  #next-project,
  #next-project a {
    min-height: 100vh; /* Mantiene il fullscreen anche su mobile */
  }

  .next-hero-title span {
    font-size: 38px;
  }
}

/* ==========================================================================
   NEXT PROJECT (COPIA)
   ========================================================================== */

#next-project-copia {
  width: 100%;
  height: 100vh; /* Forza l'altezza al 100% dello schermo */
  padding: 0;
  margin: 0;
  background-color: #020f23;
  position: relative;
  overflow: hidden; 
  display: block;
}

#next-project-copia a {
  display: flex;
  width: 100%;
  height: 100%; /* Occupa l'intera altezza del padre */
  min-height: 100vh; /* Assicura che sia almeno alto quanto la schermata */
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
}

.next-project-image-copia {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); 
  will-change: transform;
}



.next-caption-copia {
  position: relative;
  z-index: 2;
  transition: transform 0.6s ease;
  padding: 0 20px;
  text-align: center; /* Consigliato per centrare meglio i testi in fullscreen */
}

#next-project-copia a:hover .next-project-image-copia {
  transform: scale(1.1); 
}

#next-project-copia a:hover .next-overlay-copia {
  background: rgba(2, 15, 35, 0.5); 
}

#next-project-copia a:hover .next-caption-copia {
  transform: translateY(-5px); 
}



@media (max-width: 768px) {
  #next-project,
  #next-project a {
    min-height: 100vh; /* Mantiene il fullscreen anche su mobile */
  }

  .next-hero-title span {
    font-size: 38px;
  }
}





/* ==========================================================================
   HOME GALLERY 
   ========================================================================== */

.home-gallery {
  background: #ffffff;
  margin-top: 120px;
  padding: 6rem 0;
}

.home-gallery__content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}

.home-gallery__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(6, 180px);
  gap: 20px;
}

.hg-medium { grid-column: span 2; grid-row: span 2; }
.hg-large  { grid-column: span 3; grid-row: span 3; }
.hg-small  { grid-column: span 1; grid-row: span 1; }
.hg-tall   { grid-column: span 2; grid-row: span 3; }
.hg-wide   { grid-column: span 3; grid-row: span 2; }

.hg-card {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1200px;
}

.hg-front,
.hg-back {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  backface-visibility: hidden;
  transition: transform .8s ease;
}

.hg-front {
  background-size: cover;
  background-position: center;
}

.hg-back {
  background: rgba(4, 32, 75, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotateY(180deg);
}

.hg-card:hover .hg-front {
  transform: rotateY(-180deg);
}

.hg-card:hover .hg-back {
  transform: rotateY(0);
}

.hg-back-content {
  text-align: center;      
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;                
  padding: 1rem;
  height: 100%;
}

.hg-title {
  font-size: 1.6rem;
  color: #fff;
  margin: 0;
}

.hg-subtitle {
  font-size: 1.2rem;
  color: #ccc;
  margin: 0;
}

.hg-btn {
  margin-top: 1rem;            
  color: #04204b;
  border: 1px solid #04204b;
  padding: .9rem 2rem;
  text-decoration: none;
  font-size: 1.4rem;
  transition: .3s;
  background: #fff;
}

.hg-btn:hover {
  background: #04204b;
  color: #fff;
}

.hg-socials {
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 2.4rem;
  color: #3450f5;
}

.hg-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}


/* ==========================================================================
   MEDIA QUERIES 
   ========================================================================== */

@media (max-width: 1024px) {
  .home-gallery {
    margin-top: 60px;
    padding: 4rem 0;
  }

  .home-gallery__content {
    padding: 0 1.5rem;
  }

  .home-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;         
    gap: 15px;
  }

  .hg-medium, .hg-large, .hg-small, .hg-tall, .hg-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .hg-card {
    height: 280px; 
  }
}

@media (max-width: 576px) {
  .home-gallery {
    margin-top: 40px;
    padding: 3rem 0;
  }

  .home-gallery__content {
    padding: 0 1rem;
  }

  .home-gallery__grid {
    grid-template-columns: 1fr; 
    gap: 12px;
  }

  .hg-card {
    height: 240px; 
  }

  .hg-title {
    font-size: 1.4rem;
  }

  .hg-subtitle {
    font-size: 1.1rem;
  }

  .hg-btn {
    padding: 0.7rem 1.5rem;
    font-size: 1.2rem;
  }
}



/* ==========================================================================
   CONTACT BLOCK 
   ========================================================================== */
.contact-row {
  background-color: var(--bg-dark);
  color: var(--text-white);
  padding: 100px 40px;
  position: relative;
  text-align: center;
  clear: both;
}

.contact-row h5 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  color: var(--accent);
  font-weight: 400;
}

.contact-row h1 {
  font-size: clamp(32px, 5vw, 56px); 
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 30px;
}

.contact-row hr {
  border: none;
  height: 2px;
  background: var(--accent);
  width: 80px;
  margin: 30px auto;
}

#contact-formular {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

#contactform .has-animation {
  margin-bottom: 20px;
  opacity: 1; 
  transform: translateY(0);
  transition: none; 
}

#contactform input,
#contactform textarea {
  width: 100%;
  padding: 18px 25px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1); 
  background: var(--card-bg);
  color: var(--text-white);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.4s var(--ease); 
}

#contactform input:focus,
#contactform textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(52, 80, 245, 0.2);
}

#contactform input::placeholder,
#contactform textarea::placeholder {
  color: rgba(255, 255, 255, 0.4); 
}

#contactform textarea {
  resize: none;
  min-height: 150px;
}

.clapat-button-wrap {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.clapat-button input.send_message {
  background: var(--accent);
  color: var(--text-white);
  border: 1px solid var(--accent);
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 30px; 
  cursor: pointer;
  transition: all 0.4s var(--ease);
  width: auto;
}

.clapat-button input.send_message:hover {
  background: transparent; 
  border-color: var(--text-white);
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .contact-row {
    padding: 60px 20px;
  }
  
  #contactform input,
  #contactform textarea {
    padding: 15px 20px;
    font-size: 14px;
  }

  .clapat-button-wrap {
    justify-content: center; 
  }

  .clapat-button input.send_message {
    width: 100%;
    max-width: 300px;
  }
}


/* ==========================================================================
   ABOUT PAGE ADDITIONS 
   ========================================================================== */

.text-section {
  background-color: #fff !important;
  color: #020f23 !important;
}

.text-section h2.has-mask {
  color: #020f23 !important;
}

.services-block-section {
  padding: 100px 0;
  background-color: var(--bg-dark);
}

.accordion {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.accordion dt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: color 0.3s ease;
}

.accordion dt .link {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 400;
  color: var(--text-white);
}

.accordion dt .acc-icon-wrap i {
  color: var(--accent);
  transition: transform 0.4s var(--ease);
  font-size: 18px;
}

.accordion dt:hover .link {
  color: var(--accent);
}

.accordion dd {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion dd p {
  padding: 20px 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.accordion dd ul {
  padding: 0 0 20px 20px;
  color: rgba(255, 255, 255, 0.7);
}

.accordion dd ul li {
  margin-bottom: 8px;
  font-size: 15px;
}

.services-button-wrap {
  text-align: center;
  margin-top: 50px;
}

.services-button-wrap .btn-preview {
  display: inline-block;
  color: var(--text-white);
  border-color: var(--accent);
  background: var(--accent);
}

.services-button-wrap .btn-preview:hover {
  background: transparent;
  border-color: var(--text-white);
}

.clients-section {
  background: #fff !important;
}

.clients-section h2.has-mask {
  color: #020f23 !important;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  gap: 40px;
  align-items: center;
  justify-items: center;
  margin-top: 50px;
}

.client-item {
  width: 100%;
  max-width: 240px; 
  display: flex;
  justify-content: center;
  align-items: center;
  filter: grayscale(1) opacity(0.6);
  transition: all 0.4s var(--ease);
}

.client-item:hover {
  filter: grayscale(0) opacity(1);
}

.client-item img {
  width: 100%; 
  max-width: 100%;
  height: auto;
  object-fit: contain;
}


@media (max-width: 1024px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .services-block-section {
    padding: 60px 0;
  }

  .accordion dt {
    padding: 20px 0;
  }

  .accordion dd p {
    font-size: 14px;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px;
  }

  .client-item {
    max-width: 180px; 
  }
}

@media (max-width: 480px) {
  .clients-grid {
    grid-template-columns: 1fr; 
    gap: 30px;
  }

  .client-item {
    max-width: 180px; 
  }
}



/* ==========================================================================
   CONTACT INFO BLOCKS 
   ========================================================================== */

.direct-contacts {
  padding: 100px 0 60px 0;
  background-color: var(--bg-dark);
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.contact-info-block {
  display: block;
  text-decoration: none;
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.contact-info-block:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 80, 245, 0.4);
  background-color: rgba(52, 80, 245, 0.05); 
}

.contact-info-block h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
  color: var(--text-white);
  transition: color 0.3s ease;
}

.contact-info-block p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
  transition: color 0.3s ease;
}

.contact-info-block:hover h3 {
  color: var(--accent);
}

.contact-info-block:hover p {
  color: var(--text-white);
}

html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .direct-contacts {
    padding: 60px 0 30px 0;
  }
  
  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-info-block {
    padding: 30px 20px;
  }
}



/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark) !important;
    padding: 80px 0 !important;
    text-align: center;
    width: 100%;
    position: relative;
    clear: both;
    display: flex;
    justify-content: center;
}

.footer-content {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; 
}

.site-footer p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin: 0;
}

.site-footer .socials {
    list-style: none;
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 20px; 
}

.site-footer .socials li {
    margin: 0 !important; 
}

.site-footer .socials li a {
    color: #ffffff !important;
    font-size: 18px;
    transition: all 0.3s var(--ease);
    display: inline-block;
}

.site-footer .socials li a:hover {
    color: var(--accent) !important;
    transform: translateY(-5px);
}


/* ==========================================================================
   LAYOUT ASIMMETRICO: TESTO IN GRIGLIA, GRAFICA A FILO PAGINA (DESTRA)
   ========================================================================== */

.full-width-brand {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 100px;
    padding-top: 100px;
    padding-bottom: 100px;
    overflow: hidden;
}

.brand-bleed-row {
    display: grid;
    grid-template-columns: calc(50vw - (min(1200px, 100vw) / 2) + (min(1200px, 100vw) / 2)) 1fr;
    align-items: center;
}

.brand-text-col {
    padding-left: calc(50vw - (min(1140px, 100vw) / 2)); 
    padding-right: 80px;
    color: #000000;
}

.brand-title {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.brand-title strong {
    font-weight: 600;
}

.brand-description {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: #444444;
    max-width: 440px;
}

.brand-visual-col {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-container {
    background-color: #ffffff;
    justify-content: center;
    align-items: center;
}

.brand-img-crop {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

.palette-bleed {
    width: 100%;
    height: 100%;
}

.brand-color-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.color-stripe {
    width: 100%;
    height: 160px; 
    display: flex;
    align-items: center;
    padding-left: 60px;
}

.card-bianca {
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.color-info {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.color-hex {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
}


/* ==========================================================================
   STRUTTURA DEFINITIVA BRAND IDENTITY 
   ========================================================================== */

.brand-wrapper-mobile-fixed {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 100px !important;
    padding: 100px 0 !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
}

.brand-mobile-row {
    display: grid !important;
    grid-template-columns: calc(50vw - (min(1200px, 100vw) / 2) + (min(1200px, 100vw) / 2)) 1fr !important;
    align-items: center !important;
}

.brand-mobile-text {
    padding-left: calc(50vw - (min(1140px, 100vw) / 2)) !important; 
    padding-right: 80px !important;
}

.brand-mobile-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 26px !important;
    font-weight: 300 !important;
    color: #000000 !important; 
    margin-bottom: 15px !important;
    display: block !important;
}

.brand-mobile-title strong {
    font-weight: 600 !important;
}

.brand-mobile-desc {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    line-height: 1.7 !important;
    color: #444444 !important;
    max-width: 440px !important;
    margin: 0 !important;
}

.brand-mobile-visual {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.brand-img-fixed {
    width: 100% !important;
    max-height: 480px !important;
    object-fit: contain !important;
    display: block !important;
}

.brand-mobile-palette-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.brand-color-card {
    width: 100% !important;
    height: 160px !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 60px !important;
    box-sizing: border-box !important;
}

.brand-color-info {
    display: flex !important;
    flex-direction: column !important;
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
}

.brand-color-info .color-hex {
    font-size: 15px !important;
    font-weight: bold !important;
    margin-bottom: 4px !important;
}


/* ==========================================================================
   SISTEMAZIONE SPECIFICA PER TELEFONO
   ========================================================================== */
@media (max-width: 991px) {
    
    .brand-wrapper-mobile-fixed {
        gap: 60px !important;
        padding: 60px 0 !important;
    }
    
    .brand-mobile-row {
        grid-template-columns: 1fr !important; 
        display: block !important; 
    }
    
    .brand-mobile-text {
        padding-left: 30px !important;
        padding-right: 30px !important;
        margin-bottom: 30px !important;
        display: block !important;
    }
    
    .brand-mobile-title {
        font-size: 20px !important;
        color: #000000 !important; 
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .brand-mobile-desc {
        font-size: 15px !important;
        color: #444444 !important; 
        visibility: visible !important;
        opacity: 1 !important;
    }

    .brand-mobile-visual {
        padding: 0 30px !important;
        box-sizing: border-box !important;
        align-items: center !important; 
        justify-content: center !important;
    }
    
    .brand-img-fixed {
        max-width: 100% !important;
        width: auto !important; 
        max-height: 280px !important;
        margin: 0 auto !important; 
    }
    

    .brand-mobile-palette-group {
        padding: 0 !important;
        gap: 15px !important;
    }
    
    .brand-color-card {
        height: 100px !important;
        border-radius: 10px !important;
        padding-left: 25px !important;
    }
}


/* ==========================================================================
   OTTIMIZZAZIONE TESTO SEZIONE SCURA (MOBILE)
   ========================================================================== */
@media (max-width: 991px) {
    
    .dark-section .container h2.has-mask {
        font-size: 30px !important;      
        line-height: 1.3 !important;     
        letter-spacing: 0px !important;   
        margin-bottom: 15px !important;
    }
    
    .dark-section .container p {
        font-size: 25px !important;
        line-height: 1.6 !important;
    }
}



/* ==========================================================================
   photo-separator
   ========================================================================== */

   .photo-separator {
            width: 100%;
            height: 30px; 
            background-color: white; 
            margin: 0; 
        }


    .photo-separator-np {
            width: 100%;
            height: 60px; 
            background-color: #020f23; 
            margin: 0; 
        }


/* ==========================================================================
   MOBILE
   ========================================================================== */




@media (max-width: 1200px) {
    .vc_row.row_padding_top.row_padding_bottom {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .vc_row.row_padding_top.row_padding_bottom .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .vc_row.row_padding_top.row_padding_bottom .one_half {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }

    .vc_row.row_padding_top.row_padding_bottom .one_half.last {
        margin-bottom: 0 !important;
    }

    .vc_row.row_padding_top.row_padding_bottom .one_half img {
        width: 100% !important;
        height: auto !important;
        border-radius: 0 !important;
    }
}



@media (max-width: 1200px) {
    .vc_row.row_padding_top.row_padding_bottom:not(.dark-section) {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .vc_row.row_padding_top.row_padding_bottom:not(.dark-section) .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .vc_row.row_padding_top.row_padding_bottom:not(.dark-section) .one_half {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }

    .vc_row.row_padding_top.row_padding_bottom:not(.dark-section) .one_half.last {
        margin-bottom: 0 !important;
    }

    .vc_row.row_padding_top.row_padding_bottom:not(.dark-section) .one_half img {
        width: 100% !important;
        height: auto !important;
        border-radius: 0 !important;
    }

    section.vc_row.dark-section {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }

    section.vc_row.dark-section .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    section.vc_row.dark-section h2.has-mask,
    section.vc_row.dark-section p.bigger {
        padding-left: 4px !important;
        padding-right: 4px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 1200px) {
    .portfolio-category .category-header {
        padding-left: 20px !important;
        padding-right: 20px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}


@media (max-width: 768px) {
  .next-hero-subtitle span {
    font-size: 18px !important; 
    letter-spacing: 3px !important; 
  }
}




@media (max-width: 768px) {
    .vc_row.full.catalogo_row_zoom {
        height: 340px; 
        overflow: hidden;
    }
    
    .vc_row.full.catalogo_row_zoom img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
        transform-origin: center center;
    }
}

