:root {
    --primary: #f0f7ff;
    --secondary: #ffffff;
    --accent: #00b4d8;
    --accent-dark: #0891b2;
    --accent-glow: rgba(0, 180, 216, 0.25);
    --text: #0f172a;
    --text-muted: #475569;
    --card-bg: rgba(255, 255, 255, 0.92);
    --border: rgba(0, 180, 216, 0.2);
    --shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 16px 48px rgba(15, 23, 42, 0.12);
    --gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 40%, #f8fafc 100%);
    --gradient-hero: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #ffffff 100%);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gradient);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== PARTICELLE CIANO CHIARE ===== */
.particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.25;
    animation: float 15s infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.25; }
    90% { opacity: 0.25; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== NAVBAR CHIARA ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    transition: all 0.3s ease;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.nav-logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}
.nav-logo span {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-dark);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--accent-dark);
    background: rgba(0, 180, 216, 0.1);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-links a:hover::after, .nav-links a.active::after {
    width: 60%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}
.hamburger span {
    width: 25px; height: 2px;
    background: var(--accent-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== HERO CON IMMAGINE SFONDO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 5% 60px;
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(240,249,255,0.92) 0%, rgba(224,242,254,0.85) 50%, rgba(255,255,255,0.9) 100%);
    z-index: -1;
}
.hero-content { max-width: 900px; position: relative; z-index: 2; }

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    animation: fadeInDown 1s ease;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #0f172a 0%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease 0.2s both;
}
.hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 1s ease 0.4s both;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

/* ===== BOTTONI ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #ffffff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--accent-dark);
    border: 2px solid var(--accent);
}
.btn-outline:hover {
    background: rgba(0, 180, 216, 0.08);
    transform: translateY(-3px);
}

/* ===== SEZIONI ===== */
.section {
    padding: 100px 5%;
    position: relative;
    z-index: 1;
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}
.section-tag {
    display: inline-block;
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0f172a 0%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===== CARD BIANCHE ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 40px 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
    transform: translateY(-8px);
    border-color: var(--border);
    box-shadow: var(--shadow-hover), 0 0 30px var(--accent-glow);
}
.card-icon {
    width: 60px; height: 60px;
    background: rgba(0, 180, 216, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}
.card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== FEATURE LIST ===== */
.features-list {
    max-width: 800px;
    margin: 0 auto;
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}
.feature-item:hover {
    border-color: var(--border);
    transform: translateX(8px);
    box-shadow: var(--shadow-hover);
}
.feature-item .icon {
    width: 50px; height: 50px;
    min-width: 50px;
    background: rgba(0, 180, 216, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 1px solid var(--border);
}
.feature-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}
.feature-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== IMMAGINE FEATURE (HOME) ===== */
.feature-image {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(0,0,0,0.06);
}
.feature-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}
.feature-image:hover img {
    transform: scale(1.03);
}

/* ===== FORM CONTATTI ===== */
.contact-section {
    max-width: 700px;
    margin: 0 auto;
}
.contact-form {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow);
}
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea {
    min-height: 140px;
    resize: vertical;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ===== FOOTER SCURO (contrasto) ===== */
.footer {
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 60px 5% 30px;
    position: relative;
    z-index: 1;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}
.footer-brand img {
    height: 50px;
    margin-bottom: 16px;
}
.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-col h4 {
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #64748b;
    font-size: 0.85rem;
}

/* ===== SEZIONI CON SFONDO IMMAGINE ===== */
.bg-image-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.bg-image-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(240,249,255,0.95) 0%, rgba(255,255,255,0.92) 100%);
    z-index: 0;
}
.bg-image-section > * {
    position: relative;
    z-index: 1;
}

/* ===== ANIMAZIONI ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar { padding: 0 4%; height: 60px; }
    .nav-logo span { font-size: 1.1rem; }
    .nav-links {
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        transform: translateY(-150%);
        transition: transform 0.4s ease;
    }
    .nav-links.open { transform: translateY(0); }
    .hamburger { display: flex; }
    .hero { padding: 80px 4% 40px; }
    .section { padding: 60px 4%; }
    .cards-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: 28px; }
    .feature-item { flex-direction: column; text-align: center; align-items: center; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
