.events {
  padding: 55px 0 55px 0;
}
@media screen and (min-width: 768px) {
  .events {
    padding: 65px 0 65px 0;
  }
}
@media screen and (min-width: 1366px) {
  .events {
    padding: 75px 0 75px 0;
  }
}

.events__container {
  padding: 0 22px;
}
@media screen and (min-width: 768px) {
  .events__container {
    padding: 0 24px;
  }
}

.events--page {
  padding: 30px 0 45px 0;
}
@media screen and (min-width: 768px) {
  .events--page {
    padding: 0px 0 65px 0;
  }
}
@media screen and (min-width: 1366px) {
  .events--page {
    padding: 0px 0 75px 0;
  }
}
.events--page .b-btn--primary {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 27px;
}
@media screen and (min-width: 768px) {
  .events--page .b-btn--primary {
    padding: 11px 60px;
  }
}

.events--past {
  padding: 45px 0 180px 0;
}
@media screen and (min-width: 768px) {
  .events--past {
    padding: 65px 0 210px 0;
  }
}
@media screen and (min-width: 1366px) {
  .events--past {
    padding: 75px 0 250px 0;
  }
}
.events--past .b-btn--primary {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 27px;
}
@media screen and (min-width: 768px) {
  .events--past .b-btn--primary {
    padding: 11px 60px;
  }
}

.events__head {
  margin-bottom: 38px;
}
@media screen and (min-width: 768px) {
  .events__head {
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
}
@media screen and (min-width: 1366px) {
  .events__head {
    align-items: center;
    margin-bottom: 43px;
  }
}

.events__title {
  margin-bottom: 18px;
}
@media screen and (min-width: 768px) {
  .events__title {
    margin-bottom: 0;
  }
}
.events__title--noactive {
  font-size: 32px;
  line-height: 100%;
}
@media screen and (min-width: 768px) {
  .events__title--noactive {
    font-size: 40px;
    line-height: 100%;
  }
}
@media screen and (min-width: 1366px) {
  .events__title--noactive {
    font-size: 56px;
    line-height: 110%;
  }
}

.events__categories {
  margin: 0 -14px 38px -14px;
  overflow-x: auto;
}
@media screen and (min-width: 768px) {
  .events__categories {
    margin-bottom: 62px;
  }
}
@media screen and (min-width: 1366px) {
  .events__categories {
    margin-bottom: 70px;
  }
}

.categories {
  display: flex;
  align-items: center;
  padding-left: 14px;
  padding-right: 14px;
  flex-wrap: wrap;
  overflow: hidden;
}

.categories__item:not(:last-child) {
  margin-right: 16px;
}
@media screen and (min-width: 768px) {
  .categories__item:not(:last-child) {
    margin-right: 18px;
  }
}
@media screen and (min-width: 1366px) {
  .categories__item:not(:last-child) {
    margin-right: 24px;
  }
}

.categories__btn {
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  color: #A9B0F4;
  border: 1px solid #A9B0F4;
  border-radius: 30px;
  padding: 6px 15px;
  transition: background-color 0.3s ease-in, color 0.3s ease-in;
  white-space: nowrap;
}
@media screen and (min-width: 768px) {
  .categories__btn {
    font-size: 16px;
    padding: 7px 15px;
  }
}
@media screen and (min-width: 1366px) {
  .categories__btn {
    font-size: 18px;
  }
}
.categories__btn:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}
.categories__btn.active {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.events__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-row-gap: 24px;
  grid-column-gap: 16px;
}
@media screen and (min-width: 768px) {
  .events__grid {
    grid-template-columns: repeat(12, 1fr);
    grid-row-gap: 50px;
    grid-column-gap: 19px;
  }
}
@media screen and (min-width: 1366px) {
  .events__grid {
    grid-row-gap: 22px;
    grid-column-gap: 30px;
  }
}
.events__grid--page {
  margin-bottom: 50px;
}
@media screen and (min-width: 768px) {
  .events__grid--page {
    margin-bottom: 56px;
  }
}
@media screen and (min-width: 1366px) {
  .events__grid--page {
    margin-bottom: 72px;
  }
}
.events__grid--past {
  margin-bottom: 50px;
}
@media screen and (min-width: 768px) {
  .events__grid--past {
    margin-bottom: 56px;
  }
}
@media screen and (min-width: 1366px) {
  .events__grid--past {
    margin-bottom: 72px;
  }
}

.events__item {
  grid-column: 2 span;
  border: 1px solid #EEEFFD;
  border-radius: 20px;
  background-color: var(--white-color);
  transition: box-shadow 0.3s ease, border 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  height: 228px;
}
@media screen and (min-width: 768px) {
  .events__item {
    grid-column: 4 span;
    height: 362px;
  }
}
@media screen and (min-width: 1366px) {
  .events__item {
    border-radius: 30px;
    height: 438px;
  }
}
.events__item:hover {
  box-shadow: 0px 0px 14px rgba(169, 176, 244, 0.36);
  border: 1px solid #A9B0F4;
  transform: translateY(-10px);
}
.events__item:hover .events__img img {
  transform: scale(1.1);
}

.events__item--none {
  opacity: 0.5;
  pointer-events: none;
}
.events__item--none .events__date {
  color: #808080;
}
.events__item--none .events__name {
  color: #808080;
}
.events__item--none:last-child {
  /* display: none; */
}
@media screen and (min-width: 768px) {
  .events__item--none:last-child {
    display: flex;
  }
}

.events__img {
  border-top-left-radius: 20px;
  border-top-left-radius: 20px;
  overflow: hidden;
  max-height: 104px;
  font-size: 0;
}
@media screen and (min-width: 768px) {
  .events__img {
    max-height: 169px;
  }
}
@media screen and (min-width: 1366px) {
  .events__img {
    max-height: 263px;
    border-top-left-radius: 30px;
    border-top-left-radius: 30px;
  }
}
.events__img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.events__wrap {
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
@media screen and (min-width: 768px) {
  .events__wrap {
    padding: 14px 14px 19px 14px;
  }
}
@media screen and (min-width: 1366px) {
  .events__wrap {
    padding: 20px 20px;
  }
}

.events__name {
  font-weight: 400;
  font-size: 14px;
  line-height: 120%;
  color: var(--black-color);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media screen and (min-width: 768px) {
  .events__name {
    font-size: 18px;
  }
}
@media screen and (min-width: 1366px) {
  .events__name {
    font-size: 24px;
    -webkit-line-clamp: 3;
  }
}

.events__date {
  font-weight: 400;
  font-size: 14px;
  line-height: 114%;
  color: #002D74;
  margin-bottom: 15px;
}
@media screen and (min-width: 768px) {
  .events__date {
    margin-bottom: 22px;
    font-size: 24px;
    line-height: 114%;
  }
}
@media screen and (min-width: 1366px) {
  .events__date {
    font-size: 26px;
    line-height: 100%;
  }
}

.events__calendar {
  position: relative;
}
.events__calendar input {
  cursor: pointer;
  opacity: 0;
  width: 178px;
  height: 32px;
  margin: 0;
}
@media screen and (min-width: 1366px) {
  .events__calendar input {
    width: 200px;
    height: 32px;
  }
}

.calendar-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  color: #A9B0F4;
  position: absolute;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 178px;
  height: 32px;
  z-index: 100;
  cursor: pointer;
  transition: color 0.3s ease;
}
@media screen and (min-width: 1366px) {
  .calendar-text {
    font-size: 18px;
    width: 200px;
    height: 32px;
  }
}
.calendar-text.hover {
  color: var(--primary-color);
  transition: color 0.3s ease;
}
.calendar-text.hover svg {
  transform: rotate(0deg);
  transition: transform 0.3s ease, fill 0.3s ease;
}
.calendar-text.hover svg path {
  fill: var(--primary-color);
  transition: transform 0.3s ease, fill 0.3s ease;
}
.calendar-text.active {
  color: var(--primary-color);
  transition: color 0.3s ease;
}
.calendar-text.active svg {
  transform: rotate(180deg);
  transition: transform 0.3s ease, fill 0.3s ease;
}
.calendar-text.active svg path {
  fill: var(--primary-color);
  transition: transform 0.3s ease, fill 0.3s ease;
}
.calendar-text svg {
  transform: rotate(0deg);
  transition: transform 0.3s ease, fill 0.3s ease;
}
.calendar-text svg path {
  fill: #A9B0F4;
  transition: transform 0.3s ease, fill 0.3s ease;
}

.events__teg-name {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 75px;
  height: 32px;
  background-color: white;
  border-radius: 30px;
  border: 1px solid #fff;
  z-index: 2;
  font-weight: 400;
  font-size: 18px;
  line-height: 100%;
  color: #002D74;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 15px;
}

@media screen and (max-width: 767px) {
  .events__teg-name {
    font-size: 10px;
    height: 10px;
    min-width: 33px;
    top: 7px;
    right: 7px;
    padding: 6px 5px;

  }
}
@media screen and (max-width: 1023px) {
  .events__teg-name {
    font-size: 12px;
    height: 20px;
    min-width: 55px;
    top: 10px;
    right: 10px;
    padding: 6px 8px;
  }
}