body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;
}

/* Assicura che gli elementi non superino la larghezza dello schermo */
* {
    box-sizing: border-box;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #0056b3;
}

p.intro {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.category-wrapper {
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.category-wrapper:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.category-header {
    background: linear-gradient(90deg, #f9f9f9, #f1f1f1);
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: #222;
    transition: background 0.3s ease;
    border-bottom: 1px solid #ddd;
}

.category-header:hover {
    background: #ededed;
}

.category-header h2 {
    margin: 0 auto;
    font-size: 1.35rem;
    color: #222;
}

.category-header .arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: #666;
}

.category-header.open .arrow {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s ease-in-out;
    background-color: #fbfbfb;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.project-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    width: calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.project-slide {
    width: 100%;
    text-align: center;
}

.project-card picture {
    display: block;
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-card img {
    max-height: 360px;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.project-card img:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

.project-title {
    font-weight: 700;
    margin-top: 16px;
    font-size: 1.3rem;
    color: #004085;
}

.project-desc {
    font-size: 1rem;
    color: #555;
    margin: 10px 0;
    line-height: 1.6;
    padding: 0 10px;
}

.visit-button {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background-color: #1e90ff;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s;
}

.visit-button:hover {
    background-color: #0d6efd;
    transform: scale(1.05);
}

.slider-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 12px;
}

.slider-buttons button {
    padding: 8px 16px;
    background-color: #ffb936;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
}

.slider-buttons button:hover {
    background-color: #e69500;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .project-card {
        width: calc(50% - 20px);
    }
}

.highlight {
    color: #f97316;
    font-weight: 600;
}

.hero-section {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.cta-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem auto;
    border: 1px solid #e9ecef;
    max-width: 700px;
}

.cta-button, .visit-button, .cta-button-main {
    display: inline-block;
    background: #ff8935;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.cta-button:hover, .visit-button:hover, .cta-button-main:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

.final-cta {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    margin-top: 3rem;
}

.benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.benefit-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.cta-button-main {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.project-slide {
    display: none;
}

.project-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
        padding: 0 15px;
    }

    p.intro {
        font-size: 1rem;
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .hero-section {
        padding: 1.5rem 15px;
        margin-bottom: 2rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .cta-box {
        padding: 1.2rem;
        margin: 1.5rem 15px;
        border-radius: 10px;
    }

    .cta-box p {
        font-size: 0.95rem;
    }

    .category-wrapper {
        margin: 0 15px 20px;
        border-radius: 10px;
    }

    .category-header {
        padding: 15px;
        font-size: 1.15rem;
    }

    .projects-grid {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }

    .project-card {
        width: 100%;
        margin-bottom: 0;
        border-radius: 10px;
        padding: 15px;
    }

    .project-card picture {
        max-height: 400px;
    }

    .project-card img {
        max-height: 400px;
    }

    .project-title {
        font-size: 1.1rem;
        margin-top: 12px;
    }

    .project-desc {
        font-size: 0.95rem;
        margin: 8px 0;
    }

    .visit-button {
        display: block;
        text-align: center;
        margin: 10px auto 0;
        width: 90%;
        padding: 10px;
        font-size: 0.95rem;
    }

    .slider-buttons {
        margin-top: 20px;
    }

    .slider-buttons button {
        padding: 7px 12px;
        font-size: 0.9rem;
    }

    /* Sezione finale più persuasiva */
    .final-cta {
        padding: 2rem 15px;
        margin-top: 2rem;
    }

    .final-cta h2 {
        font-size: 1.5rem;
    }

    .final-cta p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .benefits {
        flex-direction: column;
        gap: 15px;
        margin: 1.5rem 0;
    }

    .benefit-item {
        min-width: 100%;
        padding: 1.2rem;
        text-align: center;
    }

    .benefit-item h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .benefit-item p {
        font-size: 0.9rem;
    }

    .cta-button-main {
        width: 90%;
        margin: 0 auto;
        padding: 12px;
        font-size: 1rem;
    }
}