/*
 * Layout tweaks to the starno theme.
 *
 * Tile grid columns:  phones (< 576px) 2  ·  576–767px 3  ·  768–991px 4  ·  992px+ 5
 * (the theme's own style.css sets 3 / 4 / 5; this file only changes phones)
 */
@media (max-width: 575.98px) {
  .grid-item:not(.open) {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/*
 * Post details on phones (post pages and the inline preview on the home page):
 * two halves instead of three columns —
 *   left:  headline, with the subhead right under it (aligned with the image's left edge)
 *   right: client / category / text, starting where the right-hand tile image starts
 *          in the 2-column grid (same 50% + gutter).
 */
@media (max-width: 575.98px) {
  .preview-deets > .row:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
  }
  .preview-deets > .row:first-child > .col-20 {
    max-width: none;
    min-width: 0;
  }
  .preview-deets > .row:first-child > .col-20:nth-child(1) { grid-column: 1; grid-row: 1; }
  .preview-deets > .row:first-child > .col-20:nth-child(2) { grid-column: 1; grid-row: 2; }
  .preview-deets > .row:first-child > .col-20:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
  .preview-deets .preview-title {
    margin-bottom: 0.25rem; /* subhead sits right under the headline */
  }
}

/*
 * Carousel dots: smaller (8px instead of 16px) and closer to the bottom of the image
 * (about 10px up instead of 26px). The transparent border keeps a comfortable tap area.
 */
.carousel-indicators {
  margin-bottom: 0;
}
.carousel-indicators li {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 8px;
  max-width: 8px;
  height: 8px;
  margin-left: 3px;
  margin-right: 3px;
}

/* Let horizontal swipes on a carousel change slides while vertical swipes still scroll the page */
.carousel {
  touch-action: pan-y;
}
.carousel img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
