/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --secondary: #4CAF50;
    --light: #f9f9f9;
    --dark: #333;
    --gray: #666;
    --light-gray: #eee;
    --white: #fff;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --radius: 8px;
}
body {
    font-family: 'Inter', 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
}
img {
    max-width: 100%;
}
.container {
    width: min(95%, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Loading */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(46, 125, 50, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#loading p {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo-mark {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}
.logo-text h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.registered {
    font-size: 0.6rem;
    vertical-align: super;
    color: var(--gray);
}
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: 0.3s;
}
.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-link {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}
.nav-link.active,
.nav-link:hover {
    color: var(--primary);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(to bottom, #e8f5e9, var(--white));
    padding: 4rem 0;
    text-align: center;
}
.hero-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 2rem;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.stat {
    text-align: center;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}
.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}
.cta-button {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s;
    box-shadow: var(--shadow);
}
.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Services */
.services {
    padding: 4rem 0;
    background: var(--white);
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}
.service-card:hover {
    transform: translateY(-5px);
}
.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 1.8rem;
}
.service-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}
.service-desc {
    color: var(--gray);
}

/* Form */
.request-form {
    padding: 4rem 0;
    background: #f5f5f5;
}
.form-container {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}
.form-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}
.form-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
}
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}
.radio-option input {
    width: 18px;
    height: 18px;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.checkbox-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.checkbox-label {
    font-size: 0.95rem;
    color: var(--gray);
}
.error-message {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}
.form-actions {
    text-align: center;
    margin-top: 2rem;
}
.submit-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: var(--shadow);
}
.submit-button:hover:not(:disabled) {
    background: var(--primary-dark);
}
.submit-button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}
.success-message {
    padding: 2rem;
    text-align: center;
}
.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1.5rem;
}
.success-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.success-text {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.success-note {
    background: #e8f5e9;
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

/* Contatti */
.contacts {
    padding: 4rem 0;
    background: var(--white);
}
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.contact-card.emergency {
    border-top: 4px solid #d32f2f;
}
.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 1.5rem;
}
.contact-card.emergency .contact-icon {
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--light);
    padding: 3rem 0 1.5rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.footer-logo-mark {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}
.footer-logo-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
}
.footer-registered {
    font-size: 0.55rem;
    color: var(--light-gray);
}
.footer-tagline, .footer-address, .footer-credits {
    color: var(--light-gray);
    margin-top: 1rem;
}
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.copyright, .footer-note {
    margin: 0.5rem 0;
    color: var(--light-gray);
    font-size: 0.95rem;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: var(--shadow);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1rem 0;
    display: none;
}
.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .main-nav {
        display: none;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
}
