/* Info Luce Gas - Unified Design System */
/* Expert UI/UX Design - Coerenza totale */

:root {
    /* === PRIMARY BRAND PALETTE === */
    --brand-primary: #1a73e8;          /* Google Blue - Affidabile, professionale */
    --brand-primary-50: #e8f0fe;
    --brand-primary-100: #d2e3fc;
    --brand-primary-200: #aecbfa;
    --brand-primary-300: #8ab4f8;
    --brand-primary-400: #669df6;
    --brand-primary-500: #4285f4;      /* Core brand */
    --brand-primary-600: #1a73e8;      /* Primary CTA */
    --brand-primary-700: #1557b0;
    --brand-primary-800: #103f78;
    --brand-primary-900: #0b2a52;
    
    /* === SECONDARY PALETTE === */
    --brand-secondary: #34a853;        /* Google Green - Successo, risparmio */
    --brand-secondary-50: #e6f4ea;
    --brand-secondary-100: #ceead6;
    --brand-secondary-200: #a8dab5;
    --brand-secondary-300: #81c995;
    --brand-secondary-400: #5bb974;
    --brand-secondary-500: #34a853;    /* Success states */
    --brand-secondary-600: #2d8f47;
    --brand-secondary-700: #26763c;
    --brand-secondary-800: #1e5d30;
    --brand-secondary-900: #174425;
    
    /* === ACCENT COLORS === */
    --brand-accent: #fbbc04;           /* Google Yellow - Attenzione, energia */
    --brand-accent-warning: #ff9800;   /* Orange - Warning states */
    --brand-accent-error: #ea4335;     /* Google Red - Errori */
    
    /* === NEUTRAL SYSTEM === */
    --neutral-white: #ffffff;
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #eeeeee;
    --neutral-300: #e0e0e0;
    --neutral-400: #bdbdbd;
    --neutral-500: #9e9e9e;
    --neutral-600: #757575;
    --neutral-700: #616161;
    --neutral-800: #424242;
    --neutral-900: #212121;
    --neutral-black: #000000;
    
    /* === SEMANTIC COLORS === */
    --color-success: var(--brand-secondary);
    --color-warning: var(--brand-accent-warning);
    --color-error: var(--brand-accent-error);
    --color-info: var(--brand-primary);
    
    /* === SURFACE COLORS === */
    --surface-primary: var(--neutral-white);
    --surface-secondary: var(--neutral-50);
    --surface-tertiary: var(--neutral-100);
    --surface-inverse: var(--neutral-900);
    
    /* === TYPOGRAPHY SYSTEM === */
    --font-family-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-family-secondary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Font Sizes - Type Scale */
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    --font-size-5xl: 3rem;       /* 48px */
    --font-size-6xl: 3.75rem;    /* 60px */
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    --line-height-loose: 1.8;
    
    /* === SPACING SYSTEM (8pt Grid) === */
    --space-0: 0;
    --space-1: 0.125rem;  /* 2px */
    --space-2: 0.25rem;   /* 4px */
    --space-3: 0.375rem;  /* 6px */
    --space-4: 0.5rem;    /* 8px - Base unit */
    --space-6: 0.75rem;   /* 12px */
    --space-8: 1rem;      /* 16px */
    --space-10: 1.25rem;  /* 20px */
    --space-12: 1.5rem;   /* 24px */
    --space-16: 2rem;     /* 32px */
    --space-20: 2.5rem;   /* 40px */
    --space-24: 3rem;     /* 48px */
    --space-32: 4rem;     /* 64px */
    --space-40: 5rem;     /* 80px */
    --space-48: 6rem;     /* 96px */
    --space-64: 8rem;     /* 128px */
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 250ms ease-out;
    --transition-slow: 350ms ease-out;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* Reset and Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--neutral-800);
    background-color: var(--surface-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* === TYPOGRAPHY HIERARCHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--neutral-900);
    margin-bottom: var(--space-16);
    letter-spacing: -0.02em;
}

/* Display Headings */
.display-1 { font-size: var(--font-size-6xl); font-weight: var(--font-weight-extrabold); line-height: 1.1; }
.display-2 { font-size: var(--font-size-5xl); font-weight: var(--font-weight-extrabold); line-height: 1.1; }
.display-3 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-bold); line-height: 1.2; }

/* Standard Headings */
h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-extrabold); }
h2 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); }
h3 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }
h4 { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
h6 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }

/* Body Text */
p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--neutral-700);
    margin-bottom: var(--space-16);
}

.lead {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-regular);
    color: var(--neutral-600);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-20);
}

.text-small {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.text-large {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

/* === LINKS === */
a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    border-radius: var(--radius-xs);
}

a:hover {
    color: var(--brand-primary-700);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* === BUTTON SYSTEM === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-12) var(--space-20);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    min-height: 48px; /* Touch target */
    letter-spacing: 0.01em;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-primary-100);
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* === BUTTON VARIANTS === */
.btn-primary {
    background: var(--brand-primary);
    color: var(--neutral-white);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--brand-primary-700);
    color: var(--neutral-white);
    border-color: var(--brand-primary-700);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    background: var(--brand-primary-800);
    border-color: var(--brand-primary-800);
}

.btn-outline-primary {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    color: var(--neutral-white);
    border-color: var(--brand-primary);
}

.btn-secondary {
    background: var(--brand-secondary);
    color: var(--neutral-white);
    border-color: var(--brand-secondary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--brand-secondary-700);
    color: var(--neutral-white);
    border-color: var(--brand-secondary-700);
    box-shadow: var(--shadow-lg);
}

.btn-light {
    background: var(--surface-primary);
    color: var(--neutral-800);
    border-color: var(--neutral-300);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    background: var(--surface-secondary);
    color: var(--neutral-900);
    border-color: var(--neutral-400);
}

/* === BUTTON SIZES === */
.btn-sm {
    padding: var(--space-8) var(--space-12);
    font-size: var(--font-size-sm);
    min-height: 36px;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--space-16) var(--space-24);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    min-height: 56px;
    border-radius: var(--radius-xl);
}

.btn-xl {
    padding: var(--space-20) var(--space-32);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    min-height: 64px;
    border-radius: var(--radius-2xl);
}

/* Header Styles */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.top-bar {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--space-2) 0;
    font-size: 0.875rem;
}

.top-bar a {
    color: var(--white);
    transition: color var(--transition-fast);
}

.top-bar a:hover {
    color: var(--primary-blue-light);
    text-decoration: none;
}

.navbar {
    padding: var(--space-4) 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.75rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--gray-900);
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

.logo {
    height: 45px;
    width: auto;
}

.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    background: var(--primary-blue-50);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-xl);
    padding: var(--space-4) 0;
    margin-top: var(--space-2);
}

.dropdown-item {
    padding: var(--space-3) var(--space-6);
    font-weight: var(--font-weight-normal);
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
    margin: 0 var(--space-3);
}

.dropdown-item:hover {
    background: var(--primary-blue-50);
    color: var(--primary-blue);
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 50%, var(--brand-primary-800) 100%);
    color: var(--neutral-white);
    padding: var(--space-64) 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.4;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-20);
    position: relative;
    z-index: 1;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-relaxed);
    opacity: 0.95;
    margin-bottom: var(--space-32);
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-cta {
    margin-bottom: var(--space-10);
    position: relative;
    z-index: 1;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: var(--font-weight-medium);
    font-size: 1.125rem;
}

.feature-item i {
    font-size: 1.5rem;
}

/* === CARD SYSTEM === */
.card {
    background: var(--surface-primary);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
    padding: 0;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary-200);
}

.card-elevated {
    box-shadow: var(--shadow-md);
}

.card-elevated:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: var(--space-20);
    border-bottom: 1px solid var(--neutral-200);
    background: var(--surface-secondary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.card-body {
    padding: var(--space-20);
}

.card-footer {
    padding: var(--space-20);
    border-top: 1px solid var(--neutral-200);
    background: var(--surface-secondary);
}

/* Provider Cards */
.provider-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
}

.provider-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-blue-100);
}

.provider-card .card-header {
    padding: var(--space-6);
    border: none;
    color: var(--white);
    position: relative;
}

.provider-card .card-body {
    padding: var(--space-6);
}

.provider-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.provider-contact {
    background: var(--gray-50);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
}

/* Compact Provider Cards */
.provider-compact {
    text-align: center;
    padding: var(--space-6);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.provider-compact .provider-icon {
    margin: 0 auto var(--space-4);
    background: var(--gray-100);
    color: var(--gray-700);
}

.provider-compact:hover .provider-icon {
    background: var(--primary-blue-50);
    color: var(--primary-blue);
}

/* === SECTIONS === */
.section {
    padding: var(--space-64) 0;
}

.section-sm {
    padding: var(--space-48) 0;
}

.section-lg {
    padding: var(--space-64) 0 var(--space-64);
}

.section-xl {
    padding: var(--space-64) 0 var(--space-64);
}

/* === BACKGROUND PATTERNS === */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-secondary-700) 100%);
}

.bg-pattern {
    background-color: var(--surface-secondary);
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.4'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='10' cy='10' r='1'/%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.bg-dots {
    background-color: var(--surface-primary);
    background-image: radial-gradient(var(--neutral-300) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-lg {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

/* Forms */
.form-control,
.form-select {
    padding: var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    background: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-100);
    outline: none;
}

.form-label {
    font-weight: var(--font-weight-medium);
    color: var(--gray-800);
    margin-bottom: var(--space-2);
}

/* Alerts */
.alert {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid var(--warning);
    color: var(--gray-800);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--space-20) 0 var(--space-8);
}

.footer h5, .footer h6 {
    color: var(--white);
    font-weight: var(--font-weight-bold);
}

.footer a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--white);
    text-decoration: none;
}

/* === UTILITIES === */
.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Text Colors */
.text-primary { color: var(--brand-primary) !important; }
.text-secondary { color: var(--brand-secondary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }
.text-info { color: var(--color-info) !important; }
.text-muted { color: var(--neutral-600) !important; }
.text-dark { color: var(--neutral-900) !important; }

/* Background Colors */
.bg-primary { background-color: var(--brand-primary) !important; }
.bg-secondary { background-color: var(--brand-secondary) !important; }
.bg-success { background-color: var(--color-success) !important; }
.bg-warning { background-color: var(--color-warning) !important; }
.bg-error { background-color: var(--color-error) !important; }
.bg-info { background-color: var(--color-info) !important; }
.bg-light { background-color: var(--surface-secondary) !important; }
.bg-dark { background-color: var(--neutral-900) !important; }

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .section {
        padding: var(--space-16) 0;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: var(--space-20) 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section {
        padding: var(--space-12) 0;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .card-body,
    .card-header {
        padding: var(--space-4);
    }
    
    .provider-card .card-header,
    .provider-card .card-body {
        padding: var(--space-5);
    }
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus Management */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card,
    .provider-card {
        border: 2px solid var(--gray-800);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === MOBILE OPTIMIZATIONS === */

/* Logo ottimizzato */
.navbar-brand .logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 767.98px) {
    .navbar-brand .logo {
        max-height: 35px;
    }
}

/* Mobile CTA Banner - Come nello screenshot */
.mobile-cta-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
    color: white;
    padding: var(--space-12) var(--space-16);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 1050;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    display: none;
}

.mobile-cta-banner.show {
    transform: translateY(0);
}

.mobile-cta-banner .banner-content {
    text-align: center;
    margin-bottom: var(--space-12);
}

.mobile-cta-banner .banner-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-4);
    color: white;
}

.mobile-cta-banner .banner-subtitle {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-bottom: 0;
}

.mobile-cta-banner .cta-buttons {
    display: flex;
    gap: var(--space-8);
    justify-content: center;
}

.mobile-cta-banner .btn {
    flex: 1;
    max-width: 200px;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-16);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.mobile-cta-banner .btn-light {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-primary);
    border: none;
}

.mobile-cta-banner .btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-cta-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-cta-banner .banner-close {
    position: absolute;
    top: var(--space-8);
    right: var(--space-12);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--space-4);
    line-height: 1;
}

.mobile-cta-banner .banner-close:hover {
    color: white;
}

/* Mostra solo su mobile */
@media (max-width: 991.98px) {
    .mobile-cta-banner {
        display: block;
    }
    
    /* Aggiungi padding bottom al body per compensare il banner fisso */
    body.has-mobile-banner {
        padding-bottom: 140px;
    }
}

/* === IMPROVED SECTIONS === */

.section {
    padding: var(--space-64) 0;
}

.section-sm {
    padding: var(--space-48) 0;
}

.section-lg {
    padding: var(--space-80) 0;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: var(--space-48);
    color: var(--neutral-800);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 2px;
}

/* Enhanced Cards */
.card-enhanced {
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    background: var(--surface-primary);
    overflow: hidden;
}

.card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-primary-200);
}

.card-enhanced .card-body {
    padding: var(--space-24);
}

.card-enhanced .card-header {
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--neutral-200);
    padding: var(--space-20);
    font-weight: var(--font-weight-semibold);
}

/* Improved Navigation */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
    position: relative; /* Remove sticky on mobile */
}

.navbar-brand {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
}

.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--neutral-700) !important;
    transition: all var(--transition-fast);
    position: relative;
    padding: var(--space-8) var(--space-16) !important;
    border-radius: var(--radius-md);
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-primary) !important;
    background: var(--brand-primary-50);
}

/* Partners Section */
.partners-section {
    background: var(--surface-secondary);
    padding: var(--space-48) 0;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    padding: var(--space-16);
}

.partner-logo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.partner-logo img {
    max-height: 50px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter var(--transition-normal);
}

.partner-logo:hover img {
    filter: grayscale(0%);
}

/* === MOBILE UI IMPROVEMENTS === */

@media (max-width: 767.98px) {
    /* Hero section mobile ottimizzato */
    .hero-section {
        padding: var(--space-40) 0;
        min-height: 70vh;
        text-align: center;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
        line-height: var(--line-height-tight);
        margin-bottom: var(--space-20);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        line-height: var(--line-height-normal);
        margin-bottom: var(--space-24);
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--space-12);
        align-items: center;
        max-width: 400px;
        margin: 0 auto var(--space-32);
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }
    
    .hero-features {
        flex-direction: column;
        gap: var(--space-16);
        text-align: center;
        margin-top: var(--space-32);
    }
    
    /* Cards mobile */
    .card,
    .card-enhanced {
        margin-bottom: var(--space-20);
    }
    
    .card-body,
    .card-enhanced .card-body {
        padding: var(--space-20);
    }
    
    /* Navigation mobile */
    .navbar {
        position: static !important; /* Remove sticky completely on mobile */
        background: white !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    .navbar-collapse {
        background: var(--surface-primary);
        margin-top: var(--space-20);
        border-radius: var(--radius-2xl);
        box-shadow: var(--shadow-xl);
        padding: var(--space-24);
        border: 1px solid var(--neutral-200);
        position: absolute;
        left: var(--space-16);
        right: var(--space-16);
        z-index: 1000;
    }
    
    .navbar-nav .nav-link {
        padding: var(--space-16) var(--space-24) !important;
        border-radius: var(--radius-xl);
        margin-bottom: var(--space-12);
        text-align: center;
        font-size: var(--font-size-lg);
        font-weight: var(--font-weight-medium);
        transition: all var(--transition-fast);
    }
    
    .navbar-nav .nav-link:hover {
        background: var(--brand-primary-50);
        color: var(--brand-primary) !important;
        transform: translateY(-1px);
    }
    
    .navbar-toggler {
        border: none;
        padding: var(--space-12);
        border-radius: var(--radius-lg);
        background: var(--surface-secondary);
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-toggler-icon {
        background-size: 20px 20px;
    }
    
    /* Sections mobile */
    .section {
        padding: var(--space-48) 0;
    }
    
    .section-sm {
        padding: var(--space-32) 0;
    }
    
    .section-lg {
        padding: var(--space-56) 0;
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-32);
    }
    
    /* Typography mobile */
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    h3 { font-size: var(--font-size-xl); }
    h4 { font-size: var(--font-size-lg); }
    
    /* Touch targets */
    .btn {
        min-height: 48px;
        padding: var(--space-12) var(--space-20);
        font-size: var(--font-size-base);
    }
    
    .btn-lg {
        min-height: 56px;
        padding: var(--space-16) var(--space-24);
        font-size: var(--font-size-lg);
    }
    
    .btn-xl {
        min-height: 64px;
        padding: var(--space-20) var(--space-32);
        font-size: var(--font-size-xl);
    }
    
    /* Form controls */
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: var(--font-size-base);
        border-radius: var(--radius-lg);
    }
    
    /* Provider cards mobile */
    .fornitore-card {
        margin-bottom: var(--space-20);
    }
    
    .fornitore-card-header {
        min-height: 80px;
        padding: var(--space-16);
    }
    
    .fornitore-card-logo {
        max-width: 80px;
        max-height: 50px;
    }
    
    /* FAQ mobile */
    .accordion-button {
        padding: var(--space-16);
        font-size: var(--font-size-base);
        border-radius: var(--radius-lg) !important;
    }
    
    .accordion-body {
        padding: var(--space-20);
        font-size: var(--font-size-base);
    }
    
    /* Partners mobile */
    .partners-section {
        padding: var(--space-32) 0;
    }
    
    .partner-logo {
        height: 70px;
        margin-bottom: var(--space-16);
    }
    
    .partner-logo img {
        max-height: 40px;
        max-width: 100px;
    }
}

/* === TABLET OPTIMIZATIONS === */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-features {
        justify-content: center;
    }
}

/* === FOOTER MODERN REDESIGN === */

.footer-modern {
    background: linear-gradient(135deg, var(--neutral-900) 0%, var(--neutral-800) 100%);
    color: var(--neutral-200);
    margin-top: var(--space-64);
}

/* Footer CTA Section */
.footer-cta {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
    padding: var(--space-48) 0;
    color: white;
}

.footer-cta .cta-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-8);
    color: white;
}

.footer-cta .cta-subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: 0;
}

.btn-cta-footer {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: var(--space-16) var(--space-32);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-cta-footer:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Footer Main */
.footer-main {
    padding: var(--space-64) 0 var(--space-48);
    background: var(--neutral-900);
}

.footer-brand-modern {
    margin-bottom: var(--space-24);
}

.brand-logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    margin-bottom: var(--space-20);
}

.footer-logo-modern {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-8);
}

.brand-text-modern h4 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-2);
    color: white;
}

.brand-tagline {
    font-size: var(--font-size-sm);
    color: var(--brand-primary-300);
    font-weight: var(--font-weight-medium);
}

.brand-description {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--neutral-300);
    margin-bottom: 0;
}

/* Footer Headings */
.footer-heading {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: white;
    margin-bottom: var(--space-20);
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 1px;
}

/* Footer Links Modern */
.footer-links-modern {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-modern li {
    margin-bottom: var(--space-12);
}

.footer-links-modern a {
    color: var(--neutral-300);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
    position: relative;
    padding-left: var(--space-16);
}

.footer-links-modern a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--brand-primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

.footer-links-modern a:hover {
    color: var(--brand-primary-300);
    padding-left: var(--space-20);
}

.footer-links-modern a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Info Modern */
.contact-info-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-20);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-12);
}

.contact-item i {
    color: var(--brand-primary);
    font-size: var(--font-size-lg);
    margin-top: var(--space-2);
    flex-shrink: 0;
}

.contact-link {
    color: var(--neutral-200);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    transition: color var(--transition-fast);
}

.contact-link:hover {
    color: var(--brand-primary-300);
}

.contact-item small {
    display: block;
    color: var(--neutral-400);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
    line-height: var(--line-height-normal);
}

/* Footer Bottom */
.footer-bottom {
    background: var(--neutral-black);
    padding: var(--space-32) 0;
    border-top: 1px solid var(--neutral-800);
}

.company-info {
    margin-bottom: var(--space-16);
}

.company-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: white;
    margin-bottom: var(--space-8);
}

.company-details {
    font-size: var(--font-size-sm);
    color: var(--neutral-400);
    margin-bottom: var(--space-4);
}

.company-disclaimer {
    font-size: var(--font-size-sm);
    color: var(--neutral-500);
    margin-bottom: 0;
}

/* Social Links Modern */
.social-links-modern {
    display: flex;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
    justify-content: flex-start;
}

.social-link-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--neutral-300);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.social-link-modern:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.copyright-modern {
    font-size: var(--font-size-sm);
    color: var(--neutral-500);
    margin-bottom: 0;
}

/* === HERO SECTION IMPROVEMENTS === */

.hero-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-800) 100%);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-24);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: white;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    line-height: var(--line-height-relaxed);
    opacity: 0.95;
    margin-bottom: var(--space-32);
    max-width: 600px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    display: flex;
    gap: var(--space-16);
    margin-bottom: var(--space-40);
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: var(--space-32);
    align-items: center;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.feature-item i {
    font-size: var(--font-size-xl);
}

/* === RESPONSIVE FOOTER === */

@media (max-width: 991.98px) {
    .footer-cta {
        padding: var(--space-32) 0;
        text-align: center;
    }
    
    .footer-cta .cta-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-16);
    }
    
    .btn-cta-footer {
        margin-top: var(--space-16);
        width: 100%;
        max-width: 300px;
    }
    
    .social-links-modern {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .footer-main {
        padding: var(--space-48) 0 var(--space-32);
    }
    
    .brand-logo-container {
        flex-direction: column;
        text-align: center;
        gap: var(--space-12);
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links-modern {
        text-align: center;
    }
    
    .contact-info-modern {
        align-items: center;
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-8);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-features {
        flex-direction: column;
        gap: var(--space-16);
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-cta-banner,
    .hero-cta,
    .btn,
    .footer-cta,
    .social-links-modern {
        display: none !important;
    }
    
    .hero-section,
    .footer-modern {
        background: none !important;
        color: var(--gray-900) !important;
    }
    
    * {
        box-shadow: none !important;
    }
}