.events-page {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px var(--container-gutter) 28px;
  border-radius: 30px;
  background:
    radial-gradient(860px 300px at 0% 0%, rgba(255, 79, 147, 0.1), transparent 68%),
    radial-gradient(760px 300px at 100% 0%, rgba(6, 185, 109, 0.11), transparent 68%),
    rgba(255, 255, 255, 0.62);
  box-shadow: 0 24px 44px rgba(45, 65, 56, 0.08);
}

.events-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.events-header h1 {
  margin-top: 0;
  font-family: var(--font-headline), sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.07;
  letter-spacing: -0.01em;
  color: #3f2f72;
}

.events-header p {
  margin-top: 6px;
  color: #63786f;
}

.events-toolbar {
  margin-top: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(124, 148, 137, 0.18);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.events-toolbar input {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(121, 146, 134, 0.22);
}

.events-toolbar input:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.4),
    0 0 0 4px rgba(6, 185, 109, 0.12);
}

.events-toolbar span {
  color: #5f746b;
  font-size: 14px;
  font-weight: 700;
}

.events-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.events-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(123, 147, 136, 0.17),
    0 14px 24px rgba(45, 68, 58, 0.08);
  padding: 16px;
}

.events-card:hover {
  transform: translateY(-5px);
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.28),
    0 18px 30px rgba(45, 68, 58, 0.12);
}

.events-preview,
.events-preview-placeholder {
  width: 100%;
  height: 170px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(123, 147, 136, 0.16);
}

.events-preview {
  object-fit: cover;
  background: #f8fffb;
}

.events-preview-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(255, 236, 244, 0.95), rgba(236, 249, 242, 0.96));
  color: #ef4f8f;
  font-family: var(--font-headline), sans-serif;
  letter-spacing: 0.1em;
}

.events-meta-row {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.events-code {
  font-family: var(--font-headline), sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #15a763;
}

.events-status-badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  white-space: nowrap;
}

.events-status-active {
  color: #0d8f52;
  background: rgba(7, 192, 111, 0.16);
}

.events-status-upcoming {
  color: #2f7cc8;
  background: rgba(78, 145, 231, 0.16);
}

.events-status-ended {
  color: #6a7683;
  background: rgba(139, 151, 168, 0.16);
}

.events-title {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.12;
}

.events-line {
  margin-top: 9px;
  font-size: 14px;
  color: #33463f;
  line-height: 1.6;
}

.events-related-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.events-related-fallback {
  color: #6b8076;
  font-size: 13px;
}

.events-related-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  background: rgba(240, 255, 248, 0.88);
  box-shadow: inset 0 0 0 1px rgba(19, 164, 101, 0.2);
  font-size: 13px;
  color: #2f3b35;
}

.events-related-sprite,
.events-related-fallback-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(118, 145, 132, 0.2);
  background-color: rgba(255, 255, 255, 0.98);
}

.events-related-sprite {
  image-rendering: pixelated;
}

.events-related-fallback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #60756b;
}

.events-periods {
  margin-top: 10px;
  padding-top: 8px;
  color: #647972;
  font-size: 13px;
  display: grid;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(121, 145, 134, 0.18);
}

.events-empty-list {
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid rgba(194, 209, 224, 0.58);
  padding: 12px;
  text-align: center;
  color: #738896;
  font-size: 13px;
}

.events-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.events-pagination a {
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(123, 147, 136, 0.22);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
}

.events-pagination a:hover:not(.is-disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.28),
    0 8px 16px rgba(45, 68, 58, 0.11);
}

.events-pagination .is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.events-pagination span {
  color: #556b63;
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 1020px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .events-page {
    border-radius: 18px;
    padding: 12px 12px 22px;
  }

  .events-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .events-meta-row {
    gap: 8px;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }
}

