/*
Theme Name: Adventist Volunteers
Author: Brett Donald
Version: 1.0
*/

@font-face {
	font-family: 'EyeCatchingSPD';
	src: url('font/EyeCatchingSPDunicode.woff2') format('woff2');
	font-style: normal;
	font-weight: normal;
}
@font-face {
  font-family: 'Advent Sans SPD';
  src: url('font/advent-sans-spd.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --clr-adventist-fire: #ff8200;
  --clr-adventist-fire-50: #ff82007f;
  --clr-adventist-excellence: #005cab;
  --clr-adventist-excellence-25: #005cab3f;
  --clr-adventist-compassion: #d20073;
  --clr-adventist-calm: #00cfc8;
  --clr-charcoal: #3d3935;
  --clr-grey-mid: #888;
  --clr-grey-light: #bbb;
  --clr-off-white: #f4f4f4;
  --tra-short: 250ms;
}

body, input, textarea, select, button {
  font-family: Montserrat, sans-serif;
  font-size: 18px;
  line-height: 1.3;
}

body {
  margin: 0;
}

a {
  color: var(--clr-adventist-excellence);
  transition: 0.3s;
  text-underline-offset: 3px;
  text-decoration-color: var(--clr-adventist-excellence-25);
}

a:hover {
  text-decoration-color: var(--clr-adventist-excellence);
}

h1, h2, h3 {
  font-weight: 600;
}

h1 {
  font-size: 2em;
}

img {
  width: auto;
  height: auto;
  max-width: 100%;
}

input[type=text], input[type=email], textarea, select {
  border: 1px solid var(--clr-grey-light);
  border-radius: 5px;
  background: white;
  padding: 10px;
  max-width: 100%;
  box-sizing: border-box;
}

header nav a { /* button, input[type="submit"], .wp-block-button__link, .wp-block-post-excerpt__more-link, */
  background: transparent;
  color: inherit;
  padding: 0.3em 1em;
  border: 1px solid #888;
  border-radius: 99em;
  font-size: 1em;
  font-weight: 500;
  transition: var(--tra-short);
  cursor: pointer;
}

button:not([role=menuitemradio]), .button, .wp-block-button__link {
  border: 1.5px solid #555;
  border-radius: 9999px;
  color: black;
  background: transparent;
  padding: 0.75em 1.5em;
  font-weight: 600;
  transition: 0.3s;
  font-size: 1em;
  text-decoration: none;
}

button:hover, .button:hover, .wp-block-button__link:hover {
  border-color: var(--clr-adventist-fire);
  color: white;
  background: var(--clr-adventist-fire);
}

button.white, .button.white, .wp-block-buttons.white .wp-block-button__link {
  border-color: white;
  color: white;
}

button.over-orange:hover, .button.over-orange:hover, .wp-block-buttons.over-orange .wp-block-button__link:hover {
  background: black;
}

hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 1em 0;
}

nav {
  display: flex;
  gap: 0.5em 1em;
  font-weight: 600;
/*  
  text-transform: uppercase;
  letter-spacing: 2px;
*/
  flex-wrap: wrap;
  justify-content: center;
}

.read-more {
  font-size: 12px;
  color: var(--clr-grey-mid);
  font-style: italic;
}

.news-header {
  font-weight: 600;
  margin-bottom: 0.5em;
}

/* BLOCKS */

p.has-background, .wp-block-group.has-background {
	padding: 1.5em 2em;
}

.wp-block-group.has-background .wp-block-group__inner-container>*:first-child {
	margin-top: 0;
}

.wp-block-group.has-background .wp-block-group__inner-container>*:last-child {
	margin-bottom: 0;
}

.wp-block-embed.is-type-video iframe {
  width: 100%;
  height: auto;
  display: block;
}

.wp-embed-aspect-16-9 iframe {
  aspect-ratio: 16/9;
}

.wp-embed-aspect-9-16 iframe {
  aspect-ratio: 9/16;
}

.wp-block-embed.alignleft {
  float: left;
  margin: .5em 1em .5em 0;
}

.wp-block-embed.aligncenter {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.wp-block-embed.alignright {
  float: right;
  margin: .5em 0 .5em 1em;
}

.wp-block-embed__wrapper {
  border-radius: 1em;
  overflow: hidden;
}

/* DETAILS WIDGETS */

summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  width: 1em;
  height: 1em;
  content: '';
  background-image: url(img/chevron-down.svg);
  background-position: center;
  background-size: auto 0.5em;
  background-repeat: no-repeat;
}

details[open] summary:after {
  background-image: url(img/chevron-up.svg);
}

/*
details[open] summary ~ * {
  animation: sweep 300ms ease-in-out;
}

@keyframes sweep {
  0%    {opacity: 0; margin-top: -5em;}
  100%  {opacity: 1; margin-top: 0px;}
}
*/

/* FORMS - CONTACT FORM 7 */

.wpcf7 form .wpcf7-response-output {
  margin: 2em 0 1em;
  padding: 0;
}
.wpcf7 form.init .wpcf7-response-output {
  display: none;
}
.wpcf7 form.sent .wpcf7-response-output {
  border: 0;
}
.wpcf7 form.sent .wpcf7-response-output::before {
  content: ' ';
  background-image: url(img/icon-ok.svg);
  background-size: contain;
  display: inline-block;
  width: 2em;
  height: 2em;
  margin-right: 0.8em;
  vertical-align: middle;
}
.wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.aborted .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output {
  border: 0;
}
.wpcf7 form.failed .wpcf7-response-output::before, .wpcf7 form.aborted .wpcf7-response-output::before, .wpcf7 form.spam .wpcf7-response-output::before {
  content: ' ';
  background-image: url(img/icon-error.svg);
  background-size: contain;
  display: inline-block;
  width: 2em;
  height: 2em;
  margin-right: 0.8em;
  vertical-align: middle;
}
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output {
  border: 0;
}
.wpcf7 form.invalid .wpcf7-response-output::before, .wpcf7 form.unaccepted .wpcf7-response-output::before {
  content: ' ';
  background-image: url(img/icon-warn.svg);
  background-size: contain;
  display: inline-block;
  width: 2em;
  height: 2em;
  margin-right: 0.8em;
  vertical-align: middle;
}
.wpcf7-not-valid-tip {
  font-size: 14px;
  color: var(--clr-adventist-fire);
  margin-top: 2px;
}

/*
.banner-image {
  margin: 0;
  position: relative;
  img {
    display: block;
    width: 100%;
    height: 30vh;
    object-fit: cover;
    filter: brightness(0.8);
  }
  h1 {
    position: absolute;
    bottom: 1em;
    left: 0;
    width: 100%;
    color: white;
    text-shadow: 0 0 8px rgb(0 0 0 / 0.2);
    margin: 0;
    text-align: center;
  }
}

.gradient {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(0deg, rgb(0% 0% 0% / 0) 0%, rgb(0% 0% 0% / 0.0015625) 6.25%, rgb(0% 0% 0% / 0.00625) 12.5%, rgb(0% 0% 0% / 0.0140625) 18.75%, rgb(0% 0% 0% / 0.025) 25%, rgb(0% 0% 0% / 0.0390625) 31.25%, rgb(0% 0% 0% / 0.05625) 37.5%, rgb(0% 0% 0% / 0.0765625) 43.75%, rgb(0% 0% 0% / 0.1) 50%, rgb(0% 0% 0% / 0.1265625) 56.25%, rgb(0% 0% 0% / 0.15625) 62.5%, rgb(0% 0% 0% / 0.18906250000000002) 68.75%, rgb(0% 0% 0% / 0.225) 75%, rgb(0% 0% 0% / 0.26406250000000003) 81.25%, rgb(0% 0% 0% / 0.30625) 87.5%, rgb(0% 0% 0% / 0.3515625) 93.75%, rgb(0% 0% 0% / 0.4) 100% );
}
*/

/* HEADER */

header {
  background-color: transparent;
  background-size: cover;
  color: white;
  text-shadow: 0 0 5px rgb(0 0 0 / 0.25);
  padding: 0.85em 1.5em 1.5em;
  @media (min-width: 500px) {padding: 0.85em 10vw 1.5em;}
  min-height: min(25vh, 18em);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  gap: 1em;
  .logo {
    width: 250px;
    @media (min-width: 500px) {width: 300px;}
    aspect-ratio: 5.5;
    background-image: url(img/unboxed-colour-light.svg);   /* if we ever need a static header, we might need a black version of this logo */
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left;
  }
  nav {
    display: flex;
    align-items: center;
    gap: 1px;
    &:has(>:last-child.button) {margin-right: -1em;}
    a {
      border: 0;
      &.xbutton {
        @media (min-width: 1100px) {
          background: var(--clr-adventist-fire);
          margin-left: 1em;
          margin-right: 1em;
          text-shadow: initial;
        }
      }
      &:hover {
        background: white;
        color: var(--clr-adventist-fire);
        text-shadow: initial;
      }
    }
  }
  h1 {
    margin: 0;
    grid-row: 4;
    text-align: center;
    text-wrap: balance;
  }
  @media (min-width: 1000px) {
    grid-template-columns: auto auto;
    grid-template-rows: auto;
    align-content: space-between;
    justify-content: space-between;
    h1 {
      grid-column: 1 / span 2;
      justify-self: initial;
      grid-row: initial;
    }
  }
}

.banner-video {
  height: 100svh;
  position: relative;
  color: white;
  margin-bottom: 0;
  video {
    height: 100%;
    object-fit: cover;
  }
  .gradient {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(0deg, rgb(0% 0% 0% / 0) 0%, rgb(0% 0% 0% / 0.00009765625) 6.25%, rgb(0% 0% 0% / 0.00078125) 12.5%, rgb(0% 0% 0% / 0.00263671875) 18.75%, rgb(0% 0% 0% / 0.00625) 25%, rgb(0% 0% 0% / 0.01220703125) 31.25%, rgb(0% 0% 0% / 0.02109375) 37.5%, rgb(0% 0% 0% / 0.03349609375) 43.75%, rgb(0% 0% 0% / 0.05) 50%, rgb(0% 0% 0% / 0.07119140625) 56.25%, rgb(0% 0% 0% / 0.09765625) 62.5%, rgb(0% 0% 0% / 0.12998046875) 68.75%, rgb(0% 0% 0% / 0.16875) 75%, rgb(0% 0% 0% / 0.21455078125) 81.25%, rgb(0% 0% 0% / 0.26796875) 87.5%, rgb(0% 0% 0% / 0.32958984375) 93.75%, rgb(0% 0% 0% / 0.4) 100% );
  }
  .tagline {
    font-family: 'Advent Sans SPD';
    font-weight: normal;
    text-align: center;
    margin: 0;
    position: absolute;
    left: 50%;
    width: 90%;
    top: 50%;
    transform: translate(-50%, -50%);
    @media (max-height: 500px) {
      top: initial;
      bottom: 10%;
      transform: translateX(-50%);
    }
    font-size: 3em;
    @media (min-width: 500px) {font-size: 4em;}
    @media (min-width: 1500px) {font-size: 5em;}
    @media (min-width: 2500px) {font-size: 6em;}
    line-height: 1;
    text-shadow: 0 0 5px rgb(0 0 0 / 0.25);
    br {
      @media (orientation: landscape) and (max-height: 500px) {display: none;}
    }
  }
}

/* FOOTER */

footer {
  color: #ffffffcc;
  background: var(--clr-charcoal);
}

footer a, footer .socials a i {
  transition: 300ms;
}

footer a {
  color: inherit;
  text-decoration: underline;
}

footer a:hover {
  color: white;
}

footer .columns {
  display: flex;
  gap: 1em;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 2em;
}

footer .columns>*:first-child {
  text-align: center;
}

footer nav {
  justify-content: center;
  margin-bottom: 1.5em;
}

footer .socials {
  font-size: 1.6em;
  display: flex;
  justify-content: center;
  gap: 0.8em;
  margin: 0 0 1rem;
}

footer .socials a:hover i {
  transform: scale(1.1);
}

footer .acknowledge {
  font-size: 0.65em;
  margin-bottom: 0;
  text-align: center;
  color: rgb(255 255 255 / 0.7);
  line-height: 1.4;
  text-wrap: balance;
}

/* MAIN */

main, footer {
  padding-top: 2em;
  padding-bottom: 2em;
  padding-left: max(1em, 3vw);
  padding-right: max(1em, 3vw);
}
main {
  padding-bottom: 4em;
}
.alignwide-within {
  margin-left: max(1em, 3vw);
  margin-right: max(1em, 3vw);
}
.alignfull, section, .wp-block-cover, .slider.full {
  margin-left: min(-1em, -3vw);
  margin-right: min(-1em, -3vw);
}
p.alignfull, h2.alignfull, .wp-block-latest-posts.alignfull, section .alignfull, .wp-block-cover .alignfull {
  margin-left: 0;
  margin-right: 0;
}
@media (min-width: 500px) {
  main, footer {
    padding-left: 10vw;
    padding-right: 10vw;
  }
  .alignwide {
    margin-left: -5vw;
    margin-right: -5vw;
  }
  .alignwide-within {
    margin-left: 5vw;
    margin-right: 5vw;
  }
  .alignfull, .featured-image, .wp-block-cover .alignfull {
    margin-left: -10vw;
    margin-right: -10vw;
  }
  p.alignfull, h2.alignfull, .wp-block-latest-posts.alignfull {
    margin-left: calc(-10vw + max(1em,3vw));
    margin-right: calc(-10vw + max(1em,3vw));
  }
  section, .wp-block-cover {
    margin-left: -10vw;
    margin-right: -10vw;
    padding-left: 10vw;
    padding-right: 10vw;
  }
  section.alignwide, .wp-block-cover.alignwide {
    margin-left: -10vw;
    margin-right: -10vw;
    padding-left: 5vw;
    padding-right: 5vw;
  }
  section.alignfull, .wp-block-cover.alignfull {
    margin-left: -10vw;
    margin-right: -10vw;
    padding-left: max(1em, 3vw);
    padding-right: max(1em, 3vw);
  }
}
@media (min-width: 1000px) {
  main, footer {
    padding-left: 15vw;
    padding-right: 15vw;
  }
  .alignwide {
    margin-left: -7.5vw;
    margin-right: -7.5vw;
  }
  .alignwide-within {
    margin-left: 7.5vw;
    margin-right: 7.5vw;
  }
  .alignfull, .featured-image, .wp-block-cover .alignfull {
    margin-left: -15vw;
    margin-right: -15vw;
  }
  p.alignfull, h2.alignfull, .wp-block-latest-posts.alignfull {
    margin-left: calc(-15vw + max(1em,3vw));
    margin-right: calc(-15vw + max(1em,3vw));
  }
  section, .wp-block-cover {
    margin-left: -15vw;
    margin-right: -15vw;
    padding-left: 15vw;
    padding-right: 15vw;
  }
  section.alignwide, .wp-block-cover.alignwide {
    margin-left: -15vw;
    margin-right: -15vw;
    padding-left: 7.5vw;
    padding-right: 7.5vw;
  }
  section.alignfull, .wp-block-cover.alignfull {
    margin-left: -15vw;
    margin-right: -15vw;
    padding-left: max(1em, 3vw);
    padding-right: max(1em, 3vw);
  }
}
@media (min-width: 1500px) {
  main, footer {
    padding-left: 20vw;
    padding-right: 20vw;
  }
  .alignwide {
    margin-left: -10vw;
    margin-right: -10vw;
  }
  .alignwide-within {
    margin-left: 10vw;
    margin-right: 10vw;
  }
  .alignfull, .featured-image, .wp-block-cover .alignfull {
    margin-left: -20vw;
    margin-right: -20vw;
  }
  p.alignfull, h2.alignfull, .wp-block-latest-posts.alignfull {
    margin-left: calc(-20vw + max(1em,3vw));
    margin-right: calc(-20vw + max(1em,3vw));
  }
  section, .wp-block-cover {
    margin-left: -20vw;
    margin-right: -20vw;
    padding-left: 20vw;
    padding-right: 20vw;
  }
  section.alignwide, .wp-block-cover.alignwide {
    margin-left: -20vw;
    margin-right: -20vw;
    padding-left: 10vw;
    padding-right: 10vw;
  }
  section.alignfull, .wp-block-cover.alignfull {
    margin-left: -20vw;
    margin-right: -20vw;
    padding-left: max(1em, 3vw);
    padding-right: max(1em, 3vw);
  }
}

.page header+.wp-post-image, .error404 header+img, .single .wp-post-image {
  display: block;
}

.page header+.wp-post-image, .error404 header+img {
  width: 100%;
  height: 30vh;
  object-fit: cover;
}

figure:has(figcaption) {
  display: table;
}

figcaption, .featured-image-caption {
  margin-top: 0.5em;
  font-style: italic;
  font-size: 0.8em; 
  color: var(--clr-grey-mid);  
  text-align: right;
  text-wrap: balance;
}

figcaption {
  display: table-caption;
  caption-side: bottom;
}

/* POST GRID */

.post-main, .post-section {
  background: var(--clr-off-white);
  padding-top: 1em;
}

.post-section {
  padding-bottom: 1em;
}

.post-section .news-header {
  margin-left: 1em;
  margin-right: 1em;
  @media (min-width: 500px) {
    margin-left: 0;
    margin-right: 0;
  }
}

.post-grid, .wp-block-latest-posts.is-grid, .card-grid > div {
  display: grid;
  grid-template-columns: auto;
  @media (min-width: 500px) {grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));}
}

.post-section .post-grid {
  margin-left: 1em;
  margin-right: 1em;
}

@media (min-width: 500px) {
  .post-grid, .post-section .post-grid {
    margin-left: -1em;
    margin-right: -1em;
  }
}

.wp-block-latest-posts.is-grid {
  margin-left: -1em !important;
  margin-right: -1em !important;
}

.wp-block-latest-posts.is-grid li {
  margin: 0;
  width: auto;
}

nav a, .post-grid a, .wp-block-latest-posts.is-grid>li>a, article.feature a, .card-grid a {
  color: inherit;
  text-decoration: none;
}

.post-grid a, .wp-block-latest-posts.is-grid>li>a, article.feature a, .card-grid a {
  display: block;
  padding: 1em 0;
}

@media (min-width: 500px) {
  article.feature a {
    margin-left: -1em;
    margin-right: -1em;
  }

  .post-grid a, .wp-block-latest-posts.is-grid>li>a, article.feature a, .card-grid a {
    padding: 1em;
    border-radius: 1.75em 1.75em 1em 1em;
    transition: 0.3s;
  }
  
  .post-grid a:hover, .wp-block-latest-posts.is-grid>li>a:hover, article.feature a:hover, .card-grid a:hover {
    background: white;
    box-shadow: 0 0 10px rgb(0 0 0 / 0.2);
  }
}

.post-grid img, .wp-block-latest-posts.is-grid>li>a>div>.wp-block-latest-posts__featured-image>img, article.feature img {
  object-fit: cover;
  display: block;
}

.post-grid img, .wp-block-latest-posts.is-grid>li>a>div>.wp-block-latest-posts__featured-image>img, .card-grid img {
  border-radius: 1em;
}

@media (min-width: 500px) {
  article.feature figure {
    border-radius: 1em;
    overflow: hidden;
  }
}

.post-grid img, .wp-block-latest-posts.is-grid>li>a>div>.wp-block-latest-posts__featured-image>img, .card-grid img {
  aspect-ratio: 3/2;
}

.post-grid h3, .wp-block-latest-posts.is-grid h3 {
  margin: 1rem 0 0;
  line-height: 1.2;
  text-wrap: balance;
  font-weight: 600;
}

.post-grid .excerpt, .wp-block-latest-posts.is-grid .wp-block-latest-posts__post-excerpt, article.feature .excerpt {
  font-size: 0.8em;
  color: #333;
}

.post-grid .excerpt>p:last-child, .wp-block-latest-posts.is-grid .wp-block-latest-posts__post-excerpt, article.feature .excerpt>p:last-child {
  margin-bottom: 0;
}

.post-grid-meta {
  font-size: 12px;
  color: var(--clr-grey-mid);
  font-style: italic;
  margin-top: 0.25em;
}

/* SINGLE POST */

.post-title, .post-meta {
  margin: 0;
}

.single main {
  padding-top: 3em;
  padding-bottom: 0;
}

.single main > article > .post-title {
  font-size: clamp(1.5em, 5vw, 3em);
  line-height: 1.1;
  text-wrap: balance;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #eee;
  margin-bottom: 0.5em;
}

@media (max-width: 500px) {
  .single main > article .wp-post-image {
    object-fit: cover;
    aspect-ratio: 3/2;
  }
}

.single main > article .wp-post-image, .single main > article .wp-block-image:not(.unrounded) img {
  border-radius: 1em;
}

.post-meta {
  color: var(--clr-grey-mid);
  font-style: italic;
  font-size: 0.8em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1em;
  padding-top: 1em;
  margin-bottom: 1em;
}

.post-nav {
  margin-top: 1em;
  display: flex;
  gap: 1em;
  justify-content: center;
  font-size: 0.7em;
  clear: both;
}

@media (min-width: 500px) {
  .post-nav {
    font-size: 1em;
  }
}

.single .post-nav {
  margin-top: 3em;
  /* justify-content: space-between; */
}

.post-nav a {
  color: var(--clr-grey-mid);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.post-nav a i {
  font-size: 24px;
  padding: 4px 6px; 
  /*
  padding: 1px 6px 0; 
  */
  border-radius: 50%;
  transition: var(--tra-short);
}

.post-nav a:hover i {
  background: var(--clr-adventist-fire);
  color: white;
}

.single .post-grid {
  @media (min-width: 1230px) and (max-width: 1755px) {
    /**********
      We always fetch 4 "more stories" from the database, but if the grid is displaying three stories per row (which
      occurs from about 1230 pixels wide to 1755px wide) we want to hide the second row which only contains one story.
      We do this by setting grid-auto-rows to zero, as per this post, and hiding the overflow:
      https://stackoverflow.com/questions/72353954/css-grid-hide-elements-that-dont-fit
      (One negative side effect of clipping is that the box shadow which appears on hover is clipped ... at least on Safari)
    **********/
    grid-template-rows: auto;
    grid-auto-rows: 0;                      /* automatically created rows will have a height of 0. */
    overflow: clip;
    overflow-clip-margin: 1em;  
  }
}

/* HOME PAGE */

/*
.home main {
  padding-top: 0;
}
*/

.home h1.post-title {
  display: none;
}

.home .photo-card-grid > .wp-block-column {
  background: white;
  color: black;
  padding: 1em 2em 1.5em;
  border-radius: 1.75em;
}

.home .photo-card-grid > .wp-block-column .wp-block-image {
/*
  margin-top: -0.7em;
  margin-left: -1.7em;
  margin-right: -1.7em;
*/
  margin-left: -1em;
  margin-right: -1em;
}

.home .vertical-flex-with-button .wp-block-column {
  display: flex;
	flex-direction: column;
	gap: 1.25em;
}

.home .vertical-flex-with-button .wp-block-column>* {
	margin: 0;
}

.home .vertical-flex-with-button .wp-block-column>*:last-child {
	flex: 1;
	align-items: end;
}

.home .vertical-flex-with-button img {
  border-radius: 1em;
}

.home .latest-news-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  h2 {margin: 0;}
  span:last-child {display: none;}
  @media (min-width: 450px) {
    align-items: end;
    span:first-child {display: none;}
    span:last-child {display: initial;}
  }
  margin-bottom: 0.5em;
}

.home .latest-news-grid {
	display: grid;
	@media (min-width: 750px) {
	  grid-template-columns: 1fr 1fr;
	}
	margin-left: -1em;
	margin-right: -1em;
	h2, h3 {line-height: 1.2;}
	figure {margin: 0;}
	:has(> img) {position: relative;}
	img {
	  position: absolute;
	  left: 0;
	  top: 0;
	  width: 100%;
	  height: 100%;
	  object-fit: cover;
	  border-radius: 1em;
	}
	.col1 {
	  display: none;
  	@media (min-width: 750px) {
      display: block;
      position: relative;
      a {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        padding: 1em;
        box-sizing: border-box;
      }
      figure {
        position: absolute;
        left: 1em;
        top: 1em;
        width: calc(100% - 2em);
        height: calc(100% - 2em);
        border-radius: 1em;
        overflow: hidden;
      }
      h2 {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        padding: 0.6em 0.9em;
        box-sizing: border-box;
        color: white;
        margin: 0;
        text-wrap: balance;
        background: linear-gradient(180deg, rgb(0% 0% 0% / 0) 0%, rgb(0% 0% 0% / 0.0015625) 6.25%, rgb(0% 0% 0% / 0.00625) 12.5%, rgb(0% 0% 0% / 0.0140625) 18.75%, rgb(0% 0% 0% / 0.025) 25%, rgb(0% 0% 0% / 0.0390625) 31.25%, rgb(0% 0% 0% / 0.05625) 37.5%, rgb(0% 0% 0% / 0.0765625) 43.75%, rgb(0% 0% 0% / 0.1) 50%, rgb(0% 0% 0% / 0.1265625) 56.25%, rgb(0% 0% 0% / 0.15625) 62.5%, rgb(0% 0% 0% / 0.18906250000000002) 68.75%, rgb(0% 0% 0% / 0.225) 75%, rgb(0% 0% 0% / 0.26406250000000003) 81.25%, rgb(0% 0% 0% / 0.30625) 87.5%, rgb(0% 0% 0% / 0.3515625) 93.75%, rgb(0% 0% 0% / 0.4) 100% );
        text-shadow: 0 0 5px rgb(0 0 0 / 0.5);
        display: flex;
        align-items: end;
      }
    }
	}
	.col2 {
	  display: grid;
	  grid-template-rows: 1fr 1fr 1fr 1fr;
    @media (min-width: 750px) {grid-template-rows: 1fr 1fr 1fr;}
		> * {
		  display: grid;
      grid-template-columns: 2fr 3fr;
      @media (min-width: 550px) {grid-template-columns: 1fr 1fr;}
      gap: 1em;
      align-items: center;
      @media (min-width: 750px) {
        &:first-child {display: none;}
      }
		}
    figure {
      min-height: 9em;
    }
    .post-meta {padding-top: 0;}
		h3 {margin-top: 0;}
	}
	a {
	  color: inherit;
	  text-decoration: none;
	  padding: 1em;
	  border-radius: 1.75em;
	  @media (min-width: 500px) {
      &:hover {
        background: white;
        box-shadow: 0 0 10px rgb(0 0 0 / 0.2);
      }
    }
	}
}

/* NEWS PAGE */

.blog .post-main {
  padding-top: 2em;
}

@media (max-width: 500px) {
  /*
  article.feature {
    margin-top: -1em;
  }
  */
  article.feature a {
    padding-top: 0;
  }
  article.feature figure {
    margin-left: -1em;
    margin-right: -1em;
  }
}

article.feature {
  margin-bottom: 1em;
}

article.feature figure {
  position: relative;
}

article.feature img {
  width: 100%;
  height: 50vh;
}

@media (max-width: 500px) {
  article.feature img {
    border: 0;
  }
}

article.feature h3 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.4em 0.6em;
  box-sizing: border-box;
  color: white;
  background: linear-gradient(180deg, rgb(0% 0% 0% / 0) 0%, rgb(0% 0% 0% / 0.0015625) 6.25%, rgb(0% 0% 0% / 0.00625) 12.5%, rgb(0% 0% 0% / 0.0140625) 18.75%, rgb(0% 0% 0% / 0.025) 25%, rgb(0% 0% 0% / 0.0390625) 31.25%, rgb(0% 0% 0% / 0.05625) 37.5%, rgb(0% 0% 0% / 0.0765625) 43.75%, rgb(0% 0% 0% / 0.1) 50%, rgb(0% 0% 0% / 0.1265625) 56.25%, rgb(0% 0% 0% / 0.15625) 62.5%, rgb(0% 0% 0% / 0.18906250000000002) 68.75%, rgb(0% 0% 0% / 0.225) 75%, rgb(0% 0% 0% / 0.26406250000000003) 81.25%, rgb(0% 0% 0% / 0.30625) 87.5%, rgb(0% 0% 0% / 0.3515625) 93.75%, rgb(0% 0% 0% / 0.4) 100% );
  font-size: 1.5em;
  text-shadow: 0 0 5px rgb(0 0 0 / 0.5);
  display: flex;
  align-items: end;
  text-wrap: balance;
}

@media (min-width: 500px) {
  article.feature h3 {
    font-size: clamp(1.5em, 5vw, 3em);
    line-height: 1.1;
  }
}

nav.pagination {
  display: block;
  font-weight: normal;
  letter-spacing: initial;
  .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--clr-grey-mid);
    .page-numbers {
      padding: 4px 5px;
    }
    .current {
      color: var(--clr-adventist-fire);
    }
    a {
      border-radius: 4px;
      transition: var(--tra-short);
      &:hover {
        color: white;
        background: var(--clr-adventist-fire);
      }
    }
    .prev, .next {
      font-size: 24px;
      padding: 1px 6px 0; 
      border-radius: 50%;
    }
    .prev {margin-right: 0.5em;}
    .next {margin-left: 0.5em;}
  }
}

.line-above {
  border-top: 1px solid #ddd;
  padding-top: 0.5em;
}

/* LINKS PAGE */

.unions a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 1em;
  margin: -1em;
  border-radius: 5px;
  transition: 0.3s;
}

.unions a:hover {
  background: var(--clr-charcoal);
  box-shadow: 0 0 10px rgb(0 0 0 / 0.2);
  color: white;
}

.unions img {
  border: 1px solid rgb(255 255 255 / 0.2);
}

.unions p:last-child {
  margin-bottom: 0;
}

/* 404 PAGE */

.sheep-image {
  width: 400px;
  max-width: 100%;
  margin: 2em 0;
}

/* OVERRIDES */

.eye-catching {
	font-family: 'EyeCatchingSPD';
	font-weight: normal;
	font-size: 80px;
	margin: 25px 0;
	line-height: 0.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.pt0 {padding-top: 0;}
.pb0 {padding-bottom: 0;}
.mt0 {margin-top: 0;}
.mb0 {margin-bottom: 0;}
.hidden {display: none;}
