/* GENESIS - Unified Stylesheet - Nero, Bianco, Rosso */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #FFFFFF;
    --black: #1D1D1F;
    --black-light: #2C2C2E;
    --gray: #86868B;
    --gray-light: #F5F5F7;
    --gray-dark: #E8E8ED;
    --red: #FF3B30;
    --red-dark: #D70015;
    --red-light: #FF6B6B;
    --blue: #0047FF;
}

/* Ensure gray-light and gray-dark are available everywhere */
.gray-light {
    background: var(--gray-light);
}

.gray-dark {
    border-color: var(--gray-dark);
}

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 20px 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-dark);
    font-size: 14px;
    margin-top: 78px;
    /* Account for fixed nav height */
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 8px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb .current {
    color: var(--black);
    font-weight: 600;
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 16px 0;
        font-size: 12px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

/* NAVIGATION */
nav:not(.breadcrumb) {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 19px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--black);
    text-decoration: none;
    display: flex;
    align-items: center;
}

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

.nav-links {
    display: flex;
    gap: 48px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--red);
    font-weight: 600;
}

/* LANGUAGE SWITCHER */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--gray-dark);
}

.lang-switcher a {
    color: var(--gray);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-switcher a:hover {
    color: var(--red);
    background: rgba(255, 59, 48, 0.08);
}

.lang-switcher a.lang-active {
    color: var(--black);
    background: var(--gray-light);
}

.lang-divider {
    color: var(--gray-dark);
    font-size: 12px;
}

/* DROPDOWN MENU */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown>a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 20px 0;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 20px;
    border: 1px solid var(--gray-dark);
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 30px;
    color: var(--black);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: var(--gray-light);
    color: var(--red);
    border-left-color: var(--red);
    padding-left: 35px;
}

.dropdown-menu a:first-child {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.dropdown-menu a:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.cta-nav {
    background: var(--red);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--red);
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.cta-nav:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 59, 48, 0.4);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
}

/* HERO SECTIONS */
.hero {
    padding: 140px 0 100px;
    background: var(--black);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.hero h1 {
    font-size: 100px;
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.03em;
    margin-bottom: 30px;
    color: var(--white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    opacity: 1;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 60px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    opacity: 1;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-cta {
    opacity: 1;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-red {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}

.hero-white {
    background: var(--white);
    color: var(--black);
}

.hero-white h1 {
    color: var(--black);
}

.hero-white .hero-subtitle {
    color: var(--gray);
}

/* BUTTONS */
.btn-primary {
    background: var(--white);
    color: var(--black);
    padding: 20px 48px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--red);
    color: var(--white);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(255, 59, 48, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 20px 48px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-red {
    background: var(--red);
    color: var(--white);
    padding: 18px 48px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-red:hover {
    background: var(--red-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 59, 48, 0.35);
}

.btn-white {
    background: var(--white);
    color: var(--black);
    padding: 18px 48px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background: var(--gray-light);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.btn-black {
    background: var(--black);
    color: var(--white);
    padding: 18px 48px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-black:hover {
    background: var(--black-light);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* SECTIONS */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 64px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 80px;
    color: var(--black);
}

.section-title-white {
    color: var(--white);
}

/* GRIDS */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* CARDS */
.card {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.card-dark {
    background: var(--black);
    color: var(--white);
}

.card-gray {
    background: var(--gray-light);
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    text-align: center;
    margin-bottom: 80px;
}

/* SERVICES GRID (Bento Style) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 0 100px;
}

.service-card {
    position: relative;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    transition: background 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.service-card:hover::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.service-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 32px;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.service-card:hover .service-card-content {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.service-card p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 90%;
}

.service-card-arrow {
    width: 40px;
    height: 40px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.service-card:hover .service-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Featured/Large Cards */
.service-card.large {
    grid-column: span 2;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        height: 350px;
    }
}

.stat-number {
    font-size: 80px;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 18px;
    color: var(--gray);
    font-weight: 500;
}

.stat-label-white {
    color: rgba(255, 255, 255, 0.8);
}

/* TESTIMONIALS */
.testimonial-card {
    background: white;
    padding: 60px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-text {
    font-size: 28px;
    line-height: 1.4;
    color: var(--black);
    margin-bottom: 40px;
    font-weight: 500;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: 700;
}

.author-info h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.author-info p {
    font-size: 16px;
    color: var(--gray);
}

/* PROCESS STEPS */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 80px;
}

.step {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-dark);
}

.step:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--red);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--red);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 24px;
}

.step-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 8px;
}

.step-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.step-desc {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.6;
}

/* FAQ */
.faq {
    padding: 100px 0;
    background: var(--gray-light);
}

.faq-item {
    max-width: 800px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-dark);
}

.faq-question {
    padding: 30px 40px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--gray-light);
    color: var(--red);
}

.faq-answer {
    padding: 0 40px 30px;
    font-size: 18px;
    color: var(--gray);
    line-height: 1.6;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* For details elements, let native HTML handle display - override any display:none */
details .faq-answer {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
}

/* For non-details FAQ (old system), hide by default */
.faq-item:not(details) .faq-answer {
    display: none;
    max-height: 0;
    overflow: hidden;
}

.faq-answer.active {
    display: block;
    max-height: 500px;
    padding: 0 40px 30px;
}

.faq-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
    color: var(--red);
}

.faq-icon.active {
    transform: rotate(45deg);
}

/* CTA SECTIONS */
.cta-final {
    background: var(--black);
    color: white;
    text-align: center;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.cta-red {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}

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

.cta-final h2 {
    font-size: 80px;
    font-weight: 900;
    margin-bottom: 24px;
}

.cta-final p {
    font-size: 28px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.btn-cta {
    background: var(--white);
    color: var(--black);
    padding: 24px 64px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    background: var(--red);
    color: var(--white);
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 20px 60px rgba(255, 59, 48, 0.3);
}

/* FOOTER */
/* Footer Improvements */
footer {
    background: #111;
    color: white;
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--white);
    opacity: 0.9;
}

.footer-section a {
    display: block;
    color: #999;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    font-size: 15px;
}

.footer-section a:hover {
    color: var(--white);
    transform: translateX(5px);
    /* Subtle nudge */
    display: inline-block;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer-bottom p {
    opacity: 0.6;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--red);
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* INTERSECTION OBSERVER ANIMATIONS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

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

.bg-black {
    background: var(--black);
    color: var(--white);
}

.bg-gray {
    background: var(--gray-light);
}

.bg-red {
    background: var(--red);
    color: var(--white);
}

/* SCROLL ANIMATIONS */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* LOADING STATES */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--red);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* FOCUS STATES FOR ACCESSIBILITY */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

/* SKIP TO CONTENT LINK */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--red);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* TABLET RESPONSIVE (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .hero h1 {
        font-size: 72px;
    }

    .hero-subtitle {
        font-size: 28px;
    }

    .section-title {
        font-size: 56px;
    }

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

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Timeline Tablet Optimization */
    .timeline-item>div[style*="grid-template-columns"] {
        gap: 30px !important;
    }

    .timeline-item>div[style*="grid-template-columns"]>div[style*="font-size: 80px"] {
        font-size: 64px !important;
    }

    .timeline-item h4 {
        font-size: 22px !important;
    }
}

/* MOBILE RESPONSIVE (max-width: 768px) */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 20px;
    }

    /* Navigation */
    nav {
        padding: 8px 0;
    }

    .logo {
        font-size: 20px;
    }

    .logo img {
        height: 32px;
        max-width: 120px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        gap: 20px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links a {
        font-size: 16px;
        padding: 12px 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--gray-dark);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 28px;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .nav-item-dropdown {
        width: 100%;
    }

    .nav-item-dropdown>a {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 10px;
        margin-left: 20px;
        box-shadow: none;
        border: 1px solid var(--gray-dark);
        padding: 10px 0;
        background: var(--gray-light);
        border-radius: 12px;
        min-width: auto;
        width: calc(100% - 40px);
        display: none;
    }

    .dropdown-menu.mobile-open {
        display: block;
    }

    .dropdown-menu a {
        padding: 10px 20px;
        font-size: 14px;
        border-left: none;
    }

    .dropdown-menu a:hover {
        padding-left: 20px;
    }

    .cta-nav {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
        font-size: 16px;
        min-height: 44px;
        background: var(--red);
        border: 2px solid var(--red);
        box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
    }

    /* Hero */
    .hero {
        padding: 140px 0 80px;
    }

    .hero h1 {
        font-size: 48px;
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 20px;
        margin-bottom: 40px;
        padding: 0 10px;
    }

    .hero-cta {
        padding: 0 10px;
    }

    .cta-group {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        min-height: 48px;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 36px;
        margin-bottom: 40px;
        line-height: 1.2;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .btn-red,
    .btn-white,
    .btn-cta {
        padding: 14px 28px;
        font-size: 16px;
        min-height: 48px;
        touch-action: manipulation;
    }

    /* Cards */
    .case-card,
    .service-card,
    .testimonial-card,
    .step {
        padding: 30px 20px;
    }

    .case-title,
    .service-card-title {
        font-size: 24px;
    }

    .case-desc,
    .service-card-desc {
        font-size: 16px;
    }

    /* Process Steps */
    .process-steps {
        gap: 30px;
    }

    .step {
        padding: 30px 20px;
    }

    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .step-title {
        font-size: 20px;
    }

    .step-desc {
        font-size: 15px;
    }

    /* FAQ */
    .faq-item {
        margin-bottom: 16px;
    }

    .faq-question {
        padding: 20px;
        font-size: 18px;
        min-height: 60px;
    }

    .faq-answer {
        padding: 0 20px 20px;
        font-size: 16px;
    }

    /* Forms */
    .form {
        padding: 30px 20px;
    }

    .form h3 {
        font-size: 24px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 48px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 12px;
        /* Prevent zoom on focus iOS */
        font-size: 16px !important;
    }

    /* Prevent zoom on input focus iOS */
    @supports (-webkit-touch-callout: none) {

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        textarea,
        select {
            font-size: 16px !important;
        }
    }

    textarea {
        min-height: 120px;
    }

    /* Footer */
    footer {
        padding: 30px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        margin-bottom: 24px;
    }

    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .footer-section a,
    .footer-section p {
        font-size: 13px;
        padding: 4px 0;
        display: block;
    }

    .footer-bottom {
        display: flex;
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding-top: 20px;
        align-items: center;
    }

    .footer-bottom p {
        font-size: 11px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .footer-links {
        gap: 16px;
        margin-bottom: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-links a {
        font-size: 11px;
    }

    /* CTA Sections */
    .cta-final,
    .cta-red {
        padding: 60px 0;
    }

    .cta-final h2,
    .cta-red h2 {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .cta-content p {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Trust Bar */
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .trust-item {
        padding: 20px;
    }

    /* Partners */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-mini {
        padding: 24px;
    }

    /* Industries */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .industry-card {
        padding: 24px 16px;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }

    .case-image {
        height: 200px;
    }

    /* Process About */
    .process-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .process-card {
        padding: 30px 20px;
    }

    /* Pricing */
    .pricing-box {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .pricing-box.featured {
        transform: none;
    }

    .pricing-price {
        font-size: 48px;
    }

    /* Contact Methods */
    .contact-method {
        flex-direction: column;
        padding: 24px;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    /* Stats */
    .stat-number {
        font-size: 48px;
    }

    .stat-label {
        font-size: 14px;
    }

    /* Disable hover effects on touch devices */
    @media (hover: none) {

        .case-card:hover,
        .service-card:hover,
        .step:hover {
            transform: none;
        }
    }
}

/* SMALL MOBILE (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    nav {
        padding: 8px 0;
    }

    .logo {
        font-size: 18px;
    }

    .logo img {
        height: 28px;
        max-width: 100px;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 38px;
        line-height: 1.1;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 28px;
    }

    section {
        padding: 50px 0;
    }

    .nav-links {
        top: 60px;
        padding: 40px 24px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        border-bottom: 2px solid var(--red);
    }

    .cta-nav {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .partners-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .stats-grid {
        gap: 24px;
    }

    .stat-number {
        font-size: 40px;
    }

    .case-card,
    .service-card {
        padding: 24px 16px;
    }

    .case-title {
        font-size: 20px;
    }

    .step {
        padding: 24px 16px;
    }

    .step-title {
        font-size: 18px;
    }

    .faq-question {
        padding: 16px;
        font-size: 16px;
    }

    .faq-answer {
        padding: 0 16px 16px;
        font-size: 15px;
    }

    .form {
        padding: 24px 16px;
    }

    .pricing-box {
        padding: 24px 16px;
    }

    .pricing-price {
        font-size: 40px;
    }

    .cta-final h2,
    .cta-red h2 {
        font-size: 28px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-red,
    .btn-white,
    .btn-cta {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* LANDSCAPE MOBILE */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .nav-links {
        max-height: calc(100vh - 60px);
    }
}

/* TOUCH DEVICE OPTIMIZATIONS */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects */
    .case-card:hover,
    .service-card:hover,
    .step:hover,
    .industry-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Active states instead of hover */
    .case-card:active,
    .service-card:active {
        transform: scale(0.98);
    }
}

/* HIGH DPI DISPLAYS */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* PREVENT TEXT SELECTION ON MOBILE (for better UX) */
@media (max-width: 768px) {

    button,
    .btn-primary,
    .btn-secondary,
    .btn-red,
    .btn-white,
    .btn-cta,
    .cta-nav {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Better tap highlight */
    a {
        -webkit-tap-highlight-color: rgba(255, 59, 48, 0.1);
    }
}

/* PERFORMANCE OPTIMIZATIONS */
@media (max-width: 768px) {

    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }

    /* Optimize transforms */
    .case-card,
    .service-card,
    .step {
        will-change: transform;
    }

    /* Reduce backdrop filter on mobile */
    nav {
        backdrop-filter: blur(10px);
    }
}

/* SAFE AREA INSETS FOR NOTCH DEVICES */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .container {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
        }

        nav {
            padding-top: max(16px, env(safe-area-inset-top));
        }

        .hero {
            padding-top: max(140px, calc(140px + env(safe-area-inset-top)));
        }
    }
}

/* ONE-PAGE SPECIFIC STYLES */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.terminal-preloader {
    font-family: 'Courier New', monospace;
    color: #0f0;
    font-size: 16px;
    line-height: 1.8;
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

.terminal-line {
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
}

.terminal-line.visible {
    opacity: 1;
    animation: typewriter 0.8s steps(40) forwards;
}

.terminal-version {
    opacity: 0;
    color: #666;
    margin-top: 20px;
    text-align: right;
}

.terminal-version.visible {
    opacity: 1;
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-text {
    font-size: 18px;
    margin-bottom: 20px;
}

#preloaderProgress {
    width: 300px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

#preloaderProgress::-webkit-progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

#preloaderProgress::-webkit-progress-value {
    background: var(--red);
    border-radius: 2px;
}

/* Case Studies */
/* Case Studies Grid - Optimized Sizing */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Changed from 2 to 3 for smaller cards */
    gap: 25px;
    /* Reduced gap */
    margin-top: 40px;
}

.case-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.case-image {
    position: relative;
    height: 220px;
    /* Reduced from 300px+ */
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.case-content {
    padding: 24px;
    /* Increased from 20px */
}

.case-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    /* Slightly larger padding */
    border-radius: 20px;
    font-size: 13px;
    /* Increased from 12px */
    font-weight: 700;
    /* Bolder */
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.case-client {
    font-size: 14px;
    /* Increased from 13px */
    color: var(--gray);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Increased spacing */
    font-weight: 600;
}

.case-content h3 {
    font-size: 21px;
    /* Increased from 18px */
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.35;
    color: var(--black);
}

.case-metrics {
    display: flex;
    flex-direction: column;
    /* Stack for better readability */
    gap: 8px;
    margin-bottom: 24px;
    font-size: 15px;
    /* Increased from 13px */
    color: var(--black);
    /* Fixed contrast: was gray-dark */
    background: #f5f5f7;
    /* Slightly darker background for contrast */
    padding: 16px;
    /* Increased padding */
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.case-metrics .metric strong {
    color: var(--red);
    font-weight: 700;
}

.case-view-btn,
.case-video-btn {
    background: var(--black);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.case-view-btn:hover,
.case-video-btn:hover {
    background: var(--red);
    transform: translateY(-2px);
}

.badge-in-arrivo {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.7);
    }
}

.case-coming-soon {
    opacity: 0.95;
    position: relative;
}

.case-coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-radius: 24px;
    z-index: 1;
    pointer-events: none;
}

/* Servizi Accordion */
.servizi-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.servizio-item {
    margin-bottom: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--gray-dark);
    overflow: hidden;
}

.servizio-header {
    width: 100%;
    padding: 30px 40px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.servizio-header:hover {
    background: var(--gray-light);
}

.servizio-header h3 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.servizio-badge {
    background: var(--red);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.servizio-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
    color: var(--red);
}

.servizio-header[aria-expanded="true"] .servizio-icon {
    transform: rotate(45deg);
}

.servizio-content {
    padding: 0 40px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.servizio-content[style*="display: block"] {
    max-height: 1000px;
    padding: 0 40px 30px;
}

.servizio-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.servizio-content li {
    margin-bottom: 8px;
}

.calcola-roi-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.calcola-roi-btn:hover {
    background: var(--red);
}

.roi-calculator {
    margin-top: 20px;
    padding: 20px;
    background: var(--gray-light);
    border-radius: 12px;
}

.roi-calculator input,
.roi-calculator select {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    font-size: 14px;
}

.roi-result {
    margin-top: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    color: var(--red);
}

.link-download {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}

/* Verticali Tabs */
.verticali-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--gray-dark);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.verticale-content {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: var(--gray-light);
    border-radius: 24px;
}

.verticale-content.active {
    display: block;
}

.verticale-content h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
}

.verticale-content ul {
    list-style: none;
    padding: 0;
}

.verticale-content li {
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--gray-dark);
}

.verticale-content li:last-child {
    border-bottom: none;
}

.verticale-content a {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}

/* Processo Steps */
.processo-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.processo-step {
    background: white;
    padding: 40px;
    border-radius: 24px;
    border: 2px solid var(--gray-dark);
    text-align: center;
    transition: all 0.3s ease;
}

.processo-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border-color: var(--red);
}

.step-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 8px;
}

.step-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.processo-step h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.processo-step ul {
    text-align: left;
    margin: 16px 0;
    padding-left: 24px;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-dark);
    overflow: hidden;
}

.faq-question {
    padding: 20px 24px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    list-style: none;
    /* Hide default triangle */
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--black);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: var(--red);
    transition: transform 0.3s ease;
    line-height: 1;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--gray);
    line-height: 1.6;
    font-size: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: -10px;
    /* Pull closer to title */
    padding-top: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-answer button {
    background: var(--blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
}

/* Contatti */
.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.contatti-form {
    background: var(--gray-light);
    padding: 40px;
    border-radius: 24px;
}

.contatti-form h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
}

.contatti-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--black);
    font-size: 14px;
    margin-top: 20px;
}

.contatti-form input,
.contatti-form select,
.contatti-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.contatti-form input:focus,
.contatti-form select:focus,
.contatti-form textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    /* Apple-like focus ring */
}

/* Error state styled by JS */
.contatti-form input.error,
.contatti-form select.error,
.contatti-form textarea.error {
    border-color: var(--red);
    background: rgba(255, 59, 48, 0.05);
}

.contatti-form input[type="range"] {
    padding: 0;
    margin-bottom: 8px;
}

#budget-display {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.contatti-info {
    padding: 40px;
}

.contatti-info h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
}

.contatti-info p {
    margin-bottom: 16px;
    font-size: 16px;
}

.badges-contatti {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.badges-contatti a {
    display: block;
    padding: 16px;
    background: var(--gray-light);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--black);
    font-weight: 600;
    transition: all 0.3s ease;
}

.badges-contatti a:hover {
    background: var(--red);
    color: white;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--black);
    color: white;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
}

.cookie-content a {
    color: var(--red);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
}

.btn-accept,
.btn-reject {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-accept {
    background: var(--red);
    color: white;
}

.btn-reject {
    background: white;
    color: var(--black);
}

/* Chi Siamo Section */
.chi-siamo-content {
    max-width: 1000px;
    margin: 0 auto;
}

.founder-story {
    margin-bottom: 60px;
}

.founder-story h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--red);
}

.founder-story>p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--gray);
}

.timeline {
    position: relative;
    padding: 0;
    margin-top: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--red);
    z-index: 1;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    padding: 0;
    scroll-margin-top: 100px;
    /* Smooth scroll offset */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInTimeline 0.6s ease forwards;
}

/* Stagger animation delay for each timeline item */
.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeInTimeline {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    margin-top: -12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--red);
    border: 4px solid white;
    box-shadow: 0 0 0 3px var(--red), 0 4px 12px rgba(255, 59, 48, 0.3);
    z-index: 2;
    transition: all 0.3s ease;
}

/* Accessibility: Focus state for timeline items */
.timeline-item:focus-within::before {
    box-shadow: 0 0 0 4px var(--red), 0 6px 20px rgba(255, 59, 48, 0.5);
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

.timeline-item:hover::before {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 0 3px var(--red), 0 6px 16px rgba(255, 59, 48, 0.5);
}

.timeline-year {
    font-size: 24px;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 12px;
    display: inline-block;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-content h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--black);
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-content h4 {
    color: var(--red);
}

.timeline-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray);
}

.team-section,
.mission-section {
    margin-top: 60px;
    padding: 40px;
    background: var(--gray-light);
    border-radius: 24px;
}

.team-section h3,
.mission-section h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
}

.team-section ul {
    list-style: none;
    padding: 0;
}

.team-section li {
    padding: 12px 0;
    font-size: 16px;
    line-height: 1.6;
    border-bottom: 1px solid var(--gray-dark);
}

.team-section li:last-child {
    border-bottom: none;
}

.mission-section p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.mission-section p:last-child {
    font-size: 20px;
    font-weight: 700;
    color: var(--red);
    margin-top: 24px;
}

/* Floating CTA Mobile */
/* Floating CTA Mobile - Removed */
.floating-cta-mobile {
    display: none !important;
}

.floating-cta-mobile a {
    display: none !important;
}

.floating-cta-mobile a:hover {
    display: none !important;
}

@media (max-width: 768px) {
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .servizio-header {
        padding: 20px;
        font-size: 18px;
    }

    .servizio-content {
        padding: 0 20px 20px !important;
    }

    .verticali-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .processo-steps {
        grid-template-columns: 1fr;
    }

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

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    /* Floating CTA removed - do not display */

    /* Case Study Pages Mobile */
    .case-hero {
        padding: 60px 0 !important;
    }

    .case-hero h1 {
        font-size: 32px !important;
    }

    .case-hero .meta {
        flex-direction: column;
        gap: 20px;
    }

    .case-content-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .case-sidebar {
        position: static !important;
        margin-top: 40px;
    }

    .case-main-content h2 {
        font-size: 24px !important;
    }

    .case-main-content p {
        font-size: 16px !important;
    }

    /* Chi Siamo Mobile */
    .founder-story>div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }

    .founder-story img {
        width: 150px !important;
        height: 150px !important;
        margin-bottom: 20px;
    }

    .founder-story>div[style*="display: flex"]>div {
        min-width: 100% !important;
    }

    /* Timeline Mobile - Hide timeline line on homepage */
    .timeline {
        padding: 0;
        margin-top: 30px;
    }

    .timeline::before {
        /* Hide red line on mobile for homepage */
        display: none;
    }

    .timeline-item::before {
        /* Hide timeline dots on mobile */
        display: none;
    }

    .timeline-item {
        margin-bottom: 40px;
    }

    .timeline-item .timeline-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        /* Restore some gap */
        padding: 0 10px;
    }

    .timeline-item .timeline-grid>div {
        width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        /* Ensure no extra padding */
    }

    /* Force Image to be SECOND (order: 2) */
    .timeline-image {
        order: 2 !important;
        margin-bottom: 0 !important;
        margin-top: 16px !important;
        /* Add space between text and image */
    }

    /* Force Text to be FIRST (order: 1) */
    .timeline-text {
        order: 1 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }


    .timeline-year {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .timeline-item h4 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .timeline-item p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        padding: 0 8px;
    }
}

/* EXTRA SMALL MOBILE (max-width: 480px) */
@media (max-width: 480px) {

    /* Timeline Extra Small Mobile - Keep hidden */
    .timeline::before {
        display: none;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-item>div[style*="grid-template-columns"] {
        padding: 0 12px !important;
        gap: 12px !important;
    }

    .timeline-item>div[style*="grid-template-columns"]>div[style*="font-size: 80px"] {
        font-size: 48px !important;
    }

    .timeline-year {
        font-size: 18px !important;
    }

    .timeline-item h4 {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }

    .timeline-item p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    /* Founder intro section */
    .founder-story img {
        width: 120px !important;
        height: 120px !important;
    }

    .founder-story h3 {
        font-size: 24px !important;
    }

    .founder-story p {
        font-size: 14px !important;
    }
}

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

@media (max-width: 768px) {

    /* Improved hero section spacing */
    .hero-content {
        padding: 0 16px;
    }

    /* Better service cards spacing */
    .service-list {
        gap: 16px;
    }

    .service-item {
        padding: 20px 16px;
    }

    /* Better list padding inside cards */
    .step ul,
    .processo-step ul,
    .verticale-content ul {
        padding-left: 20px;
        margin: 0;
    }

    .step li,
    .processo-step li,
    .verticale-content li {
        margin-bottom: 8px;
        font-size: 15px;
        line-height: 1.5;
    }

    /* Improved dropdown menu on mobile */
    .dropdown-menu {
        margin-left: 0;
        width: 100%;
        border-radius: 8px;
    }

    .dropdown-menu a {
        padding: 12px 16px;
    }

    /* Better case study card */
    .case-card {
        border-radius: 16px;
    }

    .case-card img {
        border-radius: 12px;
    }

    /* Processo steps mobile */
    .processo-step {
        padding: 24px 20px;
        text-align: left;
    }

    .processo-step .step-number {
        margin-bottom: 12px;
    }

    .processo-step h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    /* Tab buttons mobile */
    .tab-btn {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 8px;
    }

    /* Better spacing for chi siamo sections */
    .team-section,
    .mission-section {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .team-section h3,
    .mission-section h3 {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .team-section ul {
        padding-left: 20px;
    }

    .team-section li {
        margin-bottom: 12px;
        font-size: 15px;
        line-height: 1.6;
    }

    /* Better contact page spacing */
    .contact-option {
        padding: 24px 20px;
    }

    .contact-info-grid {
        gap: 20px;
    }

    /* Better article/blog spacing */
    article {
        padding: 0 16px;
    }

    article h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    article h3 {
        font-size: 20px;
    }

    article p {
        font-size: 16px;
        line-height: 1.7;
    }

    article ul,
    article ol {
        padding-left: 24px;
    }

    article li {
        margin-bottom: 8px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {

    /* Extra small mobile refinements */
    .hero h1 {
        font-size: 32px;
        padding: 0 8px;
    }

    .hero-subtitle {
        font-size: 16px;
        padding: 0 8px;
    }

    .section-title {
        font-size: 26px;
        padding: 0 8px;
    }

    /* Compact buttons on very small screens */
    .btn-primary,
    .btn-red,
    .btn-cta {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    /* Better stats on small mobile */
    .stat-number {
        font-size: 36px;
    }

    .stat-label {
        font-size: 13px;
    }

    /* Compact processo steps */
    .processo-step {
        padding: 20px 16px;
    }

    .processo-step .step-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    /* AI Widget Mobile Fix */
    @media (max-width: 768px) {

        elevenlabs-convai,
        #elevenlabs-convai-widget,
        .elevenlabs-convai-widget {
            transform: scale(0.8);
            transform-origin: bottom right;
            bottom: 15px !important;
            right: 15px !important;
            z-index: 99 !important;
        }

        /* Ensure breadcrumbs don't overflow */
        .breadcrumb ol {
            flex-wrap: nowrap;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 5px;
        }

        .breadcrumb li {
            flex-shrink: 0;
            white-space: nowrap;
        }
    }
}


/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;

    /* 4. Stats Bar */
    .stats-bar {
        background: white;
        padding: 40px 0;
        margin-top: -60px;
        /* Overlap hero */
        position: relative;
        z-index: 10;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        margin-bottom: 60px;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
        text-align: center;
    }

    .stat-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0 20px;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
    }

    .stat-item:last-child {
        border-right: none;
    }

    .stat-number {
        font-size: 36px;
        font-weight: 900;
        color: var(--red);
        line-height: 1;
    }

    .stat-label {
        font-size: 14px;
        color: var(--gray);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    @media (max-width: 768px) {
        .stats-bar {
            margin-top: 0;
            margin-bottom: 40px;
            border-radius: 0;
            border: none;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .stats-grid {
            grid-template-columns: 1fr 1fr;
            /* 2x2 on mobile */
            gap: 20px;
        }

        .stat-item {
            border-right: none;
            padding: 20px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 12px;
        }
    }

    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

/* Apply animation to cards automatically */
.service-card,
.bento-card,
.case-card {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.services-grid>*:nth-child(1),
.features-bento>*:nth-child(1),
.cases-grid>*:nth-child(1) {
    animation-delay: 0.1s;
}

.services-grid>*:nth-child(2),
.features-bento>*:nth-child(2),
.cases-grid>*:nth-child(2) {
    animation-delay: 0.2s;
}

.services-grid>*:nth-child(3),
.features-bento>*:nth-child(3),
.cases-grid>*:nth-child(3) {
    animation-delay: 0.3s;
}

.services-grid>*:nth-child(4),
.features-bento>*:nth-child(4),
.cases-grid>*:nth-child(4) {
    animation-delay: 0.4s;
}

.services-grid>*:nth-child(5),
.features-bento>*:nth-child(5),
.cases-grid>*:nth-child(5) {
    animation-delay: 0.5s;
}

.services-grid>*:nth-child(6),
.features-bento>*:nth-child(6),
.cases-grid>*:nth-child(6) {
    animation-delay: 0.6s;
}

/* Utility: Desktop Only */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}