/* =====================================================
   1. GLOBAL & BODY
   ===================================================== */
body.single-disease-fund {
  background: #F8FBFD;
}

/* Prevent parent sections from forcing full width */
/* ✅ FIXED: Limit centering to top-level APAF content wrappers only */
body.single-disease-fund > .elementor > .elementor-element:has(.apaf-content),
body.single-disease-fund > .elementor > .e-con:has(.apaf-content) {
  width: 100% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  background: none !important;
  display: block !important; /* stop forcing flexbox */
  justify-content: initial !important;
}


/* =====================================================
   2. APAF BANNER
   ===================================================== */
.apaf-banner,
.elementor-element.apaf-banner,
.apaf-banner.elementor-container,
.e-con.apaf-banner {
  width: 100% !important;                /* KEEP */
  max-width: 1400px !important;          /* matches site width */
  margin: 60px auto 70px !important;     /* improved spacing above/below */
  border-radius: 14px !important;
  text-align: center !important;
  position: relative !important;
  z-index: 1;
  overflow: visible !important;

  /* Gradient + border */
  background: linear-gradient(180deg, #B5D8F4 0%, #7ABEE7 100%) !important;
  border: 1px solid rgba(81,124,150,0.25) !important;
  box-shadow: 0 12px 30px rgba(81,124,150,0.12) !important;

  /* Padding inside banner */
  padding: 40px 24px 36px !important;    /* slightly roomier */
}

.apaf-banner h2 {
  font-size: 2.8rem !important;
  font-weight: 800 !important;
  color: #2E3A47 !important;
  letter-spacing: -0.5px;
  margin-bottom: 12px !important;
}

.apaf-banner p {
  font-size: 1.15rem !important;
  color: #3E6078 !important;
  margin: 8px auto 0 !important;
}

/* =====================================================
   3. MAIN CONTENT CONTAINER
   ===================================================== */
.apaf-content {
  background: #FFFFFF;
  max-width: 1400px;
  margin: 0 auto 80px;
  padding: 70px 60px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  z-index: 2;

  /* ✅ FIXED: let children control their own alignment */
  text-align: initial !important;
}


/* Inner containers for consistent vertical rhythm */
.apaf-content > .elementor-container,
.apaf-content > .e-con {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}
.apaf-content > .elementor-container:first-of-type,
.apaf-content > .e-con:first-of-type {
  padding-top: 0 !important;
}
.apaf-content > .elementor-container:last-of-type,
.apaf-content > .e-con:last-of-type {
  padding-bottom: 0 !important;
}

/* =====================================================
   4. SECTION TITLES & DIVIDERS
   ===================================================== */
.apaf-section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: #2E3A47;
  margin-bottom: 12px;
  margin-top: 60px; /* balanced gap before new section */
}

.apaf-section-title + .elementor-widget-divider .elementor-divider-separator {
  width: 100px !important;
  border-top: 2px solid #6AB4DD !important;
  margin: 0 auto 24px !important;
  opacity: 1 !important;
}

.apaf-content .elementor-widget-divider .elementor-divider {
  display: flex !important;
  justify-content: center !important;
}

.apaf-content .elementor-widget-divider .elementor-divider-separator {
  width: 90px !important;
  max-width: 90px !important;
  border-top: 2px solid #6AB4DD !important;
  margin: 12px auto 30px !important;
  transition: all 0.3s ease;
}

/* =====================================================
   5. BUTTONS
   ===================================================== */
.apaf-content .apaf-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  color: #fff !important;
  transition: background 0.25s ease, transform 0.1s ease;
  margin-top: 28px;
}
.apaf-btn:active { transform: translateY(1px); }
.apaf-btn-red { background: #ED3847; }
.apaf-btn-red:hover { background: #f05252; }


/* =====================================================
  6. APAF Fund Navigation Bar — Balanced w/ Top & Bottom Borders
   ===================================================== */
.apaf-fund-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 48px;
  padding: 20px 0;
  margin: 0 auto 70px;
  max-width: 1580px;
  background: #FFFFFF;
  box-sizing: border-box;

  /* ✨ Clean, even borders (no duplicates) */
  border-top: 1px solid rgba(63,70,84,0.12);
  border-bottom: 1px solid rgba(63,70,84,0.12);
  box-shadow: none !important;
}

/* Link styling */
.apaf-fund-nav a {
  position: relative;
  font-weight: 700;
  color: #2E3A47;
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1;
  transition: color 0.25s ease;
}

/* Hover underline animation */
.apaf-fund-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #ED3847; /* APAF red accent */
  transition: width 0.3s ease;
}

.apaf-fund-nav a:hover {
  color: #6AB4DD;
}

.apaf-fund-nav a:hover::after {
  width: 100%;
}

/* === Invisible spacers for left/right visual balance === */
.apaf-fund-nav-spacer {
  display: inline-block;
  width: 60px;         /* tweak for perfect visual alignment */
  height: 1px;
  content: "";
}

/* Remove Elementor section padding that can offset borders */
.elementor-element:has(.apaf-fund-nav),
.apaf-fund-nav .elementor-element,
.apaf-fund-nav .elementor-widget-container {
  padding: 0 !important;
  margin: 0 auto !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .apaf-fund-nav {
    gap: 32px;
    padding: 18px 16px;
    max-width: 95%;
  }
}

@media (max-width: 600px) {
  .apaf-fund-nav {
    gap: 24px;
    padding: 16px 12px;
    max-width: 94%;
  }

  .apaf-fund-nav a {
    font-size: 0.95rem;
  }
}


/* =====================================================
   7. END SECTION / CTA
   ===================================================== */
.apaf-end-section {
  background: #FFFFFF;
  text-align: center;
  padding: 80px 20px;
  margin-top: 80px;
  border-top: 1px solid rgba(63,70,84,0.08);
  border-bottom: 1px solid rgba(63,70,84,0.08);
}
.apaf-end-inner {
  max-width: 800px;
  margin: 0 auto;
}
.apaf-end-section h3 {
  color: #3F4654;
  font-weight: 800;
  margin-bottom: 14px;
  font-size: 1.6rem;
}
.apaf-end-section p {
  color: #517C96;
  margin-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =====================================================
   8. LISTS & PARAGRAPH TEXT
   ===================================================== */
/* === APAF Content Typography Reset (Fund Pages Only) === */
.apaf-content p,
.apaf-content ul,
.apaf-content ol {
  text-align: left !important;      /* readable alignment */
  display: block !important;        /* no inline-block centering */
  max-width: 1100px !important;     /* stretch text width */
  margin-left: auto !important;
  margin-right: auto !important;    /* center within container */
  font-size: 1.1rem;                /* slightly larger body copy */
  line-height: 1.7;                 /* comfortable readability */
  color: #2E3A47;                   /* same as headers for harmony */
}
.apaf-section-title {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
/* === Fix dynamic text field alignment (Eligibility box) === */
.apaf-content .elementor-widget-text-editor,
.apaf-content .elementor-widget-theme-post-content,
.apaf-content .elementor-widget-shortcode {
  max-width: 1100px !important;     /* match paragraph width */
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  text-align: left !important;      /* ensure left alignment */
  line-height: 1.7 !important;
  font-size: 1.1rem !important;
  color: #2E3A47 !important;
}

/* If you want centered in soft-blue panels only */
.apaf-apply-section .elementor-widget-text-editor {
  text-align: center !important;
}


.apaf-content ul {
  margin: 24px 0 36px;
  padding-left: 40px;
  list-style: disc;
  line-height: 1.75;
}
.apaf-content li {
  margin-bottom: 12px;
  color: #3F4654;
}
.apaf-content ul li::marker {
  color: #6AB4DD;
  font-size: 1.15em;
}

/* =====================================================
   9. ANCHOR SCROLL MARGIN (Sticky Header Fix)
   ===================================================== */
[id^="covered"],
[id^="eligibility"],
[id^="how-to-apply"],
[id^="resources"],
[id^="check"],
[id^="next"],
[id^="help"] {
  scroll-margin-top: 140px !important; /* KEEP: header offset */
  position: relative;
  z-index: 1;
}
:target { scroll-margin-top: 140px; }

/* =====================================================
   10. RESPONSIVE TWEAKS
   ===================================================== */
@media (max-width: 1200px) {
  .apaf-banner,
  .elementor-element.apaf-banner,
  .apaf-banner.elementor-container,
  .e-con.apaf-banner {
    max-width: 95% !important;
    padding: 56px 20px 44px !important;
  }
  .apaf-content {
    padding: 60px 40px;
    margin: 0 auto 70px;
  }
}

@media (max-width: 768px) {
  .apaf-banner,
  .elementor-element.apaf-banner,
  .apaf-banner.elementor-container,
  .e-con.apaf-banner {
    max-width: 90% !important;
    padding: 48px 18px 36px !important;
  }
  .apaf-content {
    padding: 50px 24px;
    margin: 0 auto 60px;
  }
  .apaf-content .elementor-widget-divider .elementor-divider-separator {
    width: 70px !important;
  }
  .apaf-section-title {
    margin-top: 40px;
    font-size: 1.8rem;
  }
  .apaf-end-section {
    padding: 60px 18px;
    margin-top: 60px;
  }
}
/* =====================================================
   APAF STEP SECTION  (How-It-Works / Process Icons)
   ===================================================== */
/*
Purpose:
  Displays a simple 3-step visual guide for site visitors
  (e.g., Find Disease → Apply → Get Support)
  Used on the Disease Funds page under the main banner.
Brand Notes:
  - Icons use APAF red (#ED3847)
  - Text uses APAF navy (#2E3A47)
  - Section spacing matches other APAF content blocks
*/

/* === Layout & Container === */
.apaf-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 60px;
  max-width: 1000px;
  margin: 60px auto 40px;
  text-align: center;
}

/* === Individual Step === */
.apaf-step {
  flex: 1 1 220px;
  min-width: 200px;
  transition: transform 0.2s ease;
}
.apaf-step:hover {
  transform: translateY(-4px);
}

/* === Icons === */
.apaf-step i {
  font-size: 2.5rem;
  color: #ED3847; /* APAF red accent */
  margin-bottom: 14px;
  vertical-align: middle;
}

/* === Step Headings === */
.apaf-step h4 {
  color: #2E3A47; /* APAF navy */
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

/* === Step Descriptions === */
.apaf-step p {
  color: #3E6078;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 240px;
  margin: 0 auto;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .apaf-steps {
    gap: 30px;
    margin: 40px auto;
  }
  .apaf-step i {
    font-size: 2rem;
  }
}
.apaf-step {
  background: #FFFFFF;
  border: 1px solid rgba(81,124,150,0.1);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(81,124,150,0.06);
  padding: 28px 16px;
}

/* === APAF Step Section (Refined Card Layout + Centered Position) === */
.apaf-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px; /* slightly tighter but even spacing */
  max-width: 1100px;
  margin: 50px auto 40px; /* raised section slightly */
  text-align: center;
}

.apaf-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid rgba(81,124,150,0.12);
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(81,124,150,0.06);
  padding: 36px 28px 38px; /* increased internal space */
  flex: 1 1 240px;
  min-width: 220px;
}

.apaf-step i {
  font-size: 2.5rem;
  color: #ED3847;
  margin-bottom: 14px;
}

.apaf-step h4 {
  color: #2E3A47;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.apaf-step p {
  color: #3E6078;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 260px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .apaf-steps {
    gap: 24px;
    margin: 40px auto;
  }
  .apaf-step {
    padding: 28px 20px;
  }
  .apaf-step i {
    font-size: 2rem;
  }
}
.apaf-steps {
  margin-top: 40px; /* instead of 50px */
}
.apaf-step h4 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.apaf-step p {
  font-size: 1rem;
  color: #41586A;
}
/* =====================================================
   APAF MULTI-STEP FORM — Compatible with New "e-form" System
   ===================================================== */

/* === Base container === */
.apaf-form form.elementor-form {
  background: #FFFFFF;
  padding: 48px 56px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(81,124,150,0.12);
  border: 1px solid rgba(81,124,150,0.25);
  max-width: 700px;
  margin: 0 auto;
}

/* === Step circles (new e-form structure) === */
.apaf-form .e-form__indicators__indicator__number {
  border: 2px solid rgba(81,124,150,0.25);
  background: #FFFFFF;
  color: #517C96;
  transition: all 0.3s ease;
}

/* Active step */
.apaf-form .e-form__indicators__indicator--state-active .e-form__indicators__indicator__number {
  border-color: #6AB4DD;
  background: #6AB4DD;
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(106,180,221,0.2);
}

/* Completed step */
.apaf-form .e-form__indicators__indicator--state-completed .e-form__indicators__indicator__number {
  border-color: #ED3847;
  background: #ED3847;
  color: #FFFFFF;
}

/* Inactive step */
.apaf-form .e-form__indicators__indicator--state-inactive .e-form__indicators__indicator__number {
  border-color: rgba(81,124,150,0.25);
  background: #FFFFFF;
  color: #517C96;
}

/* Step labels */
.apaf-form .e-form__indicators__indicator__label {
  font-size: 0.9rem;
  color: #517C96;
  text-align: center;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.apaf-form .e-form__indicators__indicator--state-active .e-form__indicators__indicator__label {
  color: #2E3A47;
  font-weight: 700;
}

.apaf-form .e-form__indicators__indicator--state-completed .e-form__indicators__indicator__label {
  color: #ED3847;
  font-weight: 700;
}

/* Connectors between steps */
.apaf-form .e-form__indicators__indicator__separator {
  background-color: rgba(81,124,150,0.15);
}

/* === Input fields === */
.apaf-form input,
.apaf-form select,
.apaf-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(81,124,150,0.3);
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 24px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.apaf-form input:focus,
.apaf-form select:focus,
.apaf-form textarea:focus {
  outline: none;
  border-color: #6AB4DD;
  box-shadow: 0 0 0 3px rgba(106,180,221,0.15);
}

/* === Buttons === */
.apaf-form .elementor-button {
  background: #ED3847;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  padding: 14px 32px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.25s ease, transform 0.1s ease;
}

.apaf-form .elementor-button:hover {
  background: #f05252;
  transform: translateY(-1px);
}
/* === Optional visual refinements for APAF popup form === */

/* 1️⃣ Make step indicators slightly smaller + centered visually */
.apaf-form .e-form__indicators__indicator__number {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* 2️⃣ Smooth fade transition between steps */
.apaf-form .e-form__step {
  animation: apaf-fade-step 0.45s ease;
}
@keyframes apaf-fade-step {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3️⃣ Light separator lines between progress segments */
.apaf-form .e-form__indicators__indicator__separator {
  height: 2px;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

/* 4️⃣ Subtle hover feedback on next/back buttons */
.apaf-form .elementor-button:hover {
  background: #f05252;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(237, 56, 71, 0.2);
}

/* 5️⃣ Tighten vertical spacing so the whole popup looks centered */
.apaf-form form.elementor-form {
  padding: 36px 48px;
}

/* 6️⃣ Keep the field spacing consistent across steps */
.apaf-form .elementor-field-group {
  margin-bottom: 22px;
}
/* =====================================================
   APAF POPUP CONTAINER — Refined (No Double Shadow)
   ===================================================== */

/* Remove Elementor’s default popup box shadow/background */
.elementor-popup-modal .dialog-widget-content {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

/* Clean, rounded APAF-style modal container */
.elementor-popup-modal .dialog-message {
  background: linear-gradient(180deg, #B5D8F4 0%, #7ABEE7 100%) !important; /* vivid banner blue */
  border-radius: 20px !important;
  box-shadow: 0 10px 28px rgba(81,124,150,0.12),
              0 4px 8px rgba(81,124,150,0.06) !important;
  border: 1px solid rgba(106,180,221,0.25) !important;
  padding: 48px !important;
  backdrop-filter: blur(4px);
}


/* Remove inner box shadow to prevent “double border” look */
.apaf-form form.elementor-form {
  background: #FFFFFF !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  border: 1px solid rgba(81,124,150,0.12);
  padding: 36px 48px !important;
}

/* Popup fade animation */
.elementor-popup-modal {
  animation: apaf-popup-fade 0.45s ease-out;
}
@keyframes apaf-popup-fade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.elementor-popup-modal .dialog-message {
  background: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 28px rgba(81,124,150,0.12),
              0 4px 8px rgba(81,124,150,0.08) !important;
  border: 1px solid rgba(106,180,221,0.25) !important;
  padding: 48px !important;
}
.apaf-form .e-form__indicators__indicator__number {
  box-shadow: 0 2px 6px rgba(106,180,221,0.25);
}
.elementor-popup-modal .dialog-message {
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.apaf-form .e-form__indicators__indicator--state-completed + 
.e-form__indicators__indicator__separator {
  background-color: #ED3847 !important;
}

/* =====================================================
   APAF APPLY BUTTONS + CTA LAYOUT
   ===================================================== */

/* --- Positioning Utilities --- */

/* Top Apply Button (under banner) */
.apaf-apply-top {
  margin-top: 20px !important;
  margin-bottom: 40px !important;
}

/* Bottom CTA section */
.apaf-apply-bottom {
  margin-top: 16px !important;
}

/* Optional bottom CTA heading styling */
.apaf-apply-bottom-heading {
  text-align: center;
  font-size: 1.3rem;
  color: #3F4654;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Ensure button widgets are centered */
.elementor-widget-button.apaf-btn {
  text-align: center;
}

/* =====================================================
   APAF BUTTON SYSTEM — Final Production Version
   ===================================================== */

/* === Shared base styles === */
.apaf-btn {
  display: inline-block;
  text-align: center;
  font-weight: 700 !important;
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 999px !important; /* pill shape */
  padding: 14px 40px !important;
  transition: all 0.25s ease !important;
  cursor: pointer;
}

/* === Apply Button (filled variant) === */
.apaf-btn-apply,
.elementor-button.apaf-btn-apply {
  background: #ED3847 !important;  /* APAF red fill */
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 3px 10px rgba(237,56,71,0.25) !important;
  transition: all 0.25s ease !important;
}

/* === Hover: subtle lift + APAF blue glow === */
.apaf-btn-apply:hover,
.elementor-button.apaf-btn-apply:hover,
.elementor-button.apaf-btn-apply:focus {
  background: #ED3847 !important;          /* keep red consistent */
  color: #fff !important;                  /* text stays white */
  transform: translateY(-2px);             /* lift effect */
  border: none !important;
  box-shadow:
    0 0 0 4px rgba(106,180,221,0.25),      /* APAF blue glow */
    0 6px 14px rgba(237,56,71,0.25) !important; /* red depth shadow */
}

/* === Active: pressed look === */
.apaf-btn-apply:active,
.elementor-button.apaf-btn-apply:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(237,56,71,0.25) !important;
}

/* === Fix: ensure Elementor inner text stays visible === */
.elementor-button.apaf-btn-apply .elementor-button-text {
  color: #fff !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* === Kill Elementor's pseudo overlays === */
.elementor-button.apaf-btn-apply::before,
.elementor-button.apaf-btn-apply::after {
  background: none !important;
  opacity: 0 !important;
  box-shadow: none !important;
  mix-blend-mode: normal !important;
}

/* === Contextual spacing === */
.apaf-apply-top {
  margin-top: 20px !important;
  margin-bottom: 40px !important;
}
.apaf-apply-bottom {
  margin-top: 16px !important;
}
.apaf-apply-bottom-heading {
  text-align: center;
  font-size: 1.3rem;
  color: #3F4654;
  font-weight: 700;
  margin-bottom: 10px;
}
/* =========================================
   APAF Disease Fund Layout – Section Spacing Fixes
   ========================================= */

/* Fix spacing below How to Apply lists */
.apaf-disease-fund ul {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Reduce extra gap before Resources & Support */
.apaf-disease-fund h3 + p {
  margin-top: 0 !important;
}

/* General tightening between final section and footer */
.apaf-disease-fund {
  margin-bottom: 60px !important;
}
/* =========================================
   APAF Content Section — Spacing Correction
   ========================================= */

/* Give overall container consistent rhythm */
.apaf-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Prevent stacked margins between consecutive widgets */
.apaf-content > * + * {
  margin-top: 50px !important; /* consistent spacing */
}

/* Tighten the gap after bullet lists */
.apaf-content ul {
  margin-bottom: 20px !important;
}

/* Reduce space *before* next headings after lists or paragraphs */
.apaf-content p + h3,
.apaf-content ul + h3,
.apaf-content ol + h3 {
  margin-top: 20px !important;
}

/* Specific fix: shrink gap before Resources and before Apply CTA */
.apaf-content h3:has(+ p),
.apaf-content h3:has(+ .apaf-apply-bottom-heading) {
  margin-bottom: 15px !important;
}

.apaf-content .apaf-apply-bottom-heading {
  margin-top: 10px !important;
}

/* Ensure bottom of content doesn’t get huge padding */
.apaf-content:last-of-type {
  margin-bottom: 0 !important;
  padding-bottom: 40px !important;
}
/* =========================================
   Fix Large Gaps Between Sections in .apaf-content
   ========================================= */

/* Reduce top padding for subsequent inner containers */
.apaf-content > .elementor-container + .elementor-container,
.apaf-content > .e-con + .e-con {
  padding-top: 20px !important; /* was 40px */
}

/* Keep the first section flush to the top */
.apaf-content > .elementor-container:first-of-type,
.apaf-content > .e-con:first-of-type {
  padding-top: 0 !important;
}

/* Optional: tighten bottom padding as well for consistency */
.apaf-content > .elementor-container,
.apaf-content > .e-con {
  padding-bottom: 30px !important;
}
/* =========================================
   APAF Bottom CTA — Match "Eligibility Requirements" Style Exactly
   ========================================= */
.apaf-apply-section {
  display: block !important;
  position: relative;
  max-width: 1400px;                         /* match .apaf-content width */
  margin: 60px auto 20px !important;          /* center + consistent spacing */
  background: #F3F8FC !important;             /* ✅ identical to Eligibility Requirements */
  border: 1px solid rgba(81,124,150,0.25) !important;
  box-shadow: 0 8px 20px rgba(81,124,150,0.08) !important;
  border-radius: 14px !important;
  padding: 60px 40px 50px !important;
  text-align: center !important;
  overflow: hidden;
  z-index: 2;
}

/* Inner content cleanup */
.apaf-apply-section > .elementor-container,
.apaf-apply-section > .e-con {
  background: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  justify-content: center !important;
}

/* Heading + button consistency */
.apaf-apply-section h3 {
  color: #2E3A47;                 /* APAF navy */
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.apaf-apply-section .apaf-btn-apply {
  margin-top: 10px !important;
}
/* Fix Elementor editor background override */
.elementor-editor-active .apaf-highlight {
  background: #F3F8FC !important;
  border: 1px solid rgba(106, 180, 221, 0.25) !important;
  box-shadow: 0 4px 16px rgba(81, 124, 150, 0.05) !important;
}
/* Make the Apply CTA band taller */
.apaf-highlight.apaf-apply-section {
  padding-top: 60px !important;
  padding-bottom: 60px !important;
  display: block !important; /* ensure it can expand independently */
}
/* === Fix height + vertical alignment inside CTA band === */
.apaf-highlight.apaf-apply-section {
  padding: 60px 50px !important;         /* add height */
  display: flex !important;              /* keep flex alignment */
  flex-direction: column !important;     /* stack heading + button */
  justify-content: center !important;    /* vertically center content */
  align-items: center !important;        /* horizontally center content */
  min-height: 240px !important;          /* ensures taller band */
}
.apaf-highlight.apaf-apply-section {
  padding: 70px 50px !important; /* +10px top and bottom */
  min-height: 260px !important;  /* keeps section feeling airy */
}
/* =====================================================
   APAF "How to Apply" Section — Alignment + Spacing Fix
   ===================================================== */

.apaf-how-to-apply {
  max-width: 900px !important; /* match text width to other sections */
  margin: 0 auto 40px !important; /* centers section and tightens gap below */
  text-align: left !important; /* ensures bullets and text align cleanly */
}

.apaf-how-to-apply p,
.apaf-how-to-apply ul {
  max-width: 900px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.apaf-how-to-apply ul {
  padding-left: 40px !important;
  margin-top: 16px !important;
  margin-bottom: 20px !important; /* tighten spacing before next section */
}

/* Optional — visually center it more like Eligibility section */
.apaf-how-to-apply .elementor-widget-heading {
  text-align: center !important;
  margin-bottom: 12px !important;
}
.apaf-how-to-apply {
  max-width: 900px;
  margin: 0 auto 40px !important;
  text-align: center;
}

.apaf-how-to-apply p,
.apaf-how-to-apply ul {
  text-align: left !important;
  display: inline-block;
  margin: 0 auto 1.5em;
  max-width: 800px;
}

.apaf-how-to-apply ul {
  padding-left: 40px !important;
  list-style-type: disc;
  list-style-position: outside;
}

.apaf-how-to-apply li::marker {
  color: #6AB4DD;
  font-size: 1.1em;
}
/* =====================================================
   APAF ACCORDION — Unified Production Styles
   Supports both Elementor "Classic" and "New" Accordion widgets
   ===================================================== */

/* === BASE ACCORDION === */
.apaf-accordion :where(.elementor-accordion, .e-n-accordion) {
  width: 100% !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin: 0 auto 60px !important;
}

/* === ACCORDION ITEM (default closed state) === */
.apaf-accordion :where(.elementor-accordion-item, .e-n-accordion-item) {
  border: 1px solid #E4E8EC !important;
  border-radius: 8px !important;
  background: #FCFAF9 !important;
  margin-bottom: 14px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03) !important;
  transition: all 0.25s ease !important;
}
.apaf-accordion :where(.elementor-accordion-item:hover, .e-n-accordion-item:hover) {
  border-color: var(--apaf-blue) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.07) !important;
  transform: translateY(-1px) !important;
}

/* === TITLE BAR (summary for new, tab-title for classic) === */
.apaf-accordion :where(.elementor-tab-title, .e-n-accordion-item > summary) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  text-align: left !important;
  background: #FCFAF9 !important;
  color: var(--apaf-navy) !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  padding: 18px 24px !important;
  border-left: 4px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}
.apaf-accordion :where(.elementor-tab-title:hover, .e-n-accordion-item > summary:hover) {
  background: #F9FCFF !important;
  color: #2D3640 !important;
}

/* === ACTIVE / OPEN STATE === */
.apaf-accordion :where(.elementor-tab-title.elementor-active, .e-n-accordion-item[open] > summary) {
  background: #7ABEE7 !important;
  color: #fff !important;
  border-left: 4px solid var(--apaf-blue) !important;
  box-shadow: inset 0 -1px 0 rgba(63,70,84,0.1) !important;
}

/* === ICON POSITIONING === */
.apaf-accordion :where(.elementor-accordion-icon, .e-n-accordion-item > summary .e-n-accordion-icon) {
  margin-left: auto !important;
  order: 2 !important;
  font-size: 1.1rem !important;
  color: var(--apaf-blue) !important;
  transition: transform 0.25s ease, color 0.25s ease !important;
}
.apaf-accordion :where(.elementor-tab-title.elementor-active .elementor-accordion-icon,
  .e-n-accordion-item[open] > summary .e-n-accordion-icon) {
  transform: rotate(90deg) !important;
  color: #fff !important;
}

/* === CONTENT AREA === */
.apaf-accordion :where(.elementor-tab-content, .e-n-accordion-item > div) {
  background: #fff !important;
  padding: 22px 26px !important;
  border-top: 1px solid #edf0f3 !important;
  line-height: 1.7 !important;
  animation: apafFadeIn 0.4s ease;
}
@keyframes apafFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === SMOOTH EXPAND ANIMATION === */
.apaf-accordion .e-n-accordion-item > div {
  overflow: hidden !important;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.9s ease, opacity 0.8s ease, transform 0.8s ease;
}
.apaf-accordion .e-n-accordion-item[open] > div {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 1.2s ease, opacity 0.9s ease, transform 0.9s ease;
}
.apaf-accordion .e-n-accordion-item[open] > div * {
  opacity: 0;
  animation: apaf-softFade 0.7s ease forwards;
}
@keyframes apaf-softFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === THEME KIT OVERRIDES === */
.elementor-kit-12 .apaf-accordion :where(.elementor-tab-title, .e-n-accordion-item > summary) {
  background: #FCFAF9 !important;
  color: var(--apaf-navy) !important;
}
.elementor-kit-12 .apaf-accordion :where(.elementor-tab-title.elementor-active, .e-n-accordion-item[open] > summary) {
  background: #7ABEE7 !important;
  color: #fff !important;
  border-left: 4px solid var(--apaf-blue) !important;
}

/* =====================================================
   APAF ACCORDION ALT (Soft Blue Background Variant)
   ===================================================== */
.apaf-accordion.apaf-accordion-alt {
  background: #F9FBFC !important;
  border: 1px solid transparent !important;  /* ✅ fixed border glow */
  border-radius: 12px !important;
  padding: 40px 50px !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Inner cleanup (remove double backgrounds or borders) */
.apaf-accordion.apaf-accordion-alt
  :where(.elementor-widget-container, .elementor-widget-wrap, .elementor-motion-effects-layer) {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  filter: none !important;
}

/* Items inside soft-blue variant inherit same tone */
.apaf-accordion.apaf-accordion-alt
  :where(.elementor-accordion-item, .e-n-accordion-item, .elementor-tab-content) {
  background: #F9FBFC !important;
  border: none !important;
  box-shadow: none !important;
}

/* Soft dividers between items */
.apaf-accordion.apaf-accordion-alt .elementor-accordion-item {
  border-bottom: 1px solid rgba(81,124,150,0.15) !important;
}
.apaf-accordion.apaf-accordion-alt .elementor-accordion-item:last-child {
  border-bottom: none !important;
}
/* === Restore inactive left border alignment for accordion items === */
.apaf-accordion :where(.elementor-tab-title, .e-n-accordion-item > summary) {
  border-left: 4px solid transparent !important; /* keeps layout consistent */
}

/* === Active state: vivid blue stripe === */
.apaf-accordion :where(.elementor-tab-title.elementor-active, .e-n-accordion-item[open] > summary) {
  border-left: 4px solid var(--apaf-blue) !important;
}
/* === Persistent Left Border for Accordion Items === */

/* Default (closed) items — soft neutral border */
.apaf-accordion :where(.e-n-accordion-item > summary, .elementor-tab-title) {
  border-left: 4px solid rgba(81, 124, 150, 0.2) !important; /* light gray-blue */
  background-clip: padding-box !important; /* ensure it’s visible */
  position: relative !important;
  z-index: 2 !important; /* layer above Elementor’s hidden overlay */
}

/* Active / Open item — vivid APAF blue stripe */
.apaf-accordion :where(.e-n-accordion-item[open] > summary, .elementor-tab-title.elementor-active) {
  border-left-color: var(--apaf-blue) !important;
}


/* =====================================================
   APAF THANK YOU POPUP - FIXED (gradient only on content)
   ===================================================== */

/* =====================================================
   APAF THANK YOU POPUP - force white layer OFF, keep blue card only
   ===================================================== */

/* Overlay tint only */
.elementor-popup-modal {
  background: rgba(0,0,0,0.6) !important;
}

/* Kill all default popup container backgrounds */
.elementor-popup-modal .dialog-widget-content,
.elementor-popup-modal .dialog-message,
.elementor-popup-modal .elementor-lightbox,
.elementor-popup-modal .dialog-lightbox {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* The actual popup section (your card) */
.apaf-thankyou-popup.elementor-section {
  background: linear-gradient(180deg, #B5D8F4 0%, #7ABEE7 100%) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25) !important;
  padding: 60px 40px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}


.apaf-thankyou-popup h2,
.apaf-thankyou-popup h3 {
  color: #2E3A47;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.apaf-thankyou-popup p {
  color: #3E6078;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}
.apaf-thankyou-popup.elementor-section {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25) !important;
}
.elementor-popup-modal {
  background: rgba(0, 0, 0, 0.6) !important;
}
/* =====================================================
   APAF FORM STEP TRANSITION ANIMATION
   ===================================================== */

/* Base animation for number circles */
.apaf-form .e-form__indicators__indicator__number {
  transition: all 0.35s ease;
  transform: scale(1);
}

/* When a step becomes active (blue) */
.apaf-form .e-form__indicators__indicator--state-active
.e-form__indicators__indicator__number {
  animation: apaf-step-active 0.35s ease forwards;
}

/* When a step becomes completed (red) */
.apaf-form .e-form__indicators__indicator--state-completed
.e-form__indicators__indicator__number {
  animation: apaf-step-complete 0.35s ease forwards;
}

/* --- Keyframes --- */
@keyframes apaf-step-active {
  0% {
    background: #ED3847; /* start from red */
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    background: #6AB4DD; /* finish to blue */
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes apaf-step-complete {
  0% {
    background: #6AB4DD; /* start from blue */
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    background: #ED3847; /* finish to red */
    transform: scale(1);
    opacity: 1;
  }
}
/* === APAF Main Title Accent (container version) === */
.apaf-main-title h1,
.apaf-main-title h2,
.apaf-main-title h3 {
  position: relative;
  display: inline-block;
  font-weight: 800;
  font-size: 2.6rem;
  color: #2E3A47;
  margin-bottom: 16px;
  text-align: center;
}

.apaf-main-title h1::after,
.apaf-main-title h2::after,
.apaf-main-title h3::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  background-color: #ED3847;  /* APAF red */
  margin: 10px auto 0;
  border-radius: 2px;
}
/* APAF Banner Pills — Final Balanced Compression */
.apaf-banner .apaf-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  max-width: 240px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid rgba(81,124,150,0.15);
  box-shadow: 0 3px 6px rgba(81,124,150,0.1);
  background: #fff;
  line-height: 1.25;
  box-sizing: border-box;
  text-align: center;
}

.apaf-banner .apaf-pill::before {
  margin-bottom: 1px;
  line-height: 1;
}

.apaf-banner .apaf-pill p,
.apaf-banner .apaf-pill span {
  line-height: 1.1;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

@media (max-width: 768px) {
  .apaf-banner .apaf-pill {
    min-width: 180px;
    max-width: 220px;
    padding: 12px 24px;
  }
  .apaf-banner .apaf-pill p,
  .apaf-banner .apaf-pill span {
    font-size: 1.3rem;
  }
}
/* Hide stray editor placeholder lines in APAF pills */
.apaf-banner .apaf-pill p:empty,
.apaf-banner .apaf-pill div:empty,
.apaf-banner .apaf-pill br {
  display: none !important;
}
/* === APAF Banner Pills — Bottom Padding Fix === */
.apaf-banner .
{
  padding-bottom: 18px !important;  /* adds slight breathing room at bottom */
  line-height: 1.25 !important;     /* keeps label/value spacing tight */
}

.apaf-banner .apaf-pill::before {
  margin-bottom: 2px !important;    /* keeps label close to value */
}

.apaf-banner .apaf-pill p,
.apaf-banner .apaf-pill span {
  margin-bottom: 0 !important;      /* remove residual bottom margin */
}
/* === Fix APAF dynamic shortcode text alignment and width === */
.apaf-content .elementor-widget-shortcode,
.apaf-content .elementor-widget-shortcode .elementor-widget-container {
  display: block !important;
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left !important;
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  color: #2E3A47 !important;
}

/* Optional: tighten vertical spacing inside eligibility panels */
.apaf-content .elementor-widget-shortcode p {
  margin-bottom: 0.75em !important;
}