/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background: #f7f9fc; /* Light background for a modern look */
}

/* General Styles */
.container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Header Styles */
header {
    background: #1e2a38;
    color: #fff;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Logo Styles */
.logo img {
    max-height: 50px;
}

/* Navigation Styles */
nav {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-end; /* Align menu items to the right on desktop */
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, background 0.3s ease;
    padding: 10px;
    display: block;
}

.nav-menu a:hover {
    color: #ffffff;
    background: #007bff;
    border-radius: 5px;
}

/* Mobile Menu Styles */
.mobile-menu-button {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.mobile-menu-button .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1e2a38;
        position: absolute;
        top: 60px;
        left: 0;
        text-align: center;
        padding: 10px 0;
        gap: 0; /* Remove gaps */
    }

    .nav-menu.show {
        display: flex;
    }

    .mobile-menu-button {
        display: block;
        position: absolute;
        right: 15px; /* Align to the right */
        top: 15px;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .nav-menu a {
        padding: 15px;
        font-size: 1.2em;
    }

    .mobile-menu-button.active .bar:nth-child(1) {
        transform: rotate(45deg);
        position: relative;
        top: 8px;
    }

    .mobile-menu-button.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-button.active .bar:nth-child(3) {
        transform: rotate(-45deg);
        position: relative;
        top: -8px;
    }
}

/* Hero Section Styles */
.hero {
    background: url('/img/sfondo.png') no-repeat center center/cover;
    color: #fff;
    height: 87vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 3em;
    margin: 0;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 1s forwards;
}

.hero-content p {
    font-size: 1.2em;
    margin: 20px 0;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 1s 0.5s forwards;
}

.btn {
    background: #007bff; /* Blue button */
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    transition: background 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 1s 1s forwards;
}

.btn:hover {
    background: #0056b3; /* Darker blue on hover */
}

/* Section Styles */
section {
    padding: 60px 0;
    background: #fff;
}

section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

section p {
    font-size: 1em;
    text-align: center;
    margin: 0 auto;
    max-width: 800px;
}

/* Services Section */
.service-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra gli elementi */
    margin: 0 auto; /* Centra il contenitore */
    padding: 0 20px; /* Padding laterale per piccoli schermi */
    max-width: 1200px; /* Larghezza massima per centrare il contenuto */
}

.service-item {
    background: #dbd8d8; /* White background for service items */
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    flex: 1;
    max-width: 300px; /* Larghezza massima degli elementi */
    text-align: center;
    transition: background 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s forwards;
    box-sizing: border-box; /* Assicura che il padding sia incluso nella larghezza */
}


.service-item:hover {
    background: #b8b8b8; /* Light gray background on hover */
    transform: translateY(0);
}

.service-item i {
    font-size: 2.5em;
    color: #007bff; /* Blue icon color */
    margin-bottom: 15px;
}

/* Responsive Styles for Services Section */
@media (max-width: 768px) {
    .service-list {
        padding: 0 10px; /* Riduce il padding per piccoli schermi */
        gap: 20px; /* Aggiunge spazio tra gli elementi */
    }

    .service-item {
        max-width: 90%; /* Riduce la larghezza massima per adattarsi meglio sui piccoli schermi */
        margin: 10px auto; /* Centra e distanzia verticalmente gli elementi */
    }
}

@media (max-width: 480px) {
    .service-list {
        padding: 0 5px; /* Ulteriore riduzione del padding per schermi molto piccoli */
    }

    .service-item {
        max-width: 100%; /* Larghezza a tutta la larghezza dello schermo */
        margin: 10px 0; /* Spazio verticale tra gli elementi */
        font-size: 0.9em; /* Riduce la dimensione del testo */
    }
}

/* Team Section */
.team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto; /* Centra il contenitore */
    padding: 0 20px; /* Padding laterale per piccoli schermi */
    max-width: 1200px; /* Larghezza massima per centrare il contenuto */
}

.team-member {
    background: #ffffff; /* White background for team members */
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    flex: 1;
    max-width: 250px;
    text-align: center;
    transition: background 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s forwards;
}

.team-member img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.team-member h3 {
    margin: 10px 0;
}

/* Blog Section */
/* Blog Section */
.blog-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra gli elementi */
    margin: 0 auto; /* Centra il contenitore */
    padding: 0 20px; /* Padding laterale per piccoli schermi */
    max-width: 1200px; /* Larghezza massima per centrare il contenuto */
}

.blog-post {
    background: #ffffff; /* White background for blog posts */
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    flex: 1;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s forwards;
    box-sizing: border-box; /* Assicura che il padding sia incluso nella larghezza */
}

.blog-post img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.blog-post h3 a {
    color: #007bff; /* Blue link color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post h3 a:hover {
    color: #0056b3; /* Darker blue on hover */
}

/* Responsive Styles for Blog Section */
@media (max-width: 768px) {
    .blog-posts {
        padding: 0 10px; /* Riduce il padding laterale per schermi più piccoli */
        gap: 20px; /* Aggiunge spazio tra gli elementi */
    }

    .blog-post {
        max-width: 90%; /* Riduce la larghezza massima per adattarsi meglio ai piccoli schermi */
        margin: 10px auto; /* Centra e distanzia verticalmente gli elementi */
    }
}

@media (max-width: 480px) {
    .blog-posts {
        padding: 0 5px; /* Ulteriore riduzione del padding per schermi molto piccoli */
    }

    .blog-post {
        max-width: 100%; /* Larghezza a tutta la larghezza dello schermo */
        margin: 10px 0; /* Spazio verticale tra gli elementi */
        font-size: 0.9em; /* Riduce la dimensione del testo per migliorare la leggibilità */
    }
}

/* FAQ Section */
#faq {
    background: #f9f9f9; /* Background leggero per la sezione FAQ */
    padding: 40px 20px; /* Spaziatura */
    text-align: center; /* Centra il testo del titolo */
}

/* FAQ Container */
.container {
    display: flex;
    justify-content: center; /* Centra orizzontalmente il contenuto */
    padding: 0 20px; /* Padding laterale per piccoli schermi */
    max-width: 1200px; /* Larghezza massima per contenere il contenuto */
    margin: 0 auto; /* Centra il contenitore principale */
}

/* FAQ Items */
.faq-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra orizzontalmente gli elementi FAQ */
    gap: 20px; /* Spazio tra gli elementi */
}

/* FAQ Item */
.faq-item {
    background: #ffffff; /* Background bianco per gli item FAQ */
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    max-width: 300px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box; /* Include il padding nella larghezza */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .faq-item {
        max-width: 90%; /* Riduce la larghezza massima per schermi più piccoli */
    }
}

@media (max-width: 480px) {
    .faq-item {
        max-width: 100%; /* Larghezza a tutta la larghezza dello schermo */
        padding: 15px; /* Riduce il padding per schermi molto piccoli */
        font-size: 0.9em; /* Riduce la dimensione del testo per migliorare la leggibilità */
    }
}



/* Newsletter Section */
#newsletter {
    background: #007bff; /* Blue background for newsletter */
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

#newsletter h2 {
    margin-bottom: 10px;
    font-size: 2em; /* Responsive font size */
}

#newsletter p {
    margin-bottom: 20px;
    font-size: 1.2em; /* Responsive font size */
}

#newsletter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px; /* Space between input and button */
}

#newsletter-form input {
    padding: 10px;
    margin: 0; /* Remove margin-right to use gap */
    border: none;
    border-radius: 5px;
    width: 300px;
    max-width: 100%;
    box-sizing: border-box; /* Ensure padding is included in width */
}

#newsletter-form button {
    background: #0056b3; /* Dark blue button */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1em; /* Responsive font size */
}

#newsletter-form button:hover {
    background: #003d7a; /* Even darker blue on hover */
}

/* Responsive Styles */
@media (max-width: 768px) {
    #newsletter h2 {
        font-size: 1.5em; /* Smaller font size on mobile */
    }

    #newsletter p {
        font-size: 0.8em; /* Smaller font size on mobile */
    }

    #newsletter-form {
        flex-direction: column; /* Stack input and button vertically */
        align-items: center;
    }

    #newsletter-form input {
        width: 100%; /* Full width on small screens */
        margin-bottom: 10px; /* Space between input and button */
    }

    #newsletter-form button {
        width: auto; /* Auto width on small screens */
        margin: 0; /* No extra margin */
    }
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styles */
footer {
    background: #333;
    color: #f5f5f5;
    padding: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-logo {
    max-height: 50px;
    margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .container {
        width: 90%;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-button {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1e2a38; /* Dark blue background for mobile menu */
        position: absolute;
        top: 60px;
        left: 0;
        text-align: center;
        padding: 10px 0;
        z-index: 1000;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
    }

    .hero {
        height: 60vh;
    }

    .hero-content h2 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .team-member,
    .blog-post,
    .service-item {
        margin: 10px 0;
        max-width: 100%;
    }

    /* Footer adjustments for mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}