/* --- 1. 主要外層容器 (控制左右留白) --- */
.main-content-wrapper {
  padding: 10px 10% 2% 10%; 
  box-sizing: border-box;
}

/* --- 2. 行程表設定 --- */
.compact-schedule-section {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  background-color: #f8f9fa;
  color: #333;
  font-family: "Microsoft JhengHei", sans-serif;
  padding: 15px 10px; 
  box-sizing: border-box;
}

.compact-title {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  color: #222;
  margin: 0 auto 10px auto;
  padding-bottom: 5px;
  border-bottom: 2px solid #ccc;
  max-width: 900px;
}

/* 核心：使用 Grid 網格佈局 */
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 10px; 
  max-width: 900px;
  margin: 0 auto 20px auto;
}

.event-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #555;
  padding: 10px 15px; 
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-info {
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
}

.event-btn {
  background-color: #333;
  color: #fff;
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
}

/* --- 3. 品牌切換導覽列 --- */
/* 讓外層的容器負責釘選 */
#nav-container {
  position: -webkit-sticky; 
  position: sticky;
  top: 90px; 
  z-index: 5;
}

.brand-nav-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto 0 auto; 
  background-color: #f8f9fa; 
  padding: 15px;
  box-sizing: border-box;
  border-radius: 8px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
  
  /* 使用 Flexbox 讓按鈕自動排列與折行 */
  display: flex;
  justify-content: center;
  flex-wrap: wrap; 
  gap: 12px;
}

.brand-btn {
  text-decoration: none;
  color: #555;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 8px 24px;
  border-radius: 30px; 
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.2s ease-in-out;
  white-space: nowrap; 
  flex-shrink: 0; /* 整合自手機版：防止按鈕在滑動時被硬性擠壓變形 */
}

.brand-btn:hover {
  background-color: #e9ecef;
  border-color: #aaa;
}

/* 目前所在頁面的「作用中」按鈕樣式 */
.brand-btn.active {
  background-color: #333;
  color: #fff;
  border-color: #333;
  cursor: default; 
}

/* --- 4. RWD 手機版設定 (必須放在所有樣式的最下方) --- */
@media (max-width: 768px) {
	
	#nav-container {
    top: 80px; /* 請依據你們手機版 HEADER 的實際高度微調這個數字 (例如 50px 或 60px) */
  }
	
  /* 解除手機版的左右留白，讓畫面變滿版 */
  .main-content-wrapper {
    padding: 10px 0 2% 0;
  }

  .event-grid {
    grid-template-columns: 1fr; /* 手機版：變回單欄 */
  }
  
  .event-card {
    padding: 12px;
  }
  
  /* 啟動手機版導覽列橫向滑動 */
  .brand-nav-container {
    justify-content: flex-start;
    flex-wrap: nowrap; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    margin-top: 10px; 
    padding-bottom: 15px;
    border-radius: 0; 
  }

  /* 隱藏手機版的橫向捲軸，讓畫面保持乾淨 */
  .brand-nav-container::-webkit-scrollbar {
    display: none;
  }
  .brand-nav-container {
    -ms-overflow-style: none; 
    scrollbar-width: none; 
  }
}