.md-events,
.md-events * {
  box-sizing: border-box;
}

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

.elementor-widget-md_events {
  width: 100%;
  align-self: stretch;
}

.md-events {
  width: 100%;
  color: var(--color-navy, #002855);
  font-family: var(--font-body, Arial, Helvetica, sans-serif);
}

.md-events__heading {
  margin: 0 0 1.75rem;
  text-align: start;
}

.md-events__filters {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 1.25rem 2.5rem;
  align-items: end;
  max-width: 920px;
  margin: 0 0 2.25rem;
}

.md-events__search,
.md-events__field {
  position: relative;
}

.md-events__search input,
.md-events__field select {
  width: 100%;
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--color-navy, #002855);
  background: #fff;
}

.md-events__search input {
  height: 48px;
  padding: 0 1.15rem;
  border: 1px solid #c5cdd6;
  border-radius: var(--size-button-radius, 30px);
  outline: none;
}

.md-events__search input::placeholder {
  color: #8b95a1;
}

.md-events__search input:focus {
  border-color: var(--color-steel-blue, #005686);
}

.md-events__field select {
  height: 48px;
  padding: 0 1.75rem 0 0;
  border: 0;
  border-bottom: 2px solid var(--color-navy, #002855);
  border-radius: 0;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23002855' d='M1.4.8 6 5.4 10.6.8 12 2.2 6 8 0 2.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.15rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

.md-events__field select:focus {
  outline: 2px solid var(--color-light-blue, #009cde);
  outline-offset: 4px;
}

.md-events__field .chosen-container {
  width: 100% !important;
  font-family: inherit;
  font-size: 1rem;
}

.md-events__field .chosen-container-single .chosen-single {
  height: 48px;
  padding: 0 1rem;
  border: 1px solid #c5cdd6;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  color: #8b95a1;
  line-height: 46px;
}

.md-events__field .chosen-container-single.is-updated .chosen-single {
  color: var(--color-navy, #002855);
}

.md-events__field .chosen-container-single .chosen-single span {
  margin-right: 28px;
  line-height: 46px;
}

.md-events__field .chosen-container-single .chosen-single div {
  width: 32px;
}

.md-events__field .chosen-container-single .chosen-single div b {
  background-image: url("../../legacy/v2/src/svg/icon-arrow-only.svg") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 14px !important;
  transform: rotate(90deg);
  opacity: 0.7;
}

.md-events__field .chosen-container-active.chosen-with-drop .chosen-single div b {
  transform: rotate(-90deg);
}

.md-events__field .chosen-container .chosen-drop {
  border-color: #c5cdd6;
}

.md-events__field .chosen-container .chosen-results {
  margin: 0;
  padding: 0;
  color: var(--color-navy, #002855);
}

.md-events__field .chosen-container .chosen-results li {
  font-size: 1rem;
  line-height: 1.35;
  padding: 8px 12px;
}

.md-events__field .chosen-container .chosen-results li.highlighted {
  background: var(--color-navy, #002855);
  color: #fff;
}

.md-events__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.md-events__grid[data-cols="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.md-events__grid[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@keyframes md-events-spin {
  to {
    transform: rotate(360deg);
  }
}

.md-events__grid.is-loading {
  position: relative;
  min-height: 180px;
  pointer-events: none;
}

.md-events__grid.is-loading > * {
  visibility: hidden;
}

.md-events__grid.is-loading::after {
  content: '';
  position: absolute;
  top: 80px;
  left: 50%;
  width: 5rem;
  height: 5rem;
  margin-left: -2.5rem;
  border: 2px solid var(--color-navy, #002855);
  border-right-color: #fff;
  border-top-color: #fff;
  border-radius: 50%;
  animation: md-events-spin 0.5s infinite linear;
  z-index: 2;
}

.md-events__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 100%;
  padding: 1.5rem 1.6rem 1.35rem;
  border: 1px solid var(--color-card-gray, #e0e0e0);
  border-radius: var(--size-inner-border-radius, 16px);
  background: #fff;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
}

.md-events__card:hover {
  border-color: var(--color-transparent-blue, #ccd4dd);
  box-shadow: 0 8px 28px rgba(0, 40, 85, 0.1);
}

.md-events__title {
  margin: 0;
  font-family: var(--font-brand, Arial, Helvetica, sans-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-navy, #002855);
}

.md-events__date,
.md-events__location {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.md-events__date {
  color: var(--color-light-blue, #009cde);
}

.md-events__location {
  color: #646464;
}

.md-events__more {
  margin-top: 0.35rem;
  color: var(--color-light-blue, #009cde);
  font-size: 0.95rem;
  line-height: 1.3;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.md-events__empty {
  margin: 1.5rem 0 0;
  text-align: center;
  color: #646464;
}

.md-events__empty[hidden],
.md-events__load[hidden] {
  display: none;
}

.md-events__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
}

.md-events__load {
  min-width: 9.5rem;
  padding: 0.7em 2.1em;
  border: 1px solid var(--color-navy, #002855);
  border-radius: var(--size-button-radius, 30px);
  background: #fff;
  color: var(--color-navy, #002855);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  cursor: pointer;
}

.md-events__load:hover {
  background: var(--color-navy, #002855);
  color: #fff;
}

.md-events__load.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.md-events__load.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.25rem;
  height: 1.25rem;
  margin: -0.625rem 0 0 -0.625rem;
  border: 2px solid var(--color-light-blue, #009cde);
  border-right-color: transparent;
  border-top-color: transparent;
  border-radius: 50%;
  animation: md-events-spin 0.5s infinite linear;
}

@media (max-width: 1024px) {
  .md-events__grid,
  .md-events__grid[data-cols="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .md-events__filters {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .md-events__grid,
  .md-events__grid[data-cols="2"],
  .md-events__grid[data-cols="3"],
  .md-events__grid[data-cols="4"] {
    grid-template-columns: 1fr;
  }
}
