/* ============================================================================
   service.css — Styles for /_templates/service.html
   All values use CSS custom properties. No hardcoded colors/fonts/spacing.
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 1: HERO
   ───────────────────────────────────────────────────────────────────────────── */

.service-hero {
  position: relative;
  min-height: 520px;
  height: auto;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Dark overlay for readability */
.service-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 0;
  pointer-events: none;
}

.service-hero-container {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height, 140px) + var(--space-8));
  padding-bottom: var(--space-16);
}

/* Hero content column */
.service-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 800px;
}

.service-hero-badge {
  margin-bottom: var(--space-4);
  align-self: flex-start;
}

.service-hero-title {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin: 0 0 var(--space-4) 0;
}

.service-hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.88);
  line-height: var(--leading-relaxed);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  margin: 0 0 var(--space-8) 0;
  max-width: 620px;
}

.service-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHARED SECTION HEADER STYLES (centered titles used across sections 2, 4, 5)
   ───────────────────────────────────────────────────────────────────────────── */

.service-section-title {
  text-align: center;
  align-self: center;
  margin: 0 0 var(--space-4) 0;
}

.service-section-subtitle {
  text-align: center;
  align-self: center;
  max-width: 640px;
  margin: 0 auto var(--space-12) auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 2: FEATURES
   ───────────────────────────────────────────────────────────────────────────── */

.service-features {
  background: var(--color-bg-surface, #ffffff);
}

.service-features .section-label {
  align-self: center;
}

.service-features-grid {
  margin-top: var(--space-2);
  width: 100%;
}

.service-feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.service-feature-title {
  margin: 0;
  color: var(--color-text, #111827);
}

.service-feature-desc {
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 3: BENEFITS (dark background, two-column split)
   ───────────────────────────────────────────────────────────────────────────── */

.service-benefits {
  background: var(--secondary-900, #111827);
}

.service-benefits-inner {
  flex-direction: row;
  gap: var(--space-16);
  align-items: flex-start;
}

/* Image column (sticky to stay visible while right scrolls) */
.service-benefits-image {
  flex: 0 0 calc(45% - var(--space-8));
  position: sticky;
  top: calc(var(--header-height, 110px) + var(--space-6));
  align-self: flex-start;
  /* position: relative needed so absolute badge child is contained within */
}

.service-benefits-image-inner {
  position: relative; /* Contains absolute badge overlay */
}

.service-benefits-image .img-rounded {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* Badge overlay on the image */
.service-benefits-image-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  background: var(--primary-600, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: var(--font-body);
}

/* Right content column */
.service-benefits-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.service-benefits-content .section-label {
  align-self: flex-start;
  color: var(--accent-400, #f87171);
}

.service-benefits-content h2 {
  margin: 0;
}

.service-benefits-content > p {
  margin: 0;
}

/* Benefits list */
.service-benefits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-benefits-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.9);
  line-height: var(--leading-relaxed);
}

.service-benefits-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--accent-500, #ef4444);
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Stats row */
.service-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  margin-top: var(--space-2);
}

.service-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
}

.service-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  margin: 0 var(--space-2);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 4: PROCESS (light gray background)
   ───────────────────────────────────────────────────────────────────────────── */

.service-process {
  background: var(--gray-50, #f9fafb);
}

.service-process .section-label {
  align-self: center;
}

.service-process-grid {
  margin-top: var(--space-2);
  width: 100%;
}

.service-process-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}

/* .process-number removed */

.service-process-card .icon-circle,
.service-process-card .heading-sm,
.service-process-card .text-body {
  position: relative;
  z-index: 1;
}

.service-process-title {
  margin: 0;
  color: var(--color-text, #111827);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 5: FAQ
   ───────────────────────────────────────────────────────────────────────────── */

.service-faq {
  background: var(--color-bg-surface, #ffffff);
}

.service-faq-container {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.service-faq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-8);
}

.service-faq-header .section-label {
  align-self: center;
}

.service-faq-accordion {
  width: 100%;
}

.service-faq-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
  text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 6: RELATED SERVICES (primary blue background)
   ───────────────────────────────────────────────────────────────────────────── */

.service-related {
  background: var(--primary-600, #2563eb);
}

.service-related .section-label {
  align-self: center;
}

.service-related-grid {
  width: 100%;
  margin-top: var(--space-2);
}

/* Related service card (links to other service pages) */
.service-related-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-decoration: none;
  transition: all var(--duration-200) var(--ease-default);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
}

.service-related-icon {
  flex-shrink: 0;
}

.service-related-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.service-related-title {
  margin: 0;
  color: var(--color-text, #111827);
}

.service-related-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--primary-600, #2563eb);
  transition: gap var(--duration-150) var(--ease-default);
}

.service-related-card:hover .service-related-link {
  gap: var(--space-2);
}

.service-related-footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-10);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION 7: CTA (dark gradient)
   ───────────────────────────────────────────────────────────────────────────── */

.service-cta {
  background: var(--secondary-900, #111827);
  position: relative;
  overflow: hidden;
}

/* Gradient overlay effect */
.service-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-900, #1e3a8a) 0%, var(--secondary-900, #111827) 60%, rgba(239, 68, 68, 0.15) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Decorative glow blobs */
.service-cta::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: var(--primary-700, #1d4ed8);
  opacity: 0.12;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.service-cta::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--accent-600, #dc2626);
  opacity: 0.1;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.service-cta-container {
  position: relative;
  z-index: 1;
  align-items: center;
  text-align: center;
}

.service-cta-icon {
  margin-bottom: var(--space-4);
}

.service-cta-title {
  color: #fff;
  margin: 0 0 var(--space-4) 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  max-width: 680px;
  align-self: center;
}

.service-cta-text {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.82);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  align-self: center;
  margin: 0 0 var(--space-8) 0;
}

.service-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
}

.service-cta-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  margin-top: var(--space-6);
  justify-content: center;
  font-family: var(--font-body);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (max-width: 1024px)
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  /* Benefits section: stack columns, remove sticky */
  .service-benefits-inner {
    flex-direction: column;
    gap: var(--space-10);
  }

  .service-benefits-image {
    flex: none;
    width: 100%;
    position: static; /* Remove sticky on tablet/mobile */
  }

  .service-benefits-content {
    width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (max-width: 768px)
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Hero adjustments */
  .service-hero {
    min-height: auto;
    align-items: flex-start;
    overflow: visible;
  }

  .service-hero-container {
    padding-bottom: var(--space-12);
    padding-top: calc(var(--header-height, 80px) - var(--space-2));
  }

  .service-hero-title {
    font-size: var(--text-3xl);
  }

  .service-hero-subtitle {
    font-size: var(--text-base);
  }

  .service-hero-ctas {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
  }

  .service-hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  /* Section title scale */
  .service-section-title {
    font-size: var(--text-2xl);
  }

  /* Stats row on mobile */
  .service-stats-row {
    gap: 0;
    padding: var(--space-3) var(--space-4);
  }

  .service-stat-item {
    gap: var(--space-1);
  }

  .service-stat-divider {
    height: 32px;
    margin: 0 var(--space-1);
  }

  /* Related cards: full width */
  .service-related-card {
    flex-direction: column;
    align-items: flex-start;
  }

  /* CTA buttons */
  .service-cta-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
  }

  .service-cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  

  /* Benefits image badge */
  .service-benefits-image-badge {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   REDUCED MOTION OVERRIDES
   ───────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .service-benefits-image-badge,
  .service-related-card,
  .service-related-link {
    transition: none;
  }
}
