/**
 * ICHA AIRBUS BACKGROUND CROPPING + LEGIBILITY FIX v1
 *
 * Goals:
 * - keep the Airbus page hero at the same visual height range as other site heroes
 * - crop primarily top/bottom via a restrained hero height while preserving the image center
 * - keep the Africa map visible
 * - make hero text legible
 * - style the homepage event section closer to the approved reference image
 */

.icha-home-event-bg,
.airbus-page-hero-bg {
  position: relative;
  overflow: hidden;
}

.icha-home-event-bg::before,
.airbus-page-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.icha-home-event-bg > *,
.airbus-page-hero-bg > * {
  position: relative;
  z-index: 1;
}

/* HOMEPAGE EVENT SECTION
   Keep the background light and editorial, closer to the approved reference. */
.icha-home-event-bg {
  background-color: #f4f4f4;
  background-image:
    linear-gradient(90deg, rgba(248, 248, 248, 0.94) 0%, rgba(248, 248, 248, 0.88) 26%, rgba(248, 248, 248, 0.70) 42%, rgba(248, 248, 248, 0.34) 62%, rgba(248, 248, 248, 0.12) 100%),
    url('images/campaigns/airbus/airbus-event-background.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.icha-home-event-bg::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08));
}

.icha-home-event-bg .btn,
.icha-home-event-bg a.btn,
.icha-home-event-bg .event-cta,
.icha-home-event-bg .cta-link {
  position: relative;
  z-index: 2;
}

/* AIRBUS PAGE HERO
   Constrain height so it behaves like the site's other hero sections.
   Background stays centred so the crop comes mainly from top/bottom, not the middle. */
.airbus-page-hero-bg {
  background-color: #f4f4f4;
  background-image:
    linear-gradient(90deg, rgba(248, 248, 248, 0.97) 0%, rgba(248, 248, 248, 0.93) 24%, rgba(248, 248, 248, 0.84) 38%, rgba(248, 248, 248, 0.52) 56%, rgba(248, 248, 248, 0.18) 100%),
    url('images/campaigns/airbus/airbus-event-background.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  min-height: clamp(340px, 30vw, 430px);
}

.airbus-page-hero-bg::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.09));
}

.airbus-page-hero-bg > .container,
.airbus-page-hero-bg > .campaign-shell,
.airbus-page-hero-bg > .campaign-hero-inner,
.airbus-page-hero-bg > .airbus-hero-inner,
.airbus-page-hero-bg > .inner {
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hide any old hero image element so the new background controls the hero cleanly. */
.airbus-page-hero-bg img,
.airbus-page-hero-bg picture,
.airbus-page-hero-bg .hero-media,
.airbus-page-hero-bg .campaign-hero-media,
.airbus-page-hero-bg .airbus-hero-media,
.airbus-page-hero-bg .hero-image,
.airbus-page-hero-bg .campaign-hero-image {
  display: none !important;
}

/* Improve text contrast inside the Airbus hero. */
.airbus-page-hero-bg,
.airbus-page-hero-bg h1,
.airbus-page-hero-bg h2,
.airbus-page-hero-bg h3,
.airbus-page-hero-bg h4,
.airbus-page-hero-bg p,
.airbus-page-hero-bg li,
.airbus-page-hero-bg small,
.airbus-page-hero-bg .eyebrow,
.airbus-page-hero-bg .kicker,
.airbus-page-hero-bg .meta,
.airbus-page-hero-bg .label {
  color: #111111 !important;
  text-shadow: none !important;
}

/* Give likely content wrappers a soft white backing so text remains legible. */
.airbus-page-hero-bg .hero-copy,
.airbus-page-hero-bg .hero-content,
.airbus-page-hero-bg .campaign-hero-copy,
.airbus-page-hero-bg .campaign-hero-content,
.airbus-page-hero-bg .airbus-hero-copy,
.airbus-page-hero-bg .airbus-hero-content,
.airbus-page-hero-bg > .container > :first-child,
.airbus-page-hero-bg > .campaign-shell > :first-child,
.airbus-page-hero-bg > .campaign-hero-inner > :first-child,
.airbus-page-hero-bg > .airbus-hero-inner > :first-child,
.airbus-page-hero-bg > .inner > :first-child {
  max-width: min(44rem, 100%);
  background: rgba(255, 255, 255, 0.68);
  padding: clamp(1rem, 1.9vw, 1.75rem);
}

/* Preserve button prominence. */
.airbus-page-hero-bg .btn,
.airbus-page-hero-bg a.btn,
.airbus-page-hero-bg button,
.airbus-page-hero-bg input[type="submit"] {
  text-shadow: none !important;
}

/* Tablet */
@media (max-width: 960px) {
  .icha-home-event-bg {
    background-image:
      linear-gradient(180deg, rgba(248, 248, 248, 0.95) 0%, rgba(248, 248, 248, 0.88) 36%, rgba(248, 248, 248, 0.60) 100%),
      url('images/campaigns/airbus/airbus-event-background.png');
    background-position: center center;
  }

  .airbus-page-hero-bg {
    min-height: clamp(320px, 42vw, 400px);
    background-position: center center;
  }

  .airbus-page-hero-bg .hero-copy,
  .airbus-page-hero-bg .hero-content,
  .airbus-page-hero-bg .campaign-hero-copy,
  .airbus-page-hero-bg .campaign-hero-content,
  .airbus-page-hero-bg .airbus-hero-copy,
  .airbus-page-hero-bg .airbus-hero-content,
  .airbus-page-hero-bg > .container > :first-child,
  .airbus-page-hero-bg > .campaign-shell > :first-child,
  .airbus-page-hero-bg > .campaign-hero-inner > :first-child,
  .airbus-page-hero-bg > .airbus-hero-inner > :first-child,
  .airbus-page-hero-bg > .inner > :first-child {
    background: rgba(255, 255, 255, 0.74);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .icha-home-event-bg {
    background-position: 64% center;
  }

  .airbus-page-hero-bg {
    min-height: 300px;
    background-position: 62% center;
  }

  .airbus-page-hero-bg .hero-copy,
  .airbus-page-hero-bg .hero-content,
  .airbus-page-hero-bg .campaign-hero-copy,
  .airbus-page-hero-bg .campaign-hero-content,
  .airbus-page-hero-bg .airbus-hero-copy,
  .airbus-page-hero-bg .airbus-hero-content,
  .airbus-page-hero-bg > .container > :first-child,
  .airbus-page-hero-bg > .campaign-shell > :first-child,
  .airbus-page-hero-bg > .campaign-hero-inner > :first-child,
  .airbus-page-hero-bg > .airbus-hero-inner > :first-child,
  .airbus-page-hero-bg > .inner > :first-child {
    padding: 1rem;
  }
}
