/* ============================================================
   ASONA ABUSUA GLOBAL — LAYOUT FIXES
   Loaded last so it wins. Nothing else needs to change.
   ============================================================ */

/* ---- 1. Kill sideways scrolling on phones -------------------
   Something wide (a video, a grid, a 100vw block) was pushing
   the page past the screen edge. This clamps it. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: border-box; }

/* ---- 2. Nothing may be wider than its container ------------- */
img, video, iframe, embed, object, canvas, svg {
  max-width: 100%;
  height: auto;
}
video { display: block; }

/* Long words / URLs used to blow the layout open */
p, li, h1, h2, h3, h4, h5, h6, td, th, a, span, blockquote {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Tables scroll instead of stretching the page */
table { width: 100%; }
.table-responsive, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- 3. Headings were demoted h1 -> h2 for SEO --------------
   These keep the exact look they had before. */
h2.autoDisplay {
  font-family: var(--font-display, inherit) !important;
  font-weight: 700 !important;
}
.slider .slider-container .swiper-slide .container h2,
.page-header .container h2 { font: inherit; }

.project-info h2,
.about-content h2,
.hero-content h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

/* ---- 4. Section headings scale with the screen -------------- */
.section-title {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.2;
}

/* ---- 5. The two-column grids inside project cards -----------
   These were hard-coded to "1fr 1fr" inline, so on a phone each
   column was about 140px wide and the text stacked one word per
   line. This stacks them properly instead. */
@media (max-width: 767px) {
  .project-info [style*="grid-template-columns"],
  .project-info div[style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

/* ---- 6. Portrait videos in the culture section --------------
   The two new videos are tall (phone-shot), so without a fixed
   frame they stretched the row. This gives them a proper box. */
.project-vidbox {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #0a0e1a;
}
.project-vidbox video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 767px) {
  .project-vidbox { aspect-ratio: 4 / 5; }
}

/* Card itself stacks on small screens */
@media (max-width: 991px) {
  .project-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px;
  }
  .project-card .project-info { width: 100% !important; }
}

/* ---- 7. Background videos ----------------------------------- */
.back-vid {
  object-fit: cover;
  pointer-events: none;
}
@media (max-width: 767px) {
  /* Corner decoration was a 300px box on a 360px screen */
  .blackhole-box { width: 180px; height: 180px; opacity: 0.5; }
}

/* ---- 8. Header / logo ---------------------------------------
   The logo file used to be 3375px square. Now it is sized. */
header .logo img,
.navbar .logo img,
.footer-logo img,
a.logo img { max-height: 64px; width: auto; }
@media (max-width: 767px) {
  header .logo img, .navbar .logo img, a.logo img { max-height: 46px; }
}

/* ---- 9. Cards and grids that had no mobile rule ------------- */
@media (max-width: 991px) {
  .leadership-grid, .pillars-grid, .category-grid,
  .chapter-grid, .stats-grid, .values-grid, .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  }
}
@media (max-width: 575px) {
  .leadership-grid, .pillars-grid, .category-grid,
  .chapter-grid, .stats-grid, .values-grid, .benefits-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- 10. Consistent side padding ---------------------------- */
@media (max-width: 767px) {
  section, .container { padding-left: 18px; padding-right: 18px; }
  section { padding-top: 56px; padding-bottom: 56px; }
}

/* ---- 11. Tap targets big enough for a thumb ----------------- */
@media (max-width: 991px) {
  .menu a, .navbar a, button, .btn, input[type="submit"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---- 12. Forms don't overflow ------------------------------- */
input, select, textarea, .form-control {
  max-width: 100%;
  font-size: 16px; /* stops iPhone zooming in on focus */
}
textarea { resize: vertical; }

/* ---- 13. Footer ---------------------------------------------- */
@media (max-width: 767px) {
  footer .row > [class*="col-"] { margin-bottom: 28px; }
  footer { text-align: center; }
  footer ul { padding-left: 0; list-style: none; }
}

/* ---- 14. Respect "reduce motion" accessibility setting ------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- 15. Skip link for keyboard and screen-reader users ------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: #C9A84C;
  color: #0a0e1a;
  padding: 12px 20px;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- 16. Asona Beauty Pageant video section ------------------
   The video is portrait (shot on a phone), so it gets a fixed
   frame that never stretches the page. */
.ba-video-section { padding: 72px 0; background: #080C18; }
.ba-eyebrow {
  font-size: .68rem; letter-spacing: .28em; text-transform: uppercase;
  color: #C9A84C; font-weight: 600; display: block; margin-bottom: 12px;
}
.ba-video-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff; font-weight: 900; margin-bottom: 28px;
}
.ba-video-title em { color: #C9A84C; font-style: italic; }
.ba-video-frame {
  max-width: 420px;           /* portrait video, so keep it narrow */
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(201,168,76,.35);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.ba-video-frame video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ba-video-caption {
  text-align: center; color: #cbb; margin-top: 20px; font-size: .95rem;
}
.ba-video-caption a { color: #C9A84C; text-decoration: underline; }

/* ---- 17. Testimonial / stat grids that were locked to 3 up --- */
@media (max-width: 991px) {
  section [style*="grid-template-columns:repeat(3,1fr)"],
  section [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  section [style*="grid-template-columns:repeat(3,1fr)"],
  section [style*="grid-template-columns: repeat(3, 1fr)"],
  section [style*="grid-template-columns:repeat(4,1fr)"],
  section [style*="grid-template-columns: repeat(4, 1fr)"],
  section [style*="grid-template-columns:repeat(2,1fr)"],
  section [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* ---- 18. Gallery grid ---------------------------------------- */
ul.gallery { list-style: none; padding-left: 0; }
ul.gallery li a { display: block; position: relative; overflow: hidden; }
ul.gallery li img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: 4 / 3;
}

/* ---- 19. Supportive Funds page -------------------------------- */
.sf-section { padding: 80px 0; background: #FAF6EE; color: #080C18; }
.sf-eyebrow {
  font-size: .68rem; letter-spacing: .28em; text-transform: uppercase;
  color: #C9A84C; font-weight: 600; display: block; margin-bottom: 12px;
}
.sf-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 900; margin-bottom: 18px; color: #080C18;
}
.sf-title em { color: #C9A84C; font-style: italic; }
.sf-lead { max-width: 760px; font-size: 1.05rem; line-height: 1.75; margin-bottom: 44px; }

.sf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 56px;
}
.sf-card {
  background: #fff;
  border: 1px solid rgba(201,168,76,.35);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 8px 28px rgba(8,12,24,.06);
}
.sf-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; color: #080C18;
}
.sf-card p { line-height: 1.7; color: #444; margin: 0; }

.sf-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800; margin: 12px 0 20px; color: #080C18;
}
.sf-steps { max-width: 760px; margin: 0 0 48px 20px; }
.sf-steps li { margin-bottom: 12px; line-height: 1.7; }
.sf-steps a { color: #9a7f28; text-decoration: underline; }

.sf-docs { list-style: none; padding-left: 0; margin-bottom: 52px; }
.sf-docs li { margin-bottom: 12px; }
.sf-docs a {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid rgba(201,168,76,.45);
  border-radius: 10px; padding: 14px 20px;
  color: #080C18; font-weight: 600; text-decoration: none;
  transition: all .25s ease;
}
.sf-docs a::before { content: "\\1F4C4"; }
.sf-docs a:hover { background: #C9A84C; color: #fff; border-color: #C9A84C; }

.sf-cta {
  border-top: 1px solid rgba(8,12,24,.12);
  padding-top: 36px; text-align: center;
}
.sf-cta p { margin-bottom: 16px; font-size: 1.05rem; }
.sf-btn {
  display: inline-block; background: #C9A84C; color: #080C18;
  padding: 14px 34px; border-radius: 999px;
  font-weight: 700; text-decoration: none; letter-spacing: .04em;
  transition: all .25s ease;
}
.sf-btn:hover { background: #080C18; color: #C9A84C; }

@media (max-width: 767px) {
  .sf-section { padding: 56px 0; }
  .sf-steps { margin-left: 18px; }
}

/* ---- 20. Thank-you page reuses the 404 layout styling --------- */
.thankyou-section { padding: 140px 0 120px; text-align: center; }
.thankyou-section figure { display: block; margin-bottom: 40px; }
.thankyou-section figure img { max-height: 160px; width: auto; margin: 0 auto; }
.thankyou-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: .06em; font-weight: 900; margin-bottom: 18px;
}
.thankyou-section p {
  font-size: 15px; line-height: 1.7;
  max-width: 500px; margin: 0 auto 28px;
}
.thankyou-section a {
  display: inline-block; background: #C9A84C; color: #080C18;
  padding: 14px 34px; border-radius: 999px;
  font-weight: 700; letter-spacing: .06em; text-decoration: none;
  transition: all .25s ease;
}
.thankyou-section a:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(201,168,76,.4); }
@media (max-width: 767px) { .thankyou-section { padding: 80px 0; } }
