/* ============================================================
   Service Detail Pages — servizi.css
   Shared styles for all /servizi/* pages
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.service-hero {
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.service-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(18, 120, 197, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.service-breadcrumb {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.service-breadcrumb a {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.service-breadcrumb a:hover {
  opacity: 1;
}

.service-breadcrumb .sep {
  opacity: 0.4;
}

.service-hero-chip {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.service-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.service-hero-lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-color);
  opacity: 0.85;
  max-width: 600px;
}

.service-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.service-hero-ctas .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  box-shadow: 0 6px 20px rgba(18, 120, 197, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-hero-ctas .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(18, 120, 197, 0.4);
}

.service-hero-ctas .btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.service-hero-ctas .btn-outline-primary:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
  color: #fff;
}

/* Lottie / illustration box */
.service-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-hero-lottie {
  width: 340px;
  max-width: 100%;
}

.service-hero-aside-copy {
  margin-top: 0.9rem;
}

.service-hero-aside-copy h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.35;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
}

.service-hero-aside-copy p {
  font-style: normal;
  margin-bottom: 0;
  color: var(--text-color);
  opacity: 0.82;
}

.seo-hero-visual {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
}

/* ── Overview strip ───────────────────────────────────────── */
.service-overview {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
  border-top: 1px solid rgba(18, 120, 197, 0.1);
  border-bottom: 1px solid rgba(18, 120, 197, 0.1);
  padding: 3rem 0;
}

.service-overview-stat {
  text-align: center;
  padding: 1rem;
}

.service-overview-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
  border-radius: 1.25rem;
  padding: 1.25rem 1rem;
  min-height: 100%;
  box-shadow: 0 10px 26px rgba(18, 120, 197, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, rgba(18, 120, 197, 0.24), rgba(0, 212, 255, 0.22));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.service-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(18, 120, 197, 0.11), 0 0 0 1px rgba(18, 120, 197, 0.06);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    linear-gradient(135deg, rgba(18, 120, 197, 0.34), rgba(0, 212, 255, 0.28));
}

.service-overview-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.9rem;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.12), rgba(0, 212, 255, 0.12));
  color: var(--primary-color);
  font-size: 1.15rem;
}

.service-overview-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.35rem;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .service-hero-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .service-overview-value {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.service-overview-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.service-overview-card .service-overview-value {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.service-overview-card .service-overview-label {
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ── Feature cards ────────────────────────────────────────── */
.features-section {
  padding: 5rem 0;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid rgba(18, 120, 197, 0.1);
  border-radius: 1.1rem;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.04), rgba(0, 212, 255, 0.04));
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(18, 120, 197, 0.12);
  border-color: rgba(18, 120, 197, 0.25);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.12), rgba(0, 212, 255, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.feature-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.6rem;
}

.feature-card-text {
  font-size: 0.92rem;
  color: var(--text-color);
  opacity: 0.75;
  line-height: 1.65;
  margin: 0;
}

/* ── Process section ──────────────────────────────────────── */
.process-section {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent, rgba(18, 120, 197, 0.03), transparent);
}

.process-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 2rem 1.75rem;
  background: var(--card-bg);
  border: 1px solid rgba(18, 120, 197, 0.1);
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.process-step:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 28px rgba(18, 120, 197, 0.1);
}

.process-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(18, 120, 197, 0.3);
}

.process-step-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-color);
}

.process-step-content p {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.75;
  margin: 0;
  line-height: 1.6;
}

/* connector line between steps */
.process-connector {
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  opacity: 0.3;
  margin: 0 0 0 calc(24px + 1.5rem - 1px); /* align with circle centre */
}

/* ── Tech Stack ───────────────────────────────────────────── */
.tech-section {
  padding: 5rem 0;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--card-bg);
  border: 1px solid rgba(18, 120, 197, 0.13);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-color);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.tech-badge:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(18, 120, 197, 0.15);
}

.tech-badge i {
  color: var(--primary-color);
}

.tech-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

/* ── Use cases ────────────────────────────────────────────── */
.usecase-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.03), rgba(0, 212, 255, 0.03));
}

.usecase-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 0.85rem;
  background: var(--card-bg);
  border: 1px solid rgba(18, 120, 197, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.usecase-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(18, 120, 197, 0.1);
}

.usecase-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.12), rgba(0, 212, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.usecase-item h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.usecase-item p {
  font-size: 0.87rem;
  color: var(--text-color);
  opacity: 0.7;
  margin: 0;
}

/* ── CTA Banner ───────────────────────────────────────────── */
.service-cta-section {
  padding: 5rem 0;
}

.service-cta-wrapper {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 1.5rem;
  padding: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(18, 120, 197, 0.25);
}

.service-cta-wrapper::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.service-cta-wrapper::after {
  content: "";
  position: absolute;
  bottom: -70%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.service-cta-wrapper h2 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.service-cta-wrapper p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.service-cta-wrapper .btn-light {
  background: #fff;
  color: var(--primary-color);
  font-weight: 700;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-cta-wrapper .btn-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.service-cta-wrapper .btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  transition: background 0.2s, transform 0.2s;
}

.service-cta-wrapper .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

/* ── Back-link / nav ──────────────────────────────────────── */
.service-back-nav {
  padding: 1.25rem 0 0;
}

.service-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: gap 0.2s;
}

.service-back-link:hover {
  gap: 0.8rem;
  color: var(--primary-color);
}

/* ── Editorial / writing tone variant ────────────────────── */
.service-tone-writing .service-hero::before {
  background:
    radial-gradient(circle at 12% 20%, rgba(18, 120, 197, 0.08) 0%, transparent 48%),
    radial-gradient(circle at 88% 82%, rgba(0, 212, 255, 0.08) 0%, transparent 48%);
}

.service-tone-writing .service-breadcrumb,
.service-tone-writing .service-back-link,
.service-tone-writing .tech-group-label,
.service-tone-writing .tech-badge i,
.service-tone-writing .usecase-icon,
.service-tone-writing .feature-icon-wrap {
  color: var(--primary-color);
}

.service-tone-writing .service-hero-chip,
.service-tone-writing .service-hero-title,
.service-tone-writing .service-overview-value,
.service-tone-writing .process-step-number,
.service-tone-writing .service-cta-wrapper,
.service-tone-writing .service-hero-ctas .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.service-tone-writing .service-overview {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.04) 0%, rgba(0, 212, 255, 0.04) 100%);
  border-top: 1px solid rgba(18, 120, 197, 0.1);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.service-tone-writing .feature-card,
.service-tone-writing .process-step,
.service-tone-writing .usecase-item,
.service-tone-writing .tech-badge {
  border-color: rgba(18, 120, 197, 0.1);
  border-radius: 1.4rem;
}

.service-tone-writing .feature-card::after {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.04), rgba(0, 212, 255, 0.04));
}

.service-tone-writing .feature-icon-wrap,
.service-tone-writing .usecase-icon {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.12), rgba(0, 212, 255, 0.12));
  border-radius: 16px;
}

.service-tone-writing .process-section,
.service-tone-writing .usecase-section {
  background: linear-gradient(180deg, transparent, rgba(18, 120, 197, 0.025), transparent);
}

.service-tone-writing .process-connector {
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.service-tone-writing .service-hero-ctas .btn-outline-primary {
  color: var(--primary-color);
  border-color: rgba(18, 120, 197, 0.45);
}

.service-tone-writing .service-cta-wrapper {
  box-shadow: 0 20px 60px rgba(18, 120, 197, 0.2);
  border-radius: 2rem;
}

.service-tone-writing .service-overview-card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 1.4rem;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    linear-gradient(135deg, rgba(18, 120, 197, 0.22), rgba(0, 212, 255, 0.2));
}

.service-tone-writing .service-overview-icon {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.1), rgba(0, 212, 255, 0.1));
}

.service-tone-writing .service-hero-title,
.service-tone-writing .service-overview-value {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  color: var(--primary-color) !important;
}

.service-tone-writing .service-hero-chip,
.service-tone-writing .tech-badge,
.service-tone-writing .service-hero-ctas .btn-primary,
.service-tone-writing .service-hero-ctas .btn-outline-primary,
.service-tone-writing .process-step,
.service-tone-writing .feature-card,
.service-tone-writing .usecase-item {
  border-radius: 1.35rem;
}

/* ── Dark-theme overrides ─────────────────────────────────── */
[data-theme="dark"] .feature-card,
[data-theme="dark"] .process-step,
[data-theme="dark"] .tech-badge,
[data-theme="dark"] .usecase-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .service-overview {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.08) 0%, rgba(0, 212, 255, 0.06) 100%);
}

[data-theme="dark"] .service-tone-writing .feature-card,
[data-theme="dark"] .service-tone-writing .process-step,
[data-theme="dark"] .service-tone-writing .tech-badge,
[data-theme="dark"] .service-tone-writing .usecase-item {
  border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .service-tone-writing .service-overview {
  background: linear-gradient(135deg, rgba(18, 120, 197, 0.1) 0%, rgba(0, 212, 255, 0.06) 100%);
}

[data-theme="dark"] .service-overview-card,
[data-theme="dark"] .service-tone-writing .service-overview-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(18, 120, 197, 0.26), rgba(0, 212, 255, 0.2));
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .service-hero {
    padding: 6rem 0 3rem;
  }

  .service-hero-aside-copy {
    margin: 0.2rem 0 1rem;
  }

  .service-hero-lead {
    font-size: 1rem;
  }

  .service-cta-wrapper {
    padding: 2.5rem 1.5rem;
  }

  .process-connector {
    margin-left: 1.5rem;
  }
}
