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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Arial', sans-serif;
    color: white;
    background: #e74c3c;
    min-height: 100vh;
    overscroll-behavior: none; /* Disabilita l'effetto di "rimbalzo" su scroll, fallback non necessario per questo progetto */
}

.page-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background: white;
    padding: 30px 50px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-img {
    height: 250px; /* Aumentato da 200px a 250px */
    width: auto;
    max-height: 250px;
    max-width: 600px; /* Aumentato da 500px a 600px */
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

nav ul li {
    display: flex;
    align-items: center;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Poppins', 'Arial', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 10px;
    transition: color 0.3s ease;
    position: relative;
    line-height: 1;
}

nav ul li a:hover {
    color: #e74c3c;
}

nav ul li a.active {
    color: #e74c3c;
    border-bottom: 2px solid #e74c3c;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #e74c3c;
    bottom: 0;
    left: 10px;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: calc(100% - 20px);
}

/* Hero Section for Service Pages */
.service-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay scuro per migliorare la leggibilità del testo */
}

.service-hero-content {
    position: relative;
    max-width: 800px;
    padding: 20px;
}

.service-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

.service-hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

/* Animazione Fade In Up */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Details Section */
.service-details {
    background: #f5f5f5;
    padding: 60px 20px;
    text-align: center;
    border-top: 5px solid #e74c3c;
    flex: 1;
    color: #333;
}

.service-details h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.service-details p {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0;
    animation: fadeIn 1s ease 0.2s forwards;
}

.service-details h3 {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeIn 1s ease 0.4s forwards;
}

.service-details h4 {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 1s ease 0.4s forwards;
}

/* Animazione Fade In */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Call to Action Button */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    font-family: 'Poppins', 'Arial', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
}

.cta-button:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Footer Styles */
.footer-section {
    background: #c0392b;
    color: #ffffff;
    padding: 40px 20px;
    position: relative;
}

.footer-top {
    background: white;
    padding: 40px;
    text-align: center;
    border: 2px solid white;
    margin: 0 20px;
    border-radius: 5px;
}

.footer-brand {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-img {
    height: 250px; /* Aumentato da 200px a 250px */
    width: auto;
    max-height: 250px;
    max-width: 600px; /* Aumentato da 500px a 600px */
}

.footer-bottom-section {
    padding: 40px 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #d3d3d3; /* Correzione: sostituito #d3 loser3d3 con #d3d3d3 */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #ffffff;
}

.footer-column p {
    font-size: 14px;
    margin-bottom: 12px;
    color: #d3d3d3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column p i {
    font-size: 16px;
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #ffffff;
    font-size: 18px;
    transition: opacity 0.3s ease;
}

.footer-social a:hover {
    opacity: 0.7;
}

.footer-bottom p {
    font-size: 14px;
    color: #ffffff; /* Correzione: cambiato da #d3d3d3 a #ffffff per migliorare il contrasto */
}

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: #ffffff;
    color: #e74c3c;
}

.scroll-top i {
    font-size: 18px;
}

/* Contact Pop-up Styles (corretto per #contact-modal) */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.contact-modal.active {
    display: flex; /* Aggiunto per mostrare il modale quando ha la classe .active */
}

.contact-modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #e74c3c;
}

.popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.popup-header-icon {
    font-size: 30px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.popup-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Poppins', 'Arial', sans-serif;
    color: #333;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #e74c3c;
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Poppins', 'Arial', sans-serif;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.form-message {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}

/* Service Card Grid Styles */
.service-card-grid {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.service-card-icon {
    font-size: 40px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.service-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.service-card p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Results Grid Styles */
.results-grid {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.result-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.result-icon {
    font-size: 40px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.result-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.result-card p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.details-link {
    color: #e74c3c;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.details-link:hover {
    color: #c0392b;
}

/* Details Pop-up Styles */
.details-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.details-popup-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.close-details-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    transition: color 0.3s ease;
}

.close-details-popup:hover {
    color: #e74c3c;
}

.details-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.details-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.details-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.details-content ul {
    list-style: none;
    padding: 0;
}

.details-content ul li {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-content ul li::before {
    content: '\f00c'; /* Icona di spunta di Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #e74c3c;
    font-size: 16px;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .service-hero h1 {
        font-size: 36px;
    }

    .service-hero p {
        font-size: 16px;
    }

    .service-details h2 {
        font-size: 28px;
    }

    .service-details p {
        font-size: 16px;
    }

    .service-details h3 {
        font-size: 20px;
    }

    .service-details h4 {
        font-size: 18px;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 16px;
    }

    .footer-top {
        padding: 20px;
        margin: 0 10px;
    }

    .footer-brand {
        flex-direction: column;
        text-align: center;
    }

    .logo-img {
        height: 150px; /* Aumentato da 120px a 150px */
        max-height: 150px;
        max-width: 350px; /* Aumentato da 300px a 350px */
    }

    .footer-logo-img {
        height: 150px; /* Aumentato da 120px a 150px */
        max-height: 150px;
        max-width: 350px; /* Aumentato da 300px a 350px */
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        width: 100%;
        max-width: 300px;
    }

    .footer-column p {
        justify-content: center;
    }

    nav ul {
        gap: 10px;
    }

    nav ul li a {
        font-size: 12px;
        padding: 4px 8px;
    }

    nav ul li a::after {
        left: 8px;
    }

    nav ul li a:hover::after {
        width: calc(100% - 16px);
    }

    /* Responsive Adjustments for Pop-up */
    .contact-modal-content {
        padding: 20px;
        max-width: 90%;
    }

    .popup-header h3 {
        font-size: 20px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 12px;
        padding: 8px;
    }

    .submit-btn {
        font-size: 14px;
        padding: 10px 15px;
    }

    /* Responsive Adjustments for Service Card Grid */
    .service-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 20px;
    }

    .service-card-icon {
        font-size: 35px;
        margin-bottom: 15px;
    }

    .service-card h4 {
        font-size: 18px;
    }

    .service-card p {
        font-size: 14px;
    }

    /* Responsive Adjustments for Results Grid */
    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .result-card {
        padding: 20px;
    }

    .result-icon {
        font-size: 35px;
        margin-bottom: 15px;
    }

    .result-card h4 {
        font-size: 18px;
    }

    .result-card p {
        font-size: 14px;
    }

    /* Responsive Adjustments for Details Pop-up */
    .details-popup-content {
        padding: 20px;
        max-width: 90%;
    }

    .details-gallery img {
        height: 80px;
    }

    .details-content p,
    .details-content ul li {
        font-size: 14px;
    }

    /* Responsive adjustments for dropdown menu */
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: #f5f5f5;
        padding: 5px 0;
    }

    .dropdown-menu li a {
        font-size: 12px;
        padding: 8px 15px;
        text-align: left;
    }
}

/* New Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: '\f078'; /* Icona di freccia giù da Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #333;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after,
.dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 220px;
    z-index: 1000;
    padding: 10px 0;
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    display: block;
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease, padding-left 0.3s ease;
}

.dropdown-menu li a:hover {
    background: #e74c3c;
    color: white;
    padding-left: 25px;
}