/* ===== 🌟 全站強化樣式 ===== */
body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #f5f7fb;
  color: #222;
  line-height: 1.8;
  margin: 0;
  padding: 0;
}

h1, h2 {
  color: #003f88;
  letter-spacing: 0.03em;
}

/* ===== Header 區塊 ===== */
.header {
  background: linear-gradient(90deg, #003f88, #0056b3);
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Header 內容配置：LOGO 靠左貼邊，選單靠右 */
.header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 60px;
  width: 100%;
  box-sizing: border-box;
}

/* LOGO 區塊 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;   /* ✅ 貼左邊 */
}

.brand img.logo {
  width: 64px;
  height: 64px;
}

.brand .txt b {
  font-size: 1.3em;
}

.brand .txt span {
  display: block;
  font-size: 0.85em;
  opacity: 0.85;
}

/* 導覽列靠右顯示 */
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  transition: opacity 0.3s;
  display: inline-flex;          /* ✅ 使用 Flex 對齊 */
  align-items: center;           /* 垂直置中 */
  justify-content: center;       /* 水平置中 */
  height: 36px;                  /* 統一按鈕高度 */
  padding: 0 14px;               /* 左右內距 */
  border-radius: 6px;
  line-height: 1;                /* 避免文字偏上 */
}


.nav a:hover {
  opacity: 0.75;
}

/* ===== Main 區塊 ===== */
main.wrap {
  max-width: 960px;
  background: #fff;
  margin: 40px auto;
  padding: 40px 30px 60px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.banner {
  background: linear-gradient(135deg, #e9f2ff, #f7fbff);
  color: #004085;
  padding: 14px 18px;
  border-radius: 10px;
  border-left: 6px solid #0056b3;
  margin-top: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.section {
  margin-top: 32px;
  font-size: 1.05em;
}

/* ===== 課程卡片樣式 ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
  align-items: stretch; /* ✅ 同一列卡片等高 */
}

.cards .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #f9fbff;
  border: 1px solid #dde6f5;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cards .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

/* 保證按鈕底對齊 */
.cards .card button,
.cards .card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ===== Footer 美化 ===== */
.footer {
  background: linear-gradient(180deg, #003f88, #002d5f);
  color: #fff;
  text-align: center;
  padding: 30px 10px;
  font-size: 1.05em;
  line-height: 1.6;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.2);
}

.footer .company-info {
  font-size: 0.95em;
  opacity: 0.9;
  margin-top: 6px;
}

.footer span {
  color: #ffd500;
}

/* ===== 小動畫效果 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 手機版調整 ===== */
@media (max-width: 720px) {
  main.wrap {
    margin: 20px;
    padding: 24px 20px 40px;
  }
  .header .wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 20px;
  }
  .nav {
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .brand img.logo {
    width: 48px;
    height: 48px;
  }
}
/* ===== 導覽列目前頁面高亮 ===== */
.nav a.active {
  background: #ffd500;
  color: #003f88 !important;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


.nav a.active:hover {
  opacity: 1; /* hover 時維持亮色 */
}
