/* ============================================
   VARIABILI CSS
============================================ */
:root {
    --primary: #1a365d;
    --primary-dark: #0f2744;
    --primary-light: #e8eff5;
    --secondary: #1a1a2e;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #888888;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border: #e0e0e0;
    --green: #22c55e;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
    --header-height: 60px;
    --touch-target: 48px;

    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
}

/* ============================================
   RESET & BASE
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
    /* Optimize font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Improve text readability */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: none;
    text-size-adjust: none;
    /* Font loading strategy */
    font-display: swap;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

/* Better text selection on mobile */
::selection {
    background: var(--primary-light);
    color: var(--primary);
}

/* Smooth scroll for iOS 13+ */
@supports (padding: max(0px)) {
    html {
        scroll-padding-top: max(80px, env(safe-area-inset-top));
    }
}

/* Safe area support for notched devices */
@supports (padding: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
    }

    .mobile-menu {
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .modal-content {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

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

ul {
    list-style: none;
}

/* ============================================
   CONTAINER
============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    user-select: none;
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
    font-display: swap;
}

/* Touch feedback for mobile */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
}

.btn-primary {
    background: linear-gradient(135deg, #2a5298 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e4a7c 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.42);
}

.btn-primary:active {
    transform: translateY(0);
    background: var(--primary-dark);
}

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

.btn-white:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-white:active {
    transform: translateY(0);
}

/* White button with blue text (for header) */
.header .btn-white {
    color: var(--primary);
    font-weight: 600;
}

.header .btn-white:hover {
    color: var(--primary-dark);
}

.btn-large {
    padding: 16px 36px;
    font-size: 17px;
    min-height: 56px;
}

/* ============================================
   HEADER
============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header.hidden {
    transform: translateY(-100%);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 130px;
}

.logo img {
    height: 140px;
    transition: height 0.3s ease;
}

.nav-list {
    display: flex;
    gap: 35px;
}

.nav-list a {
    font-size: 15px;
    font-weight: 500;
    color: var(--white);
    position: relative;
}

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

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

.nav-list a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: var(--white);
    border: none;
    cursor: pointer;
    padding: 10px;
    width: var(--touch-target);
    height: var(--touch-target);
    border-radius: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform-origin: center;
}

/* Hamburger to X animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    display: block;
    transform: translateY(0);
}

/* Backdrop for mobile menu */
.mobile-menu::before {
    content: '';
    display: none;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 10px;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    min-height: var(--touch-target);
    transition: all 0.2s ease;
}

.mobile-menu a:active {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-menu .mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 50px;
    margin-top: 20px;
    border-bottom: none;
    text-align: center;
    min-height: 56px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

/* ============================================
   HERO
============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(160deg, #eef4fb 0%, #f8fafc 50%, #f0f7f0 100%);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 55%;
    height: 120%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    opacity: 0.07;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -8%;
    width: 38%;
    height: 80%;
    background: linear-gradient(135deg, var(--green) 0%, #16a34a 100%);
    border-radius: 50%;
    opacity: 0.05;
    animation: float 28s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--white);
    border: 1px solid rgba(26, 54, 93, 0.12);
    padding: 7px 18px;
    border-radius: 50px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(26, 54, 93, 0.1);
    letter-spacing: 0.3px;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25); }
    50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.1); }
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--secondary);
    margin-bottom: 25px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--primary);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 10px 20px;
    background: var(--white);
    border-radius: 50px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.09);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-icon {
    color: var(--text);
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon.green-icon {
    color: var(--green);
}

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

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

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 7px 20px;
    border-radius: 50px;
    margin-bottom: 20px;
    border: 1px solid rgba(26, 54, 93, 0.12);
}

.section-header h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: clamp(16px, 2.5vw, 18px);
    color: var(--text-light);
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mobile-br {
    display: none;
}

/* ============================================
   CHI SIAMO - TEAM
============================================ */
.chi-siamo {
    background: var(--white);
}

.chi-siamo .section-header p {
    max-width: 800px;
}

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

.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border-top: 3px solid transparent;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary);
}

.team-card:active {
    transform: translateY(-5px);
}

.team-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 18px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.15);
    border: 3px solid var(--white);
    outline: 2px solid var(--primary-light);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
    line-height: 1.3;
    white-space: nowrap;
}

.team-role {
    display: block;
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 40px;
}

.team-quote {
    font-size: clamp(12px, 2vw, 13px);
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.5;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   TARGET SECTION
============================================ */
.target-section {
    background: var(--light-gray);
}

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

.target-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.target-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 15px;
}

.target-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(26, 54, 93, 0.12);
}

.target-card:active {
    transform: translateY(-2px);
    background: var(--primary-light);
}

.target-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #34d870 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.28);
}

.target-icon svg {
    width: 42px;
    height: 42px;
    color: var(--white);
}

.target-card:hover .target-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
}

.target-card p {
    font-size: 15px;
    color: var(--text-light);
}

/* ============================================
   SOLUZIONI
============================================ */
.soluzioni-section {
    background: var(--white);
}

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

.soluzione-card {
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    transition: var(--transition);
}

.soluzione-card:hover {
    background: var(--primary-light);
}

.soluzione-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.soluzione-icon svg {
    width: 35px;
    height: 35px;
    color: var(--white);
}

.soluzione-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.soluzione-subtitle {
    font-size: 16px;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
}

.soluzione-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 15px;
}

.soluzione-card ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.soluzione-card li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--text);
}

.soluzione-card li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* ============================================
   PROCESS
============================================ */
.process-section {
    background: var(--light-gray);
}

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

.process-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.process-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--green);
}

.process-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: 15px;
}

.process-number.green-number {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #34d870 0%, #16a34a 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin: 0 auto 22px;
    opacity: 1;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.38);
}

.process-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.process-card p {
    font-size: 15px;
    color: var(--text-light);
}

/* ============================================
   CTA SECTION
============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.cta-section p {
    font-size: clamp(16px, 2vw, 18px);
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 35px;
    line-height: 1.7;
}

/* ============================================
   MODAL
============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    padding: 40px 40px 20px;
    text-align: center;
}

.modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.modal-header p {
    font-size: 16px;
    color: var(--text-light);
}

.consulenza-form {
    padding: 20px 40px 40px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: var(--transition);
    min-height: var(--touch-target);
}

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

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

/* Remove iOS input styling */
.form-group input,
.form-group textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.consulenza-form .btn {
    width: 100%;
}

/* ============================================
   PROCESS CTA
============================================ */
.process-cta {
    text-align: center;
    margin-top: 50px;
    padding: 48px 40px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0f7f0 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 54, 93, 0.08);
    box-shadow: 0 2px 20px rgba(26, 54, 93, 0.06);
}

.process-cta p {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
}

.process-cta p:last-of-type {
    margin-bottom: 25px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 15px;
}

.bandi-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.bando-item {
    display: inline-block;
    padding: 8px 18px;
    background: var(--white);
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    border: 1.5px solid rgba(26, 54, 93, 0.25);
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.bando-item:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.22);
}

.bando-clickable {
    cursor: pointer;
}

/* ============================================
   BANDO MODAL
============================================ */
.bando-modal-content {
    max-width: 680px;
    padding: 0;
}

.bando-detail {
    padding: 50px 40px 40px;
}

.bando-detail h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    padding-right: 30px;
    line-height: 1.3;
}

.bando-desc {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 14px;
}

.bando-section {
    margin-top: 22px;
}

.bando-section h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 10px;
}

.bando-section ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bando-section ul li {
    font-size: 14px;
    color: var(--text);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}

.bando-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
}

.bando-investment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 22px;
}

.bando-investment-box {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.bando-investment-box span:first-child {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 6px;
}

.bando-investment-box span:last-child {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.bando-cta {
    margin-top: 30px;
    text-align: center;
}

@media (max-width: 480px) {
    .bando-detail {
        padding: 50px 20px 30px;
    }

    .bando-investment {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TEAM GRID 4
============================================ */
.team-grid-4 {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .team-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

/* ============================================
   SUCCESS STORIES
============================================ */
.success-section {
    background: var(--light-gray);
}

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

.success-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.success-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.success-image {
    aspect-ratio: 4/3;
    background: var(--primary-light);
    overflow: hidden;
}

.success-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.success-card p {
    padding: 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary);
    text-align: center;
}

/* ============================================
   NUMERI
============================================ */
.numeri-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.numeri-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 25px 25px;
    pointer-events: none;
}

.numeri-section .container {
    position: relative;
    z-index: 1;
}

.numeri-section .section-header h2,
.numeri-section .section-header p {
    color: var(--white);
}

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

.numero-card {
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.numero-value {
    font-size: 72px;
    font-weight: 800;
    color: var(--white);
    display: inline;
}

.numero-suffix {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-light);
}

.numero-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-top: 10px;
}

.numero-label.green-label {
    color: var(--green);
}

/* ============================================
   FAQ
============================================ */
.faq-section {
    background: var(--white);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--light-gray);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.faq-item:hover {
    box-shadow: var(--shadow);
}

.faq-item.active {
    background: var(--white);
    box-shadow: var(--shadow);
    border-left-color: var(--green);
}

.faq-item:active {
    background: var(--primary-light);
}

.faq-question {
    width: 100%;
    padding: 25px 30px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    min-height: var(--touch-target);
}

.faq-question span {
    font-size: 17px;
    font-weight: 600;
    color: var(--secondary);
    flex: 1;
    padding-right: 20px;
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary);
    transition: var(--transition);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 30px 25px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   FOOTER
============================================ */
.footer {
    background: var(--secondary);
    padding: 80px 0 30px;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 140px;
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a,
.footer-links li {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 15px;
}

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

.social-links a:hover {
    background: var(--green);
    transform: translateY(-2px);
}

.social-links svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    margin-left: 20px;
}

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

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .nav {
        display: none;
    }

    .header .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

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

    .target-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

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

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

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

@media (max-width: 768px) {
    :root {
        --header-height: 130px;
    }

    .header .container {
        height: var(--header-height);
    }

    .logo img {
        height: 160px;
    }


    .hero {
        padding-top: var(--header-height);
    }

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

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 30px;
    }

    .stat {
        font-size: 13px;
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 10px 16px;
    }

    .stat-icon {
        font-size: 16px;
    }

    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .mobile-br {
        display: inline;
    }

    .section-header h2 {
        font-size: 28px;
        line-height: 1.25;
    }

    .section-header p {
        font-size: 16px;
    }

    .chi-siamo .section-header p {
        font-size: 14px;
        line-height: 1.65;
    }

    .process-section .section-header h2 {
        font-size: 21px;
    }

    .team-card h3 {
        font-size: 16px;
        white-space: normal;
    }

    .team-role {
        font-size: 14px;
        min-height: auto;
    }

    .team-quote {
        font-size: 14px;
        min-height: auto;
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .target-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .process-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

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

    .process-number {
        font-size: 36px;
    }

    .process-cta {
        padding: 20px;
    }

    .process-cta p {
        font-size: 16px;
    }

    .bandi-list {
        gap: 8px;
    }

    .bando-item {
        padding: 8px 14px;
        font-size: 12px;
    }

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

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

    .numero-value {
        font-size: 36px;
    }

    .numero-suffix {
        font-size: 24px;
    }

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

    .cta-section {
        padding: 60px 0;
    }

    .cta-section h2 {
        font-size: clamp(13px, 4vw, 24px);
        white-space: nowrap;
    }

    .cta-section p {
        font-size: 16px;
    }

    .modal-content {
        max-height: 85vh;
        margin: var(--header-height) 20px 0;
    }

    .modal-header {
        padding: 30px 25px 15px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .modal-header p {
        font-size: 14px;
    }

    .consulenza-form {
        padding: 15px 25px 30px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 18px;
        font-size: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

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

    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 30px) 0 50px;
    }

    .hero h1 {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hero-stats {
        gap: 10px;
    }

    .btn-large {
        padding: 16px 24px;
        font-size: 15px;
        width: 100%;
    }

    .section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .team-card h3 {
        font-size: 15px;
    }

    .team-role {
        font-size: 13px;
    }

    .team-quote {
        font-size: 13px;
    }

    .team-card {
        padding: 25px 20px;
    }

    :root {
        --header-height: 115px;
    }

    .team-image {
        width: 95px;
        height: 95px;
    }

    .logo img {
        height: 130px;
    }

    .target-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        gap: 15px;
    }

    .target-card {
        padding: 20px 15px;
    }

    .target-icon {
        width: 60px;
        height: 60px;
    }

    .modal-header {
        padding: 25px 20px 15px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .consulenza-form {
        padding: 10px 20px 25px;
    }

    .faq-question {
        padding: 20px;
    }

    .faq-question span {
        font-size: 15px;
    }

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

    .footer {
        padding: 50px 0 25px;
    }

    .footer-bottom p {
        font-size: 13px;
    }
}

/* Target section h2 — force single line */
.target-section .section-header h2 {
    font-size: clamp(20px, 2.5vw, 28px);
    white-space: nowrap;
}

/* Process section h2 — ensure 2 lines */
.process-section .section-header h2 {
    font-size: clamp(18px, 2.2vw, 26px);
}

/* Francesco De Pascalis photo position fix */
.team-grid-4 .team-card:first-child .team-image img {
    object-fit: cover;
    object-position: 50% 25%;
    transform: scale(1.05);
}

/* Mobile overrides */
@media (max-width: 768px) {
    .target-section .section-header h2 {
        white-space: nowrap;
        font-size: clamp(13px, 4.2vw, 22px);
    }

    .footer-logo {
        height: 190px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

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

    .section-header h2 {
        font-size: 20px;
    }

}

