@charset "UTF-8";

:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --accent: #1a4d96;
  --text: #1d1d1f;
  --muted: #6b7280;
  --shadow: rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }



.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.pdf-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 4px 12px var(--shadow);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pdf-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px var(--shadow);
}

.pdf-icon {
  width: 60px;
  height: 76px;
  margin: 0 auto 12px;
  background: var(--accent);
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
}

.pdf-icon::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 14px 14px 0;
  border-color: transparent var(--bg) transparent transparent;
}

.pdf-name {
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.pdf-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--card-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 1028px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: pop 0.2s ease;
}

@keyframes pop {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-actions a,
.close-btn {
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  margin-left: 16px;
  cursor: pointer;
  background: none;
  border: none;
}

.close-btn {
  font-size: 22px;
  color: var(--text);
  line-height: 1;
}

.modal-body {
  flex: 1;
  background: #525659;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}