/* ===== 風格變數 ===== */
:root {
  --panel-radius: 12px;
  --panel-gap: 24px;

  --blue-border: #cfe1ff;
  --blue-soft: #f6f9ff;
  --blue-accent: #6fa3ff;

  --red-border: #f4cfd0;
  --red-soft: #fff7f7;
  --red-accent: #e06a6a;

  --text: #394150;
  --text-muted: #6b7280;
  --link: #337ab7;
}

.role_content {
  background: #6699f6;
  background: linear-gradient(
    221deg,
    rgba(102, 153, 246, 1) 0%,
    rgba(56, 91, 156, 1) 100%
  );
  /* margin-top: 112px; */
  min-height: 100vh;
  padding-bottom: 50px;
}
.appHeaderHidden {
  visibility: hidden;
  height: 0;
}
.role_headerContent {
  width: 100%;
  position: relative;
  height: 120px;
}
.role_headerTitle {
  margin-bottom: 20px;
  color: white;
  font-weight: bold;
}
.logoContent {
  position: absolute;
  inset-inline-start: 0;
}
.logoContent img {
  height: 70px; /* 自行調整 */
}

.role_item_box {
  width: calc(100% / 6);
  height: auto;
  min-width: 150px;
  cursor: pointer;
  border-radius: 5px;
  border: 3px solid #3b5fa2 !important;
  background: #f8faff;
  flex-wrap: wrap;
  justify-content: center;
}
.role_item_box:hover,
.role_item_box.active {
  background: #3b5fa2;
}

.role_item_ImgText {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.role_item_box:hover .role_text {
  color: #fff !important;
}

.role_item_box:hover .role_img {
  background-color: #fff !important;
}
.role_item_box.active .role_img {
  background-color: #ffffff !important;
}

.role_item_box .role_img {
  background-repeat: no-repeat;
  background-color: #3b5fa2;
  width: 5em;
  height: 6.5em;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
}

.role_item_box .role_text {
  letter-spacing: 3px;
  color: #3b5fa2;
}
.role_item_box.active .role_text {
  color: #ffffff !important;
}
.role_infoText {
  border: rgba(102, 153, 246, 0.26) 1px solid;
  padding: 35px 10px !important;
  background: #fff;
  color: #3b5fa2;
  border-radius: 10px;
  font-weight: bold;
  display: flex;
  align-items: center; /* 垂直置中 */
  justify-content: center; /* 水平置中 */
  text-align: center;
  height: 150px;
}
.pre-line {
  white-space: pre-line; /* 會把 \n 轉成換行 */
}

.login-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  margin-top: 20px;
  margin-left: 1rem;
  margin-right: 1rem;
}
.btn-login_small {
  display: inline-block;
  padding: 24px 32px; /* 上下 12px，左右 24px */
  background-color: #4a86e8; /* 藍色背景 */
  color: #fff; /* 白字 */
  text-decoration: none; /* 移除底線 */
  border-radius: 6px; /* 圓角 */
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  min-width: 220px; /* 固定寬度，讓長短字對齊 */
  transition: background-color 0.2s;
}
.btn-login_small:hover {
  background-color: #3a6dc4; /* hover 深一點的藍 */
  color: #fff;
}
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  background-color: #4a86e8;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  width: 100%;
  min-width: 220px;
  max-width: 320px;
  /* flex: 1 1 220px; */
  transition: background-color 0.2s;
}
.btn-login:hover {
  background-color: #3a6dc4; /* hover 深一點的藍 */
  color: #fff;
}

/* ===== 版面配置 ===== */
.notice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--panel-gap);
  align-items: start;
  margin: 50px;
}

/* ===== 外層卡片 ===== */
.panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-title {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: bold;
}
.panel-body {
  /* background: #fff; */

  border-radius: var(--panel-radius);
  padding: 12px;
  /* box-shadow: 0 2px 10px rgba(0,0,0,.04); */
  border: 1px solid transparent;
}
.panel-blue {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}
.panel-red {
  border-color: var(--red-border);
  background: var(--red-soft);
}

/* ===== 內層訊息框(callout) ===== */
.callout {
  position: relative;
  background: var(--blue-soft);
  /* background: #fff; */
  border-radius: 10px;
  padding: 16px 16px 40px;
  border: 1px solid transparent;
  height: 200px;
}
.callout-blue {
  background: #fff;
  border-color: var(--blue-border);
}
.callout-red {
  /* background: var(--red-soft); */
  background: #fff;
  border-color: var(--red-border);
}

.callout-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.callout-text {
  margin: 0 0 10px;
  line-height: 1.7;
  color: var(--text);
}
.callout-meta {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

/* 連結樣式 */
.link {
  color: var(--link);
  text-decoration: none;
  font-weight: bold;
  /* border-bottom: 1px solid rgba(51,122,183,.35); */
}
.link:hover {
  text-decoration: underline;
}

.badge-gov {
  position: absolute;
  right: 12px;
  bottom: 12px;
  height: 28px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
}

@media (max-width: 1200px) {
  .role_item_box {
    width: calc(100% / 3);
  }
}

@media (max-width: 1024px) {
  .role_item_container {
    flex-wrap: wrap;
  }

  .role_item_box {
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
    justify-content: flex-start;
  }

  .role_item_ImgText {
    flex: 0 0 180px;
    margin: 0;
  }

  .role_infoText {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    padding: 20px 12px;
  }

  .role_item_box .role_img {
    width: 4.5em;
    height: 6em;
  }

  .notice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .logoContent {
    visibility: hidden;
  }
  .role_item_box {
    flex-direction: column;
    align-items: center;
  }
  .role_item_ImgText {
    flex: none;
  }
  .role_infoText {
    width: 100%;
  }
  .login-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .btn-login {
    max-width: none;
    padding: 18px 20px;
    flex: 1 1 auto;
  }
  .callout {
    height: auto;
  }
}
