.speakers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  margin-top: var(--padding-2);
}

.speakers h2 p {
  color: black;
  background-color: var(--theme-white);
  padding: var(--padding-1);
  margin: 0 var(--padding-2);
  border-radius: var(--border-radius);
  font-size: 1.1rem;
}

.keynotes {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--padding-2);
}

.keynotes .snake-top,
.keynotes .snake-bottom {
  height: var(--navbar-height);
  width: 50%;
  background-color: var(--theme-red);
}

.keynotes .snake-top {
  border-top-right-radius: var(--border-radius);
  position: relative;
}

.keynotes .snake-top h2,
.keynotes .snake-bottom h2 {
  color: var(--theme-white);
  font-weight: 600;
  height: 100%;
  padding: 0 var(--padding-2);
  display: flex;
  align-items: center;
}

.keynotes .snake-top::before {
    content: "";
    position: absolute;
    top: calc(var(--navbar-height) - 1px);
    left: calc(100% - var(--navbar-height) - var(--padding-0) + 1px);
    width: 16px;
    height: 16px;
    background:
      radial-gradient(
        circle 10px at 100% 100%,
        transparent 16px,
        var(--theme-red) 17px);  /* + 1 px so the edge is smooth */
    transform: rotate(90deg);
}

.keynotes .snake-top::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: 100vw;
  height: var(--navbar-height);
  background-color: var(--theme-red);
}

.keynotes .snake-bottom {
  border-bottom-right-radius: var(--border-radius);
  position: relative;
}

.keynotes .snake-bottom::before {
    content: "";
    position: absolute;
    bottom: calc(var(--navbar-height) - 1px);
    left: calc(100% - var(--navbar-height) - var(--padding-0) - 1px);
    width: 16px;
    height: 16px;
    background:
      radial-gradient(
        circle 10px at 100% 100%,
        transparent 16px,
        var(--theme-red) 17px);  /* + 1 px so the edge is smooth */
    transform: rotate(180deg);
}

.keynotes .snake-bottom::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: 100vw;
  height: var(--navbar-height);
  background-color: var(--theme-red);
}

.keynotes .keynotes-container {
  width: 100%;
  padding: 0 var(--padding-1);
  display: flex;
  gap: var(--padding-2);
  overflow-x: auto;
  z-index: 10;
}

.keynotes .keynotes-container::before {
  content: "";
  position: absolute;
  top: 0;
  right: 50%;
  width: var(--navbar-height);
  height: 100%;
  background-color: var(--theme-red);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  z-index: -1;
}

.keynotes .keynotes-container .keynotes-empty-placeholder {
  background-color: var(--theme-white);
  padding: var(--padding-2);
  border-radius: var(--border-radius-inner);
  width: 35%;
}

.keynotes .keynotes-container .keynotes-empty-placeholder a {
  font-weight: 600;
}

.speakers-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  row-gap: var(--padding-2);
  place-items: center;
}

.speakers-container > * {
  background-color: var(--theme-white);
  width: fit-content;
  height: fit-content;
  border-radius: var(--border-radius);
  padding: var(--padding-1);
}

@media(max-width: 1200px) {
  .speakers-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width: 600px) {
  .speakers {
    margin-bottom: var(--navbar-height);
    position: relative;
  }

  .speakers h2 p {
    color: black;
    margin: 0;
    padding: var(--padding-2);
    margin-right: calc(var(--navbar-height) + var(--padding-0));
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
  }

  .keynotes .snake-top {
    align-self: flex-end;
    width: 90%;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
  }

  .keynotes .snake-top::before {
    right: var(--navbar-height);
    top: calc(-1 * var(--padding-0));
    transform: rotate(180deg);
  }

  .keynotes .snake-top::after {
    right: 0;
    top: calc(-2 * var(--navbar-height) - var(--padding-2));
    height: calc(2 * var(--navbar-height) + var(--padding-2));
    z-index: -1;
  }

  .keynotes .snake-bottom {
    align-self: flex-end;
    width: 100%;
    border-radius: 0 var(--border-radius) 0 0;
  }

  .keynotes .snake-bottom::before {
    top: calc(100% - 1px);
    right: calc(var(--navbar-height));
    transform: rotate(90deg);
  }

  .keynotes .keynotes-container {
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .keynotes .snake-top::after,
  .keynotes .snake-bottom::after,
  .keynotes .keynotes-container::before {
    display: none;
  }

  .keynotes .keynotes-container > *:nth-child(2n + 1) {
    align-self: flex-start;
  }

  .keynotes .keynotes-container > *:nth-child(2n) {
    align-self: flex-end;
  }

  .keynotes .keynotes-container .keynotes-empty-placeholder {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    width: 90%;
    align-self: flex-end;
  }

  .speakers-container {
    grid-template-columns: 1fr;
    place-items: unset;
  }

  .speakers-container > * {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-right: calc(var(--navbar-height) + var(--padding-0));
  }

  .speakers .snake-bottom {
    height: var(--navbar-height);
    width: 100%;
    background-color: var(--theme-red);
    border-bottom-right-radius: var(--border-radius);
  }

  .speakers .snake-bottom::before {
    content: "";
    position: absolute;
    bottom: var(--navbar-height);
    right: 0;
    width: var(--navbar-height);
    height: calc(100% - var(--padding-2) - var(--padding-1));
    background-color: var(--theme-red);
  }

  .speakers .snake-bottom::after {
    content: "";
    position: absolute;
    right: calc(var(--navbar-height) - 2px);
    bottom: calc(var(--navbar-height) - 2px);
    width: 16px;
    height: 16px;
    background:
      radial-gradient(
        circle 10px at 100% 100%,
        transparent 16px,
        var(--theme-red) 17px);  /* + 1 px so the edge is smooth */
    transform: rotate(180deg);
  }
}


.keynote {
    height: 600px;
    flex: 0 0 calc(33.333% - var(--padding-2));
    display: flex;
    flex-direction: column;
    column-gap: 2.5rem;
    row-gap: 1rem;
    flex-basis: 1 / 2;
    flex-shrink: 1;
    flex-grow: 0;
    margin: var(--padding-1) var(--padding-0) 0 var(--padding-0);
    padding: var(--padding-1);
    background-color: var(--theme-white);
    border-radius: var(--border-radius-inner);
}

.keynote > .keynote-image {
    align-self: center;
    height: 350px;
    border-radius: var(--border-radius-inner);
}

.keynote > .keynote-text {
    overflow: hidden;
}

@media screen and (max-width: 1068px) {
    .keynote > .keynote-image {
        height: 250px;
    }
}
