*,
*::before,
*::after {
  box-sizing: border-box;
}

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


/* 全域樣式 */
body {
  font-family: 'Noto Sans TC', sans-serif;
  color: #000;
  background-color: #FBFBFB;
  line-height: 1.5;
}

/* Header */
.site-header {
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90px;
  border-bottom: 1px solid #E5E5E5;
}

.nav {
  display: flex;
  gap: 56px; /* 兩項目間距 */
}

.nav__item {
  font-size: 18px;
  font-weight: 700;
  line-height: 42px;
  color: #000;
  text-decoration: none;
}

/*Hero*/
.hero {
  display: flex;
  width: 100%;
  min-height: 600px; /* 改成最小高度，避免固定高度導致 RWD 問題 */
  flex-wrap: wrap;   /* 手機或窄螢幕時，自動換行 */
}

.hero__left,
.hero__right {
  width: 50%;
}

.hero__left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__right {
  background-image: url(
    'https://raw.githubusercontent.com/hexschool/2022-web-layout-training/main/2025-web-camp/desktop/index/Hero%20Section2.png'
  );
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__overlay {
  text-align: center;
  padding: 0 16px; /* 小螢幕時留白 */
}

.hero__title {
  font-size: 80px;
  font-weight: 700;
  line-height: 1.2;
  color: #0033FF;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.75;
  color: #0033FF;
}

/* About Section */
.about-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1920px;
  margin: 80px auto 0;
  padding: 0 16px;         /* 緩衝左右間距 */
}

.about-section__left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-section__right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-section__date {
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 12px;
  display: block;
}

.about-section__header {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: #f8f9fa;
  padding: 12px 20px;
  border-left: 3px solid #0056d2;
  margin-bottom: 12px;
}

.about-section__label {
  color: #0027D5;
  font-size: 24px;
}

.about-section__separator {
  margin: 0 8px;
}

.about-section__badge {
  background-color: #0027D5;
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 16px;
  text-decoration: none;
}

.about-section__badge:hover {
  background-color: #ADD8E6;
  color: #0027D5;
}

.about-section__title {
  font-size: 28px;
  margin-bottom: 12px;
}

.about-section__content {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.about-section__read {
  text-decoration: none;
  color: #4B4B4B;
  border: 1px solid #4B4B4B;
  border-radius: 999px;
  padding: 8px 16px;
  width: fit-content;
}

.about-section__read:hover {
  background: #4B4B4B;
  color: #fff;
}

/* Search Bar */
.search-bar {
  width: 100%;
  max-width: 416px;
  margin-right: auto;
  margin-top: 20px;
  margin-bottom: 20px;
  gap: 10px;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #4B4B4B;
  border-radius: 999px;
  padding: 16px;
}

.search-wrapper img {
  width: 24px;
  height: 24px;
}

.search-wrapper input {
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  flex: 1;
  color: #4B4B4B;
}

/*  文章列表（article-grid）*/
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 16px;
  list-style: none;
}

@media (max-width: 992px) {
  .article-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card__img {
  width: 100%;
  display: block;
}

.card__date {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  margin: 16px 16px 4px;
  display: block;
}

.card__tags {
  font-size: 0.9em;
  font-weight: 500;
  color: #0027D5;
  margin: 0 16px 8px;
}

.tag {
  margin-right: 8px;
  text-decoration: none;
  color: #0027D5;
}

.tag:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  background: #0027D5;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75em;
  border-radius: 999px;
  margin-left: 8px;
}

.card__title {
  font-size: 1.2em;
  font-weight: 700;
  color: #000;
  margin: 0 16px 8px;
  line-height: 1.4;
}

.card__desc {
  font-size: 1em;
  color: #4B4B4B;
  margin: 0 16px 16px;
  -webkit-box-orient: vertical;
  -line-clamp: 2;
}

.card__link {
  text-decoration: none;
  color: #4B4B4B;
  border: 1px solid #4B4B4B;
  border-radius: 999px;
  align-self: start;
  padding: 8px 16px;
  margin: 0 16px 16px;
  width: fit-content;
}

.card__link:hover {
  background: #4B4B4B;
  color: #fff;
}

/* 分頁（pagination） */
.pagination {
  margin: 40px auto 80px;
  width: fit-content;
}

.pagination__list {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 8px 20px;
  list-style: none;
}

.pagination__arrow img {
  width: 24px;
  height: 24px;
}

.pagination__link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
  color: #4B4B4B;
  font-size: 16px;
}

.pagination__link.active {
  color: #0027D5;
  font-weight: 700;
}

.pagination__ellipsis {
  margin: 0 8px;
  font-size: 16px;
  color: #4B4B4B;
}

/* Footer */
.footer {
  background-color: #fff;
  border-top: 1px solid #E5E5E5;
  padding-top: 40px;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1296px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer__email {
  font-size: 16px;
  font-weight: 500;
}

.footer__social {
  display: flex;
  gap: 16px;
  list-style: none;
}

.footer__social li img {
  width: 24px;
  height: 24px;
  display: block;
}

.footer__copyright {
  font-size: 16px;
  text-align: center;
  color: #666;
  margin: 20px 0 40px;
}

@media (max-width: 768px) {
  /* Hero 換行，每個區塊 100% */
  .hero__left,
  .hero__right {
    width: 100%;
  }
  /* About Section 改成一欄排 */
  .about-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  /* 分頁縮小間距 */
  .pagination {
    margin-top: 20px;
  }
  /* Footer 裡社群圖示隱藏 */
  .footer__social {
    display: none;
  }
}
