/* ====== CHI SIAMO (Responsive) ====== */

/* Tipografia di sezione */
.storia-aziendale h2,
.timeline-section h2,
.storia-section h2,
.team-section-title {
  color: #00BFFF;
  font-size: clamp(1.5rem, 2.2vw + .6rem, 2rem);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}
.storia-aziendale h2::after,
.timeline-section h2::after,
.storia-section h2::after,
.team-section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background: #FFD700;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* ====== STORIA AZIENDALE ====== */
.storia-aziendale {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 20px;
  text-align: center;
  line-height: 1.85;
}
.storia-aziendale p {
  margin: 0 0 1.1rem;
  font-size: clamp(0.98rem, .5vw + .8rem, 1.05rem);
}

/* Variante richiesta (testo centrato tipo Word) */
.storia-section p { 
  line-height: 1.8; 
  text-align: center; 
}

/* ====== TEAM (riuso classi esistenti) ====== */
.team {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin: 40px auto;
  padding: 0 16px;
}
.team-member {
  flex: 1 1 260px;
  max-width: 360px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.team-member:hover { 
  transform: translateY(-6px);
  box-shadow: 0 10px 16px rgba(0,0,0,.12);
}
@media (prefers-reduced-motion: reduce){
  .team-member, .timeline-item { transition: none; }
}
.team-member img {
  width: 150px; height: 150px; border-radius: 50%;
  object-fit: cover; margin-bottom: 15px; border: 3px solid #00BFFF;
}
.team-member h3 { color: #00BFFF; margin: 10px 0; font-size: 1.2em; }
.team-member p { margin: 5px 0; color: #555; }
.qualification { font-weight: bold; color: #FFD700; }

/* Membro principale */
.team-member.main-member {
  background: #00BFFF; color: #fff; border-radius: 14px; padding: 28px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.team-member.main-member h3,
.team-member.main-member p { color: #fff; }
.team-member.main-member .qualification { color: #FFD700; }

/* Collaboratori esterni */
.team-member.external {
  background: #f0f8ff; border: 2px solid #00BFFF;
}
.external-badge {
  background-color: #FFD700; color: #333; font-weight: bold;
  padding: 6px 12px; border-radius: 10px; margin-top: 10px; font-size: .9em;
}

/* ====== TIMELINE ====== */
.timeline-section {
  padding: clamp(32px, 4vw, 60px) 20px;
  background-color: #f5f5f5;
  text-align: center;
}

.timeline {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 40px);
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 10px;
}

/* Linea centrale (solo desktop/tablet ampi) */
.timeline::before {
  content: '';
  position: absolute;
  top: 120px;              /* allineata alle foto */
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #00BFFF;
  z-index: 0;
}
@media (max-width: 768px){
  .timeline::before { display: none; }
}

.timeline-item {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.1);
  width: clamp(220px, 28vw, 280px);
  position: relative;
  z-index: 1;
  transition: transform .25s ease, box-shadow .25s ease;
  text-align: center;
}
.timeline-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px rgba(0,0,0,.12);
}

.timeline-item img {
  width: clamp(110px, 16vw, 140px);
  height: clamp(110px, 16vw, 140px);
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid #00BFFF;
}

.timeline-item h3 {
  color: #FFD700;
  margin-bottom: 8px;
  font-size: clamp(1.05rem, 1.2vw + .6rem, 1.25rem);
}
.timeline-item p {
  color: #333;
  font-size: clamp(.92rem, .4vw + .8rem, 1rem);
  line-height: 1.6;
}

/* ====== RESPONSIVE REFINEMENTS ====== */

/* Tablet */
@media (max-width: 992px){
  .storia-aziendale { padding: 0 16px; }
  .team { gap: 22px; }
}

/* Mobile grande */
@media (max-width: 768px){
  .team { flex-direction: column; align-items: center; }
  .team-member { max-width: 100%; }
  .timeline-item { width: 100%; max-width: 320px; }
}

/* Mobile piccolo */
@media (max-width: 480px){
  .storia-aziendale { margin-bottom: 42px; }
  .timeline-section { padding: 28px 12px; }
  .timeline { gap: 16px; padding: 10px 4px; }
}

/* ====== PICCOLI MIGLIORAMENTI ACCESSIBILITÀ ====== */
@media (hover: none){
  .team-member:hover, .timeline-item:hover { transform:none; box-shadow:0 6px 14px rgba(0,0,0,.1); }
}
