/* Muslim Teachings Academy: homepage repair v0.2.9.
   Intended to remove empty visual scaffolding and avoid an English-only banner
   on translated pages, without changing page content or assigned photos. */
.mta-home-v029 { padding-bottom: 0; }
.mta-home-v029 .mta-front-complete__editorial { padding-top: 32px; }
.mta-home-v029 .mta-editorial {
  width: min(1200px, calc(100% - 8vw));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 3.2vw, 46px);
  row-gap: 0;
  margin: 0 auto 70px;
}
.mta-home-v029 .mta-editorial > .mta-editorial-intro,
.mta-home-v029 .mta-editorial > .mta-ending { grid-column: 1 / -1; }
.mta-home-v029 .mta-editorial-intro { margin-bottom: 42px; }
.mta-home-v029 .mta-story {
  display: block;
  min-height: 0;
  padding: 27px 0 26px;
  border-top: 1px solid #d9e4ea;
  border-bottom: 0;
}
.mta-home-v029 .mta-story__copy { max-width: none; }
.mta-home-v029 .mta-editorial .mta-story h2 {
  font-size: clamp(21px, 1.8vw, 26px);
  line-height: 1.43;
  margin: 0 0 16px;
}
.mta-home-v029 .mta-story__copy > p:not(.mta-eyebrow) {
  font-size: 14.5px;
  line-height: 1.85;
  margin: 0 0 12px;
}
/* Unfilled homepage photos stay editable in WP Admin but do not show publicly. */
.mta-home-v029 .mta-image-space--empty { display: none !important; }
.mta-home-v029 .mta-story__media:has(.mta-image-space--empty) { display: none; }
.mta-home-v029 .mta-story__media { margin: 22px 0 0; }
.mta-home-v029 .mta-story__media img { width: 100%; }
.mta-home-v029 .mta-ending {
  max-width: 930px;
  margin: 21px auto 0;
  padding: 39px 28px;
  border-top: 1px solid #d9e8f3;
  background: #f7fafc;
}
/* English still uses the approved blue hero and overlapping academy badge. */
.mta-home-v029--en > .mta-hero { margin-top: 16px; margin-bottom: 96px !important; }
.mta-home-v029--en .mta-front-complete__editorial { padding-top: 0; }
.mta-home-v029--en .mta-editorial-intro { max-width: 840px; }
.mta-home-v029--en .mta-editorial-intro h1 { font-size: clamp(30px, 2.8vw, 41px); }
.mta-home-v029--en .mta-editorial-intro .mta-lead { font-size: 17px; }
/* All translated homepages receive a proper photograph-and-copy hero. */
.mta-home-v029--native .mta-editorial-intro {
  position: relative;
  isolation: isolate;
  max-width: none;
  min-height: 455px;
  margin: 0 0 35px;
  padding: clamp(35px, 5vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: start;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(116deg, #f5f9fc, #eaf4fc);
}
.mta-home-v029--native .mta-editorial-intro::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-end: 0;
  width: 43%;
  background: #edf4fb url('/wp-content/uploads/2026/10/muslim-academy-hero.webp') left center / auto 124% no-repeat;
}
.mta-home-v029--native .mta-editorial-intro > * {
  width: 54%;
  max-width: 54%;
  margin-inline: 0;
  text-align: start;
  position: relative;
  z-index: 1;
}
.mta-home-v029--native .mta-editorial-intro h1 {
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 1.33;
  margin-bottom: 17px;
}
.mta-home-v029--native .mta-editorial-intro .mta-lead {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.84;
}
.mta-home-v029 .mta-home-hero-action { margin-top: 25px; }
.mta-home-v029--en .mta-home-hero-action { display: none; }
.mta-home-v029 .mta-home-hero-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 21px;
  color: #fff;
  background: #0c63b6;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.mta-home-v029 .mta-home-hero-action a:hover { background: #084c8e; }
@media (max-width: 940px) {
  .mta-home-v029 .mta-editorial { grid-template-columns: 1fr; }
  .mta-home-v029 .mta-story { padding: 24px 0 28px; }
  .mta-home-v029--native .mta-editorial-intro { min-height: 390px; }
}
@media (max-width: 720px) {
  .mta-home-v029 .mta-editorial { width: calc(100% - 38px); margin-bottom: 45px; }
  .mta-home-v029 .mta-editorial-intro { margin-bottom: 24px; }
  .mta-home-v029--en > .mta-hero { display: block !important; }
  .mta-home-v029--en .mta-editorial-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    text-align: start;
    padding: 34px 24px 250px;
    border-radius: 13px;
    background: linear-gradient(116deg, #f5f9fc, #eaf4fc);
  }
  .mta-home-v029--en .mta-editorial-intro::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset-block-start: auto;
    inset-block-end: 0;
    inset-inline: 0;
    width: 100%;
    height: 220px;
    background: #edf4fb url('/wp-content/uploads/2026/10/muslim-academy-hero.webp') left 12% / auto 195% no-repeat;
  }
  .mta-home-v029--en .mta-editorial-intro > * { width: 100%; max-width: none; text-align: start; }
  .mta-home-v029--en .mta-home-hero-action { display: block; }
  .mta-home-v029--en .mta-editorial-intro h1 { font-size: clamp(29px, 7vw, 37px); }
  .mta-home-v029--native .mta-editorial-intro {
    min-height: 0;
    padding: 34px 24px 250px;
    border-radius: 13px;
  }
  .mta-home-v029--native .mta-editorial-intro > * { width: 100%; max-width: none; }
  .mta-home-v029--native .mta-editorial-intro::after {
    inset-block-start: auto;
    inset-block-end: 0;
    inset-inline: 0;
    width: 100%;
    height: 220px;
    background-size: auto 195%;
    background-position: left 12%;
  }
  .mta-home-v029--native .mta-editorial-intro h1 { font-size: clamp(29px, 7vw, 37px); }
  .mta-home-v029 .mta-ending { margin-top: 22px; padding: 30px 21px; }
}
