/* Crescent School — Milestone 10 layout fixes */

/* Full-width brushstroke with no seam underneath. */
.home-hero{
  overflow:hidden;
}
.brushstroke-divider{
  left:50% !important;
  bottom:-2px !important;
  width:calc(100vw + 6px) !important;
  max-width:none !important;
  height:64px !important;
  object-fit:fill !important;
  object-position:center bottom !important;
  transform:translateX(-50%) scaleX(1.55) !important;
  transform-origin:center bottom !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
  line-height:0 !important;
}

/* The section after the hero overlaps the bottom pixel so browser
   sub-pixel rounding cannot expose a white seam. */
.home-teal-body{
  position:relative;
  margin-top:-2px;
  z-index:2;
}

/* About hero image */
.about-photo{
  overflow:hidden;
  position:relative;
}
.about-photo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.about-photo-empty{
  width:100%;
  height:100%;
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#ccc;
}

/* Mixed About carousel video should occupy the same frame as images. */
.about-slideshow .slide video{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:4px;
  display:block;
  background:#111;
}

/* Gallery page: keep footer at viewport bottom when there are few/no albums. */
body.gallery-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
body.gallery-page nav{
  flex:0 0 auto;
}
body.gallery-page .gallery-main-content{
  flex:1 0 auto;
  width:100%;
  max-width:1040px;
  align-content:start;
  justify-content:center;
  box-sizing:border-box;
}
body.gallery-page footer{
  margin-top:auto;
  flex:0 0 auto;
}
.gallery-empty{
  grid-column:1/-1;
  text-align:center;
  color:#777;
  font-family:'Poppins',sans-serif;
  padding:50px 20px;
}

/* Do not let album cards overflow the grid on narrow widths. */
.gallery-main-content .album-card{
  width:min(250px,100%);
  justify-self:center;
}

@media(max-width:850px){
  body.gallery-page .gallery-main-content{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:40px 28px;
  }
}
@media(max-width:560px){
  body.gallery-page .gallery-main-content{
    grid-template-columns:1fr;
  }
  .brushstroke-divider{
    transform:translateX(-50%) scaleX(2.1) !important;
  }
}
