/* =========================================================
   UPCOMING EVENTS / SCHEDULE
   ========================================================= */

#upcoming-events {
  background-color: var(--black);
  color: var(--white);
}

.upcoming-events-inner {
  display: flex;
  flex-direction: column;
  width: 100%;

  padding-top: 100px;
  padding-bottom: 100px;

  gap: 50px;
}

.upcoming-events-inner > .h2 {
  margin: 0;

  text-align: center;
  text-transform: uppercase;

  opacity: 0;

  /* animation: fadeIn 0.6s linear 0.2s forwards; */
}

/* =========================================================
   EVENTS LIST
   ========================================================= */

.calendar-events {
  display: flex;
  flex-direction: column;

  width: 100%;

  border-top: 1px solid var(--white);
}

/* =========================================================
   EVENT ROW
   ========================================================= */

.saved-logo {
  position: relative;

  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 220px;

  align-items: stretch;

  width: 100%;
  min-height: 190px;

  padding: 32px 0;

  border-bottom: 1px solid var(--white);

  background-color: transparent;
  color: var(--white);

  cursor: default;

  opacity: 0;

  -webkit-clip-path: inset(0 0 100% 0);
  clip-path: inset(0 0 100% 0);

  /* animation: unfoldFromBottom 1s ease-out 0.4s forwards; */

  transition:
    padding 0.4s ease,
    background-color 0.4s ease;
}

/* =========================================================
   DATE COLUMN
   ========================================================= */

.calendar-date-col {
  display: flex;
  flex-direction: column;

  justify-content: flex-start;
  align-items: flex-start;

  padding-right: 30px;
}

.calendar-date {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 500;

  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.calendar-date-col .calendar-location {
  margin-top: 8px;

  font-size: 14px;
  line-height: 1.2;

  opacity: 0.55;
}

/* =========================================================
   EVENT INFORMATION
   ========================================================= */

.calendar-info-col {
  display: flex;
  flex-direction: column;

  justify-content: flex-start;

  padding: 0 40px;
}

.calendar-name {
  margin: 0;

  font-size: clamp(24px, 3vw, 46px);
  line-height: 1.05;
  font-weight: 400;

  text-transform: uppercase;
  letter-spacing: -0.02em;

  color: var(--white);

  transition: transform 0.4s ease;
}

.calendar-info-col .calendar-location {
  margin-top: 18px;

  font-size: 16px;
  line-height: 1.3;

  color: var(--white);

  opacity: 0.6;

  transition: opacity 0.4s ease;
}

/* =========================================================
   ACTION COLUMN
   ========================================================= */

.calendar-actions-col {
  display: flex;

  align-items: center;
  justify-content: flex-end;

  min-width: 0;

  padding-left: 30px;
}

.calendar-vertical-line {
  width: 1px;
  height: 70px;

  margin-right: 35px;

  background-color: var(--white);

  opacity: 0.4;

  transform-origin: center;

  /* animation: expandWidth 0.8s ease-out 1s forwards; */
}

/* Hide elements until the section enters the viewport */
#upcoming-events .upcoming-events-inner > .h2,
#upcoming-events .saved-logo,
#upcoming-events .to-calendar-link {
    opacity: 0;
}

#upcoming-events .saved-logo {
    clip-path: inset(0 0 100% 0);
    -webkit-clip-path: inset(0 0 100% 0);
}

#upcoming-events .calendar-vertical-line {
    clip-path: inset(0 50% 0 50%);
    -webkit-clip-path: inset(0 50% 0 50%);
}

/* =========================================================
   BUY TICKETS BUTTON
   ========================================================= */

.calendar-link {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 145px;
  height: 52px;

  padding: 0 24px;

  border: 1px solid var(--aist-red);
  border-radius: 0;

  background-color: var(--aist-red);
  color: var(--black-total);

  font-size: 13px;
  line-height: 1;
  font-weight: 500;

  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;

  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s ease;
}

.calendar-link::after {
  margin-left: 14px;

  font-size: 16px;

  transition: transform 0.35s ease;
}

/* Button hover */

.calendar-link:hover {
  background-color: var(--aist-red-hover);
  color: var(--white);

  transform: translateY(-2px);
}

.calendar-link:hover::after {
  transform: translateX(5px);
}

/* =========================================================
   EVENT ROW HOVER
   IMPORTANT:
   ROW NEVER BECOMES WHITE
   ========================================================= */

.saved-logo:hover {
  background-color: transparent;

  color: var(--white);

  padding-left: 20px;
  padding-right: 20px;
}

.saved-logo:hover .calendar-name {
  color: var(--white);

  transform: translateX(8px);
}

.saved-logo:hover .calendar-info-col .calendar-location {
  color: var(--white);

  opacity: 1;
}

.saved-logo:hover .calendar-date {
  color: var(--white);
}

.saved-logo:hover .calendar-date-col .calendar-location {
  color: var(--white);
}

.saved-logo:hover .calendar-vertical-line {
  background-color: var(--white);

  opacity: 1;
}

/* =========================================================
   BUTTON INSIDE HOVERED ROW
   ========================================================= */

.saved-logo:hover .calendar-link:hover {
  background-color: var(--aist-red-hover);
}

.to-calendar-link {
    margin: auto;
    width: fit-content;
    margin-top: 30px;
}

.to-calendar-link a{
  background: transparent;
  border: 1px solid var(--white);
  color: var(--white);
  padding: 12px 60px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.5s;
  width: fit-content;

}

.to-calendar-link a:hover {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   ANIMATION: UNFOLD FROM BOTTOM
   ========================================================= */

@-webkit-keyframes unfoldFromBottom {
  0% {
    opacity: 0;

    -webkit-clip-path: inset(0 0 100% 0);
    clip-path: inset(0 0 100% 0);
  }

  100% {
    opacity: 1;

    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes unfoldFromBottom {
  0% {
    opacity: 0;

    -webkit-clip-path: inset(0 0 100% 0);
    clip-path: inset(0 0 100% 0);
  }

  100% {
    opacity: 1;

    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}

/* =========================================================
   ANIMATION: FADE IN
   ========================================================= */

@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* =========================================================
   ANIMATION: EXPAND WIDTH
   ========================================================= */

@-webkit-keyframes expandWidth {
  0% {
    opacity: 0.5;

    -webkit-clip-path: inset(0 50% 0 50%);
    clip-path: inset(0 50% 0 50%);
  }

  100% {
    opacity: 1;

    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes expandWidth {
  0% {
    opacity: 0.5;

    -webkit-clip-path: inset(0 50% 0 50%);
    clip-path: inset(0 50% 0 50%);
  }

  100% {
    opacity: 1;

    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width: 920px) {
  .upcoming-events-inner {
    padding-top: 80px;
    padding-bottom: 80px;

    gap: 40px;
  }

  .saved-logo {
    grid-template-columns: 130px minmax(0, 1fr) 180px;

    min-height: 170px;
  }

  .calendar-info-col {
    padding: 0 25px;
  }

  .calendar-actions-col {
    padding-left: 20px;
  }

  .calendar-vertical-line {
    margin-right: 20px;
  }

  .calendar-link {
    min-width: 125px;

    padding: 0 18px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 768px) {
  .upcoming-events-inner {
    padding-top: 64px;
    padding-bottom: 64px;

    gap: 30px;
  }

  .calendar-events {
    border-top: 1px solid var(--white);
  }

  .saved-logo {
    display: grid;

    grid-template-columns: 90px minmax(0, 1fr);

    min-height: auto;

    padding: 25px 0;

    gap: 0;
  }

  .saved-logo:hover {
    background-color: transparent;

    color: var(--white);

    padding-left: 10px;
    padding-right: 10px;
  }

  /* Date */

  .calendar-date-col {
    padding-right: 15px;
  }

  .calendar-date {
    font-size: 15px;
  }

  .calendar-date-col .calendar-location {
    font-size: 12px;
  }

  /* Information */

  .calendar-info-col {
    padding: 0;
  }

  .calendar-name {
    font-size: clamp(20px, 6vw, 30px);
  }

  .calendar-info-col .calendar-location {
    margin-top: 10px;

    font-size: 14px;
  }

  /* Actions */

  .calendar-actions-col {
    grid-column: 2;

    justify-content: flex-start;

    padding: 20px 0 0;
  }

  .calendar-vertical-line {
    display: none;
  }

  .calendar-link {
    min-width: 130px;
    height: 46px;

    font-size: 11px;
  }

  .saved-logo:hover .calendar-name {
    transform: translateX(4px);
  }
  .calendar-info-col,
  .calendar-link {
    margin-left: 30px;
  }

  .to-calendar-link a,
  .to-calendar-link{
    display: flex;
    width: 100% !important;
    text-align: center;
    justify-content: center;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 560px) {
  .upcoming-events-inner {
    padding-top: 55px;
    padding-bottom: 55px;

    gap: 25px;
  }

  .upcoming-events-inner > .h2 {
    font-size: 24px;
  }

  .saved-logo {
    grid-template-columns: 75px minmax(0, 1fr);

    padding: 22px 0;
  }

  .calendar-date {
    font-size: 13px;
  }

  .calendar-date-col .calendar-location {
    font-size: 11px;
  }

  .calendar-name {
    font-size: 21px;
  }

  .calendar-info-col .calendar-location {
    font-size: 13px;
  }

  .calendar-link {
    width: 100%;
    max-width: 170px;
  }
}

/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media screen and (max-width: 380px) {
  .saved-logo {
    grid-template-columns: 65px minmax(0, 1fr);
  }

  .calendar-date {
    font-size: 12px;
  }

  .calendar-name {
    font-size: 19px;
  }

  .calendar-link {
    max-width: 155px;
    height: 44px;

    padding: 0 16px;
  }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .saved-logo,
  .upcoming-events-inner > .h2,
  .calendar-vertical-line {
    animation: none;

    opacity: 1;

    clip-path: none;
    -webkit-clip-path: none;
  }

  .saved-logo,
  .calendar-name,
  .calendar-link,
  .calendar-link::after {
    transition: none;
  }
}
