/* ============================================================
   Custom News Grid Design - High Contrast Hierarchy
   ============================================================ */

.rgy-news-grid .d-flex {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  clear: both;
  justify-content: flex-start;
  align-items: stretch;
  margin: 0;
  padding: 20px 0;
}

.rgy-news-grid .d-flex .rgy-article-box {
  background-color: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 30px;
  box-sizing: border-box;
  margin: 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.rgy-news-grid .d-flex .rgy-article-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(11, 60, 93, 0.15);
}

.rgy_custom_news_img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.rgy-article-box-date {
  font-size: 0.95rem;
  color: #999;
  letter-spacing: 1px;
  margin-top: 25px;
  margin-bottom: 12px;
  padding: 0 25px;
}

.rgy-article-box-speaker {
  font-size: 1rem;
  font-weight: 600;
  color: #5D8AA8;
  margin-bottom: 8px;
  padding: 0 25px;
  display: flex;
  align-items: center;
}

.rgy-article-box-speaker::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  background-color: #5D8AA8;
  margin-right: 8px;
  border-radius: 2px;
}

.rgy-article-box-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0b3c5d;
  line-height: 1.35;
  margin-bottom: 30px;
  padding: 0 25px;
  flex-grow: 1;
}

.rgy-article-box-footer {
  display: none !important;
}

/* News Grid RWD */
@media (min-width: 768px) {
  .rgy-news-grid .d-flex .rgy-article-box { width: calc(100% / 3 - 20px); }
}
@media (min-width: 576px) and (max-width: 767px) {
  .rgy-news-grid .d-flex .rgy-article-box { width: calc(100% / 2 - 20px); }
}
@media (max-width: 575px) {
  .rgy-news-grid .d-flex .rgy-article-box { width: calc(100% - 20px); margin: 10px auto; }
}


/* ============================================================
   Custom Video Grid Design - 3x3 Responsive
   ============================================================ */

.video-grid {
  display: grid;
  gap: 20px;
  padding: 20px;
  grid-template-columns: 1fr;
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Video Grid RWD */
@media (min-width: 600px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
}


/* 容器設定：將按鈕推至最右側並增加上方間距 */
.rgy-news-grid .more {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
  padding-right: 15px;
}

/* 按鈕主體樣式：建立視覺強調感 */
.rgy-news-grid .more a {
  display: inline-block;
  background-color: #005a92; /* 使用與標題相近的藍色系 */
  color: #ffffff;
  padding: 10px 30px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px; /* 膠囊狀外觀 */
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 90, 146, 0.2); /* 柔和陰影增加立體感 */
}

/* 懸浮效果：強化互動反饋 */
.rgy-news-grid .more a:hover {
  background-color: #004471;
  transform: translateY(-3px); /* 向上微調感 */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: #ffffff;
}

/* 點擊時的縮小效果 */
.rgy-news-grid .more a:active {
  transform: translateY(-1px);
}



/* 分頁區塊外部容器對齊與間距 */
.pagination {
    text-align: center;
    margin: 40px 0 30px 0;
    width: 100%;
}

/* 重置 ul 基本樣式 */
ul.jsn-pagination {
    display: inline-block;
    padding: 0;
    margin: 0;
    list-style-type: none;
}

/* 讓列表項目水平排列 */
ul.jsn-pagination li {
    display: inline;
}

/* 針對所有按鈕（連結 a 與 文字 span）的基礎卡片化設計 */
ul.jsn-pagination a,
ul.jsn-pagination span {
    display: inline-block;
    min-width: 38px;
    height: 38px;
    line-height: 36px; /* 確保文字垂直置中 */
    padding: 0 12px;
    margin: 0 4px; /* 統一元素間距，覆蓋原本的 &nbsp; 視覺 */
    font-size: 15px;
    color: #555555;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px; /* 微微圓角，呼應圖片卡片設計 */
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

/* 可點擊連結的滑鼠懸浮效果 */
ul.jsn-pagination a:hover {
    color: #005a92; /* 呼應主視覺藍色 */
    border-color: #005a92;
    background-color: #f0f7fb;
    box-shadow: 0 2px 8px rgba(0, 90, 146, 0.1); /* 輕微陰影增加互動感 */
}

/* 當前頁碼的高亮設計 (針對直接放在 ul 下的 span，例如你 HTML 中的 1) */
ul.jsn-pagination > span {
    background-color: #005a92;
    color: #ffffff;
    border-color: #005a92;
    font-weight: bold;
    cursor: default;
    box-shadow: 0 2px 5px rgba(0, 90, 146, 0.2);
}

/* 不可點擊/禁用狀態的按鈕設計 (針對放在 li 內的 span，例如「最先」、「上一篇」) */
ul.jsn-pagination li span {
    background-color: #f9f9f9;
    color: #aaaaaa;
    border-color: #eeeeee;
    font-weight: normal;
    cursor: not-allowed;
    box-shadow: none;
}