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

:root {
    --primary-color: #2563eb; /* Royal Blue Electric per Tech & Credibilità */
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    
    --sport-color: #16a34a; /* Verde Pickleball per Sport & Divertimento */
    --sport-hover: #15803d;
    
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --error-hover: #dc2626;
    --warning-color: #f59e0b;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-btn: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
    --shadow-btn-hover: 0 6px 20px rgba(37, 99, 235, 0.4);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Alias usati in vari punti del codice */
    --primary: var(--primary-color);
    --accent: var(--accent-color);
    --bg-muted: #f8fafc;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Home: link demo giochi in secondo piano (sotto le feature principali) */
.home-mini-games-aside {
    padding: 1.25rem 0 1.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--bg-secondary, #f8fafc);
}
.home-mini-games-aside__text {
    margin: 0 auto;
    max-width: 42rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text-secondary);
    text-align: center;
}
.home-mini-games-aside__text a {
    font-weight: 600;
    color: var(--primary-color, #16a34a);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.home-mini-games-aside__text a:hover {
    text-decoration-thickness: 2px;
}

/* Buttons - base styles apply to .btn and standalone .btn-primary/.btn-secondary */
.btn, .btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 0.6rem;
    min-height: 48px;
    letter-spacing: 0.01em;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

.btn:active, .btn-primary:active, .btn-secondary:active, .btn-danger:active {
    transform: scale(0.98);
}

.btn:focus, .btn-primary:focus, .btn-secondary:focus, .btn-danger:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-active) 100%);
    color: white;
    box-shadow: var(--shadow-btn-hover);
    transform: translateY(-2px);
}

.btn-primary:active {
    background: var(--primary-active);
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.btn-secondary:active {
    background: var(--bg-accent);
    transform: translateY(1px);
}

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

.btn-danger:hover {
    background: var(--error-hover);
    color: white;
    transform: translateY(-1px);
}

.btn-sm, .btn-primary.btn-sm, .btn-secondary.btn-sm, .btn-danger.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 40px;
    border-radius: 0.5rem;
}

.btn-xs, .btn-primary.btn-xs, .btn-secondary.btn-xs, .btn-danger.btn-xs {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 32px;
    border-radius: 0.375rem;
    gap: 0.4rem;
}

@media (max-width: 768px) {
    .btn, .btn-primary, .btn-secondary, .btn-danger {
        min-height: 44px; /* Touch target più confortevole */
    }
    .btn-xs {
        min-height: 38px;
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
    .btn-sm {
        min-height: 42px;
    }
}

.btn-export {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 32px;
    height: 32px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-weight: 500;
    width: auto !important;
}

.export-container {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.btn-export:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: none;
}

.btn.large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    min-height: 56px;
}

.btn.full-width {
    width: 100%;
}

/* CTA section: pulsante in evidenza su sfondo verde */
.btn-cta {
    background: white !important;
    color: var(--primary-color) !important;
    border: 2px solid white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-cta:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--primary-hover) !important;
    border-color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

/* Utility Classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

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

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(8px);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
    position: relative;
}

.nav-brand {
    flex-shrink: 1;
    min-width: 0;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

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

.nav-links a.is-active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-actions .user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nav-actions .user-menu-name {
    font-weight: 500;
    color: var(--text-primary);
}

.nav-actions .user-menu a.btn-secondary {
    text-decoration: none;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-actions .user-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.mobile-menu-actions .user-menu-name {
    font-weight: 500;
    padding: 0.5rem 0;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-md);
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    background: var(--bg-secondary);
    outline: none;
}

.mobile-menu-btn span {
    width: 1.5rem;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 100%;
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.mobile-menu-content {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu-content a {
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius-md);
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-content a:hover,
.mobile-menu-content a:focus {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.mobile-menu-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

/* Hero Section */
.hero {
    padding: 8rem 0;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent), 
                radial-gradient(circle at bottom left, rgba(22, 163, 74, 0.05), transparent),
                #f8fafc;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2316a34a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: "";
    position: absolute;
    bottom: 0.2rem;
    left: 0;
    width: 100%;
    height: 0.6rem;
    background: rgba(37, 99, 235, 0.1);
    z-index: -1;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
    max-width: 350px;
    width: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.active {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Hero: solo mobile – link Servizi / Piani / Chi siamo (sotto testo, sopra card) */
.hero-mobile-links {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.mobile-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-link-card:hover,
.mobile-link-card:focus {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.mobile-link-card .action-icon {
    font-size: 2rem;
}

@media (max-width: 768px) {
    .hero-mobile-links {
        display: grid;
    }
}

/* Dashboard preview (no video) */
.hero-dashboard-preview .dashboard-icons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 1rem;
}

.dashboard-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.4rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dashboard-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Nav CTA buttons – Accedi / Registrati */
.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
}

.btn-nav:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-nav-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.btn-nav-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.btn-nav-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    box-shadow: var(--shadow-btn);
}

.btn-nav-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-active) 100%);
    color: white;
    box-shadow: var(--shadow-btn-hover);
    transform: translateY(-1px);
}

.nav-actions {
    gap: 0.75rem;
}

.mobile-menu-actions .btn-nav {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
}

/* Features - Roles Grid */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.role-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

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

.role-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.role-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.role-icon {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.role-card:hover .role-icon {
    transform: scale(1.2) rotate(5deg);
}

.role-card h3 {
    margin-bottom: 0;
    color: var(--text-primary);
}

.role-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.role-features li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.role-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--sport-color);
    font-weight: bold;
}

.role-features li strong {
    color: var(--text-primary);
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

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

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

@media (max-width: 768px) {
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
    .contact-container {
        padding: 2rem 1.5rem;
    }
}

/* Features Section */
.features {
    padding: 6rem 0;
}

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

.feature-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Icona racchetta + pallina pickleball per "Gioca" / Partite */
img.icon-paddle-ball {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}
.mobile-link-card img.icon-paddle-ball { width: 2rem; height: 2rem; }
.dashboard-icon-item img.icon-paddle-ball { width: 1.5rem; height: 1.5rem; }
.role-header img.icon-paddle-ball,
.role-header .icon-paddle-ball { width: 2.5rem; height: 2.5rem; }
.feature-card img.icon-paddle-ball { width: 3rem; height: 3rem; margin-bottom: 1.5rem; }

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.feature-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sport-color);
}

/* Pricing Section */
.pricing {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
}

.pricing-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px) scale(1.01);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
    z-index: 10;
}

.pricing-card.featured:hover {
    transform: scale(1.06) translateY(-5px);
}

.plan-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plan-header h3 {
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.period {
    color: var(--text-muted);
    font-size: 1rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-column h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

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

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1000;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    /* Sopra la bottom-nav mobile (z-index 1000) */
    z-index: 1100;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: modalAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 0;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    padding: 0.5rem;
    line-height: 1;
}

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

.auth-form {
    padding: 0 1.5rem 1.5rem;
}

.payment-choice-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.payment-choice-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.payment-choice-card:has(input:checked) {
    border-color: var(--primary-color, #0d9488);
    background: rgba(13, 148, 136, 0.06);
}
.payment-choice-card input {
    margin-top: 0.25rem;
    width: auto;
}
.payment-choice-title {
    font-weight: 600;
    display: block;
    width: 100%;
}
.payment-choice-desc {
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
    display: block;
    width: 100%;
    margin-left: 1.5rem;
}
@media (max-width: 640px) {
    .payment-choice-desc { margin-left: 0; }
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #cbd5e1;
}

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

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Google Sign-In button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-google:hover {
    background: #f7f8f8;
    box-shadow: 0 1px 3px rgba(60,64,67,0.15);
}
.btn-google:active {
    background: #eee;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    gap: 0.75rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #dadce0;
}
.auth-divider span {
    color: var(--text-secondary, #6b7280);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────────────
   GUIDA — Info cards e Primi Passi (visibili su tutti i viewport)
   ────────────────────────────────────────────────────────────────── */
.info-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.info-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.step-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block;
    }

    .hero {
        padding: 4rem 0;
        text-align: center;
    }

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

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
        margin: 0 auto 2rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats {
        justify-content: center;
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

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

    .role-card {
        padding: 1.5rem;
    }

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

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

    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
    
    /* Mobile Quick Actions Grid */
    .quick-actions-mobile {
        padding: 1rem 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-light);
    }
    
    .mobile-action-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .mobile-action-card {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 1rem 0.75rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-action-card:active {
        transform: scale(0.95);
        background: var(--bg-secondary);
    }
    
    .action-icon {
        font-size: 2rem;
    }
    .mobile-action-card img.action-icon {
        width: 2rem;
        height: 2rem;
        object-fit: contain;
    }
    
    .action-label {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
        text-align: center;
    }

    /* (info-card / steps-container spostati fuori dal media query — vedi sotto) */

    .mobile-menu-btn {
        display: flex !important;
        flex-shrink: 0;
    }

    /* Bottom Navigation Bar */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-color);
        padding: 0.5rem 0;
        z-index: 1000;
        justify-content: space-around;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
        padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
    }

    /* Ottimizzazione Upload Video Mobile */
    .file-upload-area {
        padding: 1.5rem 1rem;
        min-height: 200px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(22, 163, 74, 0.1);
    }

    .file-upload-area .upload-placeholder p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .file-upload-area .upload-placeholder small {
        display: block;
        line-height: 1.4;
    }

    .file-upload-area input[type="file"] {
        font-size: 16px; /* Evita zoom su iOS al click */
    }

    .upload-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .upload-actions .btn {
        width: 100%;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        color: var(--text-secondary);
        font-size: 0.75rem;
        cursor: pointer;
        padding: 0.25rem;
        flex: 1;
    }

    .bottom-nav-item .icon {
        font-size: 1.25rem;
        min-height: 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bottom-nav-item .icon img,
    .bottom-nav-item img.icon {
        width: 1.25rem;
        height: 1.25rem;
        object-fit: contain;
        display: block;
    }

    .bottom-nav-item.active {
        color: var(--primary-color);
    }

    .main-content {
        padding-bottom: 6.5rem; /* Aumentato spazio per la bottom nav */
    }
    
    .nav-brand .logo {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features,
    .pricing,
    .cta {
        padding: 4rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions .btn {
        width: 100%;
        min-height: 52px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .hero-dashboard-preview .dashboard-icons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .dashboard-icon-item {
        padding: 0.5rem 0.35rem;
        font-size: 0.7rem;
    }
    
    .dashboard-icon {
        font-size: 1.25rem;
    }
}

/* ── Landing: engagement sections ── */
.home-steps {
    padding: 4rem 0;
    background: #fff;
}

.home-steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.home-step {
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
}

.home-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--primary-color, #16a34a);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.home-step h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.home-step p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.home-spotlight {
    padding: 5rem 0;
}

.home-spotlight--alt {
    background: var(--bg-secondary, #f8fafc);
}

.home-spotlight__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.home-spotlight__grid--reverse .home-spotlight__visual {
    order: 2;
}

.home-spotlight__grid--reverse .home-spotlight__copy {
    order: 1;
}

.home-spotlight__copy h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.home-spotlight__copy p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.home-spotlight__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.home-spotlight__bullets li {
    padding: 0.45rem 0 0.45rem 1.5rem;
    position: relative;
    color: var(--text-primary);
}

.home-spotlight__bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color, #16a34a);
    font-weight: 700;
}

.home-spotlight__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-chat-mock {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
}

.home-chat-mock__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.home-chat-mock__header img {
    width: 1.25rem;
    height: 1.25rem;
}

.home-chat-mock__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 220px;
    background: #f8fafc;
}

.home-chat-bubble {
    max-width: 88%;
    padding: 0.65rem 0.85rem;
    border-radius: 1rem;
    font-size: 0.82rem;
    line-height: 1.45;
    animation: homeChatIn 0.6s ease both;
}

.home-chat-bubble--user {
    align-self: flex-end;
    background: #dcfce7;
    color: #14532d;
    border-bottom-right-radius: 0.25rem;
    animation-delay: 0.15s;
}

.home-chat-bubble--bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-bottom-left-radius: 0.25rem;
    animation-delay: 0.45s;
}

.home-chat-bubble--bot:nth-of-type(3) { animation-delay: 0.75s; }
.home-chat-bubble--bot:nth-of-type(4) { animation-delay: 1.05s; }

.home-chat-mock__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 1rem 1rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.home-chat-chip {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

@keyframes homeChatIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-league-mock {
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 1.25rem;
    max-width: 400px;
    margin: 0 auto;
}

.home-league-mock__title {
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-league-row {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.home-league-row:last-child { border-bottom: none; }

.home-league-rank {
    font-weight: 700;
    color: var(--primary-color, #16a34a);
}

.home-league-delta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #16a34a;
}

.home-league-delta--down { color: #dc2626; }

.home-coach-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.home-coach-card {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-coach-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.home-coach-card__icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.home-trust {
    padding: 4rem 0;
    background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

.home-trust__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.home-trust-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #dcfce7;
    font-style: italic;
    color: #334155;
    line-height: 1.55;
}

.home-trust-card cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color, #16a34a);
}

.hero-actions--wrap {
    flex-wrap: wrap;
}

.btn-ghost {
    background: transparent;
    border: 1px dashed var(--border-color, #cbd5e1);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (max-width: 900px) {
    .home-steps__grid,
    .home-spotlight__grid,
    .home-coach-cards,
    .home-trust__grid {
        grid-template-columns: 1fr;
    }

    .home-spotlight__grid--reverse .home-spotlight__visual,
    .home-spotlight__grid--reverse .home-spotlight__copy {
        order: unset;
    }

    .home-spotlight {
        padding: 3rem 0;
    }
}

/* Landing: scroll reveal + navbar polish */
.home-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.home-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .home-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.navbar--scrolled {
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
}

@media (min-width: 901px) and (max-width: 1280px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.88rem;
    }

    .nav-actions .btn.large {
        padding: 0.55rem 1rem;
        font-size: 0.88rem;
    }
}

html {
    scroll-padding-top: 5rem;
}

.home-mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 190;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}

.home-mobile-cta.is-visible {
    transform: translateY(0);
}