/* ==========================
   GENERAL STYLES
========================== */

/* Global box-sizing */
html {
    box-sizing: border-box;
  }
  
  *, *::before, *::after {
    box-sizing: inherit;
  }


:root {
    --white-text: rgba(255, 255, 255, 0.7);
    --cont-background: rgba(255, 255, 255, 0.3);
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    box-sizing: border-box;
    cursor: none !important;
}

* {
    cursor: inherit !important;
}
/*
@font-face {
    font-family: 'Martel Ultralight';
    src: url(./risorse/fonts/martel/Martel-UltraLight.ttf);
}

@font-face {
    font-family: 'Martel Bold';
    src: url(./risorse/fonts/martel/Martel-Bold.ttf);
}
*/

@font-face {
    font-family: 'Indivisible regular';
    src: url(./risorse/fonts/indivisible/Indivisible-Regular.ttf);
}

@font-face {
    font-family: 'Indivisible medium';
    src: url(./risorse/fonts/indivisible/Indivisible-Medium.ttf);
}

@font-face {
    font-family: 'Indivisible semibold';
    src: url(./risorse/fonts/indivisible/Indivisible-SemiBold.ttf);
}

@font-face {
    font-family: 'Indivisible bold';
    src: url(./risorse/fonts/indivisible/Indivisible-Bold.ttf);
}

@font-face {
    font-family: 'Playfair mediutm';
    src: url(./risorse/fonts/Playfair_Display/PlayfairDisplay-Medium.ttf);
}

@font-face {
    font-family: 'Playfair semibold';
    src: url(./risorse/fonts/Playfair_Display/PlayfairDisplay-SemiBold.ttf);
}

@font-face {
    font-family: 'Playfair regular';
    src: url(./risorse/fonts/Playfair_Display/PlayfairDisplay-Regular.ttf);
}

html {
    scroll-behavior: smooth;
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Indivisible regular';
    font-size: 14px;
    background-color: #101111;
    
} 

/* ==========================
   VIDEO SECTION
========================== */
.video {
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100%;          /* nascosto */
    pointer-events: none;
    z-index: 4;
    background-color:#101111;
    display: block;
    transition: all 1s ease-in-out;
}

.video.out {
    opacity: 0;
}


/* ==========================
   SECTIONS BACKGROUNDS
========================== */


/* ==========================
   HEADER
========================== */
.header{
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 12%;
    width: 100%;
    padding-inline: 3%;
    /*backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);*/
    z-index: 5;
    font-family: 'Marcellus SC';
    font-size: 12px;
}

.menu1 {
    height: 100%;
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    position: relative;
}

.menu {
    color: #f0ede7;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.menu a {
    color: #f0ede7;
    text-decoration: none;
}

.menu img {
    height: 70%;
}


/* Logo iniziale grande e centrato */
.logo {
    position: fixed;  /* invece di absolute */
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%) scale(1);
    transition: all 1s ease-in-out;
    z-index: 1000;
}

.logo.fix {
    position: fixed;       /* rimane sopra tutto */
    top: 5vh;               /* regola per centrare verticalmente nell’header */
    left: 50vw;
    transform: translate(-50%, -50%) scale(0.1);
}

.menu div {
    margin-left: 10px;
}

/* ==========================
   HEADER AUTO-INVERT (negative effect)
   Il testo diventa scuro su sfondi chiari
   e chiaro su sfondi scuri.
========================== */

.header,
.menu1,
.menu1 a,
.menu1 div {
    mix-blend-mode: difference;
    color: #f0ede7; /* colore base, sarà invertito automaticamente */
}

.menu1 .logo {
    mix-blend-mode: difference;
    filter: none !important;
}

/* ==========================
   FOOTER
========================== */
footer {
    /*background: linear-gradient(to top, #000000, #00000000);*/
    height: 80vh;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: #f0ede7;
    font-size: 14px;
    margin-top: 5vh;
    margin-bottom: 5vh;
}

/* Reset e pulizia padding/margin per footer e indirizzi */
footer div,
.address ul,
.address li {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.address li{
    padding-top: 1px;
}

/* Togli i padding dai div interni ora non più necessari */
.address div {
    padding: 0;
}

.logo_footer img {
    height: 30%;
    filter: invert(80%);
}

.logo_footer {
    height: 100%;
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0;
    flex-direction: column;
}

.container-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.testo {
    height: auto;
    color: var(--white-text);
    text-align: left;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testo p {
    margin-top: auto;
    margin-bottom: 0;
}

.contatti {
    width: 75%;
    height: 100%;
    display: block;
    padding-left: 0;
}

.info {
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: left;
}

/* ==========================
   FORM
========================== */
form {
    position: relative;
    height: 100%;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    gap: 25px; /* distanza verticale tra le sezioni del form */
}

form label {
    color: #f0ede7;
    opacity: 0.7;
}

input[type="text"],
input[type="email"],
textarea {
    border: none;                /* nessun bordo */
    border-bottom: 0.1px solid var(--white-text); /* linea bianca sotto */
    border-bottom-color: rgba(109, 109, 109, 0.329); 
    background: transparent;     /* nessuno sfondo */
    color: #f0ede7;                /* testo bianco */
    padding: 5px 0;              /* spazio sopra la linea */
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    height: 30px;          /* stessa altezza per tutti */
    min-height: 30px;
    max-height: 30px;
    white-space: nowrap;   
    overflow-x: hidden;    
    overflow-y: hidden;   
    resize: none; 
}

textarea:focus {
    outline: none; /* rimuove il bordo di focus */
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none; /* rimuove il bordo di focus */
}

.linea {
    display: flex;
    gap: 20px;
    width: 100%;
}

.campo {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.campo-messaggio {
    flex: 1 1 100%;
}

.campo label,
.campo-messaggio label {
    margin-bottom: 8px; /* distanza uniforme tra label e input/textarea */
}

#prima_riga{
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* Pulsante del form senza aspetto da bottone, solo testo bianco semi-bold */
form button {
    align-self: flex-end;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    outline: none;
    color: #f0ede7;      /* rimane il testo bianco */
    font-family: inherit; 
    font-weight: 600;  /* rimane semi-bold */
    font-size: 14px;
}

/* ==========================
   FOOTER SECTIONS
========================== */
.indirizzo {
    
    width: 90%;
    height: 25%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}

.gruppo1 {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: auto;
    height: auto;
    padding: 0 22px;
    padding-left: 0;
}

.social {
    height: 100%;
    width: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}


.social img {
    mix-blend-mode: normal !important;
    filter: none !important;
    height: 14%; 
    width: auto;
}

.address {
    padding: 0;
    padding-right: 70px;
    color: var(--white-text);
    width: auto;
    height: auto;
    font-size: 11px;
}

.address ul {
    list-style-type: none; /* toglie i punti di default */
}

.storia {
    position: relative;
}

.storia__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8%;
    overflow: hidden;

        -webkit-mask-image: linear-gradient(
            to bottom,
            transparent 20%,
            black 45%,
            black 60%,
            transparent 90%
        );
        mask-image: linear-gradient(
            to bottom,
            transparent 20%,
            black 45%,
            black 60%,
            transparent 90%
        );
    
}

.storia-track {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 12vh;
    will-change: transform;
}

.storia-para {
    margin: 0;
    padding: 0;
    font-family: "Work Sans", sans-serif;
    font-size: 2.2vw;
    line-height: 1.4;
    text-align: left;
}

.story-step {
    color: #f0ede7;
    opacity: 0.15;
    transition: opacity 0.4s ease;
}

.story-step.active {
    opacity: 1;
}



.cont_foto {
    width: 80%;
    height: 70%;
    position: relative;
}

.cont_foto img {
    width: 90%;
}

.foto2{
    position: absolute;
    bottom: 0;
    right: 0;
}

.numbers {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 25%;
}

.cont_numbers {
    height: 100%;
    width: 30%;
    background-color: rgba(17, 17, 17, 0.2);
    border-radius: 16px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.129);
    border-width: 0.2px;
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
}

/* ========================== 
AZIENDE SECTION (optimized) 
========================== */ 

.aziende-section {
    position: relative;
    margin-top: -40vh;
}

.aziende-title {
    position: absolute;
    mix-blend-mode: difference;
    color: #f0ede7;
    z-index: -5;
    font-size: 60px;
    margin: 0;
    top: 20%;
    left: 0;
    transition: opacity 0.3s ease-in-out;
    white-space: nowrap;
    font-family: 'playfair regular';
}

.cont_città.chiuso .aziende-title {
    opacity: 0;
}



/* Sezione driver: lo script imposta l’altezza dinamicamente */
.aziende {
    position: relative;
    isolation: isolate;
    width: 100vw;
}
/* Pin: resta fisso a schermo (100vh), contenuti centrati in altezza */
.aziende__pin{
    position: sticky;
    top: 0;
    height: 100vh;
    isolation: isolate;
    display: flex;
    align-items: center; /* <<< centrato in altezza */
    justify-content: flex-start;
    overflow: hidden;
}

.aziende__track {
    display: flex;
    height: 100%;
    will-change: width, transform;
    /* gap: 1vw; separazione tra i box */
    justify-content: right;
    align-items: center;
    width: 100vw;
    padding-inline: 3vw;
}

.aziende__track > * {
    position: relative;
    height: 80vh;
    border-inline-style: solid;
    border-color: rgba(109, 109, 109, 0.329);
    border-inline-width: 0.1px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    transition: width 0.8s ease;
    will-change: width;
    overflow: hidden;
}

/* Stato chiuso: box piccolo */
.aziende__track > *.chiuso {
    width: 4vw;
}

/* Titolo-aziende quando chiuso deve collassare completamente */
.titolo-aziende.chiuso {
    width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Stato aperto: box grande */
.aziende__track > *.aperto {
    width: 86vw;
}

/* Contenitore città */
.cont_città {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Mappa a sinistra */
.mappa {
    width: 50%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.info-maps {
    width: 15%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;     /* ← "flex-start", non "left" */
    justify-content: flex-end;
    padding-left: 30px;
}

.nomi {
    display: flex;
    align-items: center;
    justify-content: flex-start;  /* ← "flex-start" invece di "center" */
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease-in;
    margin-bottom: 40px;
    padding-left: 10px;
}

.nomi.visible {
    opacity: 1;
}

.maps {
    margin-bottom: 10px;
    border: 1px solid #27272772;
    border-radius: 25px;
    padding: 5px 10px;
    white-space: nowrap;
    transform: translateY(10px);
    transition: all 0.3s ease;
    color: #101111;
}

.maps:hover {
    color: #f0ede7;
    background-color: #101111;
}

.info-maps a {
    text-decoration: none;
}

.cont_città.aperto .maps {
    opacity: 1;
    transform: translateY(0);
}

.cont_città.chiuso .maps {
    opacity: 0;
    transform: translateY(10px);
}

.cont_città.chiuso .mappa {
    opacity: 0;
    pointer-events: none;
}

.cont_città.chiuso .info-maps {
    opacity: 0;
    pointer-events: none;
    transition: 0.5 ease-in-out;
}




/* Stato aperto/chiuso città */
.cont_città.chiuso .colonna-loghi {
    width: 4vw;
    opacity: 0;
    pointer-events: none;
}
.cont_città.aperto .colonna-loghi {
    width: 30%;
    padding-right: 5%;
    padding-left: 0;
}

.titolo {
    position: absolute;          /* posizionamento relativo al div città */
    left: 10px;                     /* a sinistra */
    width: auto;
    height: 4vw;                /* spazio che occupa */   
    transform-origin: left top; /* punto di rotazione nell’angolo in basso a sinistra */
    color: #f0ede7;
    font-size: 0.9rem;
    white-space: nowrap;          /* evita a capo */
    pointer-events: none;         /* non interferisce con hover/click */
    transition: all 0.5s ease-in-out;
    
}

.cont_città.chiuso .titolo {
    transform: rotate(-90deg);
    top: 90px;
}

.cont_città.aperto .titolo {
    transform: rotate(0deg);
    top: 15px;
}



.riga {
    width: 40vw;
    height: 20%;
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    padding-left: 50px;
}

.riga2 {
    padding-left: 0;
    padding-right: 50px;
}

.riga div {
    width: 30%;
    height: 100%;
    display: flex;
    align-items: center;
}

.riga img {
    width: 100%;
}

.aziende-mobile {
    display: none;
}







.team {
    position: relative;
    margin-top: 10vh;
    margin-bottom: 4%;
}

.team h1 {
    color: #f0ede7;
    margin: 0;
    margin-left: 3%;
    font-family: 'Work Sans';
    font-weight: 100;
    font-size: 70px;
    margin-bottom: 20px;
}

.member {
    height: 120px;
    margin-inline: 3%;
    position: relative;
    /*margin-inline: 110px;
    padding-block: 35px;*/
    border-bottom: 0.1px solid;
    border-bottom-color: rgba(109, 109, 109, 0.329); 
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: #f0ede7;
    font-size: 15px;
}

.team-text {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.pic {
    position: absolute;
    left: 45%;
    height: 200px;
    width: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/*.ruolo {
    font-family: 'Martel Bold';
}*/


/* Stato iniziale nascosto per l’effetto “salita” */
/* ========== TEAM MEMBER ACTIVE BACKGROUND EXTENSION ========== */
.team .member {
  position: relative;
  z-index: 1;
}

/* estende lo sfondo attivo anche fuori dal box del member */


.team .member {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
  /* position and z-index already set above */
}

/* Quando entra in viewport */
.team .member.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibilità: se l’utente riduce le animazioni, salta le transizioni */
@media (prefers-reduced-motion: reduce) {
  .team .member {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ==========================
   TEAM FLUID HOVER LAYER
========================== */

.team-hover-layer {
    position: absolute;
    left: 0;
    width: 100%;
    height: 120px; /* Altezza fissa, regola se serve */
    background-color: #f0ede7;
    border-radius: 8px;
    transition: top 0.4s ease;
    pointer-events: none;
    transition: top 0.4s ease, opacity 0.25s ease;
}

/* testi sopra il layer */
.team .member span {
    transition: color 0.4s ease;
    color: #f0ede7; /* colore di default */
    position: relative;
    z-index: 2;
}

/* testo nero quando il layer è sopra il membro */
.team .member.active-member span {
    color: #101111;
}












/* Contenitore dell’anteprima centrata */
.hover-preview {
  position: fixed;
  inset: 0;                 /* occupa tutto lo schermo per centrare facilmente */
  display: none;            /* appare solo in hover */
  justify-content: center;
  align-items: center;
  pointer-events: none;     /* non cattura il mouse, così l’hover resta sulla riga */
  z-index: 9999;            /* davanti a tutto */
}

/* L’immagine in centro */
.hover-preview img {
    max-width: min(40vw, 320px);   /* era 60vw, ora più piccolo */
    max-height: min(50vh);  /* era 70vh */
    width: auto;
    height: auto;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 200ms ease, transform 220ms cubic-bezier(.22,1,.36,1);
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
    border-radius: 10px;
}

/* Stato visibile */
.hover-preview.show img {
  opacity: 1;
  transform: scale(1);
}

/* Riduci animazioni se richiesto dall’utente */
@media (prefers-reduced-motion: reduce) {
  .hover-preview img {
    transition: none;
  }
}


/* ==========================
   LOGHI SCORRIMENTO - SCROLL ORIZZONTALE NATIVO
========================== */

/* ==========================
   LOGHI SCORRIMENTO
========================== */

.loghi-scorrimento {
    width: 100vw;
    height: 15%;
    overflow: hidden;  /* hidden, non auto */
    display: flex;
    align-items: center;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    margin-top: 10%;
}

.loghi-scorrimento.active {
    cursor: grabbing;
}

.loghi-track {
    display: flex;
    align-items: center;
    gap: 80px;
    width: max-content;
    height: 100%;
    animation: scrollLoghi 80s linear infinite;
    will-change: transform;
}

@media (hover: hover) {
    .loghi-scorrimento:hover .loghi-track {
        animation-play-state: paused;
    }
}

.loghi-scorrimento.active .loghi-track {
    animation: none;
}

@keyframes scrollLoghi {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.loghi-track img {
    height: 40px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.loghi-track a:hover img {
    opacity: 1;
}

.loghi-scorrimento::-webkit-scrollbar {
    display: none;
}
/* Precedente animazione CSS rimossa:
   animation: scrollLoghi 60s linear infinite;
   @keyframes scrollLoghi {...}
*/

/* ==========================
    GRADIENT
========================== */

body {
  margin: 0;
  min-height: 100vh;
  background: #101111; 
  position: relative;
}
/*
#gradientAura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center,
    rgba(255,120,0,0.7) 0%,
    rgba(255,50,0,0.4) 25%,
    transparent 20%);
  transition: background-position 0.2s ease;
  z-index: -1;
}
*/





/* ==========================
   GLOBAL WHITE MODE (for Aziende)
========================== */

/* Transizione globale del body */
body {
  transition: background-color 600ms cubic-bezier(.22,1,.36,1), color 500ms ease;
}

/* Modalità "tutto bianco" */
body.white-mode {
  background-color: #f0ede7 !important;
  color: #000 !important;
}

/* Make sections transparent so body background shows through */
body.white-mode .video,
body.white-mode .storia,
body.white-mode .team,
body.white-mode .aziende-section,
body.white-mode .aziende,
body.white-mode footer,
body.white-mode .numbers,
body.white-mode .desc,
body.white-mode .foto_storia,
body.white-mode .cont_numbers,
body.white-mode .aziende__track > *,
body.white-mode .cont_città {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Titles / azienda text */
body.white-mode .cont_città .titolo,
body.white-mode .aziende .titolo,
body.white-mode .team .member span,
body.white-mode .storia .desc,
body.white-mode .storia .foto_storia {
  color: #000 !important;
}

/* Logos inside companies: keep their original look or force contrast if needed */
body.white-mode .cont_città .loghi a img {
  filter: none !important;
  transition: filter 400ms ease;
}

/* Ensure links and form fields are readable (excluding menu links) */
body.white-mode a:not(.menu a),
body.white-mode input,
body.white-mode textarea,
body.white-mode button {
  color: #101111 !important;
}

body.white-mode .aziende-title {
    color: #101111 !important;
}

body.white-mode .team h1 {
  color: #101111 !important;
}

/* Logo becomes dark (if logo is an image we invert it), ma solo footer e contesti non menu */
body.white-mode .logo img,
body.white-mode footer img {
  filter: invert(0) !important;
  opacity: 1 !important;
}

/* Safety: ensure no element with absolute background covers the body */
body.white-mode [style*="background"] {
  background: transparent !important;
}

/* Optional: small fade overlay to smooth the transition */
body.white-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 1000ms ease;
  pointer-events: none;
}
body.white-mode.active-fade::before {
  background: rgba(255,255,255,1);
}
/* If any backdrop-filter blur is used inside .cont_città and > 200px, reduce to 120px */
.cont_città[style*="backdrop-filter"] {
    backdrop-filter: blur(120px) !important;
}


/* ==========================
   MOBILE AZIENDE - WHITE MODE
========================== */

body.white-mode .agenzia-mobile {
  color: #101111 !important;
  border-color: #101111 !important;
}

body.white-mode .agenzia-header {
  color: #101111 !important;
}

body.white-mode .agenzia-mobile .content {
  color: #101111 !important;
}

/* marker (cerchi mappa) */
body.white-mode .marker {
  background-color: #101111 !important;
  border-color: #101111 !important;
}

/* loghi */
body.white-mode .agenzia-mobile img {
  filter: none !important;
}


/* ==========================
   LOGHI SCORRIMENTO - DRAG DESKTOP
========================== */

/* Ferma l’animazione quando si trascina il track */
/* .loghi-track.dragging {
    animation-play-state: paused;
} */
/* Colonna loghi a destra */
.colonna-loghi {
    display: flex;
    flex-direction: column;
    width: 50%;
    height: 90%;
    justify-content: space-between;
    padding-left: 5%;
    opacity: 1;
    transition: opacity 0.35s ease;
}

/* Wrapper scrollabile interno */


/* Frecce sopra e sotto */
.colonna-loghi .arrow-up,
.colonna-loghi .arrow-down {
    width: 100%;
    height: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #101111;
}

.loghi-wrapper {
    height: 85%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;

    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE 10+ */
}
.loghi-wrapper::-webkit-scrollbar {
    display: none;               /* Chrome, Safari, Opera */
}

.loghi-scorrimento::-webkit-scrollbar {
    display: none;
}

.loghi {
    height: 95%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.logo-single {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-single a img {
    width: 180px;
    height: auto;
}

.logo-single a img.img-small {
    width: 150px;
}

.logo-single a img.img-small2 {
    width: 120px;
}

.logo-single a img.img-small3 {
    width: 100px;
}

.logo-single a img.img-small4 {
    width: 80px;
}

.arrow-down, .arrow-up {
    color: #101111;
}

.titolo-aziende {
    border-width: 0;
}

/*MAPPA PER LE AZIENDE*/

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


.mappa-inner {
    height: 95%;
    width: auto;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
}

.img-mappa {
    height: 100%;
}

.marker {
    position: absolute;
    height: 40px;
    width: 40px;
    border: 0.8px solid #111111;
    border-radius: 50px;
    padding: 1.5px;
    background-color: #f0ede7;
}

.lauraferrari {
    top: 68%;
    left: 5%;
}

.gianlucagoatelli {
    top: 65%;
    left: 30%;
}

.albertoradici {
    top: 83%;
    left: 43%;
}



.francescosabatucci {
    left: 62%;
    top: 55%;
}

.fabioscilingo {
    top: 20%;
    left: 48%;
}

.marker img {
    height: 100%;
    width: 100%;
    border-radius: 50px;
}

.francesconicoli {
    top: 57%;
    left: 40%;
}

.massimovavassori {
    top: 78%;
    left: 28%;
}

.mattiaperego {
    top: 17%;
    left: 41%;
}

.federicobezzi {
    top: 55%;
    left: 58%;
}

.giacomobocchio {
    top: 28%;
    left: 35%;
}

.alessiochiodi {
    top: 36%;
    left: 36%;
}

.thomaswdanti {
    left: 29%;
    top: 40%;
}

.simonefranzoni {
    top: 40.5%;
    left: 42.5%;
}

.stefanobellucci {
    top: 31%;
    left: 43%;
}

.matteotaiocchi {
    top: 25%;
    left: 40%;
}

.paololucapuricelli {
    left: 14%;
    top: 34%;
}

.angelopruna {
    left: 28%;
    top: 33%;
}


.privacy {
    margin-top: 2%;
    display: flex;

    margin-bottom: 0 !important;
}

/* Privacy checkbox custom style */
.privacy input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #f0ede7;
    background-color: #101111;
    cursor: pointer;
    position: relative;
    margin-right: 8px;
}

/* Checkmark */
.privacy input[type="checkbox"]::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) scale(0);
    top: 2px;
    left: 5px;
    transition: transform 0.15s ease;
}

.privacy input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
}

/* Label text */
.privacy label {
    color: #f0ede7;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Privacy link fix (da viola a bianco) */
.privacy a {
    color: #f0ede7;
    text-decoration: underline;
    padding-left: 4px;
}

.privacy span {
    display: flex;
    align-items: center;
}

.successo-mess {
    color: rgb(245, 245, 245); 
    margin-top: 10px; 
    display: none;
    position: absolute;
    bottom: 70px;
    left: 0;

}

#submitBtn:disabled {
    opacity: 0.3;
    pointer-events: none;
}


input:-webkit-autofill,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: #f0ede7;
    transition: background-color 9999s ease-in-out 0s;
}

.linkteam {
    text-decoration: none;
}

/* ==========================
   TEAM MEMBER - PLUS HOVER
========================== */

.team-text {
    position: relative;
    overflow: hidden;
}

.nome{
    font-size: 18px;
}

.ruolo {
    transition: margin-right 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    margin-right: 0;
    text-align: right;
}

.member:hover .ruolo {
    margin-right: 60px;
}

.member-plus {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #f0ede7;
}

.member-plus svg {
    width: 30px;
    height: 30px;
}

.member:hover .member-plus {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

.member.active-member .member-plus {
    color: #101111;
}

.title-contatti {
    font-family: 'Indivisible bold';
    font-size: 14px;   
}

#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 13px;
    height: 13px;
    background-color: #f0ede7;
    mix-blend-mode: difference;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, 
                background-color 0.3s ease,
                mix-blend-mode 0.3s ease;
    z-index: 9999;
    opacity: 1;
    will-change: transform;
}

#custom-cursor.on-photo {
    mix-blend-mode: normal;
    background-color: #101111;
}




@media (max-width: 1024px) and (orientation: portrait) {

    .logo {
        transform: translate(-50%, -50%) scale(0.4);
    }

    #custom-cursor {
        display: none !important;
    }
    body {
        cursor: auto !important;
    }

    .titolo-storia {
        font-size: 22px;
        align-self: center;
        width: 90%;

    }

    .titolo-storia br {
        display: none;
    }

    .storia {
        justify-content: center;
        gap: 10%;
        margin-bottom: 0;
    }

    .desc {
        width: 90%;
        align-self: center;
    }

    .aziende-section {
        display: none;
    }

    .aziende-mobile {
        display: block;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
        padding-top: 5vh;
    }

    .aziende-title {
        font-size: 28px;
        position: static;
        width: 80%;
        text-align: left;
        color: #f0ede7;
        mix-blend-mode: normal;
      }
    
      body.white-mode .aziende-title {
        color: #101111 !important;
      }

    .accordion {
        width: 90%;
        height: 65%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .agenzia-mobile {
        width: 100%;
        color: #f0ede7;
        border-bottom: #ededed solid 1px;
        position: relative;
    }

    /* HEADER CLICCABILE SOPRA IL CONTENUTO */
    .agenzia-header {
        font-size: 22px;
        height: 85px;
        display: flex;
        align-items: center;
        width: 100%;
        cursor: pointer;
        z-index: 2;
        position: relative;
        background: transparent;
    }

    .milano-mobile {
        border-top: #ededed solid 1px;
    }

    .content {
        overflow: hidden;
        transition: max-height 0.4s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 1;
        width: 100%;
        background: transparent;
        max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease-in-out; /* transizione fluida */
    }

    .agenzia-mobile.active .content {
        max-height: 300vh; /* o abbastanza grande da contenere tutto */
        padding-bottom: 5%;
    }

    /* MAPPA MOBILE FIX */
    .mappa {
        width: 100%;
        height: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-bottom: 5%;
        
    }

    .mappa-inner {
        width: 100%;
        height: auto;
        border: none !important;
        box-shadow: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        background: transparent !important;
        overflow: hidden;
    }

    .img-mappa {
        width: 100% !important;
        height: auto !important;
        max-width: 100vw;
        max-height: 100%;
        border: none !important;
        box-shadow: none !important;
        display: block;
        object-fit: contain;
        background: transparent !important;
    }
    
      .marker {
        height: 40px;
        width: 40px;
        display: block;
        cursor: pointer;
    }

    /* LOGHI MOBILE - adattamento automatico dark/light */
    body:not(.white-mode) .agenzia-mobile img {
        filter: brightness(0) invert(1);
    }

    body.white-mode .agenzia-mobile img {
        filter: none;
    }

    .team .member {
        height: 70px;
        width: auto;
        flex: 1;
        margin: 10px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        pointer-events: none;
      }

      .team-text {
        display: flex;
        flex-direction: column;
        width: 70%;
        align-items: flex-start;
      }
      
      
      /* ruolo sopra a sinistra */
      .team .member .ruolo {
        font-size: 12px;
      }
      
      /* nome sotto a sinistra */
      .team .member .nome {
        font-size: 25px;
      }


    .member .pic {
        display: block;
        position: static;
        height: 160px;
        width: auto;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 10;
        margin-left: auto;
      }

      .member-plus {
        display: none;
    }


    .member.active-member .pic {
        opacity: 1;
      }

    .member.active-member {
        background-color: #f0ede7;
      }

    .member.active-member span {
        color: #101111;
      }

      .team .member.active-member::before {
        content: "";
        position: absolute;
        top: -10px;
        bottom: -10px;
        left: -3%;
        right: -3%;
        background: white;
        z-index: -1;
      }

      .loghi-track {
        gap: 40px;
      }

      .loghi-scorrimento {
        margin-top: 50px;
      }

      footer {
        position: relative;
        justify-content: center;
      }

      .logo_footer {
        position: absolute;
        bottom: 0;
        left: 0;
        height: auto;
        width: auto;
        padding-left: 10%;
        padding-bottom: 0;
      }

      .logo_footer img {
        height: 50px;
      }


      footer img {
        height: 50px;
        width: auto;
      }

      .testo {
        position: absolute;
        bottom: 0;
        left: 50vw;
        width: 40vw;
      }

      .contatti {
        width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
      }

      .info {
        justify-content: center;
        height: 60%;
        width: 90%;
      }

      .indirizzo {
        display: flex;
        flex-direction: column;
        gap: 50px;
        height: auto;
      }

      .gruppo1 {
        width: 100%;
        padding: 0;
      }

      .address {
        padding: 0;
        width: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .social {
        display: flex;
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
        width: 90%;
        height: 50px;
      }

      .social a img {
        height: 30px;
      }

      form {
        width: 100%;
      }

      .loghi-track {
        animation: scrollLoghi 100s linear infinite;
      }

      .storia-para {
        font-size: 25px;
        width: 98%;
      }

      .storia__pin {
        position: sticky;
        top: 0;
        height: 90vh;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-left: 8%;
        overflow: hidden;
    
            -webkit-mask-image: linear-gradient(
                to bottom,
                transparent 10%,
                black 35%,
                black 60%,
                transparent 90%
            );
            mask-image: linear-gradient(
                to bottom,
                transparent 10%,
                black 35%,
                black 60%,
                transparent 90%
            );
        
    }

    .ruolo {
        text-align: left;
    }

    li {
        text-decoration: none;
        color: var(--white-text);
        -webkit-text-fill-color: var(--white-text);
        -webkit-text-decoration: none;
    }

    a[href^="tel"] {
        text-decoration: none;
        color: inherit;
        -webkit-text-fill-color: inherit;
    }

}

@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {

    .marker {
        height: 60px;
        width: 60px;
    }

    .member .pic {
        height: 300px;
    }

    .storia-para {
        font-size: 32px;
    }

    .agenzia-header {
        font-size: 26px;
        height: 100px;
    }

    .team .member .nome {
        font-size: 30px;
    }

    .team .member .ruolo {
        font-size: 14px;
    }

    .agenzia-mobile .logo-single a img {
        width: 240px;
    }

    .agenzia-mobile .logo-single a img.img-small {
        width: 200px;
    }

    .agenzia-mobile .logo-single a img.img-small2 {
        width: 160px;
    }

    .agenzia-mobile .logo-single a img.img-small3 {
        width: 135px;
    }

    .agenzia-mobile .logo-single a img.img-small4 {
        width: 110px;
    }
}