/* Ripristino il file allo stato originale, rimuovendo tutte le modifiche recenti. */

:root {
    --primary: #d32f2f; /* Rosso aziendale */
    --primary-light: #e53935; /* Rosso chiaro per hover */
    --accent: #b71c1c; /* Rosso scuro per enfasi */
    --bg: #f8f9fa; /* Grigio chiaro per sfondi */
    --bg-dark: #ececec; /* Grigio medio per sezioni */
    --text: #181a1b; /* Nero per testi principali */
    --text-light: #6c757d; /* Grigio per testi secondari */
    --white: #fff;
    --black: #181a1b;
    --shadow: 0 4px 20px 0 rgba(30,41,59,0.12);
    --shadow-hover: 0 12px 40px 0 rgba(211,47,47,0.20);
    --radius: 20px;
    --radius-large: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    --gradient-secondary: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --gradient-accent: linear-gradient(135deg, #ffeaea 0%, #f8f9fa 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(211,47,47,0.9) 0%, rgba(183,28,28,0.8) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(211,47,47,0.95) 0%, rgba(183,28,28,0.85) 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* =====================
   GLOBAL BACKGROUND IMPROVEMENTS
   ===================== */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    background-attachment: fixed;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(211,47,47,0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(211,47,47,0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    will-change: auto;
}

main {
    position: relative;
    z-index: 1;
    padding: 0;
}

/* =====================
   ELEGANT SECTION SPACING SYSTEM
   ===================== */
.section-padding {
    padding: 80px 0;
}

/* Spaziatura elegante tra sezioni */
.about-section,
.services-section,
.portfolio-section,
.partner-section {
    position: relative;
}

.about-section::before,
.services-section::before,
.portfolio-section::before,
.partner-section::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(211,47,47,0.4) 25%, 
        rgba(211,47,47,0.6) 50%, 
        rgba(211,47,47,0.4) 75%, 
        transparent 100%);
    border-radius: 2px;
    opacity: 0.6;
}

/* Spaziatura interna delle sezioni */
.about-section .container,
.services-section .container,
.portfolio-section .container,
.partner-section .container {
    padding: 60px 24px;
}

/* Separatori decorativi */
.section-divider {
    height: 60px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-divider::before {
    content: '';
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(211,47,47,0.3) 50%, 
        transparent 100%);
    border-radius: 1px;
}

.section-divider::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(211,47,47,0.4);
}

/* =====================
   HERO SECTION (INDEX)
   ===================== */
.hero-section {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg, #f8fafc);
    border-radius: 18px;
    box-shadow: 0 2px 16px 0 rgba(30,41,59,0.08);
    margin: 0;
}

.swiper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.swiper-slide {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white, #fff);
    text-align: center;
    height: auto;
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    border-radius: 18px;
    box-shadow: 0 2px 16px 0 rgba(30,41,59,0.08);
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30,41,59, 0.45);
    z-index: 0;
    border-radius: 18px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 32px 24px;
    box-sizing: border-box;
    margin: 9% auto;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
}

.hero-content h1 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18), 0 1px 0 #fff;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18), 0 1px 0 #fff;
}

.hero-content .btn {
    margin: 10px;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--white, #fff) !important;
    --swiper-navigation-size: 30px;
    transition: color 0.2s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: var(--primary, #2563eb) !important;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background 0.2s;
}

.swiper-pagination-bullet-active {
    background: var(--primary, #2563eb);
    width: 12px;
    height: 12px;
}

/* =====================
   ABOUT SECTION (CHI SIAMO)
   ===================== */
.about-section {
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 25%, 
        #ffeaea 50%, 
        #f8f9fa 75%, 
        #ffffff 100%);
    border-radius: var(--radius-large);
    box-shadow: 
        0 8px 32px rgba(30,41,59,0.12),
        0 4px 16px rgba(211,47,47,0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
    margin: 0;
    border: 1px solid rgba(211,47,47,0.12);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(211,47,47,0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(211,47,47,0.02) 0%, transparent 40%);
    pointer-events: none;
}

.about-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--primary-light) 25%, 
        var(--accent) 50%, 
        var(--primary-light) 75%, 
        var(--primary) 100%);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 60px;
}

.about-video {
    margin: 0 auto 40px auto;
    flex: 1;
    position: relative;
    padding-top: 36.25%;
    padding-right: 64.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-large);
    box-shadow: 
        0 12px 40px rgba(40,40,60,0.18),
        0 4px 16px rgba(211,47,47,0.12),
        inset 0 1px 0 rgba(255,255,255,0.9);
    max-width: 600px;
    border: 2px solid rgba(211,47,47,0.15);
    position: relative;
}

.about-video::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--primary) 0%, 
        var(--primary-light) 25%, 
        var(--accent) 50%, 
        var(--primary-light) 75%, 
        var(--primary) 100%);
    border-radius: var(--radius-large);
    z-index: -1;
    opacity: 0.3;
}

.about-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-large);
    transition: transform 0.3s ease;
}

.about-text {
    flex: 2;
    font-size: 1.18em;
    color: var(--text-light, #64748b);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    border-radius: var(--radius-large);
    padding: 40px 48px;
    box-shadow: 
        0 8px 32px rgba(30,41,59,0.12),
        0 4px 16px rgba(211,47,47,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9);
    border: 2px solid rgba(211,47,47,0.12);
    position: relative;
    line-height: 1.8;
}

.about-text::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--primary-light) 25%, 
        var(--accent) 50%, 
        var(--primary-light) 75%, 
        var(--primary) 100%);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
}

.about-text h2 {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 32px;
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--accent) 50%, 
        var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    position: relative;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--primary-light) 50%, 
        var(--primary) 100%);
    border-radius: 2px;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    text-align: center;
    margin-top: 60px;
}

.milestone-item {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    border-radius: var(--radius-large);
    box-shadow: 
        0 8px 32px rgba(30,41,59,0.12),
        0 4px 16px rgba(211,47,47,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9);
    padding: 44px 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(211,47,47,0.12);
    position: relative;
    overflow: hidden;
}

.milestone-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--primary-light) 25%, 
        var(--accent) 50%, 
        var(--primary-light) 75%, 
        var(--primary) 100%);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.milestone-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(211,47,47,0.02) 0%, 
        rgba(211,47,47,0.01) 50%, 
        rgba(211,47,47,0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.milestone-item:hover {
    box-shadow: 
        0 16px 48px rgba(30,41,59,0.15),
        0 8px 24px rgba(211,47,47,0.12),
        inset 0 1px 0 rgba(255,255,255,1);
    transform: translateY(-12px) scale(1.03);
    border-color: var(--primary);
}

.milestone-item:hover::before {
    transform: scaleX(1);
}

.milestone-item:hover::after {
    opacity: 1;
}

.milestone-item h3 {
    color: var(--primary, #d32f2f);
    font-size: 2.6em;
    margin-bottom: 0.4em;
    font-weight: 800;
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--accent) 50%, 
        var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.milestone-item p {
    font-size: 1.15em;
    color: var(--text-light, #64748b);
    font-weight: 600;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* =====================
   SERVICES SECTION (INDEX)
   ===================== */
/* Modal e popup per i servizi */
#serviceModal {
    display: none;
}

.open-modal {
    cursor: pointer;
}

.lead-text {
    font-size: 1.18em;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.7;
}
.services-section {
    background: linear-gradient(135deg, 
        #ffeaea 0%, 
        #f8f9fa 30%, 
        #ffffff 70%, 
        #ffeaea 100%);
    border-radius: var(--radius-large);
    box-shadow: 
        0 4px 24px rgba(30,41,59,0.08),
        0 1px 4px rgba(211,47,47,0.05);
    margin: 0;
    border: 1px solid rgba(211,47,47,0.08);
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(211,47,47,0.02) 0%, transparent 40%);
    pointer-events: none;
}

.services-section h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 48px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
    text-align: center;
    padding: 24px 0;
}

.service-item {
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    padding: 56px 40px 48px 40px;
    transition: all var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px) scale(1.01);
    border: 2px solid var(--primary);
    z-index: 2;
    background: linear-gradient(135deg, #fff 0%, #fefefe 100%);
}

.service-item h3 {
    font-size: 1.7em;
    margin-bottom: 14px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.service-item p {
    color: var(--text-light);
    font-size: 1.08em;
    margin-bottom: 18px;
}

.service-item .icon-large {
    font-size: 2.8em;
    color: var(--primary);
    margin-bottom: 18px;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.service-item:hover .icon-large {
    color: var(--accent);
    transform: scale(1.1) rotate(-3deg);
}

/* =====================
   PORTFOLIO SECTION
   ===================== */
.portfolio-section {
    background: linear-gradient(135deg, 
        #f8f9fa 0%, 
        #ffeaea 30%, 
        #ffffff 70%, 
        #f8f9fa 100%);
    border-radius: var(--radius-large);
    box-shadow: 
        0 4px 24px rgba(30,41,59,0.08),
        0 1px 4px rgba(211,47,47,0.05);
    margin: 0;
    border: 1px solid rgba(211,47,47,0.08);
    position: relative;
    overflow: hidden;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(211,47,47,0.02) 0%, transparent 40%);
    pointer-events: none;
}

.portfolio-section h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 48px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    background: var(--white);
}

.portfolio-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: all var(--transition);
    border-radius: var(--radius);
}

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--white, #fff);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 32px 18px 22px 18px;
    font-size: 1.08em;
    border-radius: 14px;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.portfolio-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.05) saturate(1.1);
    filter: blur(4px);
}

.overlay h3 {
    color: var(--white, #fff);
    margin-bottom: 10px;
    font-size: 1.8em;
    font-weight: 700;
}

.overlay p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--white, #fff);
}

.view-project {
    color: var(--primary, #d32f2f);
    border: 1px solid var(--primary, #d32f2f);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.95em;
    background: var(--white, #fff);
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.view-project:hover {
    background-color: var(--primary, #d32f2f);
    color: var(--white, #fff);
}

/* =====================
   PARTNER SECTION
   ===================== */
.partner-section {
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 30%, 
        #ffeaea 70%, 
        #ffffff 100%);
    border-radius: var(--radius-large);
    border-radius: var(--radius-large);
    box-shadow: 
        0 4px 24px rgba(30,41,59,0.08),
        0 1px 4px rgba(211,47,47,0.05);
    margin: 0;
    border: 1px solid rgba(211,47,47,0.08);
    position: relative;
    overflow: hidden;
}

.partner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(211,47,47,0.01) 0%, transparent 40%);
    pointer-events: none;
}

.partner-section h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 48px;
}

/* Partner Carousel */
.partner-carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    padding: 40px 20px;
}

.partner-carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.partner-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.partner-carousel-slide {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    min-width: 100%;
    padding: 20px;
}

.partner-carousel-logo {
    width: 100px;
    height: 70px;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: var(--radius);
    padding: 12px;
    background: var(--white);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 4px rgba(211,47,47,0.05);
    border: 1px solid rgba(211,47,47,0.08);
}

.partner-carousel-logo:hover {
    transform: scale(1.08);
    box-shadow: 
        0 4px 16px rgba(211, 47, 47, 0.2),
        0 2px 8px rgba(30,41,59,0.1);
}

/* Carousel Navigation */
.partner-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.partner-carousel-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(211, 47, 47, 0.2),
        0 1px 4px rgba(30,41,59,0.1);
}

.partner-carousel-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
    box-shadow: 
        0 4px 12px rgba(211, 47, 47, 0.3),
        0 2px 8px rgba(30,41,59,0.15);
}

.partner-carousel-btn i {
    font-size: 16px;
}

/* Carousel Dots */
.partner-carousel-dots {
    display: flex;
    gap: 8px;
}

.partner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.partner-dot.active {
    background: var(--primary);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(211,47,47,0.3);
}

.partner-dot:hover {
    background: var(--primary-light);
}

/* =====================
   BUTTONS IMPROVEMENTS - REPLICATED FROM SCUOLA SALDATURA
   ===================== */
.btn-text {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 1.05em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-text::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 0%;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: width 0.35s cubic-bezier(.4,0,.2,1), left 0.35s cubic-bezier(.4,0,.2,1);
}

.btn-text:hover,
.btn-text:focus {
    color: var(--white);
    text-decoration: underline;
}

.btn-text:hover::before,
.btn-text:focus::before {
    width: 100%;
    left: 0;
}

/* Replica estetica pulsanti dalla scuola di saldatura */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.btn, .btn-primary, .btn-secondary, .btn-outline {
    padding: 16px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1em;
    transition: all var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 
        0 2px 8px rgba(211,47,47,0.2),
        0 1px 4px rgba(30,41,59,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 16px rgba(211,47,47,0.3),
        0 2px 8px rgba(30,41,59,0.15);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 16px rgba(211,47,47,0.2),
        0 2px 8px rgba(30,41,59,0.1);
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */
@media (max-width: 600px) {
    html, body, main, .container, section, .swiper, .swiper-wrapper, .swiper-slide {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    body {
        font-size: 15px;
    }
    
    /* Centraggio verticale per mobile */
    .about-section,
    .services-section,
    .portfolio-section,
    .partner-section,
    .main-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .about-section .container,
    .services-section .container,
    .portfolio-section .container,
    .partner-section .container,
    .main-footer .container {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    /* Layout centrato per footer su mobile */
    .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .footer-about,
    .footer-links,
    .footer-contact {
        text-align: center;
        width: 100%;
    }
    
    /* Spaziatura mobile ottimizzata */
    .about-section .container,
    .services-section .container,
    .portfolio-section .container,
    .partner-section .container {
        padding: 40px 16px;
    }
    
    .about-section::before,
    .services-section::before,
    .portfolio-section::before,
    .partner-section::before {
        width: 60px;
        height: 2px;
        top: -20px;
    }
    
    .section-divider {
        height: 40px;
    }
    
    .section-divider::before {
        width: 60px;
    }
    
    .hero-content {
        margin: 46% auto;
    }
    
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .about-video {
        max-width: 100vw;
        aspect-ratio: 16/9;
        height: auto;
        margin: 0 auto 24px auto;
    }
    
    .about-video video {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        display: block;
    }
    
    .about-text {
        padding: 24px 20px;
        font-size: 1.1em;
    }
    
    .about-text h2 {
        font-size: 2.2rem;
        margin-bottom: 24px;
    }
    
    .about-text h2::after {
        width: 40px;
        height: 2px;
    }
    
    .milestones-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
    }
    
    .milestone-item {
        padding: 28px 20px;
    }
    
    .milestone-item h3 {
        font-size: 2.2em;
    }
    
    .milestone-item p {
        font-size: 1.1em;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .milestones-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .service-item {
        padding: 18px 4vw 18px 4vw;
        border-radius: 12px;
    }
    
    .service-item h3 {
        font-size: 1.15em;
    }
    
    .service-item .icon-large {
        font-size: 2em;
    }
    
    .portfolio-item,
    .milestone-item {
        padding: 24px 20px;
    }
    
    .about-text {
        padding: 24px 20px;
    }
    
    .partner-carousel-container {
        padding: 20px 10px;
    }
    
    .partner-carousel-slide {
        gap: 20px;
        padding: 15px;
    }
    
    .partner-carousel-logo {
        width: 80px;
        height: 60px;
    }
    
    .partner-carousel-nav {
        gap: 15px;
    }
    
    .partner-carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .modal {
        width: 100vw !important;
        left: 0 !important;
        overflow-x: hidden !important;
    }
    
    .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 12px 4vw !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
        font-size: 0.95em;
    }
}

@media (max-width: 900px) {
    .services-grid {
        gap: 28px;
        padding: 10px 0;
    }
    
    .service-item {
        padding: 32px 12px 28px 12px;
    }
    
    /* Centraggio per tablet */
    .about-section,
    .services-section,
    .portfolio-section,
    .partner-section,
    .main-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .about-section .container,
    .services-section .container,
    .portfolio-section .container,
    .partner-section .container,
    .main-footer .container {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    /* Spaziatura tablet ottimizzata */
    .about-section .container,
    .services-section .container,
    .portfolio-section .container,
    .partner-section .container {
        padding: 50px 20px;
    }
    
    .about-section::before,
    .services-section::before,
    .portfolio-section::before,
    .partner-section::before {
        width: 70px;
        top: -25px;
    }
}

@media (max-width: 480px) {
    /* Centraggio per schermi molto piccoli */
    .about-section,
    .services-section,
    .portfolio-section,
    .partner-section,
    .main-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-height: auto;
    }
    
    .about-section .container,
    .services-section .container,
    .portfolio-section .container,
    .partner-section .container,
    .main-footer .container {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 30px 12px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .partner-carousel-slide {
        gap: 15px;
        padding: 10px;
    }
    
    .partner-carousel-logo {
        width: 70px;
        height: 50px;
    }
    
    .partner-carousel-dots {
        gap: 6px;
    }
    
    .partner-dot {
        width: 10px;
        height: 10px;
    }
    
    /* Typography adjustments for mobile */
    h1 {
        font-size: 2.1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Responsive: barra più sottile su mobile */
    .about-section::before,
    .services-section::before,
    .portfolio-section::before,
    .partner-section::before {
        height: 5px;
    }
}

/* =====================
   MODAL E POPUP
   ===================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(30,41,59,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white, #fff);
    margin: auto;
    padding: 30px;
    border: 1px solid #e5e7eb;
    width: 80%;
    max-width: 1000px;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(30,41,59,0.13);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.modal-content h3 {
    color: var(--primary, #d32f2f);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 800;
}

.modal-content p {
    line-height: 1.8;
    color: var(--text, #1e293b);
    font-size: 1.1em;
    margin-bottom: 20px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary, #d32f2f);
    text-decoration: none;
}

/* =====================
   ANIMATIONS AND TRANSITIONS
   ===================== */
/* Animazione rallentata per hamburger menu */
.menu-toggle .bar {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.menu-toggle.active .bar:nth-child(1) {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.menu-toggle.active .bar:nth-child(2) {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.menu-toggle.active .bar:nth-child(3) {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animazione di entrata personalizzata per le card */
[data-aos="fade-right"] { transition: all 0.6s cubic-bezier(.4,0,.2,1); }
[data-aos="fade-up"] { transition: all 0.6s cubic-bezier(.4,0,.2,1); }
[data-aos="fade-left"] { transition: all 0.6s cubic-bezier(.4,0,.2,1); }
[data-aos="zoom-in"] { transition: all 0.7s cubic-bezier(.4,0,.2,1); }

/* Animazioni specifiche per la sezione Chi Siamo */
@keyframes milestonePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.milestone-item {
    animation: milestonePulse 3s ease-in-out infinite;
    animation-delay: calc(var(--animation-order, 0) * 0.5s);
}

.milestone-item:nth-child(1) { --animation-order: 0; }
.milestone-item:nth-child(2) { --animation-order: 1; }
.milestone-item:nth-child(3) { --animation-order: 2; }

.service-item,
.portfolio-item,
.milestone-item {
    animation: fadeInUp 0.6s ease-out;
}

.service-item:nth-child(odd) {
    animation: slideInLeft 0.6s ease-out;
}

.service-item:nth-child(even) {
    animation: slideInRight 0.6s ease-out;
}

/* =====================
   DARK MODE COMPATIBILITY
   ===================== */
body,
body.darkmode,
body.darkmode .main-header,
body.darkmode .main-footer,
body.darkmode .section-padding,
body.darkmode .bg-light,
body.darkmode .btn,
body.darkmode .btn-primary,
body.darkmode .btn-secondary,
body.darkmode .btn-outline,
body.darkmode .service-item,
body.darkmode .milestone-item,
body.darkmode .portfolio-item .overlay,
body.darkmode .about-text,
body.darkmode .about-video,
body.darkmode .icon-large,
body.darkmode .footer-about,
body.darkmode .footer-links,
body.darkmode .footer-contact,
body.darkmode .social-links a,
body.darkmode input,
body.darkmode textarea,
body.darkmode select,
body.darkmode h1,
body.darkmode h2,
body.darkmode h3,
body.darkmode .about-text h2,
body.darkmode .hero-content h1,
body.darkmode .service-item h3,
body.darkmode .milestone-item h3,
body.darkmode .portfolio-item .overlay h3 {
    transition: background 0.6s, color 0.6s;
}

/* =====================
   TYPOGRAPHY IMPROVEMENTS
   ===================== */
h1 {
    font-size: 3.2rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.4rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.7rem;
    line-height: 1.4;
}



/* =====================
   SECTIONS TOP RED BAR & OPAQUE BACKGROUND
   ===================== */
.section-with-topbar {
    background: #fff !important;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(30,41,59,0.10), 0 4px 16px rgba(211,47,47,0.08);
    position: relative;
    margin: 0;
    border: 1px solid rgba(211,47,47,0.10);
    overflow: hidden;
}
.section-with-topbar::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 8px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    z-index: 2;
}

/* Applica la classe alle sezioni principali */
.about-section {
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 25%, 
        #ffeaea 50%, 
        #f8f9fa 75%, 
        #ffffff 100%) !important;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(30,41,59,0.10), 0 4px 16px rgba(211,47,47,0.08);
    position: relative;
    margin: 0;
    border: 1px solid rgba(211,47,47,0.10);
    overflow: hidden;
}

.services-section {
    background: linear-gradient(135deg, 
        #ffeaea 0%, 
        #f8f9fa 30%, 
        #ffffff 70%, 
        #ffeaea 100%) !important;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(30,41,59,0.10), 0 4px 16px rgba(211,47,47,0.08);
    position: relative;
    margin: 0;
    border: 1px solid rgba(211,47,47,0.10);
    overflow: hidden;
}

.portfolio-section {
    background: linear-gradient(135deg, 
        #f8f9fa 0%, 
        #ffeaea 30%, 
        #ffffff 70%, 
        #f8f9fa 100%) !important;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(30,41,59,0.10), 0 4px 16px rgba(211,47,47,0.08);
    position: relative;
    margin: 0;
    border: 1px solid rgba(211,47,47,0.10);
    overflow: hidden;
}

.partner-section {
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8f9fa 30%, 
        #ffeaea 70%, 
        #ffffff 100%) !important;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(30,41,59,0.10), 0 4px 16px rgba(211,47,47,0.08);
    position: relative;
    margin: 0;
    border: 1px solid rgba(211,47,47,0.10);
    overflow: hidden;
}
.about-section::before,
.services-section::before,
.portfolio-section::before,
.partner-section::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 8px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    z-index: 2;
}



/* Rimuovi solo i pattern di sfondo dalle sezioni principali */
.about-section::after,
.services-section::after,
.portfolio-section::after,
.partner-section::after {
    display: none !important;
}

/* =====================
   MODERN ENHANCEMENTS
   ===================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
.btn:focus,
.service-item:focus,
.portfolio-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Improved text selection */
::selection {
    background: var(--primary);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary);
    color: var(--white);
}

/* Enhanced loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity var(--transition);
}

/* Optimized hover effects */
.service-item:hover,
.portfolio-item:hover,
.milestone-item:hover {
    will-change: transform;
}

/* Improved typography */
.hero-content h1,
.about-text h2,
.services-section h2,
.portfolio-section h2,
.partner-section h2 {
    font-feature-settings: "liga" 1, "kern" 1;
}

/* Optimized shadows */
.service-item,
.portfolio-item,
.milestone-item {
    /* Removed filter for better performance */
}

/* Optimized transitions */
a, button {
    transition: all var(--transition);
}

.service-item, .portfolio-item, .milestone-item {
    transition: transform var(--transition), box-shadow var(--transition);
}

/* Optimized glass effects */
.service-item {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Enhanced button animations */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(211,47,47,0.25);
}

/* Improved section spacing */
.section-padding {
    padding: 100px 0;
}



/* Enhanced mobile experience */
@media (max-width: 768px) {
    .hero-content {
        padding: 32px 24px;
        margin: 20px;
    }
    
    .service-item,
    .portfolio-item {
        margin: 0 16px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

/* Performance optimizations */
.service-item,
.portfolio-item,
.milestone-item {
    contain: layout style;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
