/* Bangla Bloom v3.2.4 — compact approved image cards and full-bleed-without-crop hero.
   Presentation only. No lesson, audio, state, storage or D1 modifications. */

/* The hero source is 1600 x 900: the media column must follow 16:9
   rather than stretch a contained image inside an oversized tall frame. */
@media (min-width: 901px) {
  .bb3-hero { min-height:0!important; align-items:stretch!important; }
  .bb3-hero .bb3-hero-copy {
    padding:clamp(22px,2.5vw,40px) clamp(24px,3vw,54px)!important;
  }
  .bb3-hero .bb3-hero-copy h1 {
    font-size:clamp(38px,3.5vw,67px)!important;
    line-height:1.055!important;
    margin:15px 0 17px!important;
  }
  .bb3-hero .bb3-hero-copy>p {margin-bottom:18px!important;line-height:1.55!important;}
  .bb3-hero .bb3-hero-copy .hero-foot {margin-top:17px!important;}
  .bb3-hero .bb3-hero-illustration {
    min-height:0!important;height:auto!important;aspect-ratio:16/9!important;
    align-self:start!important;background:transparent!important;
  }
}
.bb3-hero .bb3-hero-illustration picture.bb-approved-hero {
  position:absolute!important;inset:0!important;display:block!important;
  width:100%!important;height:100%!important;
}
.bb3-hero .bb3-hero-illustration picture.bb-approved-hero img {
  display:block!important;width:100%!important;height:100%!important;
  object-fit:contain!important;object-position:center!important;
  filter:none!important;transform:none!important;
}

/* The approved picture and its text ARE the card. Do not stretch the
   surrounding white button to the height of a neighbouring tall tile. */
.content-grid:has(.learning-card .bb-approved-subject-image) {
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr))!important;
  align-items:start!important;
  gap:13px!important;
}
.content-grid .learning-card:has(.bb-approved-subject-image) {
  box-sizing:border-box!important;
  align-self:start!important;justify-self:stretch!important;
  min-height:0!important;height:auto!important;
  padding:8px!important;border-radius:16px!important;
  display:grid!important;
  grid-template-columns:minmax(0,46%) minmax(0,1fr)!important;
  grid-template-rows:repeat(3,min-content)!important;
  column-gap:12px!important;row-gap:2px!important;
  align-content:center!important;align-items:center!important;
  text-align:left!important;
}
.content-grid .learning-card:has(.bb-approved-subject-image) > .bb3-learning-picture {
  grid-column:1!important;grid-row:1/span 3!important;
  min-width:0!important;max-width:100%!important;
  width:100%!important;height:auto!important;min-height:0!important;
  aspect-ratio:1/1!important;max-height:170px!important;
  margin:0!important;padding:0!important;
  background:#fffefa!important;
}
.content-grid .learning-card:has(.bb-approved-subject-image) > .card-glyph {
  grid-column:2!important;grid-row:1!important;
  font-size:clamp(32px,3vw,46px)!important;
  line-height:1.3!important;margin:0!important;
}
.content-grid .learning-card:has(.bb-approved-subject-image) > .card-en {
  grid-column:2!important;grid-row:2!important;
  font-size:13px!important;line-height:1.28!important;margin:0!important;
}
.content-grid .learning-card:has(.bb-approved-subject-image) > .card-hint {
  grid-column:2!important;grid-row:3!important;
  font-size:11px!important;line-height:1.35!important;margin:0!important;
}
.content-grid .learning-card:has(.bb-approved-subject-image) .bb5-real-photo {
  width:calc(100% - 4px)!important;height:calc(100% - 4px)!important;
  object-fit:contain!important;object-position:center!important;
  filter:none!important;transform:none!important;
}
@media (max-width:900px) {
  .bb3-hero .bb3-hero-illustration {min-height:0!important;height:auto!important;aspect-ratio:16/9!important;}
}
@media (max-width:660px) {
  .content-grid:has(.learning-card .bb-approved-subject-image) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;
  }
  .content-grid .learning-card:has(.bb-approved-subject-image) {
    grid-column:span 2!important;
    grid-template-columns:minmax(115px,43%) minmax(0,1fr)!important;
    padding:8px!important;
  }
  .content-grid .learning-card:has(.bb-approved-subject-image) > .bb3-learning-picture {max-height:150px!important;}
  .bb3-hero .bb3-hero-illustration {aspect-ratio:760/925!important;}
}
@media (max-width:360px) {
  .content-grid .learning-card:has(.bb-approved-subject-image) {
    grid-template-columns:minmax(102px,42%) minmax(0,1fr)!important;column-gap:9px!important;
  }
  .content-grid .learning-card:has(.bb-approved-subject-image) > .card-glyph{font-size:38px!important;}
}
@media (min-width:901px) and (max-width:1540px) {
  .bb3-hero {grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr)!important;}
  .bb3-hero .bb3-hero-copy {padding:24px 26px!important;}
  .bb3-hero .bb3-hero-copy h1 {
    font-size:clamp(35px,3.1vw,51px)!important;
    margin:10px 0 12px!important;line-height:1.05!important;
  }
  .bb3-hero .bb3-hero-copy>p {font-size:14px!important;line-height:1.43!important;margin:0 0 13px!important;}
  .bb3-hero .bb3-hero-copy .btn {font-size:12px!important;padding:9px 12px!important;min-height:41px!important;}
  .bb3-hero .bb3-hero-copy .hero-foot {font-size:10px!important;gap:7px!important;margin-top:12px!important;flex-wrap:wrap!important;}
}
