/*-- 統一色系，若需要直接修改 --*/
@import url('./variables.css');
@import url("https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900");


/* 最新消息表列樣式 */
.news-list {
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  max-width: 100%;
}
.news-dropdown-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  margin-top: 12px;
}

.news-year-select {
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.news-search-input {
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.news-search-btn {
  height: 32px;
  padding: 0 16px;
  background: #b00;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  transition: background 0.2s;
}
.news-search-btn:hover {
  background: #d22;
}
.news-dropdown-wrapper label {
  color: var(--lightGray);
  font-size: 1.02rem;
}

.news-dropdown-wrapper .news-filter-form {
  margin: 10px 0 25px 0;
}

.news-pagination {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 78px 0 50px 0;
}
.news-pagination button {
  background: #fff;
  border: 1.5px solid var(--secondary);
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 1.08rem;
  color: var(--secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  min-width: 38px;
}
.news-pagination button.active,
.news-pagination button:disabled,
.news-pagination a.active > button {
  background: var(--secondary);
  color: var(--light);
  border-color: var(--secondary);
}
.news-pagination button:hover:not(.active):not(:disabled) {
  background: #ffeaea;
  color: var(--secondary);
  border-color: var(--secondary);
}
@media (max-width: 992px) {
  .news-pagination .page-num,
  .news-pagination .pagination-ellipsis {
    display: none !important;
  }
  .news-pagination .prev-page,
  .news-pagination .next-page {
    display: inline-block !important;
  }
  .news-pagination {
    justify-content: center;
    gap: 12px;
  }
  .news-pagination a button {
    min-width: 80px;
    font-size: 1.1em;
  }
}
@media (min-width: 993px) {
  .news-pagination-mobile-info {
    display: none !important;
  }
}
@media (max-width: 992px) {
  .news-pagination-mobile-info {
    display: block !important;
    text-align: center;
    margin-top: 8px;
    font-size: 1.05em;
    color: #666;
    letter-spacing: 0.5px;
  }
}
/* 卡片式最新消息 */
.news-card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 48px;
  margin-bottom: 16px;
}
.news-card {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(42,139,226,0.06);
  border: 1px solid #e5e5e5;
  padding: 18px 18px;
  transition: box-shadow 0.2s, border 0.2s;
}
.news-card-link {
  display: block;
  height: 100%;
}
.news-card-media {
  height: 100%;
}
.news-card:hover {
  box-shadow: 0 4px 16px rgba(42,139,226,0.12);
  border-color: #2a8be2;
}
.news-card-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 70px;
  margin-right: 24px;
  font-family: 'Poppins', 'Noto Sans TC', Arial, sans-serif;
}
.news-card-year {
  font-size: 1.1rem;
  color: #2a8be2;
  font-weight: 700;
  line-height: 1.1;
}
.news-card-md {
  font-size: 1rem;
  color: #888;
  line-height: 1.1;
}
.news-card-title {
  font-size: 1.13rem;
  color: #222;
  font-weight: 500;
  word-break: break-all;
  flex: 1;
  text-align: left;
}
@media (max-width: 900px) {
  .news-card-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 32px;
  }
}
@media (max-width: 992px) {
  .news-card-list {
    grid-template-columns: 1fr;
    gap: 32px 0;
    margin-bottom: 12px;
  }
  .news-card {
    padding: 14px 8px;
  }
  .news-card-img-wrap {
    width: 100%;
    height: 110px;
    min-height: 80px;
    max-height: 140px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
  .news-card-info {
    align-items: center;
    text-align: center;
  }
  .news-card-title {
    font-size: 1rem;
    text-align: center;
  }
  .news-card-date {
    justify-content: center;
    text-align: center;
  }
  .news-list {
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
  .news-year-select {
    font-size: 0.98rem;
  }
  .news-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 10px;
    gap: 4px;
  }
  .news-card-date {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    margin-right: 0;
    margin-bottom: 2px;
    gap: 8px;
  }
  .news-card-title {
    font-size: 1rem;
  }
  .news-filter-form {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
  }
  .news-filter-form > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .news-search-btn,
  .news-clear-btn {
    margin-top: 6px;
  }
  .news-year-select,
  .news-search-input {
    min-width: 120px;
  }
}

/* 最新消息詳細內容彈窗 */
.news-detail-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; right: 0; bottom: 0;
  align-items: center;
  justify-content: center;
}
.news-detail-modal.show {
  display: flex;
}
.news-detail-modal-bg {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
}
.news-detail-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 92vw;
  margin: 0 auto;
  padding: 32px 24px 24px 24px;
  box-shadow: 0 8px 32px rgba(42,139,226,0.13);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.news-detail-close {
  position: absolute;
  right: 16px;
  top: 12px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
}
.news-detail-close:hover {
  color: #2a8be2;
}

.news-detail-title {
  display: block;
  width: 100%;
  text-align: center !important;
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 18px 0;
  letter-spacing: 0.5px;
  color: #222;
  border: none;
  padding: 0 0 8px 0;
  background: none;
}
.news-detail-date {
  margin-top: -5px;
  margin-bottom: 35px;
  color: #888;
  text-align: center;
  font-size: 1.08rem;
}
.news-detail-content {
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

/* 圖片＋年月日＋標題排列 */
.news-card-media {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(42,139,226,0.06);
  border: 1px solid #e5e5e5;
  padding: 12px 18px;
  margin-bottom: 0;
  transition: box-shadow 0.2s, border 0.2s;
}
.news-card-media:hover {
  box-shadow: 0 4px 16px rgba(42,139,226,0.12);
  border-color: #2a8be2;
}
.news-card-img-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-card-year-md {
  font-size: 1.02rem;
  color: #888;
  font-family: 'Poppins', 'Noto Sans TC', Arial, sans-serif;
}
.news-card-title {
  font-size: 1.13rem;
  color: #222;
  font-weight: 500;
  word-break: break-all;
  text-align: left;
}

/* 純卡片式(圖片上、文字下) */
.news-card.card-vertical {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(42,139,226,0.07);
  border: 1px solid #e5e5e5;
  padding: 0 0 18px 0;
  transition: box-shadow 0.2s, border 0.2s;
  height: 100%;
}
.news-card.card-vertical:hover {
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.13);
  border-color: var(--secondary);
}
.news-card.card-vertical .news-card-img-wrap {
  width: 100%;
  height: 180px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card.card-vertical .news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-card.card-vertical .news-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px 0 12px;
  text-align: center;
}
.news-card.card-vertical .news-card-date {
  font-size: 1.02rem;
  color: #888;
  margin-bottom: 2px;
}
.news-card.card-vertical .news-card-title {
  font-size: 1.13rem;
  color: #222;
  font-weight: 500;
  word-break: break-all;
  text-align: center;
}
.news-count-info {
  color: var(--lightGray);
  text-align: center;
  font-size: 1.08rem;
  margin-bottom: 8px;
}
html:root {
  --lightGray: #bdbdbd;
}

/* 新增清空按鈕樣式 */
.news-clear-btn {
  height: 32px;
  padding: 0 16px;
  background: #eee;
  color: #b00;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  margin-left: 4px;
  transition: background 0.2s, color 0.2s;
}
.news-clear-btn:hover {
  background: #ffdede;
  color: #fff;
}

/* 新增：news-detail-imgs 圖片區塊 RWD 與動畫 */
.news-detail-imgs,
.news-detail-img,
.news-detail-img img {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}
.news-detail-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 0;
  margin: 24px 0 18px 0;
  width: 100%;
  max-width: 100%;
}
.news-detail-img {
  width: 48%;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  animation: fadeUpImg 0.7s forwards;
  margin: 0;
  padding: 5px;
}
.news-detail-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.image-caption {
  color: #fff !important;
  background: rgba(0,0,0,0.45);
  padding: 8px 32px;
  border-radius: 10px;
  font-size: 1.08rem;
  text-align: center;
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  min-width: 60%;
  max-width: 92%;
}

@media (max-width: 992px) {
  .news-detail-imgs {
    flex-direction: column;
    gap: 18px 0;
  }
  .news-detail-img {
    width: 100%;
    max-width: 100%;
  }
}

/* 新增：news-detail-list、news-detail-quote 樣式 */
.news-detail-list {
  margin: 18px 0 18px 18px;
  padding: 0 0 0 18px;
  font-size: 1.08rem;
  color: #444;
  list-style: disc inside;
}
.news-detail-list li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.news-detail-quote {
  margin: 24px 0;
  padding: 16px 24px;
  background: #fff6f6;
  border-left: 5px solid #b00;
  color: #b00;
  font-size: 1.13rem;
  font-style: italic;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px 0 rgba(180,0,0,0.04);
}
.news-detail-back-btn-wrap {
  margin-top: 32px;
  text-align: center;
}
.news-detail-back-btn-wrap .btn {
  min-width: 120px;
  font-size: 1.08rem;
  margin: 0 6px;
}
.news-detail-back-btn-wrap .btn-outline-secondary {
  border: 1.5px solid var(--secondary);
  color: var(--secondary);
  background: #fff;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.news-detail-back-btn-wrap .btn-outline-secondary:hover {
  background: #ffeaea;
  color: var(--secondary);
  border-color: var(--secondary);
}
@keyframes fadeUpImg {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}