/*------------------------------------------------------------
# COMPONENTS
------------------------------------------------------------*/

/*--------------------------------------------------
Sticky Nav
--------------------------------------------------*/
.sticky_nav {
  border-radius: 50px;
  border: 1px solid var(--gray-4);
  box-shadow: var(--box-shadow);
  background-color: #fff;
  width: min(90%, 60em);
  margin-inline: auto;
  overflow: hidden;
}

.sticky_nav li {
  flex: 1;
}

.sticky_nav a {
  color: var(--gray-9);
  text-decoration: none;
  text-align: center;
  display: block;
  padding-block: var(--space-sm);
  font-size: .95em;
  border-radius: 50px;
  transition: background-color .2s ease 0s;
}

.sticky_nav ul li:last-of-type a{
  background-color: var(--color-accent-light);
  color: #fff;
}

.sticky_nav a svg {
  opacity: 0.5;
  margin-right: var(--space-xxs);
}

.sticky_nav a:hover{
  background-color: var(--color-secondary);
}

.sticky_nav ul li:last-of-type a:hover{
  background-color: var(--color-accent);
}

/*----------------------------------------
Slider
----------------------------------------*/
.slider_container {
  --slider-duration: 12000ms; /*has to match 'transitionTime' in JS*/
  --active-index: 0;
  --slider-height: 450px;
  width: min(100%, 1280px);
  margin: 0 auto;
  position: relative;
}

.slider {
  width: 100%;
  overflow: hidden;
  border-radius: var(--space-lg);
}

.slider > ul {
  display: flex;
  transition: transform 0.5s ease;
  transform: translateX(calc(var(--active-index) * -100%));
}

.slider .slide {
  width: 100%;
  position: relative;
  inset: auto;
  flex: 0 0 100%;
}

.slider .slide .image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider .slide .content {
  position: absolute;
  width: min(100%, 30em);
  top: 50%;
  left: 7.5em;
  z-index: 2;
  border-radius: var(--box-border-rad);
  padding: var(--space-md);
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.slider .slide .title {
  font-size: var(--text-lg);
  line-height: 1.25;
  text-wrap: balance;
  font-family: var(--font-secondary);
  color: var(--gray-9);
  margin-bottom: var(--space-xs);
}

.slider .slide .description {
  margin: 0 0 var(--space-md);
}

.slider .slide .description p {
  font-size: 0.965em;
  margin-bottom: 0;
}

.slider .slide .btns {
  width: 100%;
  margin-block: 1em 0;
}

.slider .slide .btn {
  box-shadow: var(--box-shadow-hover);
  margin: 0;
}

.slider .slide .dropdown_btn {
  margin: 0;
}

.slider .slide .dropdown_btn .menu {
  box-shadow: var(--box-shadow-white);
}

/*----------------------------------------
Slider – Controls
----------------------------------------*/
.slider_controls {
  display: flex;
  justify-content: center;
}

/* Slider – Controls – Shortcuts
----------------------------------------*/
.slider_controls .shortcuts {
  background-color: #fff;
  border: 1px solid var(--gray-4);
  border-radius: 100px;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  width: fit-content;
  bottom: -4em;
  position: absolute;
}

.slider_controls .shortcut {
  width: var(--space-sm);
  height: var(--space-sm);
  background-color: var(--gray-4);
  padding: 0;
  margin: 0;
  border-radius: 100%;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: width 0.25s ease-in, border-radius 0.25s ease-in;
}

.slider_controls .shortcut::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background-color: var(--color-secondary);
}

/* Active shortcut becomes pill */
.slider_controls .shortcut.active {
  width: var(--space-xl);
  border-radius: 10px;
}

/* Only the active/resetting one animates */
.slider_controls .shortcut.active.is-resetting::after {
  animation: animate-progress var(--slider-duration) linear forwards;
}

@keyframes animate-progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Slider – Controls – Next/Prev Buttons
----------------------------------------*/
.slider_nav button {
  width: 1em;
  aspect-ratio: 1;
  padding: var(--space-sm);
  font-size: var(--text-xl);
  background-color: #fff;
  border: 1px solid var(--gray-4);
  border-radius: 100%;
  cursor: pointer;
  z-index: 2;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition);
}

.slider_nav button svg {
  position: absolute;
  color: var(--gray-6);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.slider_nav .prev_btn {
  left: 1em;
}

.slider_nav .next_btn {
  right: 1em;
}

.slider_nav button:hover {
  background-color: var(--color-secondary);
}

.slider_nav button:hover svg {
  color: #fff;
}

/*--------------------------------------------------
Highlights
--------------------------------------------------*/
.highlights {
  --highlight-gap-row: 4em;
  --highlight-gap-col: var(--space-lg);
  --highlight-cols: 2;
  gap: var(--highlight-gap-row) var(--highlight-gap-col);
}

.highlights.presenters {
  --highlight-gap-row: 4em;
  --highlight-gap-col: var(--space-lg);
  --highlight-cols: 2;
  gap: var(--highlight-gap-row) var(--highlight-gap-col);
}

.highlights li {
  flex: 0 0 calc((100% - (var(--highlight-gap-col) * (var(--highlight-cols) - 1))) / var(--highlight-cols));
  border: 1px solid var(--gray-3);
  border-radius: var(--space-lg);
  position: relative;
  padding: 3.75em var(--space-lg) var(--space-lg);
  box-shadow: var(--box-shadow);
}

.highlights .image {
  width: var(--space-xxl);
  aspect-ratio: 1;
  position: absolute;
  top: -2.5em;
  left: var(--space-lg);
}

.highlights .title {
  font-size: var(--text-md);
  font-weight: 600;
  text-wrap: balance;
  margin-bottom: var(--space-xxxs);
}

.highlights .description {
  font-size: 0.95em;
  margin: 0;
}

/*--------------------------------------------------
Presenters
--------------------------------------------------*/
.presenters li {
  padding-block: 3.5em var(--space-lg);
}

.presenters .title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
}

/*--------------------------------------------------
Carousel
--------------------------------------------------*/
.carousel {
  position: relative;
}

.carousel.carousel_high {
  --gap: 1em;
  --pad: var(--space-md);
  --cols-mobile: 2;
  --cols-tablet: 4;
  --cols-desktop: 5;
}

.carousel.collections_carousel {
  --gap: 1em;
  --pad: var(--space-lg);
  --cols-mobile: 2;
  --cols-tablet: 3;
  --cols-desktop: 4;
}

.carousel ul {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1em var(--pad);
  /* padding: 1em 0; */
  scroll-padding-left: var(--pad);
  scroll-padding-right: var(--pad);
  scrollbar-width: none;
}
.carousel ul::-webkit-scrollbar {
  display: none;
}

.carousel li {
  flex: 0 0 calc((97.5% - (var(--gap) * (var(--cols-desktop) - 1))) / var(--cols-desktop));
  scroll-snap-align: start;
}

.carousel .btns {
  position: absolute;
  bottom: -2.5em;
  right: 0;
}

.carousel button {
  background-color: var(--gray-3);
  border: 1px solid var(--gray-4);
  padding: var(--space-xxxs);
  margin: 0;
  font-size: var(--text-md);
  color: var(--gray-6);
  border-radius: 100%;
  aspect-ratio: 1/1;
  cursor: pointer;
}

/*--------------------------------------------------
Collage
--------------------------------------------------*/
.collage .image li {
  width: 100%;
  float: left;
  border-radius: var(--space-xs);
  border-width: 4px;
  border-style: solid;
  border-color: #fff;
  padding: 0;
  /* box-shadow: 5px 10px 20px hsla(200, 60%, 20%, .25); */
  box-shadow: none;
}

.collage .image li:nth-child(1) {
  width: 100%;
  aspect-ratio: 2/1;
}

.collage .image li:nth-child(2),
.collage .image li:nth-child(5) {
  aspect-ratio: 6/5;
  width: 40%;
}

.collage .image li:nth-child(3),
.collage .image li:nth-child(4) {
  width: 60%;
  aspect-ratio: 100/56;
}

/*--------------------------------------------------
Responsive Styles
--------------------------------------------------*/
@media only screen and (max-width: 1200px) {
  /*----------------------------------------
  Carousel
  ----------------------------------------*/
  .carousel.cats_carousel li {
    flex-basis: calc((100% - (var(--gap) * (var(--cols-tablet) - 1))) / var(--cols-tablet));
  }

  .carousel.collections_carousel li {
    flex-basis: calc((100% - (var(--gap) * (var(--cols-tablet) - 1))) / var(--cols-tablet));
  }

  /*----------------------------------------
  Slider
  ----------------------------------------*/
  .slider .slide {
    display: flex;
    flex-direction: column;
    background-color: #fff;
  }

  .slider .slide .image {
    aspect-ratio: 2/1;
    min-height: auto;
  }

  .slider .slide .content {
    position: relative;
    transform: none;
    top: auto;
    left: auto;
    width: 100%;
    padding: var(--space-lg);
    backdrop-filter: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    text-align: center;
  }

  .slider .slide .content .description {
    text-wrap: balance;
  }

  .slider .slide .content .btn {
    margin-inline: auto;
  }

  .slider_controls {
    gap: var(--space-xl);
  }

  .slider_nav button {
    position: relative;
    transform: none;
    top: auto;
  }

  .slider_nav :is(.prev_btn, .next_btn) {
    left: auto;
    right: auto;
  }

  .slider_controls .shortcuts {
    margin: 0;
    position: static;
  }

  /* #1200px */
}

@media only screen and (max-width: 980px) {
  /*----------------------------------------
  Highlights
  ----------------------------------------*/
  .highlights {
    --highlight-cols: 2;
  }

  /* 980px */
}

@media only screen and (max-width: 768px) {
  /*----------------------------------------
  Carousel
  ----------------------------------------*/
  .carousel.collections_carousel li {
    flex-basis: calc((100% - (var(--gap) * (var(--cols-mobile) - 1))) / var(--cols-mobile));
  }

  /* 768px */
}

@media only screen and (max-width: 600px) {
  /*----------------------------------------
  Carousel
  ----------------------------------------*/
  .carousel.cats_carousel li {
    flex-basis: calc((100% - (var(--gap) * (var(--cols-mobile) - 1))) / var(--cols-mobile));
  }

  /*----------------------------------------
  Highlights
  ----------------------------------------*/
  .highlights,
  .highlights.presenters {
    --highlight-cols: 1;
  }

  /* 600px */
}

@media only screen and (max-width: 480px) {
  /*----------------------------------------
  Slider
  ----------------------------------------*/
  .slider .slide .image {
    aspect-ratio: 3/2;
  }

  .slider .slide .content {
    text-align: left;
  }

  .slider .slide .content :is(.title, .description) {
    text-wrap: auto;
  }

  .slider .slide .content .btn {
    width: 100%;
    max-width: 100%;
    font-size: 1em;
  }

  .slider_controls {
    font-size: 0.875em;
    justify-content: flex-end;
    width: 90%;
    gap: var(--space-md);
    margin-top: 1em;
  }

  /*----------------------------------------
  Carousel
  ----------------------------------------*/
  .carousel.collections_carousel li {
    flex-basis: calc((100% - var(--gap)));
  }

  /* 480px */
}
