/*
 * Clarity Component: payment-hub-hero
 * BEM-prefixed; only applies inside .cv-payment-hub-hero.
 * Depends on: ../_shared/tokens.css for design tokens.
 *
 * Two variants:
 *   --pillar   large hero with bigger padding + min-height (used on /payment-hub)
 *   --feature  medium hero (used on /payment-hub/features/<slug>)
 *
 * Gradient and accent color come from the active theme via tokens. The
 * default (no theme wrapper) is Payment Hub teal-emerald.
 */

.cv-payment-hub-hero {
  position: relative;
  z-index: 0;
  background-image: linear-gradient(
    to bottom right,
    var(--cv-color-hero-from, #3F97AA) 9.09%,
    var(--cv-color-hero-via, #113F59) 55.49%,
    var(--cv-color-hero-to, #004131) 100%
  );
  font-family: var(--cv-font-family);
  color: #ffffff;
}

@media (min-width: 768px) {
  .cv-payment-hub-hero {
    background-image: linear-gradient(
      to top right,
      var(--cv-color-hero-from, #3F97AA) 9.09%,
      var(--cv-color-hero-via, #113F59) 55.49%,
      var(--cv-color-hero-to, #004131) 100%
    );
  }
}

/* ── Container ──────────────────────────────────────────────────── */

.cv-payment-hub-hero__container {
  max-width: 1230px;
  margin: 0 auto;
  padding: 0 var(--cv-space-4, 15px);
}

@media (min-width: 768px) {
  .cv-payment-hub-hero__container { padding: 0 var(--cv-space-12, 48px); }
}

.cv-payment-hub-hero__inner {
  position: relative;  /* keeps text content above the illustration */
  z-index: 1;
  max-width: 860px;
  padding: var(--cv-space-10, 40px) 0 var(--cv-space-15, 60px);
}

/* ── Variants ───────────────────────────────────────────────────── */

.cv-payment-hub-hero--pillar {
  min-height: 600px;
}

.cv-payment-hub-hero--pillar .cv-payment-hub-hero__inner {
  padding: var(--cv-space-15, 60px) 0;
}

@media (min-width: 768px) {
  .cv-payment-hub-hero--pillar { min-height: 800px; padding-top: 105px; }
  .cv-payment-hub-hero--pillar .cv-payment-hub-hero__inner { padding: 90px 0 100px; max-width: 720px; }
}

.cv-payment-hub-hero--feature {
  margin-bottom: var(--cv-space-10, 40px);
}

/* Desktop: extra margin below the hero so the absolute illustration —
   which extends ~186px past the section's bottom edge — has room to
   "blend" with breathing room before the article body starts, instead
   of clipping straight into it. ~220px = the image's overflow (~186)
   plus a ~35px visual buffer. */
@media (min-width: 768px) {
  .cv-payment-hub-hero--feature {
    margin-bottom: 220px;
  }
  .cv-payment-hub-hero--feature .cv-payment-hub-hero__inner {
    padding: var(--cv-space-15, 60px) 0;
    /* Match the pillar inner width — the image's transparent right side
       means a bit of text/image visual overlap reads fine. */
    max-width: 720px;
  }
}

/* ── Breadcrumb ─────────────────────────────────────────────────── */

.cv-payment-hub-hero__breadcrumb {
  display: none;
  padding: 24px 0 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .cv-payment-hub-hero__breadcrumb { display: flex; }
}

.cv-payment-hub-hero__breadcrumb ol {
  list-style: none;
  margin: 0; padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cv-payment-hub-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.15s ease;
}
.cv-payment-hub-hero__breadcrumb a:hover { color: #ffffff; text-decoration: underline; }
.cv-payment-hub-hero__breadcrumb [aria-current="page"] {
  color: var(--cv-color-accent);
  font-weight: var(--cv-font-weight-semibold, 600);
}
.cv-payment-hub-hero__breadcrumb-separator { color: rgba(255, 255, 255, 0.45); }

/* ── Brand badge ────────────────────────────────────────────────── */

.cv-payment-hub-hero__brand {
  display: flex;
  align-items: center;
  margin-bottom: var(--cv-space-6, 24px);
}

.cv-payment-hub-hero__brand-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-right: 12px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cv-payment-hub-hero__brand-icon img {
  width: 24px;
  height: 30px;
  display: block;
}

.cv-payment-hub-hero__brand-name {
  color: #ffffff;
  font-size: var(--cv-font-size-lg, 1.125rem);
  font-weight: var(--cv-font-weight-medium, 500);
}

.cv-payment-hub-hero__brand-subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-weight: var(--cv-font-weight-normal, 400);
  margin-left: 6px;
}

/* ── Heading + subtitle ─────────────────────────────────────────── */

.cv-payment-hub-hero__heading {
  margin: 0 0 var(--cv-space-5, 20px);
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: var(--cv-font-weight-medium, 500);
  line-height: 1.1;
}

@media (min-width: 768px) {
  .cv-payment-hub-hero--feature .cv-payment-hub-hero__heading { font-size: 2.75rem; }
}

@media (min-width: 1024px) {
  .cv-payment-hub-hero--feature .cv-payment-hub-hero__heading { font-size: 3rem; }
}

.cv-payment-hub-hero--pillar .cv-payment-hub-hero__heading {
  font-size: 2.5rem;
}

@media (min-width: 768px) {
  .cv-payment-hub-hero--pillar .cv-payment-hub-hero__heading { font-size: 3rem; }
}

@media (min-width: 1024px) {
  .cv-payment-hub-hero--pillar .cv-payment-hub-hero__heading { font-size: 3.5rem; }
}

.cv-payment-hub-hero__subtitle {
  margin: 0 0 var(--cv-space-6, 24px);
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--cv-font-size-lg, 1.125rem);
  line-height: var(--cv-line-height-snug, 1.4);
  max-width: 760px;
  font-weight: var(--cv-font-weight-normal, 400);
}

@media (min-width: 768px) {
  .cv-payment-hub-hero__subtitle { font-size: 1.2rem; }
}

/* ── Actions ────────────────────────────────────────────────────── */

.cv-payment-hub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cv-space-4, 16px);
  align-items: center;
}

.cv-payment-hub-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--cv-radius-md, 10px);
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: var(--cv-font-weight-medium, 500);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease;
}

.cv-payment-hub-hero__button--primary {
  background: var(--cv-color-accent);
  color: var(--cv-color-text-on-accent, #0F172A);
}

.cv-payment-hub-hero__button--primary:hover,
.cv-payment-hub-hero__button--primary:focus-visible {
  background: #ffffff;
  color: var(--cv-color-accent-hover);
  border-color: var(--cv-color-accent-hover);
}

.cv-payment-hub-hero__button--secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.cv-payment-hub-hero__button--secondary:hover,
.cv-payment-hub-hero__button--secondary:focus-visible {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.cv-payment-hub-hero__button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

/* ── Meta line (under buttons) ──────────────────────────────────── */

.cv-payment-hub-hero__meta {
  margin: var(--cv-space-6, 24px) 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--cv-font-size-sm, 0.875rem);
}

/* ── Illustration (mockup on the right) ──────────────────────────── */
/* Default: hidden on mobile (cleaner content-focused feature pages),
   absolutely positioned on the right at desktop. The pillar variant
   gets a larger illustration; the feature variant is more compact. */

.cv-payment-hub-hero__illustration {
  display: none;
}

@media (min-width: 768px) {
  .cv-payment-hub-hero__illustration {
    display: block;
    position: absolute;
    right: 0;
    pointer-events: none;
    z-index: 0;
  }
  .cv-payment-hub-hero__illustration img {
    display: block;
    width: 100%;
    height: auto;
  }
}

/* Pillar variant: large illustration spanning ~50% width */
@media (min-width: 768px) {
  .cv-payment-hub-hero--pillar .cv-payment-hub-hero__illustration {
    top: 206px;
    width: 50%;
    max-width: 720px;
  }
}

@media (min-width: 1280px) {
  .cv-payment-hub-hero--pillar .cv-payment-hub-hero__illustration {
    width: auto;  /* let it grow naturally on xl */
  }
}

/* Feature variant: same illustration treatment as the pillar, just positioned
   higher because the feature hero is shorter. The image extends past the hero's
   bottom edge into the next section (cpf-wrap), mirroring the pillar's
   "blend into next element" effect. */
@media (min-width: 768px) {
  .cv-payment-hub-hero--feature .cv-payment-hub-hero__illustration {
    top: 60px;
    width: 50%;       /* matches pillar */
    max-width: 720px;
  }
}

@media (min-width: 1280px) {
  .cv-payment-hub-hero--feature .cv-payment-hub-hero__illustration {
    width: auto;      /* natural intrinsic size on xl, matches pillar */
  }
}

/* ── Mobile stack ───────────────────────────────────────────────── */

@media (max-width: 767px) {
  .cv-payment-hub-hero__actions { flex-direction: column; align-items: stretch; }
  .cv-payment-hub-hero__button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-payment-hub-hero__button { transition: none; }
}
