body {
    font-family: 'Arial', sans-serif;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    position: absolute;
    bottom: 20px; /* Posiziona il testo nella parte inferiore */
    left: 50%;
    transform: translateX(-50%); /* Centra orizzontalmente */
    z-index: 10;
    width: 80%; /* Assicura che il testo non esca dai bordi */
}

.carousel-caption h1 {
    font-size: 2rem; /* Dimensione del testo per schermi grandi */
}

.carousel-caption p {
    font-size: 1.2rem; /* Dimensione del testo per schermi grandi */
}

@media (max-width: 768px) {
    .carousel-caption {
        width: 90%; /* Riduce la larghezza del testo su schermi più piccoli */
        padding: 10px; /* Riduce il padding su schermi più piccoli */
    }

    .carousel-caption h1 {
        font-size: 1.5rem; /* Riduce la dimensione del testo su schermi più piccoli */
    }

    .carousel-caption p {
        font-size: 1rem; /* Riduce la dimensione del testo su schermi più piccoli */
    }
}

@media (max-width: 576px) {
    .carousel-caption {
        width: 95%; /* Riduce ulteriormente la larghezza del testo su schermi molto piccoli */
        padding: 5px; /* Riduce ulteriormente il padding su schermi molto piccoli */
    }

    .carousel-caption h1 {
        font-size: 1.2rem; /* Riduce ulteriormente la dimensione del testo su schermi molto piccoli */
    }

    .carousel-caption p {
        font-size: 0.9rem; /* Riduce ulteriormente la dimensione del testo su schermi molto piccoli */
    }
}

footer {
    background-color: #333;
    color: white;
}

.nav-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

h2 {
    color: #333;
    margin-bottom: 20px;
}

.navbar {
    position: relative;
    z-index: 10; /* Assicura che la navbar sia sopra il carosello */
}

.navbar-brand img {
    border-radius: 50%; /* Per un effetto arrotondato */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Aggiunge una leggera ombra */
    transition: transform 0.3s ease; /* Aggiunge un'animazione */
}

.navbar-brand img:hover {
    transform: scale(1.1); /* Effetto zoom al passaggio del mouse */
}

section {
    padding-top: 20px; /* Spazio sopra le sezioni */
}

#contact a img {
    transition: transform 0.2s ease;
}

#contact a img:hover {
    transform: scale(1.1); /* Effetto zoom al passaggio del mouse */
}

#contact a {
    text-decoration: none;
}

#contact a i {
    transition: transform 0.2s ease, color 0.2s ease;
}

#contact a i:hover {
    transform: scale(1.1); /* Zoom */
    color: #000; /* Cambia colore al passaggio del mouse */
}

#about img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%; /* Fallback responsivo */
    height: auto; /* Mantiene le proporzioni */
    object-fit: cover;
}

#about img:hover {
    transform: scale(1.1); /* Effetto zoom */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Ombra */
}



.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: #333;
    margin-right: 10px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #0056b3;
}


/* Publications styling */
#publications ul {
    list-style: none;
    padding-left: 0;
}

#publications li {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#publications li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#publications li a {
    text-decoration: none;
    color: #333;
}

#publications li a:hover {
    text-decoration: underline;
    color: #0056b3
}

/* Make the pub-item container a positioned element */
.pub-item {
  position: relative; 
  padding-right: 60px;  /* leave space on right for icons */
}

/* The content part should not overlap the icons */
.pub-content {
  margin-right: 60px;  /* same amount of space reserved */
}

/* Container for icons, positioned to the right edge */
.pub-icons {
  position: absolute;
  right: 10px;       /* distance from the right box edge; tweak as needed */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

/* Styling for each icon link */
.icon-link {
  color: #333;
  font-size: 1.2em;
  text-decoration: none;
  padding: 4px;     /* increase hit area */
}

.icon-link:hover {
  color: #000;
}
