/* Variables & Design Tokens */
:root {
    /* Colors */
    --primary-blue: #105fe3;
    --primary-dark: #0d4ab5;
    --primary-light: #478bff;
    
    --bg-dark: #f4f7f6;
    --bg-darker: #eef2f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fcfcfc;
    
    --text-main: #1e293b;
    --text-muted: #475569;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Effects */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 95, 227, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 95, 227, 0.6);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Header & Navbar (Glassmorphism) */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition-normal);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--text-main);
}

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

#main-nav ul {
    display: flex;
    gap: 30px;
}

#main-nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
}

#main-nav a:hover, #main-nav a.active {
    color: var(--primary-light);
}

#main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-blue);
    transition: width var(--transition-normal);
}

#main-nav a:hover::after, #main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition-normal);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at top right, #0b1a3d, var(--bg-dark));
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 95, 227, 0.15) 0%, transparent 60%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDIiLz4KPC9zdmc+') repeat;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h2 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-dark), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--bg-darker);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px 30px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
    border-color: rgba(16, 95, 227, 0.3);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 95, 227, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--primary-light);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: #e2e8f0;
    padding: 60px 0 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
}

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

.footer-contact p {
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* Responsive */
@media (max-width: 992px) {
    .hero h2 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    /* Miglioramenti Grafica Mobile Globali (Sovrascrive stili inline) */
    .container { width: 95% !important; }
    
    /* Hero e Titoli */
    .hero { height: auto !important; min-height: 100vh !important; padding: 120px 0 60px 0 !important; background-position: center !important; }
    .hero-content { padding: 0 15px !important; padding-top: 0 !important; width: 100% !important; }
    .hero h2, .hero-text h2, .hero-title { font-size: 2.2rem !important; line-height: 1.2 !important; letter-spacing: 1px !important; }
    .typewriter-text { font-size: 1.1rem !important; white-space: normal !important; width: 100% !important; border: none !important; animation: none !important; }
    
    /* Sezioni Comuni */
    .services, section { padding-top: 50px !important; padding-bottom: 50px !important; }
    .category-title { font-size: 1.5rem !important; }
    
    /* Griglie e Layout */
    .services-grid, .feature-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .about-layout, .comparison-layout, .contact-layout { gap: 30px !important; text-align: center !important; }
    .about-layout .about-text, .about-layout .about-image, 
    .comparison-text, .comparison-list-box,
    .contact-box, .hero-text, .hero-image-container { flex: 1 1 100% !important; }
    
    /* Componenti Specifici (Liste, CTA, Form) */
    .about-features-list li, .comparison-list-box li { text-align: left !important; }
    .stat-card { padding: 20px !important; margin-bottom: 15px !important; }
    .comparison-section { padding: 40px 20px !important; }
    .comparison-list-box { padding: 25px !important; }
    .cta-banner { padding: 40px 20px !important; margin: 30px 0 !important; }
    .cta-banner h3 { font-size: 1.6rem !important; }
    .contact-box { padding: 25px !important; }
    
    .mobile-menu-toggle { display: flex; }
    
    #main-nav {
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: left var(--transition-normal);
        border-bottom: 1px solid var(--glass-border);
    }
    
    #main-nav.open { left: 0; }
    
    #main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 20px;
    }
    
    .hero h2 { font-size: 2.8rem; }
    .hero-buttons { flex-direction: column; }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Accordion Styles */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: all var(--transition-normal);
}

.accordion-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(16, 95, 227, 0.3);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.accordion-title h3 {
    font-size: 1.5rem;
    margin: 0;
}

.accordion-icon {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--primary-light);
    transition: transform var(--transition-fast);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.02);
}

.services-list {
    padding: 0 30px 25px 80px;
}

.services-list li {
    margin-bottom: 12px;
}

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

.services-list a {
    color: var(--text-muted);
    font-size: 1.1rem;
    position: relative;
    padding-left: 20px;
}

.services-list a::before {
    content: '?';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

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

.services-list a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Updated Footer Layout */
.footer-details p, .footer-legal p {
    margin-bottom: 8px;
    color: var(--text-muted);
}
.footer-brand br {
    margin-bottom: 15px;
}

/* Brand Logo */
.brand-logo {
    max-height: 40px;
    width: auto;
    /* Removed white glow for light theme */
    transition: transform var(--transition-fast), filter var(--transition-fast);
}
.brand-logo:hover {
    transform: scale(1.05);
}

/* Futuristic Hero Animations */
.hero {
    background: #f4f7f6;
}
.hero-overlay {
    background: none;
}
.futuristic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
.cyber-grid {
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(16, 95, 227, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 95, 227, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}
.glowing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 2;
    animation: orbFloat 10s ease-in-out infinite alternate;
}
.orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(16, 95, 227, 0.4);
    top: 20%;
    left: 10%;
}
.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(71, 139, 255, 0.3);
    bottom: 10%;
    right: 5%;
    animation-delay: -5s;
}
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* Hero Content Updates */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
}
.hero h2 {
    font-size: 5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(16, 95, 227, 0.2);
    margin-bottom: 0;
}

.hero-title {
    font-size: 6.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(
        110deg,
        var(--primary-dark) 0%,
        var(--primary-blue) 40%,
        #ffffff 50%,
        var(--primary-blue) 60%,
        var(--primary-dark) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: metallicShine 4s linear infinite;
    filter: drop-shadow(0px 10px 20px rgba(16, 95, 227, 0.15));
    letter-spacing: 4px;
}

@keyframes metallicShine {
    0% { background-position: 200% center; }
    100% { background-position: 0% center; }
}
.typewriter-text {
    font-size: 1.5rem;
    color: var(--primary-light);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    border-right: 2px solid var(--primary-light);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto 40px auto;
    animation: typing 3s steps(40, end), blink-caret .75s step-end infinite;
    max-width: 100%;
}
@media (max-width: 768px) {
    .typewriter-text {
        font-size: 1.1rem;
        white-space: normal;
        border-right: none;
        animation: none;
        width: 100%;
    }
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-light); }
}
.hero-buttons {
    justify-content: center;
}

/* Hero Description Effects */
.hero-description {
    margin: 0 auto 40px auto;
    font-size: 1.25rem;
    line-height: 1.8;
}

.stat-highlight {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-blue);
    background: linear-gradient(120deg, var(--primary-dark), var(--primary-light), var(--primary-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShine 3s linear infinite, floatPulse 2s ease-in-out infinite alternate;
    display: inline-block;
}

@keyframes gradientShine {
    to { background-position: 200% center; }
}

@keyframes floatPulse {
    0% { transform: translateY(0) scale(1); text-shadow: 0 0 0px rgba(16, 95, 227, 0); }
    100% { transform: translateY(-3px) scale(1.05); text-shadow: 0 5px 15px rgba(16, 95, 227, 0.15); }
}


/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1000;
    width: 800px;
    gap: 30px;
}

.dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dropdown-column h4 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-heading);
}

.dropdown-column a {
    font-size: 0.9rem !important;
    padding: 6px 0;
    color: var(--text-main) !important;
    font-weight: 400 !important;
    transition: padding-left 0.2s ease, color 0.2s ease;
}

.dropdown-column a::after {
    display: none !important;
}

.dropdown-column a:hover {
    color: var(--primary-blue) !important;
    padding-left: 5px;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background: transparent;
        flex-direction: column;
        gap: 15px;
        display: none;
        padding: 10px 0;
    }
    .dropdown:hover .dropdown-menu {
        display: flex;
    }
}


