/* ============================================
   Service Hub Page Styles
   Shared layout for all 5 service hub pages:
   Water Damage, Fire Damage, Smoke Damage,
   Mold Remediation, Sewage Cleanup

   Sections: hero, overview, process, insurance,
   city directory, FAQ, cross-service links, CTA
   ============================================ */

/* ============================================
   Hero (service-hub-specific)

   Layout strategy:
   - Taller than About hero (more content: badge,
     title, subtitle, CTAs, trust signals)
   - Shorter than Homepage hero (not the main landing)
   - Breadcrumb pinned to top-left (wayfinding)
   - Content left-aligned, anchored to bottom
   - Badge + title + subtitle + CTAs + trust signals
     all stack vertically within hero__content
   ============================================ */

.hero--service-hub {
  /* Content-driven height: padding controls the spacing,
     not min-height + flex-end. This keeps the gap between
     breadcrumb and badge consistent regardless of content length. */
  align-items: stretch;
  padding-top: 0;
  padding-bottom: 0;
}

.hero--service-hub .hero__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Top padding clears breadcrumb bar (~40px) + visual gap */
  padding-top: calc(var(--space-10) + var(--space-8));
  padding-bottom: var(--space-12);
}

/* --- Content spacing + staggered entrance animation ---
   The service hub hero carries more elements than the
   About hero (badge, title, subtitle, CTAs, trust row).
   We need generous vertical rhythm so nothing feels cramped.
   Animations stagger in: badge → title → subtitle → CTAs → trust.
*/

.hero--service-hub .hero__badge {
  align-self: flex-start;
  margin-bottom: var(--space-5);
  animation: service-hub-stagger 0.5s ease-out 0.15s both;
}

.hero--service-hub .hero__title {
  max-width: 640px;
  margin-bottom: var(--space-5);
  animation: service-hub-stagger 0.5s ease-out 0.25s both;
}

.hero--service-hub .hero__subtitle {
  max-width: 600px;
  margin-bottom: var(--space-8);
  animation: service-hub-stagger 0.5s ease-out 0.35s both;
}

.hero--service-hub .hero__actions {
  margin-bottom: 0;
  animation: service-hub-stagger 0.5s ease-out 0.45s both;
}

.hero--service-hub .hero__trust {
  margin-top: var(--space-8);
  animation: service-hub-stagger 0.5s ease-out 0.55s both;
}

/* --- Badge pulse dot --- */

.hero--service-hub .hero__badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
  animation: service-hub-pulse-dot 2s ease-in-out infinite;
}

@keyframes service-hub-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

@keyframes service-hub-stagger {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .hero--service-hub .hero__content {
    padding-top: calc(var(--space-10) + var(--space-6));
    padding-bottom: var(--space-10);
  }

  .hero--service-hub .hero__badge {
    margin-bottom: var(--space-4);
  }

  .hero--service-hub .hero__title {
    margin-bottom: var(--space-4);
  }

  .hero--service-hub .hero__subtitle {
    margin-bottom: var(--space-6);
  }

  .hero--service-hub .hero__trust {
    margin-top: var(--space-6);
  }
}

@media (max-width: 480px) {
  .hero--service-hub .hero__content {
    padding-top: calc(var(--space-8) + var(--space-6));
    padding-bottom: var(--space-8);
  }

  .hero--service-hub .hero__trust {
    gap: var(--space-3);
  }
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  .hero--service-hub .hero__badge,
  .hero--service-hub .hero__title,
  .hero--service-hub .hero__subtitle,
  .hero--service-hub .hero__actions,
  .hero--service-hub .hero__trust {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero--service-hub .hero__badge-dot {
    animation: none;
  }
}


/* ============================================
   Section 2: Service Overview
   Two-column layout: prose (left) + key facts sidebar (right)
   on desktop. Single column stacked on tablet/mobile.

   The prose column is the main educational content (~600 words).
   The sidebar is a compact "Key Facts" card with quick-scan
   stats that stays visible via sticky positioning on desktop.
   ============================================ */

.hub-overview {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-10);
  align-items: start;
}

/* --- Prose column --- */

.hub-overview__prose {
  max-width: 720px;
}

.hub-overview__prose h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.hub-overview__prose h3:first-of-type {
  margin-top: 0;
}

.hub-overview__prose p {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Lead paragraph: larger, primary color, sets the emotional tone */
.hub-overview__prose > p:first-of-type {
  font-size: var(--fs-md);
  color: var(--color-text);
  line-height: 1.65;
  text-align: justify;
}

/* Closing paragraph: accent-tinted, acts as a soft CTA */
.hub-overview__prose > p:last-of-type {
  color: var(--color-text);
  font-weight: 500;
  text-align: left;
}

.hub-overview__prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hub-overview__prose ul li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 0;
}

/* Accent check bullet */
.hub-overview__prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background-color: var(--color-accent);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
}

/* --- Sidebar: Key Facts card --- */

.hub-overview__sidebar {
  position: sticky;
  top: calc(var(--space-16) + var(--space-4));
}

.hub-sidebar-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
}

.hub-sidebar-card__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}

.hub-sidebar-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hub-sidebar-card__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-text);
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: 0;
}

.hub-sidebar-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background-color: var(--color-accent-bg);
  border-radius: var(--radius-full);
  color: var(--color-accent);
}

.hub-sidebar-card__icon svg {
  width: 18px;
  height: 18px;
}

/* --- Responsive --- */

@media (max-width: 1024px) {
  .hub-overview {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hub-overview__sidebar {
    position: static;
  }

  .hub-overview__prose {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hub-sidebar-card {
    padding: var(--space-5);
  }

  /* Disable justify on small screens — word gaps get too wide */
  .hub-overview__prose p,
  .hub-overview__prose > p:first-of-type {
    text-align: left;
  }
}


/* ============================================
   Section 3: Restoration Process Steps
   5-step vertical list with numbered icons.
   Icon-left, content-right on desktop.
   Stacked on mobile. Divider between steps.
   Max-width 860px, centered within container.

   Similar to the About page's .about-step pattern
   but with a step number overlay on the icon circle.
   ============================================ */

.hub-steps {
  max-width: 960px;
  margin: 0 auto;
}

.hub-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}

.hub-step:first-child {
  padding-top: 0;
}

.hub-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* --- Step icon with number --- */

.hub-step__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background-color: var(--color-accent-bg);
  border-radius: var(--radius-full);
  color: var(--color-accent);
}

.hub-step__icon svg {
  width: 24px;
  height: 24px;
}

/* Step number badge: small circle at top-right of the icon */
.hub-step__number {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background-color: var(--color-accent);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  line-height: 1;
}

/* --- Step content --- */

.hub-step__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.hub-step__text {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* --- Responsive --- */

@media (max-width: 640px) {
  .hub-step {
    flex-direction: column;
    gap: var(--space-3);
  }

  .hub-step__text {
    text-align: left;
  }
}


/* ============================================
   Section 4: Insurance Claim Guidance
   Standalone callout card with accent treatment.
   Centered, max-width 860px. Accent-bg background
   with left border accent. Prose + bullet list + disclaimer.

   This is the service-specific version of the insurance
   guidance section. Each service hub has unique insurance
   content (water damage coverage differs from fire, mold, etc.)
   ============================================ */

.hub-insurance {
  background-color: var(--color-accent-bg);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-8);
  max-width: 860px;
  margin: 0 auto;
}

.hub-insurance h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-5);
}

.hub-insurance > p {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* "What we help with" subheading */
.hub-insurance__subtitle {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}

/* Bullet list with check icons */
.hub-insurance__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hub-insurance__list li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.hub-insurance__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background-color: var(--color-accent);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
}

/* Disclaimer */
.hub-insurance__disclaimer {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.6;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .hub-insurance {
    padding: var(--space-6) var(--space-5);
  }
}

@media (max-width: 480px) {
  .hub-insurance > p {
    text-align: left;
  }
}


/* ============================================
   Section 5: City Directory
   Placeholder state: centered text + CTA button.
   Future state: city card grid populated as city
   pages are built in Phase 3+.
   ============================================ */

.hub-cities__text {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  text-align: center;
  line-height: 1.6;
}


/* ============================================
   Section 6: FAQ
   Uses the existing .faq accordion component from faq.css.
   The wrapper constrains width and centers the accordion.
   Full container width on desktop — no narrow strip.
   ============================================ */

.hub-faq {
  max-width: 960px;
  margin: 0 auto;
}


/* ============================================
   Section 7: Cross-Service Links
   4-column card grid linking to the other service hubs.
   Uses the existing .card--service component from cards.css.
   ============================================ */

.hub-cross-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

@media (max-width: 1024px) {
  .hub-cross-services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hub-cross-services {
    grid-template-columns: 1fr;
  }
}
