/* Generale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navbar */
.navbar {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    position: sticky;
    top: 0;
    padding: 1rem 0;
}

.navbar-nav .nav-item {
    margin-left: 20px;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 15px;
    transition: all 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #007bff;
    text-decoration: underline;
}

.navbar-toggler {
    border: none;
    background-color: transparent;
    outline: none;
    padding: 0;
}

.navbar-toggler-icon {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"%3E%3Cpath fill="%23000" d="M5 7h20c.552 0 1 .448 1 1s-.448 1-1H5c-.552 0-1-.448-1-1s.448-1 1-1zm0 7h20c.552 0 1 .448 1 1s-.448 1-1H5c.552 0-1-.448-1-1s.448-1 1-1zm0 7h20c.552 0 1 .448 1 1s-.448 1-1H5c.552 0-1-.448-1-1s.448-1 1-1z"%3E%3C/path%3E%3C/svg%3E');
    background-size: 30px 30px;
    transition: transform 0.3s ease-in-out;
}

.dropdown-menu {
    z-index: 1060;
    position: absolute;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.dropdown-menu.show {
    display: block;
}

/* Dropdown animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 8px 16px;
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar-collapse {
        display: none;
        position: relative;
    }

    .navbar-collapse.show {
        display: block;
    }

    .navbar-nav {
        text-align: center;
    }
}

@media (min-width: 768px) {
    .navbar-toggler {
        display: none;
    }
}

/* Footer */
footer {
    background: #343a40;
    color: #ffffff;
    padding: 30px 0;
}

footer a.text-light {
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

footer a.text-light:hover {
    color: #007bff;
}

footer h5 {
    border-bottom: 2px solid #007bff;
    display: inline-block;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

footer .fab {
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

footer .fab:hover {
    transform: scale(1.2);
    color: #007bff;
}

/* Banner */
.banner {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    text-align: center;
}

.banner img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 1s ease-in-out;
}

.banner .text {
    position: absolute;
    z-index: 2;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner .text.loaded {
    opacity: 1;
}

.banner-text h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.banner-text h2 {
    font-size: 1.5rem;
    margin-top: 20px;
    font-style: italic;
}

@media (max-width: 768px) {
    .banner-text h1 {
        font-size: 2rem;
    }

    .banner-text h2 {
        font-size: 1.25rem;
    }
}

/* News Cards */
.news .card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border-radius: 10px;
}

.news .card:hover {
    transform: scale(1.05);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
}

/* Quick Links */
.quick-links .btn {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 25px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid #007bff;
}

.quick-links .btn:hover {
    background-color: #007bff;
    color: white;
}

/* Next Event Section */
.next-event p {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #333;
}

.next-event a {
    font-size: 1.1rem;
    font-weight: bold;
    color: #007bff;
    transition: color 0.3s ease;
}

.next-event a:hover {
    color: #0056b3;
}

/* Sponsor Section */
.sponsor img {
    max-width: 80%;
    height: auto;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    border-radius: 8px;
}

.sponsor img:hover {
    transform: scale(1.1);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
}

/* Layout News */
.news .row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.news .col-md-4 {
    flex: 0 0 30%;
    max-width: 30%;
}

.news .row.justify-content-center .col-md-4 {
    flex: 0 0 48%;
    max-width: 48%;
}

.news .col-md-4:nth-child(3n+1) {
    margin-right: auto;
    margin-left: auto;
}
