/* ─────────────────────────────────────────
   PAGINA SERVIZI
   Da aggiungere in fondo a style.css
───────────────────────────────────────── */

/* ── Hero Servizi ── */
#hero-services {
  min-height: 100vh;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 60px 10%;
}

.hero-services-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  justify-self: center;
}

.hero-services-content {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-services-image {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  justify-self: flex-end;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.4s;
}

.hero-services-image img {
  width: 90%;
  height: auto;
  display: block;
  justify-self: flex-end;
}

.hero-services-title {
  display: flex;
  flex-direction: row;
}

.hero-services-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--black);
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.25s;
}

.hero-services-content h1 span {
  background: linear-gradient(135deg, var(--orange-primary), var(--red-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* .hero-services-content p {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--gray-text);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-weight: 400;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.4s;
} */

.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 90%;
  animation: fadeUp 0.55s ease forwards;
  animation-delay: 0.55s;
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--orange-primary), var(--yellow-primary));
  color: var(--white);
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(233, 83, 14, 0.3);
  width: fit-content;
}

/* ── Stats grid nell'hero ── */
.hero-services-stats {
  flex: 0.7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.2rem 1rem;
  text-align: center;
  border: 2px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--orange-primary), var(--yellow-primary));
}

.stat-card:hover {
  border-color: rgba(233, 83, 14, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(233, 83, 14, 0.15);
}

.stat-card:nth-child(1) { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.65s forwards; }
.stat-card:nth-child(2) { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.75s forwards; }
.stat-card:nth-child(3) { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s forwards; }
.stat-card:nth-child(4) { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.95s forwards; }

.stat-card__number {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-servizi {
  padding: 1.1rem 1.5rem;
  font-size: 0.8rem;
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
  padding: 0 2rem;
}

.section-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-header h1 span {
  background: linear-gradient(135deg, var(--orange-primary), var(--yellow-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── Servizi Dettagliati ── */
#detail-services {
  padding: 60px 10%;
  background: var(--gray-light);
}

.detail-services-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 20px auto;
  padding: 0 2rem 40px 2rem;
}

.detail-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2.5rem;
  align-items: start;
  border: 2px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--orange-primary), var(--yellow-primary));
  border-radius: 20px 0 0 20px;
}

.detail-card:hover {
  border-color: rgba(233, 83, 14, 0.2);
  box-shadow: 0 16px 40px rgba(233, 83, 14, 0.1);
  transform: translateX(6px);
}

.detail-card--alt::before {
  left: auto;
  right: 0;
  border-radius: 0 20px 20px 0;
}

.detail-card--alt:hover {
  transform: translateX(-6px);
}

.detail-card:nth-child(1) { animation: slideInLeft  0.55s ease 0.1s forwards; }
.detail-card:nth-child(2) { animation: slideInLeft  0.55s ease 0.2s forwards; }
.detail-card:nth-child(3) { animation: slideInLeft  0.55s ease 0.3s forwards; }
.detail-card:nth-child(4) { animation: slideInLeft  0.55s ease 0.4s forwards; }
.detail-card:nth-child(5) { animation: slideInLeft  0.55s ease 0.5s forwards; }
.detail-card:nth-child(6) { animation: slideInLeft  0.55s ease 0.6s forwards; }

.detail-card--alt:nth-child(1),
.detail-card--alt:nth-child(2),
.detail-card--alt:nth-child(3),
.detail-card--alt:nth-child(4),
.detail-card--alt:nth-child(5),
.detail-card--alt:nth-child(6) { animation-name: slideInRight; }

.detail-card-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: linear-gradient(135deg, var(--orange-primary), var(--yellow-primary));
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
}

.detail-card-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.25rem;
}

.detail-card-icon svg {
  width: 80px;
  height: 80px;
}

.detail-card-body h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange-primary);
  margin-bottom: 0.9rem;
}

.detail-card-body p {
  color: var(--gray-text);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.detail-card-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-card-list li {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-text);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gray-medium);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.detail-card-list li:last-child {
  border-bottom: none;
}

.detail-card-list li::before {
  content: "✓";
  color: var(--orange-primary);
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* SVG helper classes */
.svg-primary   { fill: var(--orange-primary); stroke: none; }
.svg-secondary { fill: var(--yellow-primary); stroke: none; }
.svg-outline   { fill: none; stroke: var(--orange-primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.svg-bg        { fill: var(--gray-light); stroke: none; }

/* ── Why Us ── */
#why-us {
  background: var(--white);
  position: relative;
  overflow: hidden;
  display: flex;
  padding: 60px 10%;
}


.why-us-header {
  max-width: 680px;
  margin-bottom: 4rem;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.why-us-header h2 {
  margin: 0;
}

.why-us-header p {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--gray-text);
  line-height: 1.8;
  font-weight: 600;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.why-us-card {
  background: var(--gray-light);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.why-us-card:hover {
  border-color: rgba(233, 83, 14, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(233, 83, 14, 0.09);
}

.why-us-card:nth-child(1) { animation: fadeUp 0.5s ease 0.1s forwards; }
.why-us-card:nth-child(2) { animation: fadeUp 0.5s ease 0.2s forwards; }
.why-us-card:nth-child(3) { animation: fadeUp 0.5s ease 0.3s forwards; }
.why-us-card:nth-child(4) { animation: fadeUp 0.5s ease 0.4s forwards; }

.why-us-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.why-us-card-number {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--orange-primary);
  opacity: 0.6;
}

.why-us-card-icon {
  width: 32px;
  height: 32px;
  color: var(--orange-primary);
  opacity: 0.85;
}

.why-us-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.35;
}

.why-us-card p {
  font-size: 0.9rem;
  color: var(--gray-text);
  line-height: 1.75;
  font-weight: 600;
  flex: 1;
}

.why-us-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--orange-primary);
  background: rgba(233, 83, 14, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  width: fit-content;
  margin-top: 0.5rem;
}

.why-us-bottom {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-light);
  border-radius: 16px;
  padding: 2.5rem 3.5rem;
  gap: 2rem;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.5s;
}

.why-us-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  text-align: center;
}

.why-us-stat p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

.why-us-stat strong {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--orange-primary), var(--yellow-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.why-us-divider {
  width: 1px;
  height: 40px;
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* ── Mobile/Desktop toggle ── */
span::after { display: none; }

.mobile {
  display: none;
  margin: 1rem 0;
}

.desktop {
  display: block;
}

.why-us-header h2 { justify-self: flex-start; }


/* ─────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────── */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─────────────────────────────────────────
   MEDIA QUERIES
───────────────────────────────────────── */

@media (max-width: 1200px) {
  .detail-services-grid {
    max-width: 1000px;
  }
}

@media (max-width: 1024px) {
  .mobile                  { display: block; }
  .mobile img              { justify-self: center; }
  .desktop                 { display: none; }

  .hero-services-container { flex-direction: column; gap: 3rem; padding-top: 3rem; }
  .hero-services-content   { width: 80%; }
  .hero-services-image     { justify-content: center; align-items: center; }
  .hero-services-stats     { width: 80%; grid-template-columns: repeat(4, 1fr); }
  .hero-buttons            { margin: 40px auto 10px auto; }

  .stat-card               { padding: 1rem 0.6rem; }
  .stat-card__number       { font-size: 1.4rem; }

  .btn-servizi             { max-width: 100px; }
  .btn-detail-card         { width: 35%; font-size: 0.8rem; }

  .detail-services-grid    { max-width: 800px; }

  .why-us-grid             { grid-template-columns: repeat(2, 1fr); }
  .why-us-bottom           { padding: 2rem; }
}

@media (max-width: 768px) {
  #hero-services           { min-height: fit-content; }
  
  .hero-services-stats     { grid-template-columns: 1fr 1fr; width: 60%; }
  .hero-services-image img { width: 100%; }

  .detail-card             { grid-template-columns: 1fr; padding: 2rem 1.5rem; gap: 1.25rem; }
  .detail-card:hover,
  .detail-card--alt:hover  { transform: none; }
  .detail-card-icon        { justify-content: flex-start; }
  .detail-card-icon svg    { width: 56px; height: 56px; }
  .detail-card-badge       { display: inline-block; margin-bottom: 0.75rem; }

  .btn-servizi             { padding: 1rem 1.1rem; font-size: 0.8rem; width: 30%; }
  .btn-detail-card         { width: 35%; font-size: 0.8rem; }
  #hero-services, #why-us, #detail-services { padding: 60px 5%; }

  h2 { font-size: 2.4rem; line-height: normal; }
}

@media (max-width: 640px) {
  .why-us-grid             { grid-template-columns: 1fr; }
  .why-us-bottom           { flex-direction: column; gap: 1.5rem; padding: 2rem 1.5rem; }
  .why-us-divider          { width: 40px; height: 1px; }
}

@media (max-width: 480px) {
  .hero-services-container { padding-top: 1rem; }
  .hero-buttons            { margin: 40px auto 10px auto; flex-direction: column; }

  .btn-servizi             { text-align: center; font-size: 0.8rem; padding: 0.7rem 0.9rem; width: 100%; min-width: 100%; }
  .btn-detail-card         { font-size: 0.7rem; padding: 0.8rem 1rem; }

  .hero-services-stats     { grid-template-columns: 1fr 1fr; width: 70%; gap: 1.4rem; }
  .stat-card               { padding: 1.5rem 1rem; }
  .stat-card__number       { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}

.cta {
  margin-top: 1.5rem; 
  display: inline-block;
}