/* Effetto dissolvenza */
.fade-out {
    opacity: 0; /* Riduce l'opacità a zero */
    transition: opacity 1.5s ease; /* Durata della transizione */
}

.fade-in {
    opacity: 1; /* Rende la pagina visibile */
    transition: opacity 1.5s ease; /* Durata della transizione */
}

/* Stile principale */
body {
	opacity: 0; /* Corpo inizialmente invisibile */
    transition: opacity 0.5s ease; /* Corpo inizialmente invisibile */
    font-family: Arial, sans-serif;
    margin: 0;
	overflow-x: hidden; /* Impedisce lo scroll orizzontale */
    padding: 0;
    line-height: 1.6;
    background-color: #f4f4f9;
    color: #333;
	background-image: url('background.jpg'); /* Percorso dell'immagine */
    background-size: cover; /* Adatta l'immagine all'altezza */
    background-repeat: no-repeat; /* Evita la ripetizione */
    background-attachment: fixed; /* Effetto parallax */
    position: relative; /* Necessario per l'overlay */
}

body::before {
    content: ''; /* Overlay */
    position: fixed; /* Copre tutto il viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7); /* Sovrapposizione bianca semi-trasparente */
    z-index: -1; /* Posiziona l'overlay dietro il contenuto */
}

/* Header */
.header {
    text-align: center;
    background: linear-gradient(to right, #4caf50, #81c784);
	color: white;
    padding: 2rem 0;
    animation: slideIn 1s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*Per non mostrare il banner sito in allestimento*/
.top-banner {
    display: none !important;
}

	.top-banner {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 47px;
        background-image: url('warning.jpg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }

    .top-banner-text {
        font-size: 20px;
        color: #8B0000;
        font-weight: bold;
        text-transform: uppercase;
		letter-spacing: 2px; <!-- Aumenta la spaziatura tra le lettere -->
    }
	
        body {
            font-family: 'Montserrat', sans-serif;
            margin: 0;
			/* padding-top: 47px; */ /* Compensa l'altezza della striscia ma disattivato quando non è presente il banner sito in allestimento */
            padding: 0; /* Rimuovere il commento quando verrà rimosso il banner sito in allestimento */
            background-color: #f4f4f9;
            color: #333;
        }

        header {
            /*background-color: #1d3557;*/
			background: linear-gradient(to right, #18488d, #1d3557);
            color: white;
            padding: 20px 0;
            text-align: center;
			animation: slideIn 1s ease-in-out;
        }

        header h1 {
            margin: 0;
            font-size: 2.5rem;
        }

        header h2 {
            margin-top: 10px;
            font-size: 1.5rem;
        }

        .container {
            width: 80%;
            margin: 40px auto;
        }

        .intro {
            text-align: center;
            margin-bottom: 40px;
        }

        .intro h3 {
            font-size: 1.8rem;
            margin-bottom: 10px;
        }

        .intro p {
            font-size: 1.1rem;
            line-height: 1.6;
        }

        .service-card:hover {
        transform: translateY(-10px);
		}

        .service-card h4 {
            font-size: 1.4rem;
            color: #1d3557;
            margin-bottom: 10px;
        }
		
		.service-card h3 {
			font-size: 1.4rem;
			color: #1d3557;
			font-style: italic;
			font-weight: normal;
			text-decoration: underline;
			margin-bottom: 10px;
		}

        .service p {
            font-size: 1rem;
            line-height: 1.5;
        }

        .cta {
            text-align: center;
            margin-top: 50px;
        }
		
		
		
		.bio {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
        }

        .bio-text {
            width: 60%;
            text-align: left;
        }

        .bio-text h2 {
            font-size: 2rem;
            margin-bottom: 20px;
        }

        .bio-text p {
            font-size: 1.1rem;
            line-height: 1.6;
        }

        .bio-photo {
            width: 35%;
            text-align: center;
        }

        .bio-photo img {
            max-width: 60%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .cta button {
            background-color: #457b9d;
            color: white;
            border: none;
            padding: 15px 30px;
            font-size: 1.2rem;
            border-radius: 5px;
            cursor: pointer;
        }

        .cta button:hover {
            background-color: #1d3557;
        }

        footer {
            /*background-color: #1d3557;*/
			background: linear-gradient(to right, #18488d, #1d3557);
            color: white;
            padding: 20px 0;
            text-align: center;
            margin-top: 50px;
        }

        footer p {
            margin: 0;
            font-size: 0.9rem;
        }

        @media (max-width: 768px) {
            .services {
                flex-direction: column;
            }

            .service {
                width: 100%;
                margin-bottom: 20px;
            }
        }

/* --- Pulsanti: layout + alone luminoso --- */
.icon-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;              /* distanza tra i bottoni */
}

/* dimensioni immagini + transizione morbida */
.icon-link img {
  width: 50px;
  height: 50px;
  margin: 20px;
  transition: filter .25s ease, transform .25s ease;
}

/* WhatsApp: alone verde */
#whatsapp-button img { filter: drop-shadow(0 0 3px #25D366); }
#whatsapp-button:hover img { filter: drop-shadow(0 0 12px #25D366); transform: translateY(-2px); }

/* MioDottore: alone blu */
#miodottore-button img { filter: drop-shadow(0 0 3px #007bff); }
#miodottore-button:hover img { filter: drop-shadow(0 0 12px #007bff); transform: translateY(-2px); }

/* Consulente Ideale: alone arancio */
#consulenteideale-button img { filter: drop-shadow(0 0 3px #ff9900); }
#consulenteideale-button:hover img { filter: drop-shadow(0 0 12px #ff9900); transform: translateY(-2px); }

/* Servizi */
.services {
    display: flex;
    flex-wrap: wrap; /* Permette ai blocchi di andare su righe separate */
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.service-card {
    flex: 1 1 calc(33.333% - 30px); /* Ogni card occupa un terzo della riga */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border: 1px solid #ddd;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background-color: white;
    text-align: center;
    max-width: 300px; /* Limita la larghezza */
	transition: transform 0.5s;
}

.service-link {
  text-decoration: none;
  color: inherit;
}
.service-link:hover .service-card {
  transform: scale(1.05); /* Effetto hover per la scheda */
}

.service-image {
  width: 100%; /* Adatta la larghezza all'elemento contenitore */
  height: auto; /* Mantiene il rapporto d'aspetto */
  margin-top: 10px; /* Distanza dal titolo */
  border-radius: 5px; /* Angoli arrotondati (opzionale) */
}


.counter-section {
    position: relative;
    width: 100%;
    height: 150px; /* Altezza della sezione */
    display: flex; /* Usa Flexbox per allineare gli elementi */
    overflow: hidden; /* Nasconde eventuali elementi che escono dai bordi */
}

.counter-content {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 80px); /* Riduce la larghezza per dare più spazio laterale */
    height: 100%;
    padding: 0 40px; /* Padding laterale per creare spazio ai bordi */
    display: flex; /* Usa Flexbox per allineare gli elementi */
    justify-content: center; /* Centra tutti i container orizzontalmente */
    align-items: center; /* Centra gli elementi verticalmente */
    z-index: 1; /* Assicura che il contenuto sia sopra l'immagine */
    color: white; /* Colore del testo */
    font-family: Arial, sans-serif; /* Stile del font */
    text-align: center; /* Centra il testo all'interno di ogni contenitore */
}

.counter-container {
    text-align: center;
    flex: 0 1 auto; /* Permette agli elementi di avere una dimensione automatica */
    margin: 0 28px; /* Spaziatura uniforme ridotta tra i contenitori */
}

.counter-number {
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 6px;
}

.counter-title {
    color: #D8C98A;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.25;
    max-width: 160px;
    margin: 0 auto;
}

/* Widget Linkedin */
.tc-card{
  width:300px; background:#ffffff; color:#111111;
  border:1px solid #e6e6e6; border-radius:12px; padding:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.06); font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
.tc-head{ display:flex; gap:5px; text-decoration:none; color:inherit; }
.tc-avatar{ width:56px; height:56px; border-radius:50%; object-fit:cover; background:#f0f0f0; }
.tc-id{ display:flex; flex-direction:column; justify-content:center; }
.tc-name{ font-weight:700; font-size:16px; line-height:1.2; }
.tc-badge{
  margin-left:6px; padding:0 4px; font-size:12px; font-weight:700;
  color:#fff; background:#c37d16; border-radius:4px; /* arancione Premium */
}
.tc-handle{ font-size:12px; color:#6b7280; }
.tc-followers{ margin-top:10px; font-weight:500; }
.tc-role{ margin-top:6px; font-size:18px; font-weight:700; }
.tc-site{
  display:block; margin-top:8px; padding:8px 10px; border-radius:8px;
  background:#f5f7fa; color:inherit; text-decoration:none;
}
.tc-site:hover{ background:#ebf3ff; }

#popup-whatsapp {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1000;
}

#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.toggle-btn {
  background-color: #87c8ee;   /* più chiaro */
  color: #111;                  /* testo scuro per contrasto */
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-btn:hover {
  background-color: #5aaad6;   /* leggermente più scuro al passaggio */
}

#toggle-progetti {
  background-color: #87c8ee;
  color: #111;
}

#toggle-progetti:hover {
  background-color: #5aaad6;
}

/* HEADER VIDEO OTTIMIZZATO */
.header--video {
  position: relative;
  width: 100%;
  height: 170px; /* Altezza più bassa */
  overflow: hidden;
  background: none;
}

.header--video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.header--video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(24,72,141,.45), rgba(29,53,87,.45));
  z-index: 1;
}

.header-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Logo + Nome affiancati */
.header-content .name-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.header-logo {
  width: 80px;
  height: auto;
}

.header-titles h1 {
  margin: 0;
  font-size: 2.2rem;
}

.header-titles h2 {
  margin: 5px 0 0;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Icone social */
.header-content .icon-row {
  margin-top: 10px;
}



@media (max-width: 768px) {
    .service-card {
        flex: 1 1 calc(50% - 20px); /* Due card per riga su tablet */
    }
	
	.counter-section {
        display: none; /* Nasconde completamente l'elemento */
    }
	.header--video {
    height: 170px; /* altezza per telefoni */
  }

  .header-titles h1 {
    font-size: 1.6rem;
  }

  .header-titles h2 {
    font-size: 1rem;
  }

  .header-logo {
    width: 60px;
  }
  /* Su mobile imposta layout in colonna */
  .header--video .header-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 8px;
	padding-top: calc(env(safe-area-inset-top, 0px) + 38px); /* spazio sopra al contenuto */
    box-sizing: border-box;
  }

  /* Logo più piccolo e centrato */
  .header--video .header-overlay .logo-container img {
	margin-top: 10px;   /* micro-spinta aggiuntiva solo sul logo */
    width: 56px;
    margin-bottom: 2px;
	display: block;
  }

  /* Nome e titolo sotto il logo */
  .header--video .header-overlay h1 {
    font-size: 1.5rem;
    margin: 2px 0;
  }

  .header--video .header-overlay h2 {
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
  }

  /* Pulsanti (icone) visibili e centrati */
  .header--video .header-overlay .icon-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
	margin-bottom: 4px;
  }

  .header--video .header-overlay .icon-row img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
    .service-card {
        flex: 1 1 100%; /* Una card per riga su dispositivi piccoli */
    }
	
	.counter-section {
        display: none; /* Nasconde completamente l'elemento */
    }
}

/* Pagina Chi sono - allineamento foto e ordine mobile */
.bio {
  align-items: flex-start;
}

.bio-photo {
  padding-top: 8px;
}

@media (max-width: 768px) {
  .bio {
    flex-direction: column;
  }

  .bio-photo {
    order: 1;
    width: 100%;
    text-align: center;
    padding-top: 0;
    margin-bottom: 25px;
  }

  .bio-text {
    order: 2;
    width: 100%;
    text-align: left;
  }

  .bio-photo img {
    max-width: 55%;
  }
}

@media (max-width: 480px) {
  .bio-photo img {
    max-width: 75%;
  }
}

/* EU projects */

.eu-projects-highlight {
  margin: 30px auto 20px auto;
  max-width: 1100px;
  padding: 0 20px;
}

.eu-projects-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.eu-projects-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: linear-gradient(135deg, #0d2c54 0%, #184b8a 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 28px 30px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.eu-projects-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.eu-projects-logo img {
  width: 120px;
  max-width: 100%;
  height: auto;
}

.eu-projects-text {
  flex: 1;
}

.eu-projects-text h4 {
  margin: 0 0 10px 0;
  font-size: 1.7rem;
  color: #ffffff;
}

.eu-projects-text p {
  margin: 0 0 14px 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #e8eef8;
}

.eu-projects-cta {
  display: inline-block;
  padding: 10px 16px;
  background: #ffffff;
  color: #123a6b;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .eu-projects-card {
    flex-direction: column;
    text-align: center;
  }

  .eu-projects-logo img {
    width: 90px;
  }
}

/* EU projects official/programme logos layout */
.eu-projects-logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 165px;
}

.eu-projects-logo-stack .eu-projects-brand-logo {
  width: 145px;
  height: 72px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
  box-shadow: none;
}

@media (max-width: 768px) {
  .eu-projects-logo-stack {
    flex-direction: row;
    flex: 0 1 auto;
    gap: 12px;
  }

  .eu-projects-logo-stack .eu-projects-brand-logo {
	width: 120px;
	height: 62px;
	object-fit: contain;
  }
}

@media (max-width: 480px) {
  .eu-projects-logo-stack {
    gap: 8px;
  }

  .eu-projects-logo-stack .eu-projects-brand-logo {
    width: 105px;
    height: 56px;
    padding: 6px;
  }
}

/* Pubblicazioni */
.publications-section {
  margin: 8px auto 20px auto;
  max-width: 1100px;
  padding: 0 20px;
}

.publications-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 34px 30px 32px 30px;
  background: linear-gradient(135deg, rgba(13, 44, 84, 0.96) 0%, rgba(24, 72, 141, 0.94) 56%, rgba(69, 123, 157, 0.92) 100%);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.20);
}

.publications-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(216, 201, 138, 0.22);
}

.publications-card::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
}

.publications-heading {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto 28px auto;
  text-align: center;
}

.publications-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #D8C98A;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.publications-heading h2 {
  margin: 0 0 14px 0;
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1.28;
}

.publications-heading p {
  margin: 0;
  color: #eef4fb;
  font-size: 1.03rem;
  line-height: 1.7;
}

.publications-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.publication-book {
  display: grid;
  grid-template-columns: 138px 1fr;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #1d3557;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.publication-book:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  border-color: rgba(216, 201, 138, 0.78);
}

.publication-cover-wrap {
  width: 138px;
  height: 206px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  perspective: 900px;
}

.publication-cover-img {
  width: 138px;
  height: 206px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 8px 10px 18px rgba(0, 0, 0, 0.28);
}

.publication-cover-fallback {
  width: 138px;
  height: 206px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 18px 14px;
  border-radius: 8px;
  color: #ffffff;
  text-align: left;
  box-shadow: 8px 10px 18px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.publication-cover-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.24), transparent 28%);
}

.publication-cover-fallback span,
.publication-cover-fallback strong {
  position: relative;
  z-index: 1;
}

.publication-cover-fallback span {
  font-size: 0.88rem;
  line-height: 1.2;
  opacity: 0.92;
}

.publication-cover-fallback strong {
  margin-top: 4px;
  font-size: 1.1rem;
  line-height: 1.15;
}

.publication-cover-tech {
  background: linear-gradient(150deg, #111827 0%, #18488d 52%, #7abf78 100%);
}

.publication-cover-balance {
  background: linear-gradient(150deg, #16324f 0%, #457b9d 48%, #D8C98A 100%);
}

.publication-info h3 {
  margin: 0 0 8px 0;
  color: #1d3557;
  font-size: 1.22rem;
  line-height: 1.25;
}

.publication-info p {
  margin: 0 0 14px 0;
  color: #384252;
  font-size: 0.96rem;
  line-height: 1.55;
}

.publication-cta {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: #FFD814;
  color: #111111;
  border: 1px solid #FCD200;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.publication-book:hover .publication-cta {
  background: #F7CA00;
  border-color: #F2C200;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .publications-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .publications-section {
    padding: 0 10px;
  }

  .publications-card {
    padding: 28px 18px;
    border-radius: 18px;
  }

  .publications-heading h2 {
    font-size: 1.35rem;
  }

  .publication-book {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .publication-info h3,
  .publication-info p {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .publications-card::before {
    top: -70px;
    right: -70px;
    width: 145px;
    height: 145px;
    background: rgba(216, 201, 138, 0.16);
  }
}

/* Pulsanti condivisi */
.tc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease;
  box-sizing: border-box;
}

.tc-button:hover {
  transform: translateY(-2px);
}

.tc-button-primary {
  background: linear-gradient(135deg, #18488d 0%, #1d3557 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 72, 141, 0.24);
}

.tc-button-primary:hover {
  background: linear-gradient(135deg, #123a73 0%, #152b47 100%);
  color: #ffffff;
}

.tc-button-secondary {
  background: #ffffff;
  color: #1d3557;
  border-color: rgba(29, 53, 87, 0.28);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.tc-button-secondary:hover {
  background: #eef4fb;
  color: #1d3557;
}

/* Popup ingresso prenotazione */
#booking-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 33, 58, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1200;
}

#booking-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(92vw, 560px);
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #1d3557;
  padding: 30px 28px;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  z-index: 1201;
  box-sizing: border-box;
}

.booking-popup-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(24, 72, 141, 0.10);
  color: #18488d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

#booking-popup h2 {
  margin: 0 0 14px 0;
  font-size: 1.55rem;
  line-height: 1.25;
  color: #1d3557;
}

#booking-popup p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: #384252;
}

.booking-popup-actions,
.booking-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Pagina prenotazione online */
.booking-page {
  max-width: 1120px;
}

.booking-hero,
.booking-note,
.booking-final-cta {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 38px 34px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.booking-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 44, 84, 0.96) 0%, rgba(24, 72, 141, 0.94) 56%, rgba(69, 123, 157, 0.92) 100%);
  color: #ffffff;
}

.booking-hero::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(216, 201, 138, 0.20);
}

.booking-hero > * {
  position: relative;
  z-index: 1;
}

.booking-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #D8C98A;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.booking-hero h1 {
  margin: 0 0 18px 0;
  font-size: 2.15rem;
  line-height: 1.22;
  color: #ffffff;
}

.booking-hero p {
  max-width: 860px;
  margin: 0 auto 14px auto;
  color: #eef4fb;
  font-size: 1.06rem;
  line-height: 1.75;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 26px 0;
}

.booking-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.booking-card h2,
.booking-note h2,
.booking-final-cta h2 {
  margin: 0 0 12px 0;
  color: #1d3557;
  font-size: 1.38rem;
  line-height: 1.3;
}

.booking-card p,
.booking-note p,
.booking-final-cta p {
  margin: 0;
  color: #384252;
  font-size: 1rem;
  line-height: 1.7;
}

.booking-note,
.booking-final-cta {
  margin-top: 26px;
}

.booking-final-cta {
  margin-bottom: 30px;
}

.booking-final-cta p {
  max-width: 820px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .booking-hero,
  .booking-note,
  .booking-final-cta {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .booking-hero h1 {
    font-size: 1.65rem;
  }

  .booking-grid {
    grid-template-columns: 1fr;
  }

  .booking-card {
    padding: 22px 20px;
  }

  #booking-popup {
    padding: 26px 20px;
  }

  #booking-popup h2 {
    font-size: 1.32rem;
  }

  .tc-button {
    width: 100%;
    max-width: 310px;
  }
}

/* Pulsanti CTA pagina psicologia */
.cta .psychology-cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 820px;
  margin: 0 auto 32px auto;
  text-align: center;
}

.cta .psychology-cta-buttons button {
  min-width: 210px;
  max-width: 280px;
  white-space: normal;
  text-align: center;
}

@media (max-width: 600px) {
  .cta .psychology-cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 12px;
  }

  .cta .psychology-cta-buttons button {
    width: 100%;
    max-width: 310px;
    min-width: 0;
    margin: 0 auto;
    display: block;
  }
}
/* =========================================================
   Rifinitura grafica discreta - card del sito interno
   Mantiene struttura, contenuti e colori esistenti.
   ========================================================= */
.service-card,
.booking-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.service-card::after,
.booking-card::after {
  content: "";
  position: absolute;
  top: -35%;
  left: -75%;
  width: 48%;
  height: 170%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 36%,
    rgba(255, 255, 255, 0.58) 50%,
    rgba(255, 255, 255, 0.08) 64%,
    transparent 100%
  );
  transform: rotate(10deg);
  transition: left 0.7s ease;
}

.service-link:hover .service-card,
.booking-card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(24, 72, 141, 0.26);
  box-shadow: 0 16px 34px rgba(15, 35, 64, 0.16);
}

.service-link:hover .service-card::after,
.booking-card:hover::after {
  left: 130%;
}

.service-image {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.service-link:hover .service-image {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.02);
}

.eu-projects-card,
.publications-card {
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.eu-projects-card:hover,
.publications-card:hover {
  transform: translateY(-5px);
  filter: saturate(1.04);
  box-shadow: 0 18px 38px rgba(13, 44, 84, 0.24);
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .service-card,
  .booking-card,
  .service-image,
  .eu-projects-card,
  .publications-card {
    transition: none;
  }

  .service-card::after,
  .booking-card::after {
    display: none;
  }

  .service-link:hover .service-card,
  .booking-card:hover,
  .eu-projects-card:hover,
  .publications-card:hover {
    transform: none;
  }
}

/* Correzione contrasto CTA: mantiene leggibile il testo durante hover e focus. */
.cta .tc-button.tc-button-secondary:hover,
.cta .tc-button.tc-button-secondary:focus-visible {
  color: #ffffff;
}
