/* ──────────────────────────────────────────────────────────────────────────
   KL Page Hero — inner page hero section
   Tokens are inherited from kl-global.css (child theme).
   ────────────────────────────────────────────────────────────────────────── */

/* ── SECTION ─────────────────────────────────────────────────────────────── */

.kl-page-hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  /* Grid: left = content, right = image. Image column stretches to row height
     automatically — no absolute positioning required. */
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  min-height: 420px;
}

/* ── GRADIENT BAR (bottom) ───────────────────────────────────────────────── */

.kl-hero-gradient-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient);
  z-index: 4;
}

/* ── INNER (content column, left ~50%) ───────────────────────────────────── */

.kl-hero-inner {
  position: relative;
  z-index: 2;
  /* Dynamic left padding mirrors the old max-width:1200px centering at wide viewports */
  padding: 72px 40px 88px clamp(40px, calc((100vw - 1200px) / 2), 120px);
  box-sizing: border-box;
}

/* ── CONTENT ─────────────────────────────────────────────────────────────── */

.kl-hero-content {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* ── BREADCRUMBS ─────────────────────────────────────────────────────────── */

.kl-hero-breadcrumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.kl-hero-breadcrumbs li {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.50);
}

.kl-hero-breadcrumbs li + li::before {
  content: '/';
  margin: 0 7px;
  opacity: 0.35;
}

.kl-hero-breadcrumbs li a {
  color: rgba(255, 255, 255, 0.50);
  text-decoration: none;
  transition: color 0.15s;
}

.kl-hero-breadcrumbs li a:hover {
  color: var(--mint);
}

.kl-hero-breadcrumbs li:last-child {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 600;
}

/* ── BADGE PILL ──────────────────────────────────────────────────────────── */

.kl-hero-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ── HEADLINE ────────────────────────────────────────────────────────────── */

.kl-hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--white);
  margin: 0;
}

.kl-hero-headline .accent        { color: var(--mint);   font-style: italic; }
.kl-hero-headline .accent-yellow { color: var(--yellow); font-style: italic; }
.kl-hero-headline .accent-orange { color: var(--orange); font-style: italic; }

/* ── SUB-HEADLINE ────────────────────────────────────────────────────────── */

.kl-hero-sub {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 480px;
}

/* ── CTA GROUP ───────────────────────────────────────────────────────────── */

.kl-hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

/* ── CTA BUTTON (primary — filled) ──────────────────────────────────────── */

.kl-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  line-height: 1.2;
}

.kl-hero-cta:hover {
  background: #d4650a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(238, 114, 3, 0.40);
  color: var(--white);
  text-decoration: none;
}

.kl-hero-cta svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.kl-hero-cta:hover svg {
  transform: translateX(3px);
}

/* Ghost / outline variant for second button */
.kl-hero-cta--ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.kl-hero-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  transform: translateY(-1px);
  box-shadow: none;
  color: var(--white);
}

/* ── IMAGE ── full height, right 50%, absolutely positioned ─────────────── */

.kl-hero-image-wrap {
  position: relative;   /* grid item — stretches to full row height automatically */
  z-index: 1;
  overflow: hidden;
}

/* Scoped to .kl-page-hero to beat .elementor img { height: auto } in Elementor's frontend.min.css */
.kl-page-hero .kl-hero-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* No overlay on the image — clean edge */

/* Placeholder when no image set */
.kl-hero-image-ph {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
}

/* ── VARIANTS ─────────────────────────────────────────────────────────────── */

.kl-page-hero--standard .kl-hero-badge { background: var(--mint);   color: var(--navy); }
.kl-page-hero--services .kl-hero-badge { background: var(--yellow); color: var(--navy); }
.kl-page-hero--brady    .kl-hero-badge { background: var(--orange); color: var(--white); }


.kl-page-hero--warm .kl-hero-badge { background: var(--yellow); color: var(--navy); }
.kl-page-hero--warm { background: linear-gradient(135deg, #0E3957 0%, #1a3d4f 60%, #1f3d40 100%); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .kl-page-hero  {
    min-height: 0;
    grid-template-columns: 1fr;        /* stack: content above, image below */
    grid-template-rows: auto auto;
  }
  .kl-hero-inner { padding: 48px 32px 64px; }
  .kl-hero-content { max-width: 100%; }

  .kl-hero-image-wrap {
    position: relative;
    width: 100%;
    height: 280px;
  }

  /* Subtle top-fade so image blends into the navy content above it */
  .kl-hero-image-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(180deg, var(--navy) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
  }

  .kl-hero-headline { font-size: clamp(1.8rem, 5vw, 2.4rem); }
}

@media (max-width: 600px) {
  .kl-hero-inner    { padding: 36px 20px 56px; }
  .kl-hero-headline { font-size: 1.75rem; }
  .kl-hero-sub      { font-size: 0.95rem; }
  .kl-hero-image-wrap { height: 220px; }
}
