/*
Theme Name: Coffs Harbour Events
Author: Adventist Media
*/

:root {
  --clr-malachite: #4cd964;
  --clr-carrot: #f9a03f;
  --clr-dark-blue: #26255a;
  --clr-light-blue: #ebebf2; /* #e7e7f5; */
  --main-width: 1200px;
  --side-padding: max(5vw, (100vw - var(--main-width)) / 2);
  --side-padding-negative: calc(var(--side-padding) * -1);
  --tra-short: 250ms;

  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body, input, button, textarea {
  font-family: 'Noto Sans', sans-serif;
  font-size: 16px;
  @media (min-width: 750px) {font-size: 17px;}
}

body {
  margin: 0;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

header, footer, section {
  margin-left: var(--side-padding-negative);
  margin-right: var(--side-padding-negative);
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

h1 {
  font-family: 'Calistoga', serif;
  font-weight: normal;
}

img {
  max-width: 100%;
}

a {
  text-underline-offset: 3px;
  transition: var(--tra-short);
}

button, .button {
  display: inline-block;
  background: var(--clr-malachite);
  color: inherit;
  padding: 0.5em 1em;
  border-radius: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  transition: var(--tra-short);
  &:hover {
    color: white;
    background: var(--clr-carrot);
  }
}

.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%;
}

.speakers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  font-size: 0.8em;
  @media (min-width: 670px) {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
  }
  > div {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    align-items: start;
    img {
      width: 100%;
      border-radius: 3px;
      @media (min-width: 670px) {width: 165px;}
    }
  }
}

nav {                                   /* basic menu */
  display: flex;
  flex-wrap: wrap;
/*  gap: 0 1em; */
  font-size: 0.9em;
  align-items: center;
  a {
    color: inherit;
    text-decoration: none;
    padding: 0.1em 1em;
  }
}

header nav {
  margin-right: -1em;
}

.venue-nav {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  background: #ddd;
/*  @media (max-width: 499.999px) {font-size: 0.8em;} */
  nav {justify-content: center;}
}

header, footer {
  padding-top: 0.75em;
  padding-bottom: 0.75em;
  a {
    text-decoration: none;
    color: inherit;
    &:hover {color: var(--clr-gold);}
  }
}

header {
  display: flex;
  gap: 1em;
  justify-content: space-between;
  align-items: center;
  > :first-child {
    font-family: 'Calistoga', serif;
    font-size: 1.25em;
  }
}

footer {
  margin-top: 2em;
  padding-top: 4em;
  padding-bottom: 11em;
  font-size: 0.7em;
  border-top: 1px solid #eee;
  color: #bbb;
  text-align: center;
}

section.book {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding-top: 0.75em;
  padding-bottom: 0.75em;
  text-align: center;
/*
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
*/
  background: black;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
/*
  a {
    display: inline-block;
    background: var(--clr-malachite);
    color: inherit;
    padding: 0.5em 1em;
    text-decoration: none;
    border-radius: 0.25em;
    transition: var(--tra-short);
    &:hover {
      color: white;
      background: var(--clr-carrot);
    }
  }
*/
  > :is(.a, .b) {
    display: none;
  }
  &:not(.expanded) > .a, &.expanded > .b {
    display: contents;
  }		
}

.venue-details {
  display: grid;
  gap: 1em 5vw;
  @media (min-width: 750px) {
    grid-template-columns: 13fr 7fr;
    .address-photo-map {
      grid-column: 2;
      grid-row: 1 / span 2;
    }
  }
}


.sessions {
  margin-bottom: 2em;
  @media (min-width: 1000px) {columns: 2;}
  > div > :first-child {font-weight: 600;}
}

.topic-list {
  counter-reset: count;
}

.topic-list > div > div {
  counter-increment: count;
}

.topic-list h3::before {
  content: counter(count) '. ';
}

.venue-card {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
  > div {
    padding: 0.5em 1em 0.75em;
    background: var(--clr-dark-blue);
    color: white;
    font-weight: bold;
    > span {
      display: block;
      &:first-child {font-size: 1.1em;}
      &:last-child {font-size: 0.8em; font-weight: 500;}
    }
  }
  > img {
    aspect-ratio: 1.5;
    object-fit: cover;
  }
}

.home {
  .banner {
    padding-left: 0;
    padding-right: 0;
    img {
      display: block;
      width: 100%;
      height: 50vh;
      object-fit: cover;
      object-position: center top;
    }
  }
  .topics {
    background: var(--clr-dark-blue); /* #e0e0e0; */
    padding-bottom: 3em;
    h2 {color: white;}
  }
  .topic-list {
    font-size: 0.7em;
  }
  .topic-list > div {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
    > div {
      background: white;
      border-radius: 3px;
      position: relative;
      > * {
        padding: 1.5em 1em 1em;
        display: flex;
        flex-direction: column;
        gap: 0.5em;
        > * {
          margin: 0;
          &:first-child {line-height: 1.3;}
        }
      }
    }
    h3 {
      display: flex;
      gap: 1em;
      justify-content: space-between;
      &::before {
        display: none;
        content: 'z';
      }
      &::after {
        content: counter(count);
        position: relative;
        font-size: 2em;
        top: -0.1em;
        right: -0.1em;
        color: var(--clr-dark-blue);
        line-height: 0.5;
        opacity: 0.3;
      }
    }
  }
  .venues {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
  }
  .reels {
    margin-top: 2em;
    padding: 0;
    .title {margin-bottom: 0;}
  }
}

.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;}}
.rounded {border-radius: 3px;}
.hidden {display: none;}








/* SLIDER */

.slider>div {
  display: flex;
  gap: 1rem;
  overflow: auto;
  scroll-snap-type: x mandatory;
  padding: 1em var(--side-padding) 2em;
}
.slider>div>div {
  scroll-snap-align: center;
  width: 90%;
  max-width: 800px;
  flex-shrink: 0;
}
.slider>div>div:first-child {
  margin-left: auto;
}
.slider>div>div:last-child {
  margin-right: auto;
}
.slider .wp-block-embed.is-type-video {
  margin-bottom: 0;
}
.wp-block-cover .slider .wp-block-embed {
  min-width: initial;
  min-height: initial;
}

.video-slider {
	background: var(--clr-light-blue);
}
.video-slider>div>div {
	display: flex;
	flex-direction: column;
}
.video-slider>div>div {
	box-sizing: border-box;
	width: 80%;
	max-width: 288px;
}
.video-slider iframe, .video-slider img,  .video-slider video {
	width: 100%;
	display: block;
	border-radius: 3px;
}
.video-slider iframe {
	aspect-ratio: 9/16;
}
.video-slider video {
	background-color: #f2f2f2;
	height: 100%;
	cursor: pointer;
}
.video-slider>div>div:has(video) {
	position: relative;
}
.video-slider>div>div:has(video)::after {
	content: "";
	position: absolute;
	top: 1.5em;
	left: 1.5em;
	width: 2em;
	height: 2em;
	color: white;
	background-image: url(/wp-content/themes/coffs-harbour-events/img/play.svg);
	background-size: contain;
	pointer-events: none;
}
.video-slider>div>div:has(video.playing)::after {
	background-image: url(/wp-content/themes/coffs-harbour-events/img/pause.svg);
}
.video-slider .title {
	font-size: 18px;
}
.video-slider .title {
	font-weight: 600;
	margin-top: 10px;
	flex: 1;
}
