/* Layout tweaks
/* ----------------------------------------------------------
   Loaded after built/screen.css and dark-mode.css (see default.hbs).
/* ---------------------------------------------------------- */

/* Space between the photo tiles on the homepage, collection and tag pages.
   Set with the theme setting "Photo spacing". */
.has-photo-spacing-none   { --feed-gap: 0px; }
.has-photo-spacing-small  { --feed-gap: 8px; }
.has-photo-spacing-medium { --feed-gap: 20px; }
.has-photo-spacing-large  { --feed-gap: 40px; }

.post-feed {
    gap: var(--feed-gap, 0px);
}

/* Two tiles per row: subtract the gap so a pair still fits on one line */
.post-card {
    flex: 1 1 calc(50% - var(--feed-gap, 0px));
}

.post-card-large {
    flex: 1 1 100%;
}

@media (max-width: 700px) {
    .post-card {
        flex: 1 1 100%;
    }
}

/* Mobile header: logo takes the free space, then however many icon buttons
   are enabled (search, dark mode toggle) and the menu button */
@media (max-width: 767px) {
    #gh-head .gh-head-brand {
        grid-template-columns: 1fr;
        grid-auto-flow: column;
        grid-auto-columns: auto;
    }
}

/* Mobile header: the theme pulls the header out over the page padding with
   a negative margin on all four sides (-6vw). The negative bottom margin also
   pulls the content up under the header, which shows on pages that start
   directly with photos (collections, tag pages). Keep the top and sides,
   drop the bottom part. */
@media (max-width: 850px) {
    body:not(.is-head-open) .gh-head {
        margin-bottom: 0;
    }
}
