/* ==========================================================================
   Kennedy Mortgage - Hero Variants
   ==========================================================================
   Five distinct hero patterns used across the site:

   .hero-image          Homepage. Full-width property image with navy overlay.
   .hero-two-column     About page. Two columns with headshot.
   .hero-pillar         Multifamily / Residential pillar pages.
   .hero-compact        Contact, Licensing, legal pages.
   .hero-program        22 program pages. Breadcrumb above title.
   ========================================================================== */

/* ==========================================================================
   SHARED HERO BASE STYLES
   ========================================================================== */

.hero {
  position: relative;
  background-color: var(--color-navy);
  color: var(--color-white);
  overflow: hidden;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  max-width: 18ch;
}

.hero .hero-subhead {
  color: var(--color-blue-100);
  font-size: var(--text-body-lg);
  line-height: var(--leading-loose);
  font-weight: var(--weight-regular);
  max-width: 60ch;
  margin-bottom: var(--space-lg);
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   1. IMAGE HERO (Homepage)
   Navy background, property photo at low opacity behind navy gradient,
   large title, subhead, single CTA button.
   ========================================================================== */

.hero-image {
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: var(--space-4xl) 0;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image-url, none);
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: 0;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(24, 36, 46, 0.88) 0%,
    rgba(24, 36, 46, 0.65) 50%,
    rgba(24, 36, 46, 0.30) 100%
  );
  z-index: 1;
}

.hero-image .hero-content {
  max-width: 720px;
}

.hero-image h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.hero-image .hero-subhead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin-bottom: var(--space-xl);
}

@media (max-width: 639px) {
  .hero-image {
    min-height: 500px;
    padding: var(--space-3xl) 0;
  }
}

/* ==========================================================================
   2. TWO-COLUMN HERO (About page)
   Headshot on right, text on left. Stacks on mobile with photo on top.
   ========================================================================== */

.hero-two-column {
  padding: var(--space-4xl) 0;
}

.hero-two-column .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-two-column .hero-content {
  max-width: 540px;
}

.hero-two-column .hero-photo {
  width: 400px;
  height: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-navy-800);
  flex-shrink: 0;
}

.hero-two-column .hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1023px) {
  .hero-two-column .container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
    justify-items: center;
  }

  .hero-two-column .hero-photo {
    order: -1;
    width: 280px;
    height: 280px;
  }

  .hero-two-column .hero-content {
    max-width: 100%;
  }
}

/* ==========================================================================
   3. PILLAR HERO (Multifamily, Residential)
   Navy with text only, no CTA button.
   ========================================================================== */

.hero-pillar {
  padding: var(--space-3xl) 0 var(--space-4xl);
}

.hero-pillar .hero-content {
  max-width: 800px;
}

.hero-pillar h1 {
  max-width: 16ch;
}

@media (max-width: 639px) {
  .hero-pillar {
    padding: var(--space-2xl) 0 var(--space-3xl);
  }
}

/* ==========================================================================
   4. COMPACT HERO (Contact, Licensing)
   Shorter navy band, title plus one-line subhead.
   ========================================================================== */

.hero-compact {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero-compact .hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.hero-compact h1 {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.hero-compact .hero-subhead {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 639px) {
  .hero-compact {
    padding: var(--space-2xl) 0;
  }
}

/* ==========================================================================
   5. PROGRAM PAGE HERO
   Compact treatment with breadcrumb above the title.
   ========================================================================== */

.hero-program {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.hero-program .hero-content {
  max-width: 800px;
}

.hero-program h1 {
  font-size: var(--text-h2);
  max-width: none;
  margin-bottom: var(--space-sm);
}

.hero-program .hero-subhead {
  font-size: var(--text-body-lg);
  font-style: italic;
  color: var(--color-blue-100);
  margin-bottom: 0;
}

/* Breadcrumbs styled when inside a navy hero */
.hero-program .breadcrumbs {
  margin-bottom: var(--space-md);
}

.hero-program .breadcrumbs a,
.hero-program .breadcrumbs span {
  color: var(--color-blue-100);
}

.hero-program .breadcrumbs a:hover {
  color: var(--color-white);
}

@media (max-width: 639px) {
  .hero-program {
    padding: var(--space-xl) 0 var(--space-2xl);
  }
}

/* ==========================================================================
   HERO BUTTONS - inside navy hero contexts
   ========================================================================== */

.hero .btn-primary {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.hero .btn-primary:hover {
  background-color: var(--color-blue-400);
  color: var(--color-white);
}

.hero .btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.hero .btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}
