.past-main {
  padding-top: 88px;
}

.past-section {
  padding: 42px 0 70px;
  background: var(--light-gray);
  min-height: calc(100vh - 120px);
}

.past-section .section-title {
  padding-bottom: 34px;
}

.past-section .section-title p {
  color: #6b7280;
  font-size: 15px;
}

.past-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.past-tabs a {
  padding: 8px 18px;
  border: 1px solid #d9dee4;
  border-radius: 50px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.past-tabs a.is-active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #fff;
}

.past-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}

.past-loading {
  grid-column: 1 / -1;
  padding: 30px;
  color: #6b7280;
  text-align: center;
}

.past-card {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e3e6e9;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(24, 39, 75, 0.07);
}

.past-card__media {
  position: relative;
  flex: 0 0 210px;
  align-self: center;
  aspect-ratio: 1;
  margin: 14px;
  overflow: hidden;
  border-radius: 4px;
  background: #eef0f2;
}

.past-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  object-fit: cover;
  transition: transform 0.3s;
}

.past-card__media img.is-logo {
  padding: 16px;
  background: #23282d;
  object-fit: contain;
}

.past-card:hover .past-card__media img {
  transform: scale(1.04);
}

.past-card__date {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-left: 2px solid #e0b85c;
  background: rgba(55, 81, 126, 0.94);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.past-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 18px 18px 18px 0;
}

.past-card__body h3 {
  margin: 0 0 5px;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 700;
}

.past-card__body p {
  margin: 0 0 12px;
  color: #5f6b76;
  font-size: 13.5px;
  line-height: 1.5;
}

.past-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef0f2;
}

.past-card__city {
  color: #6b7280;
  font-size: 12px;
}

.past-card__city i {
  color: var(--primary-dark);
  margin-right: 4px;
}

.past-card__button {
  padding: 7px 16px;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.past-card__button:hover {
  background: #fff;
  color: var(--primary-color);
}

.past-card__hidden {
  color: #8a929a;
  font-size: 12px;
}

.past-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  overflow-y: auto;
  background: rgba(20, 8, 10, 0.72);
}

.past-modal[hidden] {
  display: none;
}

.past-modal__backdrop {
  position: fixed;
  inset: 0;
}

.past-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.past-modal__cover {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: #eef0f2;
}

.past-modal__cover.is-logo {
  padding: 24px;
  background: #23282d;
  object-fit: contain;
}

.past-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  font-size: 18px;
}

.past-modal__body {
  padding: 24px 28px 30px;
}

.past-modal__meta {
  margin-bottom: 4px;
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.past-modal__body h2 {
  margin-bottom: 14px;
  color: var(--primary-dark);
  font-size: 30px;
  font-weight: 700;
}

.past-modal__text {
  color: #444;
  font-size: 15px;
  line-height: 1.65;
}

.past-modal__text p {
  margin-bottom: 12px;
}

.past-modal__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.past-modal__gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid #e3e6e9;
  border-radius: 4px;
  cursor: zoom-in;
}

.past-preview {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(15, 5, 7, 0.92);
}

.past-preview[hidden] {
  display: none;
}

.past-preview img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .past-grid {
    grid-template-columns: 1fr;
    max-width: 620px;
  }
}

@media (max-width: 767px) {
  .past-main {
    padding-top: 76px;
  }

  .past-section {
    padding: 26px 0 44px;
  }

  .past-card__media {
    flex-basis: 118px;
    margin: 10px;
  }

  .past-card__body {
    padding: 14px 14px 14px 0;
  }

  .past-card__body h3 {
    font-size: 16px;
  }

  .past-card__body p {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 8px;
    font-size: 12.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .past-card__button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .past-modal {
    padding: 10px;
  }

  .past-modal__body {
    padding: 18px 16px 22px;
  }

  .past-modal__body h2 {
    font-size: 22px;
  }

  .past-modal__gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .past-card__foot {
    flex-wrap: wrap;
  }

  .past-card__button {
    width: 100%;
  }
}
