.section-events {
  padding: 0;
  position: relative;
  margin: 5rem 0;
}
.section-events .container {
  position: relative;
}
.section-events .container h1, .section-events .container h2 {
  text-align: center;
  margin-bottom: 20px;
}
.section-events .container .text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.75em;
}
.section-events .container > .buttons {
  display: block;
  margin: 50px auto 0;
}
.section-events .container > .buttons .button {
  max-width: -moz-max-content;
  max-width: max-content;
  margin: 0 auto 20px;
}
.section-events .container > .buttons .button:last-child {
  margin-bottom: 0;
}
.section-events .container .events {
  margin-top: 50px;
}
.section-events .container .events .inner {
  display: flex;
  justify-content: flex-start;
  grid-gap: 30px;
  transition: all 1s;
}
.section-events .container .events .event {
  position: relative;
  width: calc(50% - 15px);
}
.section-events .container .events .event .image {
  position: relative;
  background-color: rgba(var(--gray-rgb), 0.5);
  width: 100%;
  height: 250px;
  border-radius: 20px;
}
.section-events .container .events .event .image img {
  width: 100%;
  height: 100%;
  display: block;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 20px;
}
.section-events .container .events .event .image p.date {
  position: absolute;
  top: -10px;
  left: 20px;
  background-color: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  margin: 0;
  font-size: 1.4em;
  border-radius: 4px;
  letter-spacing: 1px;
  transition: all 0.3s;
}
.section-events .container .events .event .text {
  padding: 20px 0 0;
  color: var(--black);
  font-weight: 400;
  text-align: left;
  transition: all 0.3s;
}
.section-events .container .events .event .text p.button {
  justify-content: flex-start;
  width: -moz-max-content;
  width: max-content;
  margin: 20px 0 0;
  padding: 6px 20px;
}
.section-events .container .events .event:hover {
  text-decoration: none !important;
}
.section-events .container .events .event:hover .image p.date {
  top: -15px;
}
.section-events .container .events .event:hover .text {
  color: var(--primary);
}
.section-events .container .events .dots {
  display: flex;
  justify-content: center;
  grid-gap: 5px;
  align-items: center;
  margin-top: 40px;
}
.section-events .container .events .dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 100%;
  cursor: pointer;
  background-color: var(--black);
}
.section-events .container .events .dots .dot.active {
  background-color: var(--primary);
  width: 21px;
  border-radius: 5px;
  transition: all 0.2s;
}

/*

Options > Background Primary

*/
.section-events[options~=background-primary] {
  background-color: var(--primary);
  margin: 0;
  padding: 5rem 0;
}
.section-events[options~=background-primary] .container .content {
  color: var(--white);
}
.section-events[options~=background-primary] .container .events .event .image p.date {
  background-color: var(--black);
}
.section-events[options~=background-primary] .container .events .event .text {
  color: var(--white);
}
.section-events[options~=background-primary] .container .events .event .text p.button.outline {
  color: var(--white);
  border-color: var(--white);
}
.section-events[options~=background-primary] .container .dots .dot.active {
  background-color: var(--white);
}

/*

Scroll Animations

*/
.section-events {
  opacity: 0;
  transition: all 1s;
}
.section-events .block {
  margin: -50px 0 50px;
  opacity: 0;
}
.section-events.scrolled-to {
  opacity: 1;
}
.section-events.scrolled-to .block {
  animation: blockAppear 1s ease-out forwards;
}
.section-events.scrolled-to .block:nth-child(1) {
  animation-delay: 0s;
}
.section-events.scrolled-to .block:nth-child(2) {
  animation-delay: 0.2s;
}
.section-events.scrolled-to .block:nth-child(3) {
  animation-delay: 0.4s;
}
.section-events.scrolled-to .block:nth-child(4) {
  animation-delay: 0.6s;
}
.section-events.scrolled-to .block:nth-child(5) {
  animation-delay: 0.8s;
}
.section-events.scrolled-to .block:nth-child(6) {
  animation-delay: 1s;
}
.section-events.scrolled-to .block:nth-child(7) {
  animation-delay: 1.2s;
}
.section-events.scrolled-to .block:nth-child(8) {
  animation-delay: 1.4s;
}
.section-events.scrolled-to .block:nth-child(9) {
  animation-delay: 1.6s;
}
.section-events.scrolled-to .block:nth-child(10) {
  animation-delay: 1.8s;
}
.section-events.scrolled-to .block:nth-child(11) {
  animation-delay: 2s;
}
.section-events.scrolled-to .block:nth-child(12) {
  animation-delay: 2.2s;
}

@keyframes blockAppear {
  to {
    margin: 0;
    opacity: 1;
  }
}