/* ==============================================
   SERVICE.CSS — Shared Service Page Template Styles
   Baxter Site Works
   ============================================== */

/* ==============================================
   1. HERO SECTION
   ============================================== */
.service-hero {
  position: relative;
  min-height: 42vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Hero background image container (used with <img> + overlay approach) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.78) 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 1;
}

/* Full-coverage dark overlay for text readability */
.service-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.78) 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.service-hero-content {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  align-items: flex-start;
  width: 100%;
}



/* Breadcrumb */
.hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.hero-breadcrumb a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.hero-breadcrumb span:last-child {
  color: #FFFFFF;
  font-weight: var(--font-weight-semibold);
}

/* Hero Title */
.service-hero-title {
  color: #FFFFFF;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  max-width: 820px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

/* Hero Subtitle */
.service-hero-subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
  line-height: var(--line-height-relaxed);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  margin-bottom: var(--space-8);
}

/* Hero CTA Buttons */
.service-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ==============================================
   2. INTRO / OVERVIEW SECTION
   ============================================== */
.service-intro-section {
  background: var(--color-bg);
}

.service-intro-row {
  align-items: flex-start;
}

.service-intro-left {
  flex: 1 1 55%;
  min-width: 280px;
}

.service-intro-body {
  margin-top: var(--space-5);
  color: var(--color-text);
}

.service-intro-body p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
}

.service-intro-body p:last-child {
  margin-bottom: 0;
}

.service-intro-body ul {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-intro-body ul li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  line-height: var(--line-height-relaxed);
}

.service-intro-body ul li::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 7px;
}

/* Benefits Column */
.service-benefits-col {
  flex: 1 1 40%;
  min-width: 280px;
}

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

.service-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

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

.service-benefit-text h3 {
  margin-bottom: var(--space-1);
  color: var(--color-neutral-900);
}

.service-benefit-text p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* ==============================================
   3. PROCESS SECTION
   ============================================== */
.service-process-section {
  background: var(--color-bg-dark);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative grid pattern on dark bg */
.service-process-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(239,68,68,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  aria-hidden: true;
}

.service-process-section .container {
  position: relative;
  z-index: 1;
}

.service-process-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

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

.service-process-header .heading-lg {
  margin-bottom: var(--space-4);
}

/* Steps container */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 800px;
  margin: 0 auto;
}

/* Individual step */
.process-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  transition: background var(--duration-normal) var(--ease-default), border-color var(--duration-normal) var(--ease-default);
}

.process-step:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

/* Step Number Badge */
.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: var(--letter-spacing-normal);
}

.process-step-content {
  flex: 1;
}

/* ==============================================
   4. APPLICATIONS SECTION
   ============================================== */
.service-applications-section {
  background: var(--color-bg-secondary);
}

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

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

.service-section-header .heading-lg {
  margin-bottom: var(--space-4);
}

.service-applications-grid {
  margin-top: var(--space-2);
}

.service-application-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-application-card .icon-circle {
  margin-bottom: var(--space-4);
}

.service-application-card .heading-md {
  margin-bottom: var(--space-2);
  color: var(--color-neutral-900);
}

.service-application-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* ==============================================
   5. SERVICE AREAS SECTION
   ============================================== */
.service-areas-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("https://connect.mediaserve.io/storage/v1/object/public/media/78dba5ff-e514-44fd-bc2d-1f49dd7a0a6f/e50f7c9a-7566-41f4-ac02-6a344078ff86/media/images/Construction-Grading.webp");
  background-size: cover;
  background-position: center;
  background-attachment: scroll; /* fixed causes blank on iOS Safari */
  text-align: center;
}

.service-areas-section h2 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.service-areas-section p {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.area-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.area-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  padding: var(--space-2) var(--space-5);
  border-radius: 9999px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border: 1px solid rgba(255, 255, 255, 0.3);
  letter-spacing: var(--letter-spacing-wide);
  transition: background var(--duration-fast) var(--ease-default);
}

.area-badge:hover {
  background: rgba(255, 255, 255, 0.28);
}

.service-areas-note {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: 0;
}

/* ==============================================
   6. FAQ SECTION
   ============================================== */
.faq-section {
  background: var(--color-bg);
}

.service-faq-accordion {
  max-width: 760px;
  margin: 0 auto var(--space-10);
}

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

/* ==============================================
   7. RELATED SERVICES SECTION
   ============================================== */
.related-services-section {
  background: var(--color-bg-secondary);
}

.related-services-grid {
  margin-top: var(--space-2);
  justify-content: center;
}

/* Related card — anchor tag styled as card */
.related-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.related-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  transition: background var(--duration-normal) var(--ease-default), color var(--duration-normal) var(--ease-default);
}

.related-card:hover .related-card-icon {
  background: var(--color-primary);
  color: #FFFFFF;
}

.related-card-title {
  color: var(--color-neutral-900);
  margin-bottom: var(--space-2);
  transition: color var(--duration-fast) var(--ease-default);
}

.related-card:hover .related-card-title {
  color: var(--color-primary);
}

.related-card-desc {
  color: var(--color-text-secondary);
  flex: 1;
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

.related-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  font-family: var(--font-heading);
  transition: gap var(--duration-fast) var(--ease-default);
  margin-top: auto;
}

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

/* ==============================================
   8. CTA SECTION
   ============================================== */
.cta-section {
  background: var(--color-bg-dark);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Decorative blob accents */
.cta-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

.cta-blob-1 {
  width: 400px;
  height: 400px;
  background: rgba(239, 68, 68, 0.18);
  top: -120px;
  left: -100px;
}

.cta-blob-2 {
  width: 320px;
  height: 320px;
  background: rgba(239, 68, 68, 0.12);
  bottom: -80px;
  right: -60px;
}

.cta-content {
  position: relative;
  z-index: 1;
  align-items: center;
}

.cta-content .heading-lg {
  margin-bottom: var(--space-4);
}

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

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

/* ==============================================
   RESPONSIVE — MOBILE & TABLET
   ============================================== */

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .service-intro-left,
  .service-benefits-col {
    flex: 1 1 100%;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  /* Hero */
  .service-hero {
    min-height: 38vh;
  }

  .service-hero-content {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

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

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

  .service-hero-ctas {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

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

  /* Intro two-column → single */
  .service-intro-left,
  .service-benefits-col {
    flex: 1 1 100%;
  }

  /* Process steps */
  .process-step {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
  }

  /* Applications grid */
  .service-applications-grid {
    gap: var(--space-4);
  }

  /* Area badges */
  .area-badges {
    gap: var(--space-2);
  }

  .area-badge {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
  }

  /* CTA buttons */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
    max-width: 320px;
  }

  /* Related services grid */
  .related-services-grid {
    gap: var(--space-4);
  }

  /* Section headers */
  .service-section-header {
    margin-bottom: var(--space-8);
  }

  .service-process-header {
    margin-bottom: var(--space-8);
  }
}

/* Small Mobile (<=480px) */
@media (max-width: 480px) {
  .service-hero {
    min-height: 320px;
  }

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

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

  .service-hero-content {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

  .process-step {
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-sm);
  }

  .area-badge {
    font-size: var(--font-size-xs);
    padding: var(--space-1) var(--space-3);
  }

  .cta-buttons .btn {
    max-width: 100%;
  }
}
