:root {
    /* New Color Palette */
    --primary-color: #6b8aef;
    /* Azzurro */
    --primary-hover: #5570d9;
    --primary-light: #a8b9f7;
    --secondary-color: #e87830;
    /* Arancio */
    --secondary-hover: #d06828;
    --secondary-light: #f5a76a;
    --accent-color: #a585f0;
    /* Viola */
    --accent-hover: #9070e0;
    --accent-light: #d4c4fa;

    /* Legacy aliases */
    --highlight-color: #e87830;
    --neutral-color: #B0B0B0;

    /* Text colors */
    --text-dark: #1a1a2e;
    --text-light: #5a5a6e;

    /* Backgrounds */
    --background: #FFFFFF;
    --background-light: #f7f8fc;
    --light-bg: #f7f8fc;
    --border-color: #e8eaf5;

    /* Segment Colors (updated) */
    --color-brand: #6b8aef;
    --color-prof: #6b8aef;
    /* Azzurro */
    --color-art: #e87830;
    /* Arancio */
    --color-comm: #a585f0;
    /* Viola */
}

/* Skip to main content - Accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
}

.hero-section {
    background: var(--primary-color);
    color: white;
    padding: 80px 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.4rem;
    opacity: 0.9;
}

.service-card {
    border: 1px solid var(--neutral-color);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    background: var(--background);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.service-icon.fisco {
    background: var(--accent-color);
}

.service-icon.paghe {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.service-card .card-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.btn-custom {
    background: var(--highlight-color);
    border: none;
    color: var(--text-dark);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 226, 154, 0.3);
    color: var(--text-dark);
    background: #f4db7a;
}

.features-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.feature-item {
    text-align: center;
    margin-bottom: 40px;
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--highlight-color) !important;
}

footer {
    margin-top: auto;
}

/* Language Dropdown */
.dropdown-item {
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--secondary-color) !important;
    color: var(--text-dark) !important;
}

.dropdown-item.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.dropdown-item button {
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.2rem;
    }

    .service-card {
        margin-bottom: 30px;
    }
}

/* ========================================
   NEW VISUAL IMPROVEMENTS
   ======================================== */

/* 1. Glassmorphism Navbar */
.navbar-glass {
    background: rgba(107, 138, 239, 0.92);
    /* Azzurro with transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(107, 138, 239, 0.15);
    transition: all 0.3s ease;
    z-index: 2000;
    /* Ensure it stays on top */
}

/* 2. Unified Button Styles */
/* Segment Buttons */
.btn-brand {
    background: var(--color-brand);
    color: white !important;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(61, 125, 138, 0.3);
    transition: all 0.3s ease;
}

.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 125, 138, 0.4);
    background: #2c5d66;
}

.btn-prof {
    background: #5b73f6;
    /* Indigo */
    color: white !important;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(91, 115, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-art {
    background: #ff6900;
    /* Orange - Artigiano */
    color: white !important;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-comm {
    background: #9b51e0;
    /* Violet - Commerciante (Verified Hex) */
    color: white !important;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(155, 81, 224, 0.3);
    transition: all 0.3s ease;
}

.btn-comm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 81, 224, 0.4);
    background: #8a41d0;
}

.btn-gradient-primary {
    background: var(--primary-color);
    border: none;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(107, 138, 239, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.02em;
    padding: 12px 30px;
    border-radius: 50px;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 138, 239, 0.35);
    background: var(--primary-hover);
    color: white !important;
}

.btn-gradient-secondary {
    background: var(--secondary-color);
    border: none;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(232, 120, 48, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 12px 30px;
    border-radius: 50px;
}

.btn-gradient-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 120, 48, 0.35);
    background: var(--secondary-hover);
    color: white !important;
}

/* 3. Refined Card Design (Glass/Float) */
.service-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 20px 50px rgba(61, 125, 138, 0.15), 0 10px 25px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   REDESIGN ASSETS (Ported from Paghe Adesso)
   ======================================== */

:root {
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
}

/* Background Patterns */
.dots-pattern {
    background-image: radial-gradient(circle, rgba(61, 125, 138, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
}

.dots-pattern-light {
    background-image: radial-gradient(circle, rgba(232, 160, 93, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Decorative Blobs */
.blob-primary-top-right {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(107, 138, 239, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.blob-secondary-bottom-left {
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(165, 133, 240, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.blob-accent {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(232, 120, 48, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

/* Typography Utilities */
.text-gradient-primary {
    background: none;
    -webkit-text-fill-color: initial;
    color: #2c3e50;
    /* Dark gray/blue standard for headings */
}

.fw-extra-bold {
    font-weight: 800;
}

/* Feature Icon Boxes */
.feature-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-icon-box:hover {
    transform: rotate(5deg) scale(1.05);
}

.feature-icon-box.primary-soft {
    background-color: rgba(107, 138, 239, 0.12);
    color: var(--primary-color);
    /* Azzurro */
}

.feature-icon-box.secondary-soft {
    background-color: rgba(232, 120, 48, 0.12);
    color: var(--secondary-color);
    /* Arancio */
}

.feature-icon-box.accent-soft {
    background-color: rgba(165, 133, 240, 0.12);
    color: var(--accent-color);
    /* Viola */
}

/* Fiscozen Segment Classes (Preserved for Buttons/Specifics) */
.feature-icon-box.prof {
    background-color: rgba(91, 115, 246, 0.1);
    color: var(--color-prof);
    /* Indigo */
}

.feature-icon-box.art {
    background-color: rgba(255, 105, 0, 0.1);
    color: var(--color-art);
    /* Orange */
}

.feature-icon-box.comm {
    background-color: rgba(155, 81, 224, 0.1);
    color: var(--color-comm);
    /* Violet */
}

/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(61, 125, 138, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(61, 125, 138, 0);
    }
}

.pulse-primary {
    animation: pulse-glow 3s infinite;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}