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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.animate {
    opacity: 1;
}

.section.animate.fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.section.animate.slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.section.animate.slide-right {
    animation: slideInRight 0.8s ease-out forwards;
}

/* ===== Base Styles ===== */
:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #1e293b;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --lighter-gray: #f1f5f9;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --overlay: rgba(0, 0, 0, 0.7);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Spacing */
    --container-padding: 1.5rem;
    --section-padding: 5rem 0;
    --gap: 1.5rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --transition-fast: all 0.15s ease;
}

/* Stili per la sezione di testo */
.text-section {
    width: 100vw;
    max-width: 100%;
    margin: 0;
    padding: 2rem 5%;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: var(--secondary);
}

/* Assicura che il contenuto non superi mai la larghezza dello schermo */
.text-section p {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    text-align: center;
}

/* Media query per dispositivi mobili */
@media (max-width: 768px) {
    .text-section {
        padding: 1.5rem 1rem;
    }
    
    .text-section p {
        padding: 0;
        text-align: left;
        max-width: 100%;
    }
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--secondary);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

p {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.section-padding {
    padding: 6rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
}

/* Video Background */
.video-background {
    position: relative;
    width: 100%;
    height: 50vh; /* Metà dell'altezza dello schermo */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

#bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100%;
    min-width: 100%;
    object-fit: cover;
    object-position: center top; /* Mostra la parte superiore del video */
    z-index: -1;
}

/* Video Embed */
.video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100%;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    transform: translate(-50%, -50%);
}

/* Nuova sezione sotto il video */
.content-section {
    padding: 4rem 0;
    background-color: #ffffff;
    color: #333;
}

.content-section h2 {
    color: #2563eb;
    margin-bottom: 1.5rem;
}

.content-section p {
    color: #4b5563;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content {
    position: absolute;
    bottom: 5%;
    left: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 1rem;
    color: white;
    left: 2%;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.1;
    color: #FFFFFF !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-left: 0;
    padding-left: 1%;
}

.hero .subtitle {
    font-size: 1.8rem;
    margin-bottom: 0;
    max-width: 700px;
    color: #FFFFFF !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    margin-left: 0;
    padding-left: 1%;
    font-weight: 400;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    margin-top: 3rem;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ff6b00;
    color: white;
    border: 2px solid #ff6b00;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Logo Fisso */
.fixed-logo {
    position: fixed;
    top: 1rem;
    left: 2rem;
    z-index: 1100;
    transition: all 0.3s ease;
    max-width: 80%;
}

.fixed-logo .logo-img {
    height: 60px;
    width: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.fixed-logo:hover .logo-img {
    transform: scale(1.05);
}

/* Adjust logo for smaller screens */
@media (max-width: 1024px) {
    .fixed-logo {
        left: 1rem;
    }
    
    .fixed-logo .logo-img {
        height: 60px;
    }
}

@media (max-width: 768px) {
    .fixed-logo .logo-img {
        height: 50px;
    }
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 2rem; /* Increased padding from 1.5rem to 2rem to add 10px height */
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transform: translateY(-100%);
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    justify-content: flex-end;
    align-items: center; /* Center items vertically */
}

#main-header.visible {
    transform: translateY(0);
    height: 85px;
}

#main-header .container {
    display: contents;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1001;
    margin-left: auto; /* Spinge il logo a destra */
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Navigation */
.main-nav {
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    gap: 3rem; /* Increased gap between nav items */
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
    align-items: center; /* Center items vertically */
}

.main-nav a {
    color: #333;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    text-decoration: none;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 30px;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

/* Stile per i trattini del menu */
.menu-toggle span {
    display: block;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 3px;
    width: 100%;
}

.menu-toggle span:nth-child(2) {
    width: 80%;
}

.menu-toggle span:nth-child(3) {
    width: 60%;
}

/* Stile quando il menu è attivo */
.menu-toggle.active span {
    background-color: #333;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
    width: 100%;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu-toggle span:nth-child(2) {
    width: 80%;
}

.menu-toggle span:nth-child(3) {
    width: 60%;
}

.menu-toggle.active span {
    width: 100%;
    background-color: #333;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
    width: 100%;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
    position: relative;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%),
                url('1.jpg') no-repeat center center/cover;
    color: white;
    padding: 8rem 0;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    top:6%;
    transition: opacity 0.6s ease, transform 0.6s ease;
    left: 2%;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    h1 {
        font-size: 2.75rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
}

/* Menu Toggle - Nascosto di default */
.menu-toggle {
    display: none; /* Nascosto di default */
    opacity: 0; /* Assicura che sia completamente trasparente */
    visibility: hidden; /* Nasconde l'elemento */
    pointer-events: none; /* Disabilita gli eventi del mouse */
    position: fixed;
    right: 20px;
    top: 50px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.menu-toggle span {
    display: block;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 3px;
    width: 100%;
}

.menu-toggle span:nth-child(2) {
    width: 80%;
}

.menu-toggle span:nth-child(3) {
    width: 60%;
}

/* Nascondi completamente la navbar sotto i 992px */
@media (max-width: 992px) {
    /* Nascondi il menu toggle */
    .menu-toggle,
    .main-nav,
    .nav-container,
    nav,
    #main-navigation {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
    
    /* Assicurati che l'header non occupi spazio */
    #main-header {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
}

/* Stili per schermi molto piccoli (opzionale) */
@media (max-width: 773px) {
    .menu-toggle {
        display: none !important; /* Assicurati che sia nascosto */
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        padding: 80px 2rem 2rem;
        z-index: 1000;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .main-nav a {
        font-size: 1.2rem;
        padding: 0.75rem 0;
        display: block;
        width: 100%;
    }
    
    /* Overlay per il menu */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    
    .overlay.active {
        display: block;
        opacity: 1;
    }
    
    .hero {
        padding: 7rem 0 5rem;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
        margin: 0 auto 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.5rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .cta-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
}

/* Services Section */
.services {
    background-color: var(--lighter-gray);
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

.section-description {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    height: 100%;
    opacity: 0.05;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.service-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.service-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.service-link i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--primary-dark);
}

.service-link:hover i {
    transform: translateX(5px);
}

/* About Section */
.about {
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content {
    padding-right: 2rem;
}

.about-text {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-features {
    margin: 2rem 0;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.feature i {
    color: var(--success);
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.feature span {
    color: var(--dark);
    font-weight: 500;
}

.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--lighter-gray) 0%, #e6f0ff 100%);
    position: relative;
    overflow: hidden;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 3rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-info {
    background: var(--primary);
    color: white;
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 1;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40h-40z' fill='%232563eb' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
    z-index: -1;
}

.contact-info h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
}

.info-item {
    display: flex;
    margin-bottom: 1.75rem;
    align-items: flex-start;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 1.25rem;
    color: white;
}

.info-content h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.info-content a, 
.info-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    transition: var(--transition);
}

.info-content a:hover {
    color: white;
    text-decoration: underline;
}

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

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

.social-links a:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

.contact-form {
    padding: 3rem 2.5rem;
}

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

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    color: var(--gray);
    pointer-events: none;
    transition: var(--transition);
    background: white;
    padding: 0 0.5rem;
    transform-origin: left center;
}

.form-group.focused label,
.form-group.filled label {
    transform: translateY(-1.75rem) scale(0.9);
    color: var(--primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.error-message {
    display: none;
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--danger);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
}

.checkbox-group label {
    position: static;
    transform: none;
    padding: 0;
    color: var(--gray);
    font-size: 0.95rem;
    cursor: pointer;
}

.privacy-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #1e3a8a;
    color: #ffffff;
    padding: 5rem 0 0;
    position: relative;
    border-top: 1px solid #1e40af;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-logo img {
    margin-bottom: 1.5rem;
    max-width: 180px;
}

.footer-about {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #1e40af;
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: #1e3a8a;
    color: white;
    transform: translateY(-3px);
}

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

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

.footer-links a {
    color: #4b5563;
    transition: var(--transition);
    display: inline-block;
    padding: 0.25rem 0;
    position: relative;
    text-decoration: none;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: var(--transition);
    color: var(--primary);
}

.footer-links a:hover {
    color: #1e40af;
    transform: translateX(5px);
    text-decoration: underline;
}

.footer-links a:hover::before {
    opacity: 1;
    left: -15px;
}

.newsletter-form .form-group {
    position: relative;
    margin-bottom: 0;
}

.newsletter-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: var(--transition);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-form .btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 40px;
    height: calc(100% - 8px);
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-form .btn i {
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: #4b5563;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal a {
    color: #1e40af;
    font-size: 0.85rem;
    margin: 0 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-legal a:hover {
    color: white;
}

.footer-legal span {
    color: rgba(255, 255, 255, 0.3);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-content {
        padding-right: 0;
        order: 2;
        text-align: left;
    }
    
    .about-image {
        order: 1;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .contact-form {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

p {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-description {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Header */
header {
    position: fixed;
    top: -100px; /* Start off-screen */
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: top 0.3s ease-in-out;
}

header.visible,
header.force-visible {
    top: 0;
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

.logo-img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

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

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding-top: 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto 40px;
}

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

.services h2, .contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-color);
}

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

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.service-card p {
    color: var(--light-text);
    line-height: 1.7;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--background);
}

.form-group {
    margin-bottom: 25px;
}

input, textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

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

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Buttons */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 50px 0 20px;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto; /* Spinge il logo a destra */
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

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

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Mobile menu styles */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .logo-img {
        height: 35px;
    }
    
    .menu-toggle {
        display: flex;
        order: -1;
        margin-right: 15px;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--background);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        padding: 80px 30px 30px;
        z-index: 1000;
        overflow-y: auto;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    nav a {
        display: block;
        padding: 10px 0;
        font-size: 1.1rem;
    }
    
    nav a::after {
        display: none;
    }
    
    .hero {
        padding-top: 100px;
        text-align: left;
    }
    
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        text-align: left;
    }
    
    .services, .contact {
        padding: 80px 0;
    }
    
    .services h2, .contact h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .cta-button {
        width: 100%;
    }
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ===== Mobile Layout ===== */
@media (max-width: 992px) {
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .about-content {
        order: 1;
        padding-right: 0 !important;
        text-align: left;
    }
    
    .about-images {
        order: 2;
        flex-direction: column !important;
        align-items: center;
        gap: 1.5rem !important;
    }
    
    .about-images img {
        width: 100% !important;
        max-width: 400px !important;
    }
    
    /* Situations Section */
    .situations-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .situations-content {
        order: 1;
    }
    
    .situations-image {
        order: 2;
        margin: 0 auto;
        max-width: 400px;
    }
    
    /* Additional Services Section */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .services-content {
        order: 1;
    }
    
    .services-image {
        order: 2;
        margin: 0 auto;
        max-width: 400px;
    }
    
    /* Testo centrato su mobile */
    .situations-content,
    .services-content {
        text-align: center !important;
    }
    
    /* Aggiusta la spaziatura per il testo */
    .situations-content div,
    .services-content div {
        margin-bottom: 1rem;
        line-height: 1.8 !important;
    }
    
    /* Contatti */
    #contatti .container > div {
        text-align: center !important;
    }
    
    /* Sezioni con immagini */
    .section-with-image {
        display: flex;
        flex-direction: column;
    }
    
    .section-content {
        order: 1;
        max-width: 75%;
    }
    
    .section-image {
        order: 2;
        margin: 2rem auto 0;
        max-width: 100%;
        width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    /* Sezione Chi sono - Solo mobile */
    .mobile-about {
        display: none; /* Nascosta di default */
    }
    
    @media (max-width: 768px) {
        .mobile-about {
            display: block;
            padding: 2rem 1rem;
            background-color: #fff;
            text-align: left;
        }
        
        .mobile-about h2 {
            color: #000;
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
            text-align: left;
            padding-left: 0;
        }
        
        .mobile-about p {
            color: #333;
            line-height: 1.8;
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
            text-align: left;
            padding-left: 0;
            white-space: pre-line;
        }
    }
    
    /* Stile specifico per l'immagine 9 */
    .additional-services .services-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem !important;
        box-sizing: border-box !important;
    }
    
    .additional-services .services-image {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    
    .additional-services .services-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        padding: 0 !important;
        display: block !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        border-radius: 15px !important;
    }
    
    .additional-services .services-content {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
}
