/* 전체 폰트: 공통 Noto Sans KR (head.ejs에서 로드) */
body,
.download-container,
.download-section-title,
.download-card,
.document-image {
  font-family: 'Noto Sans KR', sans-serif;
}

.download-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  max-width: 1200px;
  width: 92%;
  margin: 40px auto;
  background: #ffffff;
  box-sizing: border-box;
  align-items: start;
}

.download-section {
  width: 100%;
  margin: 0;
  min-width: 0;
}

.download-section-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4e61aa;
  font-size: 1.25rem;
  font-weight: 700;
  color: #222;
  text-align: left;
  line-height: 1.4;
}

.download-card {
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 8px 0 12px;
  box-sizing: border-box;
}

.cards-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 16px;
}

.document-preview-link {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.document-preview-link:hover,
.document-preview-link:focus-visible {
  border-color: #4e61aa;
  opacity: 0.92;
  outline: none;
}

.document-image {
  border: none;
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto;
  pointer-events: none;
}

.document-title {
  display: block;
  width: 100%;
  max-width: 220px;
  border: 1px solid #ddd;
  margin: 8px auto 0;
  border-radius: 4px;
  box-sizing: border-box;
  text-align: center;
  background-color: #d7d7d7;
  padding: 6px 8px;
  word-break: break-word;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.document-title:hover,
.document-title:focus-visible {
  background-color: #c8c8c8;
  border-color: #4e61aa;
  color: #1a1a1a;
  outline: none;
}

.modal-container {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 15px 25px;
  border-radius: 5px;
  z-index: 1000;
  animation: fadeInOut 5s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

.download-empty {
  width: 100%;
  text-align: center;
  color: #666;
  padding: 16px 0;
  margin: 0;
}

@media (max-width: 1024px) {
  .download-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 94%;
  }
}

@media (max-width: 640px) {
  .download-container {
    grid-template-columns: 1fr;
    width: 95%;
    gap: 28px;
  }

  .download-section-title {
    font-size: 1.1rem;
  }

  .document-preview-link,
  .document-image,
  .document-title {
    max-width: 100%;
  }

  .cards-container {
    align-items: stretch;
  }
}
