/* Root Variables */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary: #f8fafc;
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-dark: #ea580c;
    --success: #10b981;
    --success-light: #34d399;
    --text: #0f172a;
    --text-light: #475569;
    --text-lighter: #94a3b8;
    --light-bg: #f1f5f9;
    --dark-bg: #0f172a;
    --border: #e2e8f0;
    --section-padding: 8rem 2rem;
    --card-radius: 16px;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --bsd-blue: #013a84;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #fff;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-size: 2.75rem;
    font-weight: 700;
    position: relative;
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
}

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

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

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

section {
    position: relative;
    overflow: hidden;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    padding: 0.8rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 45px;
    margin-right: 10px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: var(--transition);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.01em;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    position: relative;
    z-index: auto;
}

.menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: width 0.3s;
}

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

.menu a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-image: radial-gradient(
        circle at 70% 80%,
        rgba(241, 245, 249, 0.8) 0%,
        rgba(255, 255, 255, 1) 70%
    );
    padding: 5rem 0;
    padding-top: calc(5rem + 80px); /* Add space for the fixed header */
    overflow: hidden;
}

/* Hero Background Elements */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(50px);
}

.hero-bg-circle-1 {
    top: -5%;
    right: -10%;
    width: 40rem;
    height: 40rem;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%);
    animation: float-slow 15s infinite alternate ease-in-out;
}

.hero-bg-circle-2 {
    bottom: -10%;
    left: -5%;
    width: 50rem;
    height: 50rem;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0) 70%);
    animation: float-slow 20s infinite alternate-reverse ease-in-out;
}

@keyframes float-slow {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(3%, 3%);
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 650px;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.hero-tagline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 1.5px;
}

.hero-title {
    margin-bottom: 2rem;
}

.hero-title .gradient-text {
    background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.hero-feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
}

.hero-feature-icon {
    margin-right: 1rem;
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hero-feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.hero-feature:hover .hero-feature-icon::before {
    opacity: 1;
}

.hero-feature:hover .hero-feature-icon i {
    color: white;
}

.hero-feature-icon i {
    transition: var(--transition);
    color: var(--primary);
}

.hero-feature-text {
    flex: 1;
}

.hero-feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.hero-feature-desc {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(42,92,170,0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(42,92,170,0.3);
    color: white;
}

.btn:hover::before {
    width: 100%;
}

.btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(4px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

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

.btn-outline:hover {
    color: white;
    box-shadow: 0 15px 30px rgba(42,92,170,0.2);
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.hero-main-illustration {
    width: 100%;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
    animation: float 7s infinite alternate ease-in-out;
    transform-origin: center;
    position: relative;
    z-index: 2;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-20px);
    }
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 500px;
    position: relative;
    z-index: 3;
}

.hero-service-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.hero-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.hero-service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.hero-service-card:hover::before {
    transform: scaleX(1);
}

.hero-service-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.hero-service-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    color: var(--primary);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.hero-service-card:hover .hero-service-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 80%);
    color: white;
    transform: rotate(10deg);
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.scroll-down:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.scroll-down span {
    margin-bottom: 0.5rem;
}

.scroll-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.scroll-icon i {
    color: var(--primary);
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* Features */
.features {
    padding: var(--section-padding);
    background-color: white;
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(42,92,170,0.03) 0%, rgba(42,92,170,0) 20%),
        radial-gradient(circle at 80% 70%, rgba(255,127,80,0.03) 0%, rgba(255,127,80,0) 20%);
    pointer-events: none;
}

.features-intro {
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 3rem 2.5rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42,92,170,0.03) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    transition: height 0.5s ease;
    border-top-left-radius: var(--card-radius);
    border-bottom-left-radius: var(--card-radius);
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

.feature-card:hover::after {
    height: 100%;
}

.feature-icon {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border-radius: 16px;
    background: var(--light-bg);
    color: var(--primary);
    position: relative;
    transition: all 0.5s ease;
}

.feature-card:hover .feature-icon {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 80%);
    box-shadow: 0 15px 30px rgba(42,92,170,0.2);
    transform: scale(1.1) rotate(10deg);
}

/* Philosophy */
.philosophy {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.philosophy::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(-30deg);
    z-index: 1;
}

.philosophy-intro {
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.philosophy-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--card-radius);
    padding: 3rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.philosophy-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42,92,170,0.03) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
}

.philosophy-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: width 0.5s ease;
    border-bottom-left-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}

.philosophy-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

.philosophy-item:hover::after {
    width: 100%;
}

.philosophy-item h3 {
    position: relative;
    padding-left: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.philosophy-icon {
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.5s ease;
}

.philosophy-item:hover .philosophy-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 80%);
    color: white;
    transform: rotate(10deg);
    box-shadow: 0 10px 20px rgba(42,92,170,0.2);
}

/* BSD Advantage Section */
.bsd-advantage {
    padding: var(--section-padding);
    background: white;
    position: relative;
}

.bsd-advantage::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 30% 70%, rgba(1, 58, 132, 0.05) 0%, rgba(1, 58, 132, 0) 50%);
    pointer-events: none;
}

.bsd-intro {
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
}

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

.bsd-item {
    background: white;
    border-radius: var(--card-radius);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.bsd-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(180deg, var(--bsd-blue) 0%, var(--primary) 100%);
    transition: height 0.5s ease;
    border-top-right-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}

.bsd-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

.bsd-item:hover::after {
    height: 100%;
}

.bsd-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--bsd-blue);
    font-weight: bold;
    transition: all 0.3s ease;
}

.bsd-item:hover .bsd-logo {
    transform: scale(1.1);
}

.bsd-item h3 {
    margin-bottom: 1.2rem;
    color: var(--bsd-blue);
}

.bsd-item p {
    color: var(--text-light);
}

.bsd-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.bsd-item:hover .bsd-tag {
    background: var(--primary);
    color: white;
}

/* Testimonial */
.testimonial {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff 100%);
    position: relative;
}

.testimonial-quote {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 4rem;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 30px;
    font-size: 150px;
    font-family: Georgia, serif;
    line-height: 1;
    background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.2;
}

.quote-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text);
    font-style: italic;
}

.quote-source {
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-top: 0.5rem;
}

.quote-company {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* About */
.about {
    padding: var(--section-padding);
    background: white;
    position: relative;
}

.about-intro {
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto 5rem;
    position: relative;
    padding: 4rem;
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.about-content::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 30px;
    font-size: 150px;
    font-family: Georgia, serif;
    line-height: 1;
    background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.2;
}

.team-heading {
    text-align: center;
    margin-bottom: 4rem;
}

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

.team-member {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.team-member:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.team-member-img-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
}

.team-member-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center; /* Mostra la parte superiore dell'immagine */
    transition: var(--transition);
    transform: scale(1.05);
}

.team-member:hover .team-member-img {
    transform: scale(1);
}

.team-member-img-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.team-member-content {
    padding: 2.5rem;
    position: relative;
}

.team-member h3 {
    margin-bottom: 0.5rem;
}

.team-member-role {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
    letter-spacing: 0.02em;
}

.bsd-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.8rem 0;
    box-shadow: 0 10px 20px rgba(42,92,170,0.15);
    transition: all 0.3s ease;
}

.bsd-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(42,92,170,0.25);
}

/* Blog Section */
.blog-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff 100%);
    position: relative;
    text-align: center;
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(42,92,170,0.05) 0%, rgba(42,92,170,0) 50%);
    pointer-events: none;
}

.blog-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.blog-section .btn {
    margin-top: 2rem;
}

/* Contact */
.contact {
    padding: var(--section-padding);
    background: white;
    position: relative;
}

.contact-intro {
    max-width: 800px;
    margin: 0 auto 5rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: white;
    padding: 3.5rem;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

.contact-form:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

input, textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--secondary);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42,92,170,0.1);
    background: white;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    background: white;
    padding: 3.5rem;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

.contact-info:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.contact-info h3 {
    margin-bottom: 1.8rem;
    position: relative;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-info h3 i {
    font-size: 1.4rem;
    color: var(--accent);
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 50px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.contact-details {
    margin-bottom: 2.5rem;
}

.contact-details p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-details i {
    color: var(--primary);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.contact-details strong {
    color: var(--text);
    font-weight: 600;
}

/* Privacy Summary */
.privacy-summary {
    margin-top: 5rem;
    background: white;
    padding: 3.5rem;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

.privacy-summary:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.privacy-summary h3 {
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 0.8rem;
    position: relative;
}

.privacy-summary h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.privacy-item {
    margin-bottom: 2.5rem;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    background: var(--secondary);
}

.privacy-item:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.privacy-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    cursor: pointer;
}

.privacy-title i {
    color: var(--accent);
    font-size: 1.2rem;
}

.privacy-content {
    padding-left: 2rem;
    border-left: 3px solid var(--border);
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: white;
    padding: 7rem 0 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-heading {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: white;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 50px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 1.5px;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a, .footer-contact a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover, .footer-contact a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links i, .footer-contact i {
    color: var(--accent);
    font-size: 0.8rem;
}

.footer-contact p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-contact i {
    color: var(--primary-light);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.footer-contact strong {
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

/* Decorative Elements */
.shape {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.shape-1 {
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(42,92,170,0.05) 0%, rgba(42,92,170,0) 70%);
    border-radius: 50%;
    animation: pulse-shape 15s infinite alternate ease-in-out;
}

.shape-2 {
    bottom: 10%;
    right: 5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,127,80,0.05) 0%, rgba(255,127,80,0) 70%);
    border-radius: 50%;
    animation: pulse-shape 12s 2s infinite alternate-reverse ease-in-out;
}

@keyframes pulse-shape {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0.2;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2.5rem;
}

.accent-text {
    color: var(--accent);
}

.primary-text {
    color: var(--primary);
}

.bold {
    font-weight: 700;
}

/* Media Queries */
@media (max-width: 1200px) {
    h1 {
        font-size: 3.5rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Rimuoviamo order: -1 per mantenere l'illustrazione dopo il contenuto */
    /* Aggiungiamo padding ridotto per l'illustrazione su mobile */
    .hero-illustration {
        padding-top: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    :root {
        --section-padding: 5rem 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .features-grid, .philosophy-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.7rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1.5rem 0;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
        z-index: 1000;
        gap: 1.5rem;
    }

    .menu.active {
        height: auto;
    }

    .menu li {
        margin: 0 2rem;
    }

    /* Rendi la sezione hero più compatta su mobile */
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 3rem;
    }
    
    /* Riduci lo spazio tra il contenuto e l'illustrazione */
    .hero-grid {
        gap: 2rem;
    }
    
    /* Facciamo apparire le card più compatte su mobile */
    .hero-services {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .hero-service-card {
        min-height: 100px;
        padding: 1.2rem;
    }
    
    /* Riduciamo spazio tra i feature box */
    .hero-feature {
        margin-bottom: 1rem;
    }
    
    /* Rendiamo il hero content più compatto */
    .hero-tagline {
        margin-bottom: 1rem;
    }
    
    h1 {
        margin-bottom: 1rem;
    }
    
    /* Riduciamo l'altezza del bottone "scroll down" e spostiamolo */
    .scroll-down {
        bottom: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    .contact-form,
    .contact-info,
    .about-content,
    .privacy-summary {
        padding: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 4rem 1.5rem;
    }

    h1 {
        font-size: 2.3rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 20px;
    }

    .feature-card,
    .philosophy-item {
        padding: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-services {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .hero-service-card {
        min-height: auto;
        padding: 1rem;
    }
    
    .hero-service-title {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-service-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* Aggiungi queste regole alla fine del tuo file styles.css */

/* Fix per testi troppo lunghi */
body {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix per gli indirizzi email e URL */
a {
    word-break: break-all;
}

/* Migliore spaziatura per elementi di contatto su mobile */
@media (max-width: 768px) {
    .contact-details p {
        flex-wrap: wrap;
    }

    .contact-details i {
        margin-bottom: 0.3rem;
    }

    .footer-contact p {
        flex-wrap: wrap;
    }

    /* Riduci le dimensioni del testo su mobile per email lunghe */
    .contact-details a,
    .footer-contact a {
        font-size: 0.95rem;
    }

    /* Assicurati che nessun elemento abbia posizione fissa indesiderata */
    .features, .services, section {
        position: relative !important;
        z-index: 1;
    }

    /* Assicurati che il menu mobile si chiuda correttamente */
    .menu.active {
        position: absolute;
        z-index: 1001;
    }
}

/* Correggi la visualizzazione degli indirizzi email su dispositivi molto piccoli */
@media (max-width: 480px) {
    .contact-details a,
    .footer-contact a {
        font-size: 0.9rem;
        display: inline-block;
        width: 100%;
        margin-top: 0.2rem;
    }
}

/* Comprehensive Mobile Fixes */
@media (max-width: 768px) {
  /* Fix root issues */
  html, body {
    width: 100%;
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Override any inline styles that might be causing position issues */
  section[style*="position"] {
    position: relative !important;
  }

  /* Fix container width and prevent overflow */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow-x: visible;
    box-sizing: border-box;
  }

  /* Clear any fixed position for non-header elements */
  section, .features, .philosophy, .bsd-advantage, .about, .testimonial, .contact, .blog-section {
    position: relative !important;
    width: 100% !important;
    overflow: hidden;
    z-index: 1 !important;
  }

  /* Ensure proper grid behavior on mobile */
  .hero-grid, .features-grid, .philosophy-grid, .bsd-grid, .team-grid, .contact-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  /* Improve padding for better mobile experience */
  .feature-card, .philosophy-item, .bsd-item, .contact-form, .contact-info {
    padding: 2rem !important;
  }

  /* Fix form elements */
  input, textarea, button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* Additional fixes for very small screens */
@media (max-width: 480px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.7rem !important; }

  .hero-services {
    grid-template-columns: 1fr !important;
  }

  .hero-service-card {
    min-height: auto !important;
  }
}

@media (max-width: 768px) {
  /* Fix for persistent "Services" heading */
  header + section h2,
  .services,
  h2:first-child,
  nav + h2,
  section:first-of-type h2 {
    position: static !important;
    top: auto !important;
    z-index: 1 !important;
  }

  /* Ensure mobile menu fully closes */
  .menu {
    height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  .menu.active {
    height: auto !important;
    padding: 1.5rem 0 !important;
  }

  /* Fix z-index and stacking contexts */
  #header {
    z-index: 1000;
  }

  section {
    z-index: 1;
  }
}
