/* ระเบียบบริหารสถานศึกษา (ใช้ร่วมกับ law_page.css) */

/* ---------- Document card ---------- */
.reg-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px;
  border-radius: var(--law-radius);
  background: #fff;
  border: 1px solid var(--law-line);
  box-shadow: var(--law-shadow);
}

.reg-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 1.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--law-maroon), var(--law-maroon-2));
  box-shadow: 0 10px 24px rgba(128, 0, 0, 0.25);
}

.reg-card__body { flex: 1; min-width: 0; }

.reg-card__body h2 {
  margin: 4px 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--law-maroon-deep);
}

.reg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--law-muted);
}

.reg-meta i { margin-right: 4px; color: var(--law-gold); }

.reg-card__actions {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reg-card__actions .law-btn { justify-content: center; }

/* ---------- Viewer ---------- */
.reg-viewer {
  margin-top: 28px;
  overflow: hidden;
  border-radius: var(--law-radius);
  background: #fff;
  border: 1px solid var(--law-line);
  box-shadow: var(--law-shadow-sm);
}

.reg-viewer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--law-maroon-deep), var(--law-maroon));
  border-bottom: 3px solid var(--law-gold);
}

.reg-viewer__head span { font-weight: 500; }
.reg-viewer__head span i { margin-right: 6px; color: var(--law-gold-soft); }

.reg-viewer__head a {
  font-size: 0.85rem;
  color: var(--law-gold-soft);
  text-decoration: none;
}

.reg-viewer__head a:hover { color: #fff; }

.reg-viewer__frame {
  height: 82vh;
  min-height: 560px;
  background: #f3f0ee;
}

.reg-viewer__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.reg-viewer__mobile {
  display: none;
  padding: 34px 22px;
  text-align: center;
}

.reg-viewer__mobile i { font-size: 2.6rem; color: var(--law-maroon); }
.reg-viewer__mobile p { margin: 12px 0 18px; line-height: 1.7; color: var(--law-muted); }

.reg-viewer + .law-related { margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .reg-card { flex-wrap: wrap; }
  .reg-card__actions { flex-direction: row; width: 100%; }
  .reg-card__actions .law-btn { flex: 1; }
}

/* มือถือ: เบราว์เซอร์ส่วนใหญ่ไม่แสดง PDF ใน iframe จึงแสดงปุ่มเปิดแทน */
@media (max-width: 720px) {
  .reg-viewer__frame { display: none; }
  .reg-viewer__mobile { display: block; }
}

@media (max-width: 600px) {
  .reg-card { padding: 18px; gap: 14px; }
  .reg-card__icon { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 16px; }
  .reg-card__body h2 { font-size: 1.05rem; }
  .reg-card__actions { flex-direction: column; }
  .reg-viewer__head { padding: 12px 16px; }
}
