/* --- General Grid Styles --- */
.rgy-news-grid {
  margin-top: 20px !important;
}

.rgy-news-grid .jsn-modulecontainer_inner {
  margin: 0 !important;
}

.rgy-news-grid h3.jsn-moduletitle {
  margin: 10px 12px;
  font-size: 18px;
  color: #0b3c5d;
}

/* --- Flex Container --- */
.rgy-news-grid .d-flex {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  clear: both;
  justify-content: flex-start;
  align-items: stretch;
  margin: 0 0 70px 0;
  gap: 15px;
}

/* --- Layout System 1: rgy_custom_news --- */
.rgy-news-grid .d-flex .rgy_custom_news {
  flex:1 1 33.333%;
  box-sizing: border-box;
  padding-left: 4.8px;
  padding-right: 4.8px;
  position: relative;
}

.rgy-news-grid .d-flex .rgy_custom_news .rgy_custom_news_body {
  width: 98%;
  box-sizing: border-box;
  padding: 5px;
  font-size: 16px;
  background-color: rgba(0, 0, 0, .5);
  position: absolute;
  bottom: 0;
}

.rgy-news-grid .d-flex .rgy_custom_news .rgy_custom_news_body a {
  color: #fff;
}

.rgy-news-grid .d-flex .rgy_custom_news img,
.rgy-news-grid .d-flex .rgy_custom_news_img .rgy-news-img {
  width: 100%;
  aspect-ratio: unset; /* 3 / 2 */
  object-fit: contain; /* cover */
  height: auto;
  background-color: white;
}

.rgy_custom_news_img iframe {
  border: 0 none !important;
}


/* --- Layout System 2: rgy-article-box --- */
.rgy-article-box-header,
.rgy-article-box-title,
.rgy-article-box-main,
.rgy-article-box-footer {
  padding-left: 15px;
  padding-right: 15px;
  /* margin-bottom: 15px; */
}

.rgy_custom_news_img {
  margin: 0; /* 15px */
}

.rgy-article-box-title {
  padding-top: 15px;
  font-size: 1.3rem;
  text-align: center;
}

.rgy-article-box-title .title,
.rgy-article-box-title a {
  color: white;
}

.rgy-article-box-main {
  text-align: center;
}
.rgy-article-box-main a {
  color: white;
  border: 1px solid white;
  border-radius: 5px;
  padding: 10px 15px;
  display: inline-block;
  /* margin-top: 15px; */
}

.rgy-article-box-footer {
  display: flex;
  justify-content: space-between;
  color: white;
}


/* --- Other Components --- */
.news-is-block a {
  color: #fff;
}

.news-is-block .title {
  display: flex;
  padding: 4.8px;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: #0b3c5d;
  font-size: 18px;
}

.button-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.view-more-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3071b7;
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.view-more-button:hover {
  background-color: #255b93;
  text-decoration: none;
  color: white;
}

.arrow {
  display: inline-block;
  margin-left: 15px;
  font-size: 24px;
  font-weight: bold;
}


/* --- Media Queries (Responsive Design) --- */

/* 精選 Highlight Box */
.rgy-news-grid .d-flex .rgy-article-box.highlight {
  width: calc(100% / 1 - 20px);
  box-sizing: border-box;
  margin: 0 5px 10px 5px;
  background-color: #2d5e96; /* #2d5e96 */
  display: flex;
}

/* Desktop Large (1200px and up) */
@media screen and (min-width: 1200px) {
  .rgy-news-grid .d-flex .rgy-article-box {
    width: calc(100% / 3 - 20px); /* calc(100% / 3 - 20px) */
    box-sizing: border-box;
    margin: 0 5px 10px 5px;
    background-color: #2d5e96; /* #2d5e96 */
  }
}

/* Tablet to Desktop (768px to 1199px) */
@media screen and (min-width: 768px) and (max-width: 1199px) {
  .rgy-news-grid .d-flex .rgy-article-box {
    width: calc(100% / 3 - 20px); /* calc(100% / 3 - 20px) */
    box-sizing: border-box;
    margin: 0 5px 10px 5px;
    background-color: #2d5e96; /* #2d5e96 */
  }
}

/* General Tablet Portrait (max-width 768px) */
@media (max-width: 768px) {
  .rgy-news-grid .d-flex {
    flex-direction: column;
  }

  .rgy-news-grid .d-flex .rgy_custom_news {
    flex: 1 1 100%;
  }
}

/* Mobile to Tablet (480px to 767px) */
@media screen and (min-width: 480px) and (max-width: 767px) {
  .rgy-news-grid .d-flex .rgy-article-box {
    width: calc(100% / 2 - 20px);
    box-sizing: border-box;
    margin: 0 5px 10px 5px;
    background-color: #2d5e96; /* #2d5e96 */
  }
}

/* Mobile (max-width 479px) */
@media screen and (max-width: 479px) {
  .rgy-news-grid .d-flex .rgy-article-box {
    width: calc(100% / 1 - 20px);
    box-sizing: border-box;
    margin: 0 5px 10px 5px;
    background-color: #2d5e96; /* #2d5e96 */
  }
}
