/*路径：/static/home/modal.css*/

/* 触发链接放在卡片右下角 */
.feature-card {
  position: relative;
  padding-bottom: 3.5rem; /* 给“了解详情”留出空间 */
}
.more-link {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  font-size: 0.95rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.9;
  transition: opacity .2s ease, transform .2s ease;
}
.more-link:hover { opacity: 1; transform: translateY(-1px); }

/* Modal 基础 */
.modal[aria-hidden="true"] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  width: min(900px, 92vw);
  max-height: 88vh;
  margin: 6vh auto 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn .18s ease-out;
}

@keyframes modalIn {
  from { transform: translateY(12px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1;  }
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border: none;
  border-radius: 999px;
  background: #f1f3f5;
  color: #222;
  font-size: 22px;
  cursor: pointer;
  z-index: 1;
}
.modal__close:hover { background: #e9ecef; }

.modal__body {
  padding: 18px 22px 22px 22px;
  overflow: auto;
}
.modal__body h3 {
  margin: 12px 0 8px;
  font-size: 1.45rem;
  color: #222;
}
.modal__body p {
  color: #555;
  line-height: 1.7;
}

.modal__img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  background: #f5f7fb;
}



/* ====== 获取资格模态：二维码占位 ====== */
.modal__desc{
  margin: .25rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6b7280;
}
.modal__qr-placeholder{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 1.25rem;
}
.modal__qr-placeholder .qr-box{
  width: 240px;
  height: 240px;
  border-radius: 12px;
  border: 1px dashed rgba(0,0,0,.15);
  background:
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 50%, rgba(0,0,0,0.04) 50%, rgba(0,0,0,0.04) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: .95rem;
  user-select: none;
}
.modal__actions{ display: flex; justify-content: center; gap: .75rem; }

/* 居中文案的对话框变体（只作用于需要的模态） */
.modal__dialog--center .modal__body {
  text-align: center;
  padding: 22px;
}


/* ====== 获取资格模态：二维码尺寸限制 ====== */
/* 图片最大宽/高：在大屏也不失控；小屏自动等比缩放 */
#modal-apply .modal__qr-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(420px, 86vw);
  max-height: 60vh;
  margin: 0 auto;
  border-radius: 12px;
}

/* 让标题/说明与二维码之间的间距更舒服 */
#modal-apply .modal__body h3 {
  margin: 6px 0 8px;
}
#modal-apply .modal__desc {
  margin-top: 2px;
}
#modal-apply .modal__qr-placeholder {
  margin: 12px 0 16px;
}