/* WESO Phase C8 — mobile density, media gallery folders and balanced card grids */
@media (max-width: 768px){
  /* Global: use the screen instead of stacking generous desktop spacing. */
  .section{padding:1.7rem 0!important}
  .section-title,.testimonials-title,.recent-events-title{margin-top:.35rem!important;margin-bottom:1.15rem!important}
  .section-title::after{bottom:-8px!important}
  .media-content{width:100%!important;max-width:none!important;padding:0!important;margin:0!important}

  /* Media heading and intro. */
  .media-content>.section-title{font-size:clamp(1.75rem,7vw,2.15rem)!important;margin-top:.35rem!important;margin-bottom:1.2rem!important}
  .media-content>.subtitle{display:block!important;color:#526174!important;font-size:.92rem!important;line-height:1.5!important;max-width:620px!important;margin:0 auto 1.15rem!important;padding:0 4px!important}

  /* Four compact counters always stay on one row on phones. */
  .media-content .stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;width:100%!important;max-width:none!important;margin:.7rem 0 1rem!important;padding:0!important}
  .media-content .stat-item{min-width:0!important;flex:none!important;padding:9px 2px 8px!important;background:#f7f9fc!important;border:1px solid #e5eaf1!important;border-radius:10px!important}
  .media-content .stat-number{font-size:1.42rem!important;line-height:1!important;margin:0 0 5px!important;color:#c79b18!important}
  .media-content .stat-label{display:block!important;color:#17385f!important;font-size:.58rem!important;line-height:1.12!important;letter-spacing:.02em!important;text-transform:uppercase!important;white-space:normal!important}

  /* Media categories are a compact four-option toolbar, not a tall stack. */
  .media-content .tags{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;width:100%!important;max-width:none!important;margin:0 0 1rem!important;padding:5px!important;border-radius:13px!important;overflow:visible!important}
  .media-content .tags a{min-width:0!important;padding:8px 2px!important;border-radius:9px!important;justify-content:center!important;gap:4px!important;font-size:.69rem!important;line-height:1!important;white-space:nowrap!important;transform:none!important}
  .media-content .tags a i{font-size:.8rem!important}

  /* Album folders: clean, compact two-column folder cards. */
  #albums-container{width:100%!important}
  #photosSelection{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:.65rem!important;width:100%!important}
  #photosSelection .wing-card{min-width:0!important;border-radius:12px!important;overflow:hidden!important}
  #photosSelection .image-wrap{height:auto!important;aspect-ratio:4/3!important;min-height:0!important}
  #photosSelection .album-cover{height:100%!important;min-height:0!important;aspect-ratio:4/3!important;object-fit:cover!important}
  #photosSelection .wing-content{padding:9px 9px 10px!important;display:flex!important;flex-direction:column!important;min-height:112px!important}
  #photosSelection .wing-content h3{font-size:.88rem!important;line-height:1.22!important;margin:0 0 4px!important}
  #photosSelection .album-title-link{font-size:inherit!important;line-height:inherit!important;text-decoration:none!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  #photosSelection .wing-content .date{font-size:.67rem!important;line-height:1.2!important;margin:0 0 4px!important}
  #photosSelection .wing-content p:not(.date){font-size:.72rem!important;line-height:1.3!important;margin:0 0 7px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  #photosSelection .wing-button-link{font-size:.7rem!important;line-height:1!important;padding:7px 9px!important;margin-top:auto!important;align-self:flex-start!important;border-radius:7px!important}

  /* Wings/ministry cards: two per row, balanced image and copy. */
  .wings-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:1rem!important}
  .wings-grid .wing-card{min-width:0!important;border-radius:12px!important}
  .wings-grid .wing-card img,.wings-grid .wing-card img.lazy-image{height:auto!important;aspect-ratio:4/3!important;object-fit:cover!important}
  .wings-grid .wing-content{padding:10px!important}
  .wings-grid .wing-content h3{font-size:.9rem!important;line-height:1.2!important;margin:0 0 5px!important}
  .wings-grid .wing-content p{font-size:.72rem!important;line-height:1.35!important;margin:0 0 8px!important;display:-webkit-box!important;-webkit-line-clamp:3!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  .wings-grid .wing-button,.wings-grid .wing-button-link{font-size:.7rem!important;padding:7px 9px!important;border-radius:7px!important;margin-top:auto!important}

  /* Event cards: two per row on phone, with deliberately compact content. */
  .events-container,.highlight-cards,.activities-container{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:1rem!important}
  .event-card,.highlight-card,.activity-card{min-width:0!important;border-radius:12px!important;overflow:hidden!important}
  .event-poster,.highlight-card-poster{min-height:0!important;height:auto!important;aspect-ratio:4/3!important}
  .event-poster img,.highlight-card-poster img,.event-poster-image,.highlight-card-image{width:100%!important;height:100%!important;object-fit:cover!important}
  .event-content,.highlight-card-content,.activity-card{padding:10px!important}
  .event-title,.highlight-card h3,.activity-day{font-size:.88rem!important;line-height:1.2!important;margin-bottom:5px!important}
  .event-description,.highlight-card p,.activity-card p{font-size:.7rem!important;line-height:1.32!important;margin-bottom:6px!important}
  .event-badge,.event-status{font-size:.62rem!important;padding:4px 6px!important}
  .filter-tabs{margin:.7rem 0!important}
  .filter-tab{padding:.45rem .75rem!important;font-size:.72rem!important}
}
@media (max-width: 380px){
  .media-content .stat-label{font-size:.53rem!important}
  .media-content .tags a{font-size:.62rem!important}
  #photosSelection,.wings-grid,.events-container,.highlight-cards,.activities-container{gap:7px!important}
  #photosSelection .wing-content,.wings-grid .wing-content,.event-content,.highlight-card-content,.activity-card{padding:8px!important}
}
@media (max-width:768px){
  #albums-container{display:block!important}
  .photosDiv:not(.active) #albums-container{display:none!important}
}
