/* Variables */
:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2d5a8a;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --whatsapp: #25d366;
    --whatsapp-dark: #1da851;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    color: var(--primary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
    color: var(--white);
}

/* Hero */
.hero {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.hero-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 2rem;
}

.hero-logo {
    width: 200px;
    height: auto;
    flex-shrink: 0;
}

.hero-main h1 {
    text-align: left;
    margin: 0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Servizi */
.servizi {
    padding: 80px 0;
    background: var(--white);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.servizio-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--gray-200);
}

.servizio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.servizio-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.servizio-card h3 {
    margin-bottom: 10px;
}

.servizio-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
}

/* Perché noi */
.perche-noi {
    padding: 80px 0;
    background: var(--primary);
    color: var(--white);
}

.perche-noi h2 {
    color: var(--white);
}

.vantaggi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.vantaggio {
    text-align: center;
}

.vantaggio-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
}

.vantaggio h3 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.vantaggio p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

/* Contatti */
.contatti {
    padding: 80px 0;
    background: var(--gray-50);
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 180px;
}

.form-note {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.info-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-box {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-box h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-200);
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-list svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

.info-list a {
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 20px;
}

.footer-brand .logo-text {
    color: var(--white);
    font-size: 1.75rem;
}

.tagline-small {
    font-style: italic;
    color: var(--gray-300);
    margin-top: 5px;
}

.footer-legal p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.footer-legal strong {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-300);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0 60px;
    }

    .hero-main {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hero-logo {
        width: 150px;
    }

    .hero-main h1 {
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .servizi,
    .perche-noi,
    .contatti {
        padding: 60px 0;
    }

    .contatti-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-container {
        padding: 25px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-legal {
        text-align: center;
    }
}

/* Form states */
.form-success {
    background: #d1fae5;
    color: #065f46;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-success.show {
    display: block;
}

.form-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.form-error.show {
    display: block;
}

/* Loading state */
.btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
