/* css/event.css */

/* --- 1. 主視覺 (大圖 - 保持滿版) --- */
.page-header {
    background: 
    linear-gradient(rgba(10,20,40,0.85), rgba(10,20,40,0.85)),
    url("../assets/images/ai-bg.jpg") center/cover no-repeat;
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.page-header h1 {
    font-size: 50px;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.page-header p {
    width: 400px;
    height: 4px;
    background: #ff5c5c;
    margin: 0 auto;
}

/* --- 頁面標題區 (統一風格) --- */
.page-title-section {
    text-align: center;
    padding: 60px 0 40px;
    background-color: #f9f9f9;
    margin-bottom: 50px;
}

.page-title-section h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.title-underline {
    width: 100px;
    height: 4px;
    background-color: #D9534F; /* 紅色底線 */
    margin: 0 auto;
}

/* --- 活動列表容器 --- */
.event-content{
  max-width: 980px; /* 你想更緊湊就 900 */
}

.event-container{
  width: 100%;
  margin: 0;        /* 避免置中造成大留白 */
}


/* --- 活動卡片 --- */
.event-card {
    display: flex;
    align-items: center;    /* 垂直置中 */
    gap: 40px;
    background: #fff;
    border-radius: 12px;    /* 圓角 */
    padding: 30px;
    margin-bottom: 40px;    /* 卡片之間的距離 */
    
    /* 陰影與邊框 (跟首頁風格統一) */
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    transition: transform 0.3s;
}

.event-card:hover {
    transform: translateY(-5px); /* 滑鼠移過去微微浮起 */
}

/* 圖片區塊 */
.card-image {
    flex: 1;
    min-width: 300px; /* 確保圖片不會縮太小 */
}

.card-image img {
    width: 100%;
    border-radius: 8px;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 文字區塊 */
.event-text {
    flex: 1.5;
}

.event-text h2 {
    color: #0000FF; /* 藍色標題 */
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.event-text p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1rem;
}

/* 按鈕樣式 */
.event-btn {
    background-color: #D9534F;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.event-btn:hover {
    background-color: #c9302c;
}

/* --- 手機版適應 --- */
@media (max-width: 768px) {
    .event-card {
        flex-direction: column; /* 變直排 */
        padding: 20px;
    }

    .card-image {
        min-width: 100%;
        width: 100%;
    }
    
    .event-text h2 {
        font-size: 1.5rem;
    }
}

/* ===== 活動頁：左列表 + 右內容 ===== */
.event-layout{
  max-width: 1200px;
  width: 92%;
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.event-sidebar{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  padding: 18px;
  position: sticky;
  top: 90px; /* 避開 navbar 高度（不夠就調大一點） */
}

.sidebar-title{
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #333;
  letter-spacing: 1px;
}

.event-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-list-item{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fafafa;
  cursor: pointer;
  font-size: 0.98rem;
  line-height: 1.3;
}

.event-list-item:hover{
  background: #f2f6ff;
  border-color: #d7e4ff;
}

.event-list-item.active{
  background: #eaf2ff;
  border-color: #b9d1ff;
  font-weight: 700;
}

/* 右邊內容：一次只顯示一個 */
.event-card.is-hidden{
  display: none;
}

/* 手機版：變成上下排列 */
@media (max-width: 900px){
  .event-layout{
    grid-template-columns: 1fr;
  }
  .event-sidebar{
    position: static;
  }
  .event-list{
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
  }
  .event-list-item{
    white-space: nowrap;
  }
}

.event-sidebar{
  max-height: calc(100vh - 120px); /* 依你的 navbar 高度可微調 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-list{
  overflow-y: auto;
  padding-right: 6px; /* 避免滾動條貼到文字 */
}

.event-search{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  outline: none;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.event-search:focus{
  border-color: #b9d1ff;
  box-shadow: 0 0 0 3px rgba(43,124,255,0.12);
}