/*
Theme Name: Prayer Online
Author: Adventist Media
*/

:root {
  --clr-gold: #ebbb34;
  --clr-gold-hover: #dfaa16;
  --clr-gold-darker: #b68a12;
  --main-width: 1000px;
  --tra-short: 250ms;

  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body, input, button, textarea {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  @media (min-width: 500px) {font-size: 17px;}
  @media (min-width: 750px) {font-size: 18px;}
  @media (min-width: 1000px) {font-size: 19px;}
}

body {
  margin: 0;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
}

h3 {
	color: #fe8d85;
}

a {
  color: #5a3fd6;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: var(--tra-short);
  
  &:hover {
    color: #261669;
    text-decoration-thickness: 2px;
  }
}

input[type="text"], input[type="email"], textarea {
  color: #7c8a96;
  background: #fff;
  box-sizing: border-box;
  padding: 15px;
  border: solid 1px #D4DDE5;
  width: 100%;
	border-radius: 4px;
	background-color: rgba(255,255,255,0.8);
}

button, input[type="submit"], .wp-block-button__link, header nav > :last-child {
  background-color: var(--clr-gold);
  color: white;
  border: 0;
  border-radius: 0.6em;
  font-weight: bold;
  text-shadow: 0 0 2px var(--clr-gold-darker);  
  transition: var(--tra-short);
  &:hover {
    background-color: var(--clr-gold-hover);
    color: white;
  }
}

button, input[type="submit"], .wp-block-button__link {
  font-size: 1.125em;
  padding: 0.3em 1em;
  cursor: pointer;
}

.big-button {
  font-size: 1.5em;
}

.wpcf7 form .wpcf7-response-output {
	margin: 2em 0 1em;
	padding: 0.5em 1em;
	border: 0;
	background-color: yellow;
	line-height: 1.3;
}

.wpcf7 form.sent .wpcf7-response-output {
	border-left: 10px solid #00c1d6;
	background-color: #99f5ffbf;
}

.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output {
	border-left: 10px solid #d70000;
	background-color: #ff9999bf;
}
/*
.wpcf7-not-valid-tip {
  color: yellow;
}
*/
@media (min-width: 800px) {
	.fifty-fifty {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-column-gap: 2em;
	}
}

.wp-block-media-text.is-stacked-on-mobile {
  gap: 2em 5vw;
  > .wp-block-media-text__content {
    padding: 0;
  }
}

.wp-embed-aspect-16-9>.wp-block-embed__wrapper, .aspect-16-9 {
	width: 100%;
	aspect-ratio: 16/9;
}

.wp-block-embed__wrapper>iframe {
  width: 100%;
  height: 100%;
}

nav {                                   /* basic menu */
  display: flex;
  gap: 0.5em 1em;
}

header, footer {
  background-color: black;
  color: white;
  padding: 1em;
  a {
    text-decoration: none;
    color: inherit;
    &:hover {color: var(--clr-gold);}
  }
}

header {
  background-color: #2e2c28;
  padding: 0.75em 1.5em;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  .hamburger {
    margin: 0;
    padding: 0;
    border: 0;
    width: 1em;
    height: 1em;
    justify-self: end;
    color: white;
    background-color: transparent;
    background-image: url(img/hamburger.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 3px;
    cursor: pointer;
    &:hover {background-color: transparent;}
  }
  nav {
    display: none;
    > :last-child {padding: 0.2em 1em;}
  }
  &.expanded nav {display: flex; grid-column: 1 / span 2; justify-self: center; align-items: center; gap: 1.5em;}
  @media (min-width: 500px) {
    .hamburger {display: none;}
    nav, &.expanded nav {display: flex; grid-column: unset; justify-self: end; align-items: center; gap: 1.5em;}
  }
}

footer {
  background-color: #404d5e;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 5vw;
  nav {flex-direction: column;}
  padding: 3em max(1em, (100vw - var(--main-width)) / 2);
  h4 {
    margin-top: 0;
    margin-bottom: 1em;
  }
}

main {
/*
  max-width: var(--main-width);
  margin-left: auto;
  margin-right: auto;
*/
  width: min(var(--main-width), 100%);
  padding: 1em max(1em, 5vw) 2em;
  container-type: inline-size;
  flex-grow: 1;
  align-self: center;
  box-sizing: border-box;
}

.alignfull {
  margin-left: calc((100vw - 100cqw) / -2);
  margin-right: calc((100vw - 100cqw) / -2);
}

.wp-block-cover.alignfull {
  padding-left: calc((100vw - 100cqw) / 2);
  padding-right: calc((100vw - 100cqw) / 2);
}

.wp-singular .featured-image img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
}

.form-section {
  padding-top: 3em;
}

.home {
  main {
    padding-top: 0;
    padding-bottom: 0;
  }
  h1.post-title {display: none;}
  @media (max-width: 499.999px) {.main-banner-spacer {height: 15em !important;}}
/*
  .wp-block-media-text.is-stacked-on-mobile {
    gap: 1em 0;
  }
*/
  .rounding, .image-rounding img {
    border-radius: 8px;
  }
  #page .image-mb0>figure.alignright {
    margin-bottom: 0;
  }
  #learn {
    background: aliceblue;
    margin-bottom: 0;
  }
  .course-header, .videos {
    padding: 2em clamp(1em, 5vw, 2em) 0;
  }
  .videos {
    padding: 3em clamp(1em, 5vw, 2em);
    line-height: 1.3;
  }
  .videos>div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
    gap: 2em;
  }
  .videos>div>div {
    box-shadow: 0 0 10px rgb(0 0 0 / 0.15);
    background: white;
    border-radius: 0.5em;
    overflow: hidden;
    cursor: pointer;
  }
  .videos>div>div>div {
    padding: 1em;
  }
  .videos>div>div>div>*:last-child {
    margin-bottom: 0;
  }
  .videos h4, .videos .wp-block-image {
    margin: 0;
  }
  .videos figure {
    position: relative;
  }
  .videos img {
    max-width: 100%;
  }
  .videos iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
  }
  .videos>div>div .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 300ms;
  }
  .videos>div>div:hover .play-button {
    opacity: 0.6;
  }
  .verticalpad2 {
    padding-top: 2em;
    padding-bottom: 2em;
  }
  .tips {
    padding-top: 3em;
    padding-bottom: 3em;
    @media (min-width: 750px) {
      padding-left: 15vw;
      padding-right: 15vw;
    }
  }
  .wp-block-latest-posts.is-grid.columns-3 {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
    gap: 2em;
    line-height: 1.3;
    > * {
      margin: 0;
      width: 100%;
      box-shadow: 0 0 10px rgb(0 0 0 / 0.15);
      background-color: rgb(255 255 255 / 0.9);
      color: black;
      border-radius: 0.5em;
      overflow: hidden;
      cursor: pointer;
      padding: 1em;
      box-sizing: border-box;
      transition: var(--tra-short);
      &:hover {
        background-color: white;
        transform: scale(1.02);
      }
      .wp-block-latest-posts__featured-image {
        margin: -1em -1em 1em;
        img {
          display: block;
          filter: brightness(0.95);
          transition: var(--tra-short);
        }
      }
      .wp-block-latest-posts__post-title {
        font-size: 1em;
        margin: 0;
      }
      .wp-block-latest-posts__post-excerpt {
        margin-top: 1em;
        margin-bottom: 0;
      }
    }
    a {
      color: inherit;
      text-decoration: none;
      &:hover {
        img {filter: brightness(1.05);}
      }
    }
  }
}

.mt0 {margin-top: 0;}
.mb0 {margin-bottom: 0;}
.mt1 {margin-top: 1em;}
.mb1 {margin-bottom: 1em;}
.mt10 {margin-top: 10px;}
.mb10 {margin-bottom: 10px;}
.text-center {text-align: center;}
.text-right {text-align: right;}
.text-right-desktop {@media (min-width: 800px) {text-align: right;}}
.hidden {display: none;}
