/* Contact Form Modern User-Friendly */
.contact-form-group {
    position: relative;
    margin-bottom: 32px;
}

.contact-form-input,
.contact-form-textarea {
    width: 100%;
    padding: 22px 18px 14px 54px;
    border: 1.5px solid #bfcfff;
    border-radius: 10px;
    font-size: 1.13em;
    background: #f8fafc;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px #c7d2fe;
    background: #fff;
}

.contact-form-label {
    position: absolute;
    left: 54px;
    top: 22px;
    color: #6b7280;
    font-size: 1.08em;
    pointer-events: none;
    background: transparent;
    transition: 0.2s cubic-bezier(.4, 0, .2, 1);
    letter-spacing: 0.01em;
}

.contact-form-input:focus+.contact-form-label,
.contact-form-input:not(:placeholder-shown)+.contact-form-label,
.contact-form-textarea:focus+.contact-form-label,
.contact-form-textarea:not(:placeholder-shown)+.contact-form-label {
    top: 4px;
    left: 50px;
    font-size: 0.93em;
    color: #4f46e5;
    background: #fff;
    padding: 0 6px;
}

.contact-form-icon {
    position: absolute;
    left: 18px;
    top: 22px;
    font-size: 1.35em;
    color: #bfcfff;
    pointer-events: none;
    transition: color 0.2s;
}

.contact-form-input:focus~.contact-form-icon,
.contact-form-textarea:focus~.contact-form-icon {
    color: #4f46e5;
}

.contact-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-btn {
    background: linear-gradient(90deg, #4f46e5 60%, #6366f1 100%);
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.13em;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px #bfcfff22;
}

.contact-form-btn:hover {
    background: linear-gradient(90deg, #3730a3 60%, #6366f1 100%);
}

.contact-form-input:invalid,
.contact-form-textarea:invalid {
    border-color: #f87171;
}

.contact-form-input:invalid:focus,
.contact-form-textarea:invalid:focus {
    box-shadow: 0 0 0 2px #fca5a5;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 36px;
    background: rgba(255, 255, 255, 0.97);
    padding: 0 0 0 0;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px #bfcfff11;
    backdrop-filter: blur(4px);
}

.main-nav a {
    color: #222;
    text-decoration: none;
    font-size: 1.08em;
    font-weight: 500;
    padding: 18px 0 14px 0;
    display: inline-block;
    border-bottom: 2.5px solid transparent;
    transition: border 0.2s, color 0.2s, background 0.2s;
    border-radius: 6px 6px 0 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: #4f46e5;
    background: #f1f5ff;
    border-bottom: 2.5px solid #4f46e5;
}

@media (max-width: 600px) {
    .main-nav {
        gap: 12px;
    }

    .main-nav a {
        font-size: 0.98em;
        padding: 12px 0 10px 0;
    }
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    color: #222;
}

header {
    text-align: center;
    padding: 40px 20px 20px 20px;
    background: linear-gradient(120deg, #e0e7ff 0%, #f4f4f4 100%);
    position: relative;
}

.lang-menu {
    position: absolute;
    top: 30px;
    right: 40px;
}

.lang-menu select {
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #bfcfff;
    background: #fff;
}

img.logo {
    max-width: 20%;
    height: auto;
    margin-bottom: 10px;
}

.quote {
    font-size: 1.3em;
    font-style: italic;
    color: #3b3b3b;
    margin: 20px 0 10px 0;
}

.author {
    font-size: 1em;
    color: #6b7280;
    margin-bottom: 10px;
}

.main-section {
    max-width: 900px;
    margin: 30px auto 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 #bfcfff33;
    padding: 30px 20px 10px 20px;
}

.services {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.service-card {
    background: #f1f5ff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #bfcfff22;
    padding: 20px 18px;
    width: 260px;
    text-align: center;
}

.service-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 1.2em;
    color: #374151;
    /*margin-top: 30px;*/
    margin-bottom: 10px;
    text-align: center;
}

.about-img {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    margin: 0 auto 20px auto;
    display: block;
}

.contacts {
    background: #e0e7ff;
    border-radius: 12px;
    padding: 18px;
    margin: 30px 0 10px 0;
    text-align: center;
}

footer {
    text-align: center;
    color: #6b7280;
    font-size: 0.95em;
    padding: 18px 0 10px 0;
    background: #f4f4f4;
    margin-top: 40px;
}

a.privacy {
    color: #4f46e5;
    text-decoration: none;
    margin-left: 10px;
}

@media (max-width: 900px) {
    .main-section {
        padding: 18px 4vw;
    }

    .services {
        gap: 16px;
    }

    .service-card {
        width: 98vw;
        max-width: 340px;
    }
}

@media (max-width: 600px) {
    .main-section {
        padding: 8px 2vw;
    }

    .lang-menu {
        right: 10px;
        top: 10px;
    }
}

/* Accordion Styles */
.accordion-btn {
    width: 100%;
    background: #e0e7ff;
    color: #222;
    font-size: 1.13em;
    padding: 16px 0 16px 18px;
    border: 1.5px solid #bfcfff;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    outline: none;
    box-shadow: 0 2px 8px #bfcfff22;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s, border 0.2s, border-radius 0.2s;
    position: relative;
}
.accordion-btn[aria-expanded="true"] {
    border-radius: 10px 10px 0 0;
}
.accordion-btn[aria-expanded="false"] {
    border-radius: 10px;
}

.accordion-btn:hover,
.accordion-btn:focus {
    background: #dbeafe;
    border-color: #4f46e5;
}

.accordion-arrow {
    transition: transform 0.3s;
    font-size: 1.2em;
}

.accordion-btn[aria-expanded="true"] .accordion-arrow {
    transform: rotate(90deg);
}

#contactPanel {
    display: none;
    padding: 18px 10px 10px 10px;
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px #bfcfff22;
    border: 1.5px solid #bfcfff;
    border-top: none;
    animation: fadeInAccordion 0.4s;
    margin-top: -2px;
    /* Unisce visivamente con il bottone sopra */
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
#backToTopBtn {
    display: flex;
}

@media (max-width: 700px) {
    #backToTopBtn {
        display: none !important;
    }
}

#backToTopBtn.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}