/* ==================
 * SIMPLE IMAGE
 * ================== */
.simple_image img {
  margin: 0;
}

.simple_image__caption {
  font-size: 0.8rem;
  text-align: center;
  color: var(--c-text--light);
}

.simple_image--force-left .col {
  align-items: flex-start !important;
}

/* ==================
 * SIMPLE GALLERY
 * ================== */
.simple_gallery {
  margin-bottom: 2rem;
}
.simple_gallery:not(:first-child) {
  margin-top: 2rem;
}

.simple_gallery__info {
  margin-bottom: 0.5rem;
}

.simple_gallery__title {
  font-weight: bold;
}

.simple_gallery__desc {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.simple_gallery__items {
  margin-top: 1rem;
  display: grid;
  row-gap: 1rem;
  column-gap: 1rem;
}
/*  (> phone) */
@media only screen and (max-width: 480px) {
  .simple_gallery--image .simple_gallery__items {
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
  }
  .simple_gallery--video .simple_gallery__items,
  .simple_gallery--youtube .simple_gallery__items {
    grid-template-columns: repeat(1, minmax(120px, 1fr)) !important;
  }
}
/*  (> phone-to-tablet) */
@media only screen and (min-width: 481px) and (max-width: 580px) {
  .simple_gallery__items {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
}
/*  (> tablet) */
@media only screen and (min-width: 581px) and (max-width: 768px) {
  .simple_gallery__items {
    grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
  }
}

.simple_gallery__items img {
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.simple_gallery__items .youtube_video {
  margin: 1rem 0 !important;
}
/*  (> phone) */
@media only screen and (max-width: 480px) {
  .simple_gallery__items .youtube_video {
    width: 100%;
  }
}

.simple_gallery--shadow .simple_gallery__items img,
.simple_gallery--shadow .simple_gallery__items .youtube_video {
  box-shadow: 3px 3px 6px 1px rgba(0, 0, 0, 0.25);
}

.simple_gallery__item--selected {
  outline: 3px solid var(--c-text--red);
}

/* ==================
 * SIMPLE VIDEO
 * ================== */
.simple_video {
  overflow: hidden;
  padding-bottom: 56.25%; 
  position: relative; 
  height: 0;
}

.simple_video video {
  left: 0; 
  top: 0; 
  height: 100%;
  width: 100%;
  position: absolute;
}

/* ==================
 * YOUTUBE VIDEO
 * ================== */
.youtube_video {
  margin-bottom: 2rem;
}
.youtube_video__video {
  overflow: hidden;
  padding-bottom: 56.25%; 
  position: relative; 
  height: 0;
}

.youtube_video__video iframe {
  left: 0; 
  top: 0; 
  height: 100%;
  width: 100%;
  position: absolute;
}
.youtube_video--centered {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.youtube_video__info {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.youtube_video__title {
  font-weight: bold;
}

.youtube_video__desc {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* ==================
 * SOCIALS
 * ================== */
.socials {
  --social-item-size: 24px;
  display: flex;
}

.socials > *:not(:last-child) {
  margin-right: 0.5rem;
}

.socials__item {
  fill: var(--c-text);
  border: 1px solid var(--c-text);
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: var(--social-item-size);
  height: var(--social-item-size);
  padding: 0.35rem;
  cursor: pointer;
}
.socials__item:hover {
  fill: var(--c-text--light);
  border-color: var(--c-text--light);
}

/* ==================
 * TIMELINE
 * from: https://codepen.io/paulhbarker/pen/apvGdv
 * ================== */
.timeline * {
  box-sizing: border-box;
}

.timeline {
  --c-timeline-head-bg: #efefef;
  --c-timeline-head-text: #333;
  --c-timeline-head-text--hover: #666;
  --c-timeline-bullet-bg: #999;
  --c-timeline-box-bg: #222;
  --c-timeline-box-text: white;
  --c-timeline-line: var(--c-border);
  --timeline-bullet-size: 9px;
  --timeline-line-spacing: 32px;
  --timeline-cards-spacing: 8px;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1000px) {
  .timeline {
    display: flex;
    flex-flow: column wrap;
    max-width: 1200px;
    margin: 0 auto;
  }
}

.timeline::after {
  z-index: 1;
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid var(--c-timeline-line);
}
@media (min-width: 1000px) {
  .timeline::after {
    border-left: 1px solid var(--c-timeline-line);
  }
}

@media (min-width: 1000px) {
  .timeline__item:nth-child(even) .timeline__item__head::before,
  .timeline__item:nth-child(odd) .timeline__item__head::before {
    position: absolute;
    content: "";
    width: var(--timeline-bullet-size);
    height: var(--timeline-bullet-size);
    background-color: var(--c-timeline-bullet-bg);
    border-radius: 50%;
  }
}

.timeline__item {
  position: relative;
  display: block;
  margin: 10px auto 80px;
  z-index: 2;
}
@media (min-width: 480px) {
  .timeline__item {
    max-width: 100%;
    box-shadow: 0px 1px 22px 4px rgba(0, 0, 0, 0.07);
  }
}
@media (min-width: 720px) {
  .timeline__item {
    max-width: 80%;
  }
}
@media (min-width: 1000px) {
  .timeline__item {
    max-width: 40%;
    margin-left: var(--timeline-line-spacing);
    margin-bottom: var(--timeline-cards-spacing);
    left: 50%;
  }
  .timeline__item:not(:first-child) {
    margin-top: -12vh;
  }
  .timeline__item:nth-child(odd) {
    margin-left: 0;
    margin-right: var(--timeline-line-spacing);
    transform: translateX(calc(-100% - (var(--timeline-line-spacing) - var(--timeline-bullet-size) * 0.5)));
  }
  .timeline__item:nth-child(odd) .timeline__item__head::before {
    right: calc(-1 * var(--timeline-line-spacing));
  }
  .timeline__item:nth-child(even) {
    margin-left: var(--timeline-line-spacing);
    margin-right: 0;
    transform: translateX(calc(-1 * var(--timeline-bullet-size) * 0.5));
  }
  .timeline__item:nth-child(even) .timeline__item__head::before {
    left: calc(-1 * var(--timeline-line-spacing));
  }
}

/* (timeline item head) */
.timeline__item__head {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--c-timeline-head-text);
  background-color: var(--c-timeline-head-bg);
  font-weight: 400;
  padding: 0.35rem;
}

.timeline__item__head a {
  color: var(--c-timeline-head-text);
  text-decoration: underline;
}
.timeline__item__head a:hover {
  color: var(--c-timeline-head-text--hover);
  text-decoration: underline;
}

.timeline__item__head_box {
  display: inline;
  float: left;
  margin: 4px 8px 4px 4px;
  padding: 8px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--c-timeline-box-bg);
  color: var(--c-timeline-box-text);
  width: min-content;
}
.timeline__item__head_info {
  font-weight: inherit;
  margin: 0;
}
.timeline__item__head_title {
  font-size: 1.2rem;
}
.timeline__item__head_subtitle {
  display: block;
  font-size: 0.5rem;
  margin: 0;
}
@media (min-width: 480px) {
  .timeline__item__head_subtitle {
    font-size: 0.7rem;
  }
}
.timeline__item__body {
  background: #fff;
  border: 1px solid rgba(191, 191, 191, 0.4);
  border-top: 0;
  padding: 15px;
}

.timeline__item__body img {
  max-width: 100%;
}

.video-container {
  margin: 1rem auto;
  text-align: center;
}

.video-container > iframe {
  max-width: 100%;
}

/* ==================
 * LOAD SPINNER
 * ================== */
.load_spinner {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.load_spinner div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 4px solid var(--c-clickable--light);
  border-radius: 50%;
  animation: load_spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: var(--c-clickable--light) transparent transparent transparent;
}
.load_spinner div:nth-child(1) {
  animation-delay: -0.45s;
}
.load_spinner div:nth-child(2) {
  animation-delay: -0.3s;
}
.load_spinner div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes load_spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================
 * ACCORDION
 * ================== */
.accordion--title {
  font-weight: bold;
  padding-bottom: 0.25rem;
  margin-bottom: 0.35rem;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.accordion--title:hover {
  color: var(--c-text--light);
  border-bottom-color: var(--c-text--light);
}

.accordion.open .accordion--icon-closed,
.accordion:not(.open) .accordion--icon-open {
  display: none;
}

.accordion:not(.open) .accordion--content {
  display: none;
}

/* ==================
 * SPOILER ACCORDION
 * ================== */
.spoiler_accordion {
  margin: 1rem 0;
  border: 1px solid var(--c-border);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}
.spoiler_accordion:not(.open):hover {
  background-color: var(--c-bg--light);
}

.spoiler_accordion--title {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  color: var(--c-text--light);
  cursor: pointer;
}
.spoiler_accordion--icon {
  margin-right: 0.5rem;
}

.spoiler_accordion:not(.open) .spoiler_accordion--content {
  display: none;
}

/* ==================
 * SLIDER DOUBLE
 * ================== */
.slider_double {
  --slider-height: 8px;
  --slider-thumb-size: calc(var(--slider-height) + 4px);
  --slider-bg: #111;
  --slider-bg--light: #e2e2e2;

  position: relative;
  height: var(--slider-height);
  background-color: var(--slider-bg--light);
  text-align: left;
  margin: 1rem calc(0.5 * var(--slider-thumb-size));
}

.slider_double .ui-widget-header {
  top: 0;
  height: 100%;
  position: absolute;
  z-index: 1;
  display: block;
  background-position: 0 0;
  background-color: var(--slider-bg);
}

.slider_double .ui-slider-handle {
  position: absolute;
  z-index: 2;
  width: var(--slider-thumb-size);
  height: var(--slider-thumb-size);
  border: 1px solid black;
  background-color: white;
  cursor: pointer;
  top: calc(-0.25 * var(--slider-thumb-size));
  margin-left: calc(-0.5 * var(--slider-thumb-size));
}
.slider_double .ui-slider-handle:focus {
  outline: none;
}

.slider_double + .ui-slider-values {
  text-align: center;
  margin: -0.25rem 0 0.5rem 0;
  font-size: 0.85rem;
}

/* ==================
 * AUTOCOMPLETE
 * ================== */
.autocomplete {
  position: relative;
  display: inline-block;
}
.autocomplete-items {
  position: absolute;
  border: 1px solid var(--c-border);
  border-bottom: none;
  border-top: none;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
}
.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
  background-color: white;
  border-bottom: 1px solid var(--c-border);
}
.autocomplete-items div:hover {
  background-color: #e9e9e9;
}

/* =======================
 * FORM CHECKBOXES GRID
 * ======================= */
.form-checkboxes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* =======================
 * FILE INPUT
 * ======================= */
.file-input {
  display: grid;
  place-items: center;
  background-color: var(--c-bg--light);
  height: 80px;
  width: 100%;
  border: 1px solid var(--c-text--light);
  border-radius: 3px;
  color: var(--c-text);
  cursor: pointer;
}
.file-input:hover {
  border-color: var(--c-border);
  color: var(--c-text--light);
}
