/* ==========================================================================
   HDM Marketing Theme — Section Layouts
   ========================================================================== */

/* ── Section Header (shared) ── */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

/* ── Trust Bar ── */
.trust-bar-section {
  padding-block: 48px;
  border-bottom: 1px solid var(--border);
}

.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.trust-item:hover {
  opacity: 1;
}

.trust-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.trust-name {
  font-size: 16px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* Wordmark-only items (Taboola, Outbrain) */
.trust-wordmark {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* ── Services Grid ── */
.services-section {
  background-color: var(--bg-section);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  transition: width 0.4s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  width: 100%;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-color: rgba(57, 255, 20, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.service-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}

.service-description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.service-link:hover {
  gap: 8px;
}

/* Make the entire service card a click target */
.service-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ── Process Steps ── */
.process-section {
  position: relative;
}

.process-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  position: relative;
}

/* Continuous dashed connector line running through all the circles */
.process-connector-line {
  position: absolute;
  top: 63px;
  left: 12.5%;
  right: 12.5%;
  height: 0;
  border-top: 2px dashed rgba(57, 255, 20, 0.25);
  z-index: 0;
}

.process-step {
  flex: 1;
  text-align: center;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.step-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  margin-bottom: 12px;
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  box-shadow: 0 0 0 6px var(--bg-primary);
}

.process-step:hover .step-icon {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--bg-primary), 0 0 20px rgba(57, 255, 20, 0.2);
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.step-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Results / Metrics ── */
.results-section {
  background-color: var(--bg-section);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 0;
  align-items: stretch;
}

.metric-card-result {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.metric-card-result:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.metric-number {
  display: block;
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  line-height: 1;
  margin-bottom: 8px;
}

.metric-desc {
  display: block;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-client {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* Featured Case Study card (inline with metrics) */
.case-card {
  background: linear-gradient(145deg, rgba(57, 255, 20, 0.06), rgba(20, 20, 20, 0.6));
  border: 1px solid rgba(57, 255, 20, 0.25);
  border-radius: 16px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(57, 255, 20, 0.08);
}

.case-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.case-card__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background-color: rgba(57, 255, 20, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.case-card__spark {
  width: 120px;
  height: 44px;
  flex-shrink: 0;
}

.case-card__title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: auto;
  font-family: 'Heebo', sans-serif;
}

.case-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: 18px;
  transition: gap 0.3s ease;
}

.case-card__link:hover {
  text-decoration: underline;
}

/* ── CTA Section (two-column band) ── */
.cta-section {
  position: relative;
  overflow: hidden;
  background-color: #0a140d;
  background-image: url('../images/footer-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Soft fade from the page's black into the green flow background at the top edge */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(10, 20, 13, 0) 22%);
  pointer-events: none;
  z-index: 0;
}

.cta-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

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

.cta-headline {
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.25;
}

.cta-text {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Brand block (right side) */
.cta-brand {
  display: flex;
  flex-direction: column;
  align-items: center; /* logo centered above the text */
  text-align: center;
  gap: 24px;
  padding-inline-start: 56px;
  border-inline-start: 1px solid var(--border);
}

.cta-brand__logo-link {
  display: inline-flex;
}

.cta-brand__logo {
  height: 110px;
  width: auto;
  display: block;
}

.cta-brand__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 380px;
  margin: 0;
}

.cta-brand__social {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cta-brand__social .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.cta-brand__social .social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── Animate on Scroll ── */
.fade-in,
.animate-on-scroll[data-animation="fade-in"] {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in.visible,
.animate-on-scroll.is-visible[data-animation="fade-in"] {
  opacity: 1;
}

.slide-up,
.animate-on-scroll[data-animation="slide-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-up.visible,
.animate-on-scroll.is-visible[data-animation="slide-up"] {
  opacity: 1;
  transform: translateY(0);
}

.slide-right,
.animate-on-scroll[data-animation="slide-right"] {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-right.visible,
.animate-on-scroll.is-visible[data-animation="slide-right"] {
  opacity: 1;
  transform: translateX(0);
}

.slide-left,
.animate-on-scroll[data-animation="slide-left"] {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-left.visible,
.animate-on-scroll.is-visible[data-animation="slide-left"] {
  opacity: 1;
  transform: translateX(0);
}

.scale-in,
.animate-on-scroll[data-animation="scale-in"] {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible,
.animate-on-scroll.is-visible[data-animation="scale-in"] {
  opacity: 1;
  transform: scale(1);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .case-card {
    grid-column: 1 / -1;
  }
  .case-card__title {
    font-size: 22px;
  }
  .process-steps {
    flex-wrap: wrap;
    gap: 24px;
  }
  .process-connector-line {
    display: none;
  }
  .process-step {
    flex: 0 0 calc(50% - 12px);
  }
  .cta-headline {
    font-size: 32px;
  }
  .cta-band {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .cta-brand {
    padding-inline-start: 0;
    border-inline-start: none;
    border-top: 1px solid var(--border);
    padding-top: 32px;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-step {
    flex: 0 0 100%;
  }
  .cta-headline {
    font-size: 28px;
  }
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metric-number {
    font-size: 36px;
  }
}
