/* ==========================================================================
   Apply Page — Edge Pharma
   The nav, footer, and form fields are shared (see css/layout/footer.css,
   css/components/forms.css). This file covers what's unique to this page:
   the static Apply Hero banner (its heading is rewritten by
   js/apply-form.js when a specific position is passed in via query
   string), the Process Steps + Form two-column section, the success
   state that replaces the form on submit, and the closing help band.
   ========================================================================== */

/* ==========================================================================
   Apply Hero — static banner (no carousel), shorter than the Careers Hero
   ========================================================================== */

.apply-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 340px;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

.apply-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.apply-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apply-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 8, 40, 0.85) 0%, rgba(2, 8, 40, 0.6) 55%, rgba(2, 8, 40, 0.42) 100%);
}

.apply-hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-10);
}

.apply-hero .hero__label,
.apply-hero .hero__title,
.apply-hero .hero__subtitle {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Process Steps + Form
   ========================================================================== */

.apply-main {
  background-color: var(--color-white);
  padding-block: var(--space-12); /* 80px mobile base */
}

.apply-main__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-9);
}

/* ---------------------------------------------------------------------
   Process Steps column
   --------------------------------------------------------------------- */

.apply-steps__heading {
  font-size: var(--fs-h4);
}

.apply-steps__description {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
}

.apply-steps__list {
  margin-top: var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  list-style: none;
}

.apply-step {
  display: flex;
  gap: var(--space-4);
}

.apply-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

.apply-step__title {
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
}

.apply-step__desc {
  margin-top: var(--space-1);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
}

.apply-steps__contact {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.apply-steps__contact-label {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.apply-steps__contact-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: var(--color-primary);
}

.apply-steps__contact-link:hover {
  color: var(--color-primary-dark);
}

/* ---------------------------------------------------------------------
   Application Form panel
   --------------------------------------------------------------------- */

.apply-form-panel {
  padding: var(--space-7);
  background-color: var(--color-surface);
  border: 1px solid #e8eef6;
  border-radius: var(--radius-sharp);
}

.apply-form-panel__heading {
  font-size: var(--fs-h4);
}

.apply-form-panel__description {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
}

.apply-form-panel .form {
  margin-top: var(--space-6);
}

/* ---------------------------------------------------------------------
   Success state — replaces the form once submitted (client-side demo,
   see js/apply-form.js; the real endpoint would redirect or confirm
   server-side instead).
   --------------------------------------------------------------------- */

.apply-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-2);
  padding-block: var(--space-6);
}

.apply-success[hidden] {
  display: none;
}

.apply-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: rgba(31, 157, 85, 0.12);
  color: var(--color-success);
  margin-bottom: var(--space-2);
}

.apply-success__heading {
  font-size: var(--fs-h4);
}

.apply-success__desc {
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 440px;
}

.apply-success__desc + .btn {
  margin-top: var(--space-3);
}

/* ---------------------------------------------------------------------
   Scroll animation — fade up
   --------------------------------------------------------------------- */

.apply-steps,
.apply-form-panel {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-default), transform 600ms var(--ease-default);
}

.apply-main.is-visible .apply-steps { transition-delay: 0ms; }
.apply-main.is-visible .apply-form-panel { transition-delay: 120ms; }

.apply-main.is-visible .apply-steps,
.apply-main.is-visible .apply-form-panel {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .apply-steps,
  .apply-form-panel {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Tablet (≥768px)
   --------------------------------------------------------------------- */

@media (min-width: 768px) {
  .apply-form-panel {
    padding: var(--space-8);
  }
}

/* ---------------------------------------------------------------------
   Desktop (≥992px) — steps column + form panel side by side
   --------------------------------------------------------------------- */

@media (min-width: 992px) {
  .apply-main {
    padding-block: var(--space-14); /* 120px */
  }

  .apply-main__grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-12); /* 80px */
    align-items: start;
  }

  .apply-steps {
    position: sticky;
    top: calc(var(--space-11) + 24px);
  }
}

/* ==========================================================================
   Help band — closing CTA, same visual recipe as the homepage/about
   Contact CTA Strip, adapted with two direct actions instead of a link.
   ========================================================================== */

.apply-help {
  background-color: #eaf8fb;
  border: 1px solid rgba(11, 94, 215, 0.08);
  padding: 40px 24px;
}

.apply-help__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.apply-help__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background-color: #0b5ed7;
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.apply-help__content {
  display: flex;
  flex-direction: column;
}

.apply-help__heading {
  font-family: var(--font-family-heading);
  font-weight: var(--fw-regular);
  line-height: 1.3;
  background: var(--gradient-h2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
}

.apply-help__description {
  margin-top: var(--space-2);
  font-size: 16px;
  color: var(--color-text-secondary);
}

.apply-help__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.apply-help__actions .btn {
  width: 100%;
}

@media (min-width: 768px) {
  .apply-help {
    padding-block: 28px;
    padding-inline: 0;
  }

  .apply-help__container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    text-align: left;
  }

  .apply-help__content {
    flex: 1;
  }

  .apply-help__actions {
    flex-direction: row;
    width: auto;
  }

  .apply-help__actions .btn {
    width: auto;
  }
}

@media (min-width: 992px) {
  .apply-help__heading {
    font-size: 30px;
  }
}
