/* ===================================
   milano - Construction Template
   Optimized & Organized CSS
   =================================== */
/* --- 1. VARIABILI --- */
:root {
  --primary-color: #ffc107;
  --secondary-color: #1a1a1a;
  --bg-footer-color: #1e1e1e;
  --border-color: #cfcfcf;
  --text-color: #666;
  --text-dark: #1a1a1a;
  --light-bg: #f8f9fa;
  --bianco: #ffffff;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
  --font-titolo: 'Unbounded', sans-serif;
  --font-paragrafo: 'Montserrat', sans-serif;
}
/* --- 2. RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-paragrafo);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}
/*.main-content {
    margin-top: 136px;
}*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-titolo);
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}
a {
  text-decoration: none;
  transition: var(--transition);
}
img {
  max-width: 100%;
  height: auto;
}
.projects,
.stats {
  width: 100%;
}
.moduletable h3 {
  text-align: center;
}
.wmafc-page-header {
  margin-top: 114px;
}
.wmafc-filters-bar {
  background-color: var(--primary-color) !important;
}
.wmafc-detail-container {
  box-shadow: 0 0px 12px 3px rgba(0, 0, 0, 0.15) !important;
  margin-top: 137px !important;
}
.wma-communication-form{
  margin-top: 150px !important;
}
.wma-cf-privacy-text a {
    pointer-events: all;
    text-decoration: none;
    font-weight: 500;
    color: #0d6efd;
}
#system-message-container {
    position: relative;
    top: 200px;
    font-weight: 700;
}
/******************** pulsanti ********************/
.pulsante-primario {
  display: inline-block;
  /*height: 38px;*/
  padding: 7px 30px;
  color: var(--bianco) !important;
  background-color: var(--primary-color);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0px;
  border: none; /* Rimuove il bordo */
  cursor: pointer;
  box-sizing: border-box;
  font-family: var(--font-titolo); /* Font Unbounded */
  transition: var(--transition); /* Effetto fluido al passaggio */
}
.pulsante-primario:hover {
  color: var(--primary-color) !important;
  background-color: var(--bianco); /* Colore scuro al passaggio */
  text-decoration: none;
}
.pulsante-secondario {
  display: inline-block;
  /*height: 38px;*/
  padding: 7px 30px;
  color: var(--primary-color) !important;
  background-color: var(--bg-footer-color);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0px;
  border: none; /* Rimuove il bordo */
  cursor: pointer;
  box-sizing: border-box;
  font-family: var(--font-titolo); /* Font Unbounded */
  transition: var(--transition); /* Effetto fluido al passaggio */
}
.pulsante-secondario:hover {
  color: var(--primary-color) !important;
  background-color: var(--bianco); /* Colore scuro al passaggio */
  text-decoration: none;
}
.wmafc-btwma-detail {
  display: inline-block;
  background-color: var(--primary-color) !important;
  color: var(--bianco) !important;
}
button#wmafc-loadmore-btwma {
  margin: 0;
  padding: 0px 48px;
  font-size: 1.5rem;
  background-color: var(--primary-color) !important;
  color: var(--bianco) !important;
}
.wmafc-btwma-reset {
  background-color: var(--secondary-color) !important;
  border: 0px solid #ccc !important;
  color: var(--primary-color) !important;
  font-weight: 700;
}
.wmafc-btwma-back {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 700;
}
/* --- 3. COMPONENTI GLOBALI --- */
/* Hero Full (Home/Generico) */
.hero-image-full {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.loading-container {
  position: relative;
  width: 100px;
  height: 100px;
}
.loading {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  border: 3px solid transparent;
  border-left-color: var(--bianco);
  border-right-color: var(--bianco);
  animation: rotate-loading 1.5s linear infinite;
}
#loading-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#loading-icon img {
  max-width: 60px;
  height: auto;
}
@keyframes rotate-loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Utility */
.page-header h1 {
  text-align: center;
  text-transform: uppercase;
  margin-top: 30px;
}
.com-content-article__body p {
  text-align: justify;
}
.nav-logo img {
  width: 150px;
}
/* --- 4. LAYOUT ESTESO (esteso.php) --- */
.layout-esteso .hero-article-header {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 40vh;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}
.layout-esteso .hero-overlay {
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
  box-sizing: border-box;
}
.layout-esteso .hero-content {
  text-align: center;
  width: 100%;
  padding-top: 80px;
}
.layout-esteso .hero-title {
  margin-bottom: 15px;
  line-height: 1.1;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 6rem;
}
.layout-esteso .hero-title .first-word {
  color: var(--primary-color);
}
.layout-esteso .hero-title .other-words {
  color: var(--bianco);
}
.layout-esteso .hero-breadcrumb {
  color: var(--bianco);
  font-size: 1rem;
  letter-spacing: 1px;
  margin-top: 15px;
}
.layout-esteso .hero-breadcrumb ol.mod-breadcrumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item a,
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item span {
  color: var(--bianco);
}
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item a:hover {
  color: var(--primary-color) !important;
}
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item.active span,
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item:last-of-type span {
  color: var(--primary-color) !important;
}
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__item:not(:last-child):after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.5rem;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0 20px;
  transform: rotate(20deg);
}
.layout-esteso .container {
  margin-top: 50px;
  margin-bottom: 50px;
}
.layout-esteso .hero-breadcrumb .mod-breadcrumbs__here,
.layout-esteso .hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  display: none !important;
}
/******************************* Magic Cursor Style *******************************/
#magic-cursor {
  position: fixed;
  width: 34px;
  height: 34px;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.3s ease;
}
#ball {
  width: 12px; /* Diametro richiesto */
  height: 12px;
  background-color: var(--primary-color);
  mix-blend-mode: difference; /* Inverte il colore rispetto allo sfondo */
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s,
    height 0.3s,
    opacity 0.3s;
}
/* Nascondi su mobile */
@media (max-width: 1024px) {
  #magic-cursor {
    display: none;
  }
}
/************************** CARD saracinesca **************************/
/* --- 5. CARD SARACINESCA --- */
.card-saracinesca {
  position: relative;
  background: var(--bianco);
  padding: 30px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: color 0.3s ease;
  z-index: 1;
  margin-bottom: 20px;
  cursor: pointer;
}
.card-saracinesca::before {
  content: '';
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}
.card-saracinesca:hover::before,
.card-saracinesca.is-active::before {
  bottom: 0;
}
.card-saracinesca:hover .card-title,
.card-saracinesca:hover .card-text,
.card-saracinesca:hover .card-icon,
.card-saracinesca:hover .card-link,
.card-saracinesca.is-active .card-title,
.card-saracinesca.is-active .card-text,
.card-saracinesca.is-active .card-icon,
.card-saracinesca.is-active .card-link {
  color: var(--text-dark);
}
.card-icon {
  font-size: 50px;
  color: var(--primary-color);
  margin-bottom: 20px;
  transition: color 0.3s ease;
}
.card-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 15px;
}
.card-link {
  font-family: var(--font-titolo);
  display: inline-block;
  margin-top: 20px;
  font-weight: bold;
  color: var(--text-dark);
  border-bottom: 2px solid var(--primary-color);
}
.card-link i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}
.card-saracinesca:hover .card-link i,
.card-saracinesca.is-active .card-link i {
  transform: translateX(5px);
}
/* --- Allineamento Altezza Card (Solo per sezione saracinesca) --- */
.saracinesca .row {
  display: flex;
  flex-wrap: wrap;
}
.saracinesca .columns {
  display: flex;
}
.saracinesca .card-saracinesca {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.saracinesca .card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.saracinesca .card-text {
  flex-grow: 1;
  /* Spinge il link verso il basso */
}
/* Quando il mouse passa sopra una card saracinesca, il pallino diventa nero */
body:has(.card-saracinesca:hover) #ball {
  background-color: var(--secondary-color) !important;
}
/* Se vuoi che diventi nero anche quando passi sul pulsante primario giallo */
body:has(.pulsante-primario:hover) #ball {
  background-color: var(--secondary-color) !important;
}
/****************************** Hero slider *****************************/
.slider-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity var(--transition-speed) ease;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
/* FETTE */
.slice-container {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  perspective: 2000px;
  overflow: hidden;
  z-index: 1;
}
.slice {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(50px) scale(0.9) rotateY(-45deg);
  box-shadow: inset 1px 0 5px rgba(0, 0, 0, 0.5);
  transition:
    opacity var(--transition-speed) ease,
    transform var(--transition-speed) ease;
}
.slide.active .slice {
  opacity: 1;
  transform: translateY(0) scale(1) rotateY(0deg);
}
/* CONTENUTO */
.slide-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  z-index: 10;
  text-align: left;
  width: 100%;
  max-width: 800px;
  color: var(--bianco);
  pointer-events: none;
}
/* ANIMAZIONE TESTI */
.subtitle,
.title {
  opacity: 0;
  transform: translateX(-100px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.subtitle {
  font-size: 1.6rem;
  margin-bottom: 15px;
  display: block;
  letter-spacing: 0.03rem;
  color: var(--primary-color);
  text-shadow: 1px 1px var(--secondary-color);
}
.title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 35px;
  line-height: 1.1;
  color: var(--bianco);
  text-shadow: 2px 2px var(--secondary-color);
}
/* CONTENITORE PULSANTI */
.btn-container {
  display: flex;
  gap: 20px;
}
/* ANIMAZIONE SINGOLI PULSANTI (Risolve il blocco del Flex) */
.btn {
  opacity: 0;
  transform: translateX(-100px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: auto;
  /* Stile */
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  text-decoration: none;
  color: var(--bianco);
  background: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 0px;
}
.btn.border {
  background: transparent;
  border: 2px solid var(--bianco);
}
/* ATTIVAZIONE SEQUENZIALE */
.slide.active .subtitle {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.6s;
}
.slide.active .title {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.8s;
}
/* I pulsanti ora si muovono singolarmente */
.slide.active .btn {
  opacity: 1;
  transform: translateX(0);
}
.slide.active .btn:nth-child(1) {
  transition-delay: 1s;
}
.slide.active .btn:nth-child(2) {
  transition-delay: 1.1s;
}
/* HOVER (separato per non rompere l'animazione) */
.btn:hover {
  background: var(--bianco);
  color: var(--secondary-color);
}
/* NAVIGAZIONE */
.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--primary-color);
  border: none;
  padding: 20px;
  cursor: pointer;
  z-index: 20;
  font-size: 4rem;
}
.prev {
  left: 20px;
}
.next {
  right: 20px;
}
/******************************** Split layout ********************************/
/* Contenitore principale 100% */
.milano-split-wrapper {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  min-height: 500px; /* Altezza minima indicativa */
}
/* Base dei quadrati con naming specifico per Milano */
.milano-split-box {
  flex: 1 0 50%;
  position: relative;
  /* Fondamentale: nasconde l'immagine quando esce dal quadrato */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}
/* Box Immagine - Configurazione di base "a riposo" */
.milano-split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* --- CORREZIONE QUI --- */
  /* Rendiamo l'immagine il 10% più grande del quadrato già in partenza */
  transform: scale(1.1) rotate(0deg);
  /* Transizione più lenta per lo zoom accentuato */
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.22, 1);
}
/* Effetto Hover: Zoom Accentuato + Rotazione */
.milano-split-image:hover img {
  /* --- CORREZIONE QUI --- */
  /* Lo zoom finale deve essere maggiore dello scale iniziale (1.10) */
  /* per coprire la rotazione. Usiamo 1.25 per accentuarlo molto. */
  transform: scale(1.25) rotate(12deg);
}
body:has(.milano-split-image:hover img) #ball {
  background-color: var(--primary-color) !important;
}
/* Box Contenuti */
.milano-split-content {
  background-color: var(--primary-color);
  padding: 10%; /* Padding in percentuale per scalarlo col quadrato */
  box-sizing: border-box;
}
body:has(.milano-split-content) #ball {
  background-color: var(--secondary-color) !important;
}
.milano-split-content .content-inner {
  max-width: 400px; /* Evita che il testo diventi troppo largo su monitor enormi */
  text-align: left;
}
.title-white {
  color: var(--secondary-color);
  margin-bottom: 20px;
}
.milano-split-content p {
  color: var(--bianco);
  margin-bottom: 30px;
  opacity: 0.9;
}
/****************************** Footer *****************************/
.footer {
  background-color: var(--bg-footer-color);
  background-image: url('../img/footer-bg.svg');
  background-repeat: no-repeat;
  /* Questo sostituisce object-fit: cover */
  background-size: cover;
  /* Centra l'immagine sia in orizzontale che in verticale */
  background-position: center center;
}
.footer h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin: 25px 0;
}
.footer a,
.footer li {
  font-size: 1.7rem;
  color: var(--bianco);
  line-height: 1.6;
}
ul.social_media {
  list-style: none;
}
.footer .row {
  display: flex;
  flex-wrap: wrap;
}
.footer .three.columns:has(.img-centrato-avvolgente) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer .logofooter {
  width: 100%;
  height: auto;
}
.footer-bottom p {
  text-align: center;
  color: var(--primary-color);
  font-size: 1.3rem;
  padding-top: 20px;
}
/* --- 7. MEDIA QUERIES (RAGGRUPPATE) --- */
@media (max-width: 3440px) {
  .container {
    width: 100%;
  }
}
@media (max-width: 1600px) {
  .container {
    width: 100%;
  }
}
@media (max-width: 1280px) {
  .container {
    width: 96%;
    padding: 0px 6px;
  }
}
@media (max-width: 1024px) {
  .layout-esteso .hero-article-header {
    height: 30vh;
    min-height: 250px;
    overflow: visible;
  }
  .layout-esteso .hero-overlay {
    align-items: flex-end;
    padding-bottom: 5px;
  }
  .layout-esteso .hero-content {
    padding-top: 0 !important;
    transform: translateY(30px);
  }
  .layout-esteso .hero-title {
    font-size: 2rem !important;
    margin-bottom: 0px;
    letter-spacing: -1px;
  }
  .layout-esteso .hero-breadcrumb .mod-breadcrumbs__item {
    font-size: 1.1rem !important;
  }
  /* Footer 2x2 */
  .footer .three.columns {
    width: 48%;
    margin: 1%;
    float: left;
    box-sizing: border-box;
  }
  .footer .three.columns:nth-child(2n + 1) {
    margin-left: 0;
    clear: left;
  }
  .footer .row {
    display: block;
  }
  .footer .row::after {
    content: '';
    display: table;
    clear: both;
  }
  .nascondi-mobile {
    display: none !important;
  }
  /* Elimina completamente l'ingombro della box */
  .nascondi-mobile {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
  }
}
@media (max-width: 768px) {
  .layout-esteso .hero-title {
    font-size: 2.2rem;
  }
  .layout-esteso .hero-article-header {
    height: 30vh;
  }
}
@media (max-width: 549px) {
  .footer .three.columns {
    width: 100%;
    margin: 0;
  }
  .footer {
    background-image: url('../img/footer-bg-device.svg');
  }
}
@media (max-width: 480px) {
  .layout-esteso .hero-content {
    transform: translateY(40px);
  }
  .milano-split-box {
    flex: 1 0 100%; /* Passa a larghezza piena */
    aspect-ratio: auto; /* Rimuove il vincolo del quadrato se preferisci */
    min-height: 400px;
  }
}
@media (max-width: 390px) {
  .prev,
  .next {
    top: 70%;
  }
}
