/* ============================================================
   FitBook Master — Stile principale
   ============================================================ */

:root {
  --primary: #3b5bdb;
  --primary-dark: #2f4ac0;
  --primary-light: #4c6ef5;
  --accent: #7950f2;
  --accent-light: #9775fa;
  --bg: #ffffff;
  --bg-muted: #f8f9fa;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: var(--radius-sm);
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }

/* ---- Navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
}
.navbar-logo {
  display: flex; align-items: center; gap: .625rem;
  font-size: 1.25rem; font-weight: 800; color: var(--text); text-decoration: none;
}
.navbar-logo-icon {
  width: 36px; height: 36px; background: var(--primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1rem;
}
.navbar-nav { display: flex; align-items: center; gap: 2rem; list-style: none; }
.navbar-nav a { color: var(--text-muted); font-weight: 500; font-size: .9375rem; }
.navbar-nav a:hover { color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switcher { display: flex; align-items: center; gap: .25rem; }
.lang-btn {
  padding: .25rem .5rem; border-radius: 4px; font-size: .8125rem; font-weight: 600;
  color: var(--text-muted); background: transparent; border: none; cursor: pointer;
  transition: all var(--transition);
}
.lang-btn.active, .lang-btn:hover { background: var(--bg-muted); color: var(--primary); }
.navbar-hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.navbar-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: all var(--transition); }

/* ---- Hero ---- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b5bdb 40%, #7950f2 100%);
  padding: 120px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  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='%23ffffff' 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");
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25); border-radius: 50px;
  padding: .5rem 1.25rem; font-size: .875rem; color: rgba(255,255,255,.9);
  font-weight: 500; margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero p { color: rgba(255,255,255,.8); font-size: 1.125rem; max-width: 600px; margin: 0 auto 2.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 4rem; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,.15);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
}
.hero-stat {
  background: rgba(255,255,255,.08); padding: 1.5rem 1rem; text-align: center;
}
.hero-stat-value { font-size: 2rem; font-weight: 800; color: #fff; display: block; }
.hero-stat-label { font-size: .8125rem; color: rgba(255,255,255,.7); margin-top: .25rem; }
.wave-divider { position: absolute; bottom: -1px; left: 0; right: 0; }

/* ---- Sections ---- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-muted); }
.section-badge {
  display: inline-block; background: rgba(59,91,219,.1); color: var(--primary);
  padding: .375rem 1rem; border-radius: 50px; font-size: .8125rem; font-weight: 600;
  margin-bottom: 1rem;
}
.section-header { text-align: center; max-width: 600px; margin: 0 auto 4rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p { font-size: 1.0625rem; }

/* ---- Features Grid ---- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--primary); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.feature-card h3 { margin-bottom: .5rem; }

/* ---- Pricing ---- */
.pricing-toggle {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin-bottom: 3rem;
}
.pricing-toggle-label { font-weight: 600; color: var(--text-muted); cursor: pointer; }
.pricing-toggle-label.active { color: var(--primary); }
.toggle-switch {
  position: relative; width: 52px; height: 28px;
  background: var(--primary); border-radius: 14px; cursor: pointer;
  border: none; transition: background var(--transition);
}
.toggle-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; background: #fff; border-radius: 50%;
  transition: transform var(--transition);
}
.toggle-switch.yearly::after { transform: translateX(24px); }
.pricing-save-badge {
  background: var(--success); color: #fff; font-size: .75rem; font-weight: 700;
  padding: .25rem .625rem; border-radius: 50px;
}
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; align-items: start; }
.pricing-card {
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; position: relative; transition: all var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border-color: var(--primary); background: linear-gradient(135deg, #f0f4ff, #e8edff);
  transform: scale(1.03);
}
.pricing-popular-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: .375rem 1.25rem;
  border-radius: 50px; font-size: .8125rem; font-weight: 700; white-space: nowrap;
}
.pricing-plan-name { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; }
.pricing-plan-desc { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pricing-price { margin-bottom: 1.5rem; }
.pricing-amount { font-size: 2.5rem; font-weight: 800; color: var(--text); }
.pricing-period { font-size: .875rem; color: var(--text-muted); }
.pricing-original { font-size: .875rem; color: var(--text-light); text-decoration: line-through; }
.pricing-trial { font-size: .8125rem; color: var(--success); font-weight: 600; margin-top: .25rem; }
.pricing-features { list-style: none; margin-bottom: 2rem; }
.pricing-features li {
  display: flex; align-items: flex-start; gap: .625rem;
  padding: .5rem 0; font-size: .9375rem; border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; margin-top: .1rem; }

/* ---- Case Studies ---- */
.case-studies-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.case-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2.5rem; transition: all var(--transition);
}
.case-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.case-type { font-size: .8125rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.case-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.case-quote { font-size: 1rem; color: var(--text-muted); font-style: italic; margin-bottom: 1.5rem; line-height: 1.7; }
.case-author { font-size: .875rem; font-weight: 600; color: var(--text); }
.case-stat { display: inline-block; background: var(--primary); color: #fff; padding: .375rem 1rem; border-radius: 50px; font-size: .875rem; font-weight: 700; margin-top: 1rem; }
.case-link { display: inline-flex; align-items: center; gap: .375rem; font-size: .875rem; font-weight: 600; color: var(--primary); margin-top: .75rem; }

/* ---- FAQ ---- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; background: none; border: none; cursor: pointer;
  font-size: 1rem; font-weight: 600; color: var(--text); text-align: left;
  gap: 1rem; transition: color var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-icon { font-size: 1.25rem; flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1.25rem; color: var(--text-muted); line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }

/* ---- CTA Section ---- */
.cta-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b5bdb 50%, #7950f2 100%);
  padding: 100px 0; text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,.8); font-size: 1.125rem; margin-bottom: 2.5rem; }
.cta-note { font-size: .875rem; color: rgba(255,255,255,.6); margin-top: 1rem; }

/* ---- Footer ---- */
.footer { background: var(--bg-dark); color: rgba(255,255,255,.7); padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .navbar-logo { color: #fff; }
.footer-tagline { font-size: .9375rem; margin-top: .75rem; color: rgba(255,255,255,.5); }
.footer-col h4 { color: #fff; font-size: .9375rem; margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .625rem; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: .9375rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: .875rem; color: rgba(255,255,255,.4); }

/* ---- Auth Pages ---- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-muted); padding: 2rem; }
.auth-card { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .5rem; }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: .9375rem; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: .375rem; }
.form-control {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9375rem; color: var(--text);
  background: var(--bg); transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .8125rem; color: var(--text-muted); margin-top: .375rem; }
.form-error { font-size: .8125rem; color: var(--danger); margin-top: .375rem; }

/* ---- Alerts ---- */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .9375rem; display: flex; align-items: flex-start; gap: .75rem; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ---- Dashboard ---- */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: var(--bg-dark); color: rgba(255,255,255,.8);
  flex-shrink: 0; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto;
}
.sidebar-logo { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-logo a { display: flex; align-items: center; gap: .625rem; color: #fff; font-size: 1.125rem; font-weight: 800; text-decoration: none; }
.sidebar-nav { flex: 1; padding: 1.5rem 0; }
.sidebar-nav-label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.3); padding: 0 1.5rem; margin-bottom: .5rem; margin-top: 1.5rem; }
.sidebar-nav-label:first-child { margin-top: 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem;
  color: rgba(255,255,255,.65); font-size: .9375rem; font-weight: 500;
  transition: all var(--transition); text-decoration: none;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { border-right: 3px solid var(--primary); }
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user { display: flex; align-items: center; gap: .75rem; }
.sidebar-avatar { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .875rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: .75rem; color: rgba(255,255,255,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-content { flex: 1; margin-left: 260px; background: var(--bg-muted); min-height: 100vh; }
.page-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.page-header h1 { font-size: 1.5rem; }
.page-body { padding: 2rem; }

/* ---- Cards ---- */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.card-title { font-size: 1rem; font-weight: 700; }

/* ---- Stats Grid ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.stat-label { font-size: .8125rem; color: var(--text-muted); font-weight: 500; margin-bottom: .5rem; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-change { font-size: .8125rem; margin-top: .25rem; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--bg); }
thead th { background: var(--bg-muted); padding: .875rem 1rem; text-align: left; font-size: .8125rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
tbody td { padding: .875rem 1rem; font-size: .9375rem; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-muted); }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; padding: .25rem .625rem; border-radius: 50px; font-size: .75rem; font-weight: 700; }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #faf5ff; color: #6b21a8; }

/* ---- Modals ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: all var(--transition); }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform var(--transition); }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.125rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.5rem; line-height: 1; padding: .25rem; border-radius: 4px; transition: all var(--transition); }
.modal-close:hover { background: var(--bg-muted); color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

/* ---- Ticket Chat ---- */
.ticket-chat { display: flex; flex-direction: column; gap: 1rem; }
.ticket-message { display: flex; gap: .75rem; max-width: 80%; }
.ticket-message.admin { flex-direction: row-reverse; margin-left: auto; }
.ticket-bubble { background: var(--bg-muted); border-radius: var(--radius); padding: .875rem 1rem; font-size: .9375rem; }
.ticket-message.admin .ticket-bubble { background: var(--primary); color: #fff; }
.ticket-meta { font-size: .75rem; color: var(--text-muted); margin-top: .375rem; }
.ticket-message.admin .ticket-meta { text-align: right; }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-top: 2rem; }
.page-btn { padding: .5rem .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; color: var(--text-muted); background: var(--bg); cursor: pointer; transition: all var(--transition); text-decoration: none; }
.page-btn:hover, .page-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(59,91,219,.05); }
.page-btn.active { font-weight: 700; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.featured { transform: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-nav, .navbar-actions .btn { display: none; }
  .navbar-hamburger { display: block; }
  .pricing-grid, .features-grid, .case-studies-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; align-items: center; }
  .sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 1.5rem; }
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-small { font-size: .875rem; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   FEATURES DETAILED — griglia con icone grandi
   ============================================================ */
.features-grid-detailed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.feature-card-detailed {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card-detailed:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.feature-card-detailed.feature-highlight {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(59,91,219,.03) 0%, rgba(121,80,242,.03) 100%);
}
.feature-icon-large {
  font-size: 2.5rem;
  min-width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59,91,219,.1) 0%, rgba(121,80,242,.1) 100%);
  border-radius: var(--radius-sm);
}
.feature-content h3 {
  font-size: 1.1rem;
  margin-bottom: .4rem;
  color: var(--text);
}
.feature-content p {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 992px) {
  .features-grid-detailed { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features-grid-detailed { grid-template-columns: 1fr; }
  .feature-card-detailed { padding: 1.25rem; }
}

/* ============================================================
   CASE STUDIES — card migliorate
   ============================================================ */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}
.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.case-type-badge {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--primary);
  background: rgba(59,91,219,.08);
  padding: .35rem .75rem;
  border-radius: 20px;
}
.case-stat-badge {
  font-size: .8rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16,185,129,.08);
  padding: .35rem .75rem;
  border-radius: 20px;
}
.case-card h3 {
  font-size: 1.4rem;
  margin-bottom: .75rem;
}
.case-card .case-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.6;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  margin: 1rem 0;
}
.case-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.case-author {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}
.case-link {
  font-size: .85rem;
  font-weight: 500;
  color: var(--primary);
}
.case-link:hover {
  text-decoration: underline;
}

/* ============================================================
   CTA — sezione avvolgente
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #2563eb 100%);
  padding: 5rem 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(121,80,242,.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59,91,219,.1) 0%, transparent 40%);
  pointer-events: none;
}
.cta-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
.cta-section h2 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}
.cta-subtitle {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.cta-features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem 1.5rem;
  margin-bottom: 2rem;
}
.cta-feature-item {
  font-size: .9rem;
  color: rgba(255,255,255,.9);
  font-weight: 500;
}
.btn-xl {
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  border-radius: var(--radius);
}
.cta-main-btn {
  display: inline-block;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(59,91,219,.4);
}
.cta-main-btn:hover {
  box-shadow: 0 6px 30px rgba(59,91,219,.6);
  transform: translateY(-2px);
}
.cta-note {
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  margin-bottom: 2rem;
}
.cta-trust {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.75);
}
.cta-trust-icon {
  font-size: 1.2rem;
}

@media (max-width: 600px) {
  .cta-section { padding: 3.5rem 1rem; }
  .cta-trust { flex-direction: column; align-items: center; gap: .75rem; }
  .cta-features-row { flex-direction: column; align-items: center; }
}

/* ============================================================
   PROSE — per pagine statiche
   ============================================================ */
.prose h2 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.5rem; margin-bottom: .5rem; }
.prose p { margin-bottom: 1rem; line-height: 1.7; }
.prose ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose ul li { margin-bottom: .4rem; color: var(--text-muted); }
.prose a { color: var(--primary); text-decoration: underline; }
