:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-muted: #64748b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }

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

header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

.btn-nav {
    background-color: var(--primary);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-toggle {
    display: none;
}

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

/* Hero con immagine di sfondo professionale */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.94)),
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
    color: #fff;
    padding: 100px 0;
    position: relative;
    text-align: left;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-logo-large {
    flex-shrink: 0;
    max-width: 280px;
}

.hero-logo-large img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-content h1 span {
    color: #3b82f6;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.hero-content p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero h1 span {
    color: #3b82f6;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 780px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Card con Immagini di Copertina */
.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

.section { padding: 70px 0; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-btn {
    width: 100%;
    padding: 18px 20px;
    text-align: left;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-content {
    padding: 0 20px 18px;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: none;
}

.faq-content.active { display: block; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 50px 0 25px;
    border-top: 1px solid var(--dark-light);
}

footer h4 {
    color: #fff;
    margin-bottom: 15px;
}

footer ul { list-style: none; }
footer ul li { margin-bottom: 8px; }
footer a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid var(--dark-light);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
    }
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--dark);
        cursor: pointer;
        padding: 5px;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        gap: 15px;
        text-align: center;
    }
    .nav-links.active {
        display: flex;
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .hero-logo-large {
        max-width: 180px;
        margin: 0 auto;
    }
    .hero-content h1 { font-size: 1.8rem; }
    .hero-btns { justify-content: center; }
}

/* Telefono: niente scroll orizzontale e aree di tocco di almeno 44px */
.grid-2 > *, .grid-3 > * { min-width: 0; }
.card p, footer p { overflow-wrap: anywhere; }

@media (max-width: 768px) {
    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    .nav-links a {
        display: block;
        padding: 10px 0;
    }
    .nav-links a.btn-nav {
        padding: 12px 20px;
    }
    .card { padding: 22px; }
    .hero-content h1 { font-size: 1.9rem !important; }
    .hero-content p { font-size: 1.1rem !important; }
    footer ul li a { display: inline-block; padding: 6px 0; }
    .btn-primary, .btn-secondary { min-height: 44px; }
}
