/* ============================================================
   SERVICE PAGE — css/service.css
   Stili condivisi per tutte le pagine servizio
   ============================================================ */

/* ---- HERO ---- */
.svc-hero {
  background: linear-gradient(to right, #d9d9d9 0%, #e6e6e6 38%, #d0d0d0 100%);
  min-height: 380px;
  padding: 28px 0 48px;
  position: relative;
  overflow: clip;
  display: flex;
  align-items: center;
}
.svc-hero-inner { position: relative; z-index: 2; }
.svc-hero .parallax-cloud { opacity: 0.12 !important; }
.svc-hero .hero-city-wrap { opacity: 0.15 !important; }

.svc-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.2rem; color: var(--secondary-text);
  margin-bottom: 20px;
}
.svc-breadcrumb a { color: var(--secondary-text); }
.svc-breadcrumb a:hover { color: var(--theme-color); }
.svc-breadcrumb span { color: var(--secondary-text); }

.svc-hero-title {
  font-size: clamp(2.8rem, 4vw, 4rem);
  font-weight: 800;
  color: var(--text-color);
  line-height: 1.1;
  margin-bottom: 14px;
}

.svc-hero-sub {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--primary-text);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
}

.svc-hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center;
}

.btn-outline-dark-svc {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 50px;
  border: 2px solid var(--text-color);
  color: var(--text-color);
  font-size: 1.4rem; font-weight: 600;
  transition: all 0.25s ease;
}
.btn-outline-dark-svc:hover {
  background: var(--text-color); color: #fff;
}

/* Hero image */
.svc-hero-img-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.svc-hero-img {
  width: 100%; height: 280px;
  object-fit: cover; display: block;
}
.svc-hero-badge-float {
  position: absolute; bottom: 20px; left: 20px;
  background: white;
  border-radius: 16px;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.svc-badge-num {
  font-size: 2.8rem; font-weight: 800;
  color: var(--theme-color); line-height: 1;
}
.svc-badge-txt {
  font-size: 1.2rem; font-weight: 600;
  color: var(--text-color); line-height: 1.4;
}

/* ---- SECTION CLOUDS ---- */
@keyframes scDriftH {
  0%,100% { transform: translateX(0); }
  50%      { transform: translateX(20px); }
}
@keyframes scDriftHR {
  0%,100% { transform: translateX(0); }
  50%      { transform: translateX(-18px); }
}
@keyframes scDriftV {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.sc-cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Intro (white) */
.sc-intro-tr { width: 300px; top: -30px; right: -70px; opacity: 0.13; animation: scDriftHR 14s ease-in-out infinite; }
.sc-intro-bl { width: 200px; bottom: 20px; left: -50px; opacity: 0.10; animation: scDriftH  18s ease-in-out infinite 3s; }

/* Steps (white) */
.sc-steps-tl { width: 240px; top: 30px; left: -60px; opacity: 0.11; animation: scDriftH  16s ease-in-out infinite 1s; }
.sc-steps-br { width: 180px; bottom: 40px; right: -50px; opacity: 0.09; animation: scDriftHR 12s ease-in-out infinite 5s; }
.sc-steps-tm { width: 140px; top: 60px; right: 18%; opacity: 0.08; animation: scDriftV  20s ease-in-out infinite 2s; }

/* FAQ (gray gradient) */
.sc-faq-tl { width: 280px; top: -20px; left: -60px; opacity: 0.14; animation: scDriftH  15s ease-in-out infinite; }
.sc-faq-br { width: 200px; bottom: -10px; right: -55px; opacity: 0.11; animation: scDriftHR 19s ease-in-out infinite 4s; }

/* CTA (teal) — outline clouds invertiti in bianco */
.sc-cta-tl { width: 320px; top: -40px; left: -70px; opacity: 0.14; filter: brightness(0) invert(1); animation: scDriftH  13s ease-in-out infinite; }
.sc-cta-br { width: 220px; bottom: -30px; right: -60px; opacity: 0.11; filter: brightness(0) invert(1); animation: scDriftHR 17s ease-in-out infinite 2s; }
.sc-cta-tr { width: 150px; top: 20px; right: 12%; opacity: 0.08; filter: brightness(0) invert(1); animation: scDriftV  22s ease-in-out infinite 6s; }

/* ---- HERO EFFECTS ---- */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
  50%       { transform: translateY(-9px); box-shadow: 0 18px 32px rgba(0,0,0,0.16); }
}
.svc-hero-badge-float {
  animation: badgeFloat 3.2s ease-in-out infinite;
}

.svc-hero-img-wrap {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Stat counter — flash teal on finish */
@keyframes statPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); color: var(--teal-green); }
  100% { transform: scale(1); }
}
.svc-stat-num.counted { animation: statPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }

/* ---- COMMON SECTION STYLES ---- */
.svc-section-title {
  font-size: clamp(2.6rem, 3.5vw, 3.6rem);
  font-weight: 300; color: var(--text-color);
  line-height: 1.2; margin-bottom: 18px;
}
.svc-section-title strong { font-weight: 800; }
.svc-section-text {
  font-size: 1.5rem; font-weight: 300;
  color: var(--primary-text); line-height: 1.75;
  margin-bottom: 16px;
}

/* ---- INTRO ---- */
.svc-intro {
  background: var(--bg-primary);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}

.svc-check-list {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: flex; flex-direction: column; gap: 12px;
}
.svc-check-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.45rem; font-weight: 500; color: var(--text-color);
}
.svc-check-list svg {
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--theme-color); stroke: var(--theme-color);
}

.svc-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.svc-stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 20px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}
.svc-stat-num {
  font-size: 3.6rem; font-weight: 800;
  color: var(--teal-green); line-height: 1;
}
.svc-stat-label {
  font-size: 1.3rem; font-weight: 500;
  color: var(--secondary-text);
}

/* ---- TIPOLOGIE ---- */
.svc-tipologie {
  background: linear-gradient(to right, #d9d9d9 0%, #e6e6e6 38%, #d0d0d0 100%);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.tipo-turbine {
  position: absolute; bottom: 0;
  opacity: 0.22; pointer-events: none; user-select: none;
}
.tipo-turbine-l { left: -20px; height: 88%; }
.tipo-turbine-r { right: -20px; height: 72%; }

.tipo-card {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 32px 28px;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex; flex-direction: column;
}
.tipo-card:hover {
  box-shadow: 0 14px 40px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}
.tipo-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--theme-color), #f0a050);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex-shrink: 0;
}
.tipo-icon svg { width: 26px; height: 26px; fill: white; }
.tipo-title {
  font-size: 1.8rem; font-weight: 700;
  color: var(--text-color); margin-bottom: 12px;
}
.tipo-desc {
  font-size: 1.4rem; font-weight: 300;
  color: var(--primary-text); line-height: 1.65;
  flex: 1; margin-bottom: 20px;
}
.tipo-link {
  font-size: 1.35rem; font-weight: 700;
  color: var(--theme-color);
  transition: gap 0.2s ease;
  display: inline-block;
}
.tipo-link:hover { color: var(--theme-color); letter-spacing: 0.02em; }

/* ---- TIMELINE STEPS ---- */
.svc-steps {
  background: var(--bg-primary);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}

.tl-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

/* Vertical line — centered on the 52px dot (center = 26px ≈ left 25px) */
.tl-line-bg {
  position: absolute;
  left: 25px; top: 26px; bottom: 26px;
  width: 2px;
  background: rgba(0,120,132,0.15);
  border-radius: 2px;
}
.tl-line-fill {
  position: absolute;
  left: 25px; top: 26px;
  width: 2px; height: 0;
  background: var(--teal-green);
  border-radius: 2px;
  transition: height 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tl-wrap.animated .tl-line-fill { height: calc(100% - 52px); }

/* Nodes column */
.tl-nodes {
  display: flex;
  flex-direction: column;
}

.tl-node {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 48px;
}
.tl-node:last-child { padding-bottom: 0; }

/* Dot — 52px so center = 26px ≈ line left 25px */
.tl-dot {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--teal-green);
  color: var(--teal-green);
  font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; z-index: 2;
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s;
}
.tl-wrap.animated .tl-node:nth-child(1) .tl-dot { transform: scale(1); transition-delay: 0.1s; }
.tl-wrap.animated .tl-node:nth-child(2) .tl-dot { transform: scale(1); transition-delay: 0.4s; }
.tl-wrap.animated .tl-node:nth-child(3) .tl-dot { transform: scale(1); transition-delay: 0.7s; }
.tl-wrap.animated .tl-node:nth-child(4) .tl-dot { transform: scale(1); transition-delay: 1.0s; }
.tl-dot:hover { background: var(--teal-green); color: #fff; }

/* Content */
.tl-content {
  padding-top: 10px;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.tl-wrap.animated .tl-node:nth-child(1) .tl-content { opacity: 1; transform: translateX(0); transition-delay: 0.25s; }
.tl-wrap.animated .tl-node:nth-child(2) .tl-content { opacity: 1; transform: translateX(0); transition-delay: 0.55s; }
.tl-wrap.animated .tl-node:nth-child(3) .tl-content { opacity: 1; transform: translateX(0); transition-delay: 0.85s; }
.tl-wrap.animated .tl-node:nth-child(4) .tl-content { opacity: 1; transform: translateX(0); transition-delay: 1.15s; }

.tl-title {
  font-size: 1.7rem; font-weight: 700;
  color: var(--text-color); margin-bottom: 8px;
}
.tl-desc {
  font-size: 1.4rem; font-weight: 300;
  color: var(--primary-text); line-height: 1.7; margin: 0;
}

/* ---- FAQ ---- */
.svc-faq {
  background: linear-gradient(to right, #d9d9d9 0%, #e6e6e6 38%, #d0d0d0 100%);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--bg-primary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.faq-question {
  width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 22px 28px;
  font-size: 1.5rem; font-weight: 600;
  color: var(--text-color);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color 0.2s ease;
  font-family: "Montserrat", sans-serif;
}
.faq-question:not(.collapsed) { color: var(--theme-color); }
.faq-arrow {
  width: 20px; height: 20px; flex-shrink: 0;
  transition: transform 0.3s ease;
  stroke: currentColor;
}
.faq-question:not(.collapsed) .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  padding: 0 28px 22px;
  font-size: 1.45rem; font-weight: 300;
  color: var(--primary-text); line-height: 1.75;
}

/* ---- CTA FINALE ---- */
.svc-cta {
  background: var(--teal-green);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.svc-cta-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
}
.svc-cta-text h2 {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  font-weight: 700; color: white; margin-bottom: 8px; line-height: 1.3;
}
.svc-cta-text p {
  font-size: 1.4rem; font-weight: 300;
  color: rgba(255,255,255,0.75); margin: 0;
}
.svc-cta-actions {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  flex-shrink: 0;
}
.svc-cta-wa {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border-radius: 50px;
  background: #25d366; color: white;
  font-size: 1.4rem; font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}
.svc-cta-wa:hover { color: white; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.5); }

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
  .svc-hero { padding: 36px 0 48px; min-height: auto; }
  .svc-hero-img { height: 260px; }
  .svc-hero-title { font-size: clamp(2.6rem, 5vw, 3.6rem); }

  .svc-intro { padding: 60px 0; }
  .svc-tipologie { padding: 60px 0; }
  .svc-steps { padding: 60px 0; }
  .svc-faq { padding: 60px 0; }
  .svc-cta { padding: 56px 0; }

  .svc-cta-inner { flex-direction: column; text-align: center; }
  .svc-cta-actions { justify-content: center; }

  /* Timeline */
  .tl-wrap { max-width: 100%; }
  .tl-title { font-size: 1.6rem; }
  .tl-desc { font-size: 1.35rem; }

  /* Tipo turbines hidden on tablet */
  .tipo-turbine { display: none; }
}

@media (max-width: 767px) {
  /* Hero */
  .svc-hero { padding: 28px 0 36px; }
  .svc-hero-title { font-size: clamp(2.4rem, 6vw, 3.2rem); margin-bottom: 10px; }
  .svc-hero-sub { font-size: 1.45rem; margin-bottom: 22px; }
  .svc-hero-actions { gap: 10px; }
  .svc-hero-badge-float { padding: 10px 14px; gap: 8px; }
  .svc-badge-num { font-size: 2.2rem; }

  /* Hero image — on mobile push below text (col-12 stacks) */
  .svc-hero-img { height: 220px; }
  .svc-hero-img-wrap { margin-top: 0; border-radius: 16px; }

  /* Intro */
  .svc-intro { padding: 48px 0; }
  .svc-section-title { font-size: clamp(2.2rem, 5vw, 3rem); }
  .svc-section-text { font-size: 1.4rem; }
  .svc-stats-grid { gap: 12px; }
  .svc-stat-card { padding: 20px 18px; border-radius: 16px; }
  .svc-stat-num { font-size: 2.8rem; }

  /* Tipologie */
  .svc-tipologie { padding: 48px 0; }

  /* Timeline */
  .svc-steps { padding: 48px 0; }
  .tl-dot { width: 44px; height: 44px; font-size: 1.2rem; }
  .tl-line-bg, .tl-line-fill { left: 21px; }
  .tl-node { gap: 20px; padding-bottom: 36px; }
  .tl-title { font-size: 1.55rem; }
  .tl-desc { font-size: 1.3rem; }

  /* FAQ */
  .svc-faq { padding: 48px 0; }
  .faq-question { padding: 18px 20px; font-size: 1.4rem; }
  .faq-answer { padding: 0 20px 18px; font-size: 1.35rem; }

  /* CTA */
  .svc-cta { padding: 44px 0; }
  .svc-cta-text h2 { font-size: clamp(2rem, 5vw, 2.6rem); }
}

@media (max-width: 575px) {
  .svc-hero-actions { flex-direction: column; align-items: stretch; }
  .svc-hero-actions .btn-theme,
  .svc-hero-actions .btn-outline-dark-svc { justify-content: center; text-align: center; }

  .svc-stats-grid { grid-template-columns: 1fr 1fr; }

  /* Disable stacking card anim on small service page too */
  .tl-wrap { max-width: 100%; }
  .tl-dot { width: 40px; height: 40px; font-size: 1.1rem; }
  .tl-line-bg, .tl-line-fill { left: 19px; }
  .tl-node { gap: 16px; padding-bottom: 28px; }
  .tl-content { padding-top: 6px; }

  .svc-breadcrumb { font-size: 1.1rem; }
  .svc-hero-title { font-size: clamp(2.2rem, 7vw, 2.8rem); }
}
