/*!
 * Copyright (c) 2025 Kenneth Raymond
 * All rights reserved.
 *
 * Part of the expertsincmt WordPress theme.
 * Do not copy, modify, or redistribute without permission.
 *
 * ------------------------------------------------------------
 * GENES DB — APP HERO
 * ------------------------------------------------------------
 * Overlay hero: background image + live CSS mask-image fade,
 * driven by --genes-hero-fade-start / --genes-hero-fade-end
 * (set inline by the [genes_hero] shortcode from ACF Range
 * fields). No image editing required to adjust the fade.
 *
 * Scope:
 *   .genes-hero
 */

.genes-hero {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: 1180px;
  transform: translateX(-50%);
  overflow: hidden;
  padding-inline: 12px;
  background: var(--bg, #fff);
  min-height: clamp(190px, 22vw, 260px);
  border-radius: 28px 28px 0 0;
}

.genes-hero::before {
  content: "";
  position: absolute;
  inset: 0 12px;
  border-radius: 28px 28px 0 0;
  background-image: var(--genes-hero-img);
  background-size: cover;
  background-position: right center;
}

.genes-hero::after {
  content: "";
  position: absolute;
  inset: 0 12px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(
    to right,
    var(--bg, #fff) 0%,
    var(--bg, #fff) var(--genes-hero-fade-start),
    transparent var(--genes-hero-fade-end)
  );
}

.genes-hero__inner {
  position: relative;
  z-index: 1;
  max-width: min(560px, 55%);
  height: 100%;
  padding: 1.75rem 2.5rem 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.genes-hero__title {
  font-size: 2rem;
}

.genes-hero__intro {
  margin: 0 0 1.5rem;
  max-width: 46ch;
  color: var(--text);
  line-height: 1.5;
}

.genes-hero__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.genes-hero__stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.genes-hero__stat-icon {
  display: inline-flex;
  color: var(--primary);
}

.genes-hero__stat-text strong {
  font-weight: 600;
}

.genes-hero__stat-divider {
  width: 1px;
  height: 1.2em;
  background: rgb(85 85 85 / 30%);
}

/* =========================================================
   Mobile: crop tighter instead of stacking
   ========================================================= */
@media (max-width: 600px) {
  .genes-hero {
    min-height: clamp(220px, 46vw, 300px);
    border-radius: 22px 22px 0 0;
  }

  .genes-hero::before {
    background-position: 78% center;
    border-radius: 22px 22px 0 0;
  }

  .genes-hero::after {
    border-radius: 22px 22px 0 0;
  }

  .genes-hero__inner {
    max-width: 100%;
    padding: 1.5rem 1.75rem 4rem;
  }

  .genes-hero__stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .genes-hero__stat-divider {
    display: none;
  }
}
