body, html {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
.menu {
    background-color: #60257e;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72px;
    position: relative;
}
.menu div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    font-weight: bold;
    border-right: 2px solid white;
    height: 100%;
    text-align: center;
}
.menu div:last-child {
    border-right: none;
}
.menu div:hover {
    background-color: #efe4dd;
    cursor: pointer;
}
.menu a, .menu-mobile a {
    color: white;
    text-decoration: none;
}
.menu a:hover, .menu-mobile a:hover {
    background-color: #efe4dd;
    color: black;
    text-decoration: none; /* Rimuove la sottolineatura */
}
.menu-mobile {
    display: none;
    background-color: #60257e;
    color: white;
    padding: 20px;
    text-align: center;
}
.menu-mobile a {
    color: white;
    display: block;
    text-decoration: none;
    padding: 10px 0;
}
.menu-mobile a:hover {
    background-color: #efe4dd;
    color: black;
}
.menu-toggle {
    display: none;
    background-color: #60257e;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    right: 0;
    top: 0;
}
.menu-mobile-logo {
    margin-bottom: 10px;
    max-width: 100%;
    height: auto;
}
@media (max-width: 768px) {
    .menu {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .menu-mobile {
        display: none;
        width: 100%;
    }
    .menu-mobile.show {
        display: block;
    }
}
.header, .footer .bibliography {
    background-color: #efe4dd;
    padding: 30px 0;
    width: 100%;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.header .content {
    flex: 1 1 50%;
    padding: 20px;
    background: url('img/background_image.png') no-repeat left top;
    background-size: contain;
}
.header .image-section {
    flex: 1 1 50%;
    padding: 0 20px;
}
.header img {
    max-width: 100%;
    height: auto;
}
.header .content h2, .main-content .text-section h2 {
    color: #60257e;
    margin-bottom: 20px;
}
.header .content h3, .main-content .text-section h3 {
    color: #60257e;
}
.header .content .buttons {
    display: flex;
    justify-content: start;
    flex-wrap: nowrap;
    margin-bottom: 20px;
}
.header .content .buttons button {
    background-color: #60257e;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-right: 5px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
}
.header .content .buttons button:hover, .header .content .buttons button:active {
    background-color: #efe4dd;
    color: black;
}
.main-content {
    padding: 20px;
    width: 100%;
}
.main-content .container {
    display: flex;
    flex-wrap: wrap;
}
.main-content .text-section, .main-content .image-section {
    padding: 10px;
    box-sizing: border-box;
}
.main-content .text-section {
    flex: 2 1 66.66%;
}
.main-content .image-section {
    flex: 1 1 33.33%;
}
.main-content .image-section img {
    width: 100%;
    height: auto;
}
.section-colored {
    background-color: #efe4dd;
}
.section-colored h2 {
    color: #60257e;
}
.footer .bibliography, .footer .copyright {
    text-align: center;
    width: 100%;
}
.card-header .btn-link {
    color: #60257e;
    font-weight: bold;
    text-decoration: none;
    text-align: left;
    padding: 5px 10px; /* Riduce la spaziatura interna del bottone */
    font-size: 1rem; /* Dimensione del testo */
}
.card-body {
    color: #000;
}
.card {
    border: none;
    margin-bottom: 5px; /* Riduce lo spazio tra le card */
}
.card-header {
    background-color: transparent;
    border: none;

    padding: 5px; /* Riduce lo spazio interno */
    margin-bottom: 0; /* Riduce lo spazio inferiore */
}
.card-header h5 {
    margin: 0; /* Rimuove il margine del titolo */
}
.btn-link:focus, .btn-link:hover {
    text-decoration: none;
}
.custom-button {
    background-color: #60257e;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    font-size: 16px;
}
.custom-button:hover, .custom-button:focus {
    background-color: #5a2172;
    color: white;
    outline: none;
}
@media (max-width: 768px) {
    .header .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .header .buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
    .header .container {
        flex-direction: column;
    }
    .header .content {
        width: 100%;
    }
    .header .image-section {
        display: none;
    }
    .header .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .header .buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
    .card-header .btn-link {
        text-align: left;
    }
}
.specific-section .text-section, 
.specific-section .image-section {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (min-width: 769px) {
    .card-header .btn-link {
        font-size: 1.25rem;
    }
}
.specific-section .text-section,
.specific-section .image-section {
    flex: 0 0 50%;
    max-width: 50%;
}
.social-icons {
    margin-top: 20px;
}
.social-icons a {
    display: inline-block;
    margin-right: 10px;
}
.social-icons img {
    width: 32px;
    height: 32px;
}
@media (max-width: 768px) {
    .specific-section .text-section,
    .specific-section .image-section {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .social-icons {
        text-align: center;
    }
    .social-icons a {
        margin-right: 15px;
        margin-bottom: 15px;
    }
}
.bibliography {
    background-color: #efe4dd;
    padding: 20px;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.bibliography h2 {
    color: #60257e;
    margin-bottom: 10px;
}
.bibliography p {
    margin: 0;
    white-space: pre-wrap;
}
.purple-divider {
    background-color: #60257e;
    width: 100%;
    height: 50px;
}
.copyright {
    text-align: center;
    padding: 10px;
    background-color: white;
}
.section-colored .text-section p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
@media (max-width: 768px) {
    .section-colored .text-section {
        padding: 0 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
@media (max-width: 768px) {
    .main-content .container {
        flex-direction: column;
        text-align: left;
    }

    .main-content .text-section, 
    .main-content .image-section {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .main-content .image-section img {
        width: 100%;
        height: auto;
    }

    .main-content .text-section h2 {
        font-size: 1.5rem;
    }

    .main-content .text-section h3 {
        font-size: 1.25rem;
    }

    .main-content .text-section p {
        padding: 0 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #60257e;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 4px;
}

#scrollToTopBtn:hover {
    background-color: #555;
}
.footer {
    background-color: #ffffff; /* Colore di sfondo bianco */
    padding: 20px 0; /* Spaziatura interna */
    text-align: center; /* Allineamento del testo */
    font-size: 14px; /* Dimensione del testo */
    color: #333; /* Colore del testo */
    
}

.footer-container {
    max-width: 1200px; /* Larghezza massima del container */
    margin: 0 auto; /* Margine automatico per centrare */
    padding: 0 20px; /* Spaziatura interna orizzontale */
    display: flex; /* Flexbox layout */
    flex-direction: column; /* Disposizione in colonna */
    align-items: center; /* Allineamento centrale */
}

.footer-links {
    text-align: left; /* Allineamento a sinistra dei link */
    width: 100%; /* Larghezza completa */
    margin-bottom: 10px; /* Margine inferiore */
}

.footer-links a {
    color: #333; /* Colore del link */
    text-decoration: none; /* Rimozione della sottolineatura */
    margin: 0 5px; /* Spaziatura orizzontale */
}

.footer-links a:hover {
    text-decoration: underline; /* Sottolineatura al passaggio del mouse */
 color: #CCCCCC; /* Colore del link */
}

.biblio-links {
    text-align: left; /* Allineamento a sinistra dei link */
 
    width: 100%; /* Larghezza completa */
    margin-bottom: 10px; /* Margine inferiore */
}

.biblio-links a {
    color: #60257e; /* Colore del link */
    text-decoration: none; /* Rimozione della sottolineatura */
 
    margin: 0 5px; /* Spaziatura orizzontale */
}

.biblio-links a:hover {
    text-decoration: underline; /* Sottolineatura al passaggio del mouse */
 
 color: #ffffff; /* Colore del link */
}

.footer-address {
    margin-top: 10px; /* Margine superiore */
    font-size: 16px; /* Dimensione del testo */
    text-align: center; /* Testo centrato */
    width: 100%; /* Larghezza completa */
}

.footer-address p {
    margin: 0; /* Rimozione del margine */
}

.footer-logo {
    margin-top: 20px; /* Margine superiore */
    text-align: right; /* Allineamento a sinistra */
    width: 100%; /* Larghezza completa */
}

.footer-logo img {
    max-width: 150px; /* Larghezza massima dell'immagine */
}

.footer-copyright {
    margin-top: 20px; /* Margine superiore */
    font-size: 16px; /* Dimensione del testo */
    text-align: center; /* Testo centrato */
    width: 100%; /* Larghezza completa */
}

.footer-copyright p {
    margin: 0; /* Rimozione del margine */
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 10px; /* Riduzione della spaziatura interna */
    }
    .footer-links {
        margin-bottom: 10px; /* Margine inferiore */
    }
    .footer-logo {
        text-align: center; /* Allineamento centrale */
    }
}


   .interstitial-overlay { /* Inizio classe per external interstitial message */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.interstitial-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 92%;
    text-align: center;
}

.interstitial-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.interstitial-content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.interstitial-button {
    background-color: #60257e;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    border-radius: 5px;
}

.interstitial-button:hover {
    background-color: #5a2172;
}
/* Stile del popup di interstitial */
.external-interstitial {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 40px;
    text-align: center;
}

.external-interstitial p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.external-interstitial button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

/* Modifica la larghezza del popup su mobile */
@media (max-width: 768px) {
    .external-interstitial {
        width: 90%;
        max-width: 400px;
        padding: 20px;
    }
}
/* Stili per il modal */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1; 
  padding-top: 100px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}



.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Aggiungi questa regola CSS per impostare lo z-index degli indicatori */
.carousel-indicators {
    z-index: 10;
}

/* Aggiungi questa regola CSS per impostare lo z-index della modale */
.modal {
    z-index: 20;
}
/* Codice per rendere le immagini aperte dalla gallery responsive matenendo le proporzioni invariate */
.modal-content {
    width: auto; /* Mantiene le proporzioni orizzontali */
    max-width: 90vw; /* Imposta la larghezza massima al 90% della larghezza della finestra */
    height: auto; /* Mantiene le proporzioni verticali */
    max-height: 85vh; /* Imposta l'altezza massima al 85% dell'altezza della finestra */
    margin: auto;
    display: block;
}
@media (max-width: 767px) {
  .col-md-4,
  h3 {
    margin-top: 10px !important;
  }
}

