.documents {
  background: #dff4eb;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.document-card {
  display: flex;
  min-width: 0;
  padding: 0 0 24px;
  overflow: hidden;
  flex-direction: column;
  text-align: left;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 5px 5px 0 var(--line);
  cursor: zoom-in;
  transition: .2s;
}

.document-card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 8px 9px 0 var(--line);
}

.document-card[hidden] {
  display: none;
}

.document-image {
  display: block;
  height: 230px;
  margin-bottom: 22px;
  overflow: hidden;
  background: #eee8dd;
  border-bottom: 2px solid var(--line);
}

.document-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  transition: transform .35s;
}

.document-card:hover img {
  transform: scale(1.025);
}

.document-card > span:not(.document-image),
.document-card > strong,
.document-card > small {
  margin-right: 22px;
  margin-left: 22px;
}

.document-kind {
  margin-bottom: 8px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.document-card strong {
  min-height: 52px;
  font: 700 17px/1.4 Unbounded, Manrope, sans-serif;
}

.document-card small {
  margin-top: 18px;
  color: #716b7c;
  font-weight: 700;
}

.documents-more {
  display: block;
  min-height: 50px;
  margin: 34px auto 0;
  padding: 0 24px;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--line);
  border-radius: 999px;
  font: 800 14px Manrope, sans-serif;
  cursor: pointer;
}

.document-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: 92vh;
  padding: 58px 24px 24px;
  overflow: auto;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--line);
  border-radius: 24px;
  box-shadow: 12px 12px 0 var(--line);
}

.document-dialog::backdrop {
  background: rgba(25, 21, 39, .78);
  backdrop-filter: blur(5px);
}

.document-dialog h3 {
  margin: 0 48px 20px 0;
  font: 700 19px/1.4 Unbounded, Manrope, sans-serif;
}

.document-dialog img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.document-dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  padding: 0;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .document-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .document-grid {
    grid-template-columns: 1fr;
  }

  .document-image {
    height: 245px;
  }

  .document-card strong {
    min-height: auto;
  }
}
