/* 讓 html, body 撐滿高度 */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-image: url('https://lino.wayda.com.tw/wp-content/uploads/2025/08/background.png'); /* 你的底圖路徑 */
  background-size: cover;       /* 讓圖片自動縮放填滿螢幕 */
  background-repeat: no-repeat; /* 不重複平鋪 */
  background-attachment: fixed; /* 捲動時背景固定不動 */
  background-position: center;  /* 置中 */
  /* background-color: #72befd; */
}

/* main
{
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  /* 若想視差感可以加上： background-attachment: fixed; 
} */
header {
  background-color: #002369;
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: white;
  padding: 10px 15px;
  display: block;
  text-decoration: none;
}

nav ul li:hover {
  background-color: #0a45b9;
}

nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #002369;
  padding: 0;
}

nav ul li:hover ul {
  display: block;
}

main {
  width: 100%;
	  background-image: url('https://lino.wayda.com.tw/wp-content/uploads/2025/08/background.png');

  box-sizing: border-box;
  padding: 0 15px;
  flex: 1; /* 主體區塊彈性撐開 */

}

/* section {
  background-color: white;
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
} */

section {
   max-width: 70%;  /* 限制內容不會太寬，可以依需求調整 */
  /* width: 100%;         預設佔滿 main 的寬度 */
  margin: 20px auto;   /* 區塊置中 */
  background: #fff;    /* 白底避免背景圖干擾閱讀 */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


section h2 {
  border-bottom: 2px solid #2c7a7b;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

footer {
  background-color: #002369;
  color: white;
  text-align: center;
  padding: 15px;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #ccc;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  background-color: #eee;
}

.tab.active {
  background-color: white;
  border-top: 2px solid #2c7a7b;
  border-left: 2px solid #2c7a7b;
  border-right: 2px solid #2c7a7b;
}

.tab-content {
  display: none;
  padding: 15px;
  background-color: white;
}

.tab-content.active {
  display: block;
}

/* ===== Banner & News 區塊原本 CSS ===== */
.banner {
  position: relative;
  width: 100%;
  height: 800px;
  background: url('images/banner.gif') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.banner img {
  width: 90%;
  height: 90%;
  z-index: -1;
}

.banner h1 {
  font-size: 48px;
  margin-bottom: 15px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.banner h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.banner p {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 8px;
}

.news-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.news-preview a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-preview img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.news-preview p {
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
}

.about {
  background: url('images/about-bg.jpg') center/cover no-repeat;
  color: white;
  padding: 60px 18px;
  text-align: center;
}

.about h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.about p {
  max-width: 70%;
  margin: 0 auto 15px;
  line-height: 1.8;
  font-size: 18px;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 6px;
}

.news,
.description,
.studentCommend {
  padding: 40px 20px;
  text-align: center;
}

.news h2,
.description h2,
.studentCommend h2 {
  font-size: 32px;
  margin-bottom: 30px;
}

.news-cards {
  /* display: grid; */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  /* gap: 20px; */

  display: flex;
  gap: 20px;              /* 卡片之間的間距 */
  flex-wrap: wrap;        /* 小螢幕時自動換行 */
  justify-content: center;/* 置中整排 */
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: transform 0.2s;
  width: 30%;           /* 固定卡片寬度（可調整） */


  display: flex;
  flex-direction: column; /* 預設上下排版 */
  /* width: 300px;           固定卡片寬度（可調整） */

}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  flex: 1;
  width: auto;            /* 保持原始比例 */
  height: 100%;
  object-fit: contain;    /* 讓圖片縮放但不裁切 */
  display: block;
  /* margin: 0 auto;         圖片水平置中 */
  padding: 10px;          /* 圖片四周留白 */
  background: #f9f9f9;    /* 可選：背景色，讓空白更明顯 */
}

.card-body {
  flex: 1;
  padding: 15px;
  text-align: center;
}

.card-body .date {
  font-size: 14px;
  color: #888;
  margin-bottom: 5px;
}

.card-body h3 {
  font-size: 18px;
  margin: 10px 0;
  min-height: 50px;
}

.card-body .btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background: #28a745;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.card-body .btn:hover {
  background: #218838;
}

/* ===== 漢堡選單 ===== */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
  padding: 10px 15px;
}

/* ===== RWD 手機支援 ===== */
@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .hamburger {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #002369;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    padding: 12px 20px;
    border-bottom: 1px solid #0a45b9;
  }

  nav ul li ul {
    position: static;
    display: none;
    background-color: #003399;
  }

  nav ul li.active > ul {
    display: block;
  }

  main {
    max-width: 95%;
    padding: 0 10px;
  }

  .banner {
    height: 400px;
  }

  .banner h1 {
    font-size: 28px;
  }

  .banner h2 {
    font-size: 18px;
  }

  .banner p {
    font-size: 14px;
    padding: 10px;
  }

  .news-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .about p {
    max-width: 100%;
    font-size: 14px;
    padding: 10px;
  }

  section h2 {
    font-size: 24px;
  }

  .card-body h3 {
    font-size: 16px;
    min-height: auto;
  }

  footer p {
    font-size: 12px;
  }
  .card {
    width: 100%;           /* 固定卡片寬度（可調整） */
  
  }
}

/* Basic nav styles */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; }
