/* Archives */
.document-archive {
  max-width: 1200px;
  margin: 60px auto;
  padding: 20px;
  font-family: "Segoe UI", sans-serif;
}
.doc-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #006400;
}
.doc-container {
  display: flex;
  gap: 30px;
}
.doc-sidebar {
  flex: 1;
  max-width: 260px;
  background: rgb(191, 207, 194);
  padding: 20px;
  border-radius: 8px;
}
.filter-box label {
  font-weight: 600;
  display: block;
  margin-top: 10px;
}
.filter-box select,
.filter-box input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}
.doc-main {
  flex: 3;
}

/* ✅ New horizontal row layout */
.document-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 200px;
}
.document-row {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  justify-content: space-between;
  transition: all 0.3s ease;
}
.document-row:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.doc-icon {
  font-size: 36px;
  margin-right: 20px;
  color: #007344;
  flex-shrink: 0;
}
.doc-info {
  flex-grow: 1;
  margin-right: 20px;
}
.doc-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}
.doc-name a {
  color: #007344;
  text-decoration: none;
}
.doc-name a:hover {
  text-decoration: underline;
}
.doc-meta {
  font-size: 14px;
  color: #555;
  display: flex;
  gap: 20px;
}
.doc-action {
  flex-shrink: 0;
}
.doc-download {
  padding: 10px 14px;
  background: rgb(9, 105, 25);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
}
.doc-download:hover {
  background: rgb(216, 238, 220);
}
.doc-missing {
  color: #888;
  font-size: 13px;
}

/* Pagination */
/* Container Pagination */
.doc-pagination {
  text-align: center;
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Style setiap page link */
.page-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  background-color: #f0f0f0;
  border-radius: 6px;
  color: #333;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid #ccc;
  min-width: 40px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Hover effect */
.page-link:hover {
  background-color: #007344;
  color: #fff;
  border-color: #007344;
}

/* Aktif (current page) */
.page-link.current {
  background-color: #28a745;
  color: #fff;
  font-weight: bold;
  border-color: #28a745;
}

/* Responsive tweak */
@media (max-width: 480px) {
  .page-link {
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* Spinner */
#document-spinner {
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

#document-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: #28a745;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ✅ Responsive Layout */
@media (max-width: 768px) {
  .doc-container {
    flex-direction: column;
  }
  .doc-sidebar {
    max-width: 100%;
  }
  .document-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .doc-meta {
    flex-direction: column;
    gap: 4px;
  }
  .doc-action {
    width: 100%;
  }
  .doc-download {
    width: 100%;
    text-align: center;
  }
}

/* Single */
.document-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.document-content {
  flex: 2;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #f7f7f7;
  padding: 30px;
  border-radius: 8px;
}
.document-icon {
  font-size: 80px;
  color: #007c3c;
}
.document-info {
  flex: 1;
}
.document-info h1 {
  margin: 0 0 10px;
  font-size: 26px;
}
.document-info p {
  margin: 6px 0;
  font-size: 16px;
}
.document-download {
  display: inline-block;
  margin-top: 16px;
  background: #28a745;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
}
.document-download:hover {
  background: #218838;
}
.no-file {
  color: red;
  margin-top: 15px;
}
.last-updated {
  margin-top: 15px;
  font-size: 13px;
  color: #666;
  font-style: italic;
}

.document-sidebar {
  flex: 1;
  min-width: 280px;
}
.document-sidebar h3 {
  margin-bottom: 20px;
  font-size: 18px;
  color: #007c3c;
}
.related-documents {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-documents li {
  margin-bottom: 10px;
}
.related-documents li a {
  display: block;
  background: #e7f6ec;
  padding: 10px 15px;
  border-left: 4px solid #28a745;
  border-radius: 4px;
  color: #064e3b;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}
.related-documents li a:hover {
  background: #d1f0dc;
  border-left-color: #1e7e34;
  color: #000;
}

@media (max-width: 768px) {
  .document-container {
    flex-direction: column;
  }
  .document-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .document-icon {
    font-size: 60px;
  }
  .document-info h1 {
    font-size: 22px;
  }
}
