/* =============================================
   chi-siamo-timeline.css — Chi Siamo Timeline + Trust
   Riparazioni Ricci — Component Library
   ============================================= */

/* ── Hero Minimal ── */
.hero-minimal {
  padding: clamp(4rem, 6vw, 5rem) 0 clamp(2rem, 3vw, 3rem);
  text-align: center;
}

.hero-minimal .container {
  max-width: var(--container-narrow);
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-info);
  margin-bottom: var(--space-3);
}

.hero-minimal h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  color: var(--color-heading);
  text-wrap: balance;
}

.hero-quote {
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-muted);
  max-width: 500px;
  margin: var(--space-3) auto 0;
  line-height: 1.6;
}

/* ── Timeline Section ── */
.timeline-section {
  background: var(--surface-warm);
}

/* ── Timeline Desktop ── */
.timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
}

/* Horizontal line */
.timeline-line-wrap {
  position: absolute;
  top: 32px;
  left: 40px;
  right: 40px;
  height: 2px;
}

.timeline-line-wrap svg {
  width: 100%;
  height: 2px;
  display: block;
}

.timeline-line-svg {
  stroke: rgba(var(--color-primary-rgb), 0.15);
  stroke-width: 2;
  stroke-linecap: round;
}

/* Timeline item */
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.timeline-year {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.timeline-marker {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 2px solid var(--color-background);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.15);
  margin-bottom: var(--space-4);
  transition: box-shadow var(--duration-slow) ease;
}

.timeline-card {
  background: var(--color-background);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  width: 100%;
  max-width: 180px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out);
  cursor: default;
}

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

.timeline-item:hover .timeline-marker {
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.2),
              0 0 10px rgba(var(--color-primary-rgb), 0.15);
}

.timeline-card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-heading);
  margin-bottom: var(--space-1);
}

.timeline-card-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ── Mobile Vertical Timeline ── */
@media (max-width: 767px) {
  .timeline {
    flex-direction: column;
    padding-top: 0;
    padding-left: 24px;
    gap: 0;
  }

  .timeline-line-wrap {
    display: none;
  }

  .timeline-item {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-3);
    padding-bottom: 20px;
    position: relative;
  }

  .timeline-item:last-child {
    padding-bottom: 0;
  }

  .timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 10px;
    width: 2px;
    height: 100%;
    background: rgba(var(--color-primary-rgb), 0.12);
  }

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

  .timeline-marker {
    position: absolute;
    left: -24px;
    top: 3px;
    margin: 0;
    width: 10px;
    height: 10px;
  }

  .timeline-year {
    margin-bottom: var(--space-1);
    font-size: 12px;
  }

  .timeline-card {
    max-width: 100%;
    text-align: left;
    padding: 12px 10px;
  }

  .timeline-card-desc {
    display: none;
  }

  .timeline-text {
    display: flex;
    flex-direction: column;
  }
}

/* ── Trust Section ── */
.trust-section {
  background: var(--surface-cool);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  max-width: 900px;
  margin: 0 auto;
}

.trust-card {
  background: var(--color-background);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  transition: transform var(--duration-slow) var(--ease-out),
              border-color var(--duration-slow) ease;
  cursor: default;
}

.trust-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--color-primary-rgb), 0.15);
}

.trust-icon {
  width: 24px;
  height: 24px;
  margin: 0 auto var(--space-3);
  color: var(--color-primary);
}

.trust-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.trust-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: 1;
}

.trust-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  margin-top: var(--space-1);
}

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

  .trust-card {
    padding: var(--space-3) 10px;
  }

  .trust-value {
    font-size: var(--text-xl);
  }

  .trust-label {
    font-size: 12px;
  }
}

/* ── Entrance Animation States ── */
.js-loaded .timeline-item,
.js-loaded .trust-card,
.js-loaded .hero-eyebrow,
.js-loaded .hero-minimal h1,
.js-loaded .hero-quote {
  opacity: 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .timeline-item,
  .trust-card,
  .hero-eyebrow,
  .hero-minimal h1,
  .hero-quote {
    opacity: 1 !important;
  }
}
