/* ===========================
   Avvocato Rapido - Stile completo
   Tema chiaro moderno
   =========================== */

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --muted: #475569;
  --text: #111827;
  --primary: #1b2a41;
  --primary2: #274060;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #16a34a;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 10px 22px rgba(15, 23, 42, 0.06);
  --radius: 4px;
  --radius-sm: 3px;
  --gradient-start: #1b2a41;
  --gradient-end: #274060;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html { scroll-padding-top: 110px; }
:target { scroll-margin-top: 110px; }

body {
  margin: 0;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

/* Link */

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary2);
}

/* Layout generico */

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px;
}

/* Navbar */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-logo {
  height: 60px;
  max-height: 60px;
  width: auto;
  display: block;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
  font-size: 18px;
}

.brand-title {
  font-weight: 600;
  letter-spacing: -0.5px;
  font-size: 20px;
}

.brand-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

.navlinks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Bottoni */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  min-height: 40px;
}

.btn:hover {
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  filter: brightness(0.98);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(39, 64, 96, 0.06);
  border-color: rgba(27, 42, 65, 0.35);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
}

/* Griglie e card base */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; }
}

.landing-section {
  margin-top: 26px;
  scroll-margin-top: 110px;
}

.landing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .landing-grid-3 { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: none;
}

.feature-card {
  border-top: 2px solid rgba(27, 42, 65, 0.35);
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  background: var(--card);
}

.faq summary { cursor: pointer; font-weight: 700; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  transition: all 0.2s ease;
  animation: fadeIn 0.3s ease-out;
}

.card {
  border-top: 2px solid rgba(27, 42, 65, 0.35);
}

.card:hover {
  box-shadow: none;
}

.card-pad {
  padding: 24px;
}

/* Gerarchia titoli testuali */

.h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
  line-height: 1.2;
}

.h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text);
}

.lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.landing-h2 { margin: 0 0 10px 0; }

.landing-mt-10 { margin-top: 10px; }
.landing-mt-14 { margin-top: 14px; }
.landing-mt-16 { margin-top: 16px; }
.landing-grid-mt { margin-top: 14px; }
.landing-sep { margin: 0 10px; opacity: .6; }

.landing-cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.landing-cta-row.landing-cta-row-sm {
  margin-top: 14px;
  align-items: stretch;
}

.landing-stats-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .landing-stats-grid { grid-template-columns: 1fr; }
}

.landing-stat-card { text-align: center; }
.landing-stat-number { font-size: 22px; font-weight: 700; }
.landing-stat-label { opacity: .9; color: var(--muted); }

.landing-step-row { display: flex; gap: 10px; align-items: flex-start; }
.landing-step-number { font-size: 26px; font-weight: 700; line-height: 1; }
.landing-card-title { font-weight: 600; }
.landing-card-text { opacity: .9; margin-top: 6px; color: var(--muted); }

.faq .faq-answer { margin-top: 10px; opacity: .9; color: var(--muted); }

.is-hidden { display: none; }
.terms-row { display:flex; align-items:flex-start; gap:10px; }
.terms-check { margin-top: 4px; }
.terms-label { margin: 0; }
.spacer-10 { height: 10px; }

.lawyer-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.lawyer-stat-card {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.lawyer-stat-number { font-size: 2em; font-weight: bold; }
.lawyer-stat-number-blue { color: #3498db; }
.lawyer-stat-number-green { color: #27ae60; }
.lawyer-stat-label { color: #666; }

.lawyer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* Form */

.form {
  display: grid;
  grid-auto-flow: row;
  justify-items: stretch;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
}

.input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--card);
  color: var(--text);
  transition: all 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--card);
  color: var(--text);
  transition: all 0.2s ease;
  min-height: 200px;
  resize: vertical;
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Alert */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  margin: 16px 0;
}

.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fed7aa;
  color: #92400e;
}

/* Pill / KPI */

.kpi {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.pill {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.pill-primary {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.pill-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.pill-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.pill-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* Tabella */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.table td {
  color: var(--text);
  font-size: 14px;
  word-wrap: break-word;
}

.table tr:hover {
  background: var(--bg);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Badge */

.badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* Footer */

.footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ===========================
   Sezioni pagina tipo landing
   =========================== */

.page {
  max-width: 1200px;
  margin: 24px auto 48px auto;
  padding: 0 24px;
}

.section {
  margin-top: 32px;
}

.section + .section {
  margin-top: 40px;
}

.section-muted {
  background: rgba(148, 163, 184, 0.06);
  border-radius: var(--radius);
  padding: 32px 24px;
}

/* Header di sezione */

.section-header {
  margin-bottom: 20px;
  max-width: 700px;
}

.section-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
}

.section-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ===========================
   Hero a due colonne
   =========================== */

.hero {
  margin-top: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.hero-main {
  padding: 28px 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px 0;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-lead {
  margin: 0 0 16px 0;
  font-size: 15px;
  color: var(--muted);
}

.hero-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
}

.hero-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.hero-benefit-icon {
  font-size: 16px;
  line-height: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-secondary-link {
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-secondary-link:hover {
  color: var(--primary2);
}

/* Lato destro hero */

.hero-aside {
  padding: 20px 20px 22px 20px;
  border-left: 4px solid rgba(59, 130, 246, 0.4);
  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.05), transparent 55%);
}

.hero-aside-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.hero-aside-text {
  margin: 0 0 14px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ===========================
   Sezione "Come funziona"
   =========================== */

.steps {
  margin-top: 16px;
}

.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step-card {
  padding: 18px 16px 18px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.step-content-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.step-content-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ===========================
   Vantaggi / Perché sceglierci
   =========================== */

.benefits-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.benefit-card {
  padding: 16px 16px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.benefit-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.benefit-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.benefit-text {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ===========================
   Metriche / Numeri
   =========================== */

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
}

.metric {
  min-width: 120px;
}

.metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary2);
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
}

/* ===========================
   Sezione "I nostri avvocati"
   =========================== */

.lawyers-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.lawyer-card {
  padding: 16px 16px 18px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}

.lawyer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.lawyer-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lawyer-name {
  font-size: 15px;
  font-weight: 600;
}

.lawyer-meta {
  font-size: 12px;
  color: var(--muted);
}

.lawyer-tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===========================
   FAQ
   =========================== */

.faq {
  margin-top: 12px;
}

.faq-item {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.faq-question span {
  flex: 1;
}

.faq-toggle {
  font-size: 18px;
  color: var(--muted);
  margin-left: 10px;
}

.faq-answer {
  padding: 0 14px 10px 14px;
  font-size: 13px;
  color: var(--muted);
  display: block;
}

/* stato "aperto" se aggiungi una classe .open al container */
.faq-item.open .faq-answer {
  display: block;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .page {
    padding: 0 16px;
  }

  .navbar {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .navlinks {
    justify-content: center;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-pad {
    padding: 20px;
  }

  .h1 {
    font-size: 24px;
  }

  .btn {
    padding: 12px 16px;
    font-size: 16px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-main {
    padding: 20px 18px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-aside {
    margin-top: 4px;
  }

  .section-muted {
    padding: 24px 18px;
  }
}

/* ===========================
   Animazioni & accessibilità
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus */

.btn:focus,
.input:focus,
.textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Stati di caricamento */

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}
