/* activity.css */
/* ------------------------ 網頁基本設定 ------------------------ */
body {
  margin: 0;
  font-family: "Noto Sans TC", sans-serif;
  background-color: #fdf6dc;
  color: #333;
}

/* ------------------------ 導覽列 Header ------------------------ */
header {
  background-color: #fdf6dc;
  padding: 10px 30px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 36px;
}
.navbar-links {
  flex: 1.5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 50px;
  padding-left: 275px;
}

nav a {
  font-size: 20px;
  text-decoration: none;
  color: #887d00;
  font-weight: bold;
  padding: 6px 12px;
}

nav a:hover {
  color: #2a8491;
  text-decoration: underline;
  transition: 0.3s;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.buttons a {
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #f0c837;
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.buttons a:hover {
  background-color: #b9953d;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.3s;
}

a.logo {
  text-decoration: none;
  color: inherit;
}

/* ------------------------ Logo 共用樣式 ------------------------ */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 75px;
  width: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  text-align: left;
}

.logo-title {
  font-size: 30px;
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
}

.logo-blue { color: #418693; }
.logo-orange { color: #f37c3a; }

.logo-subtitle {
  font-size: 20px;
  color: #21414C;
  margin-top: 2px;
  font-weight: bold;
}

/* ------------------------ Hero 區塊 ------------------------ */
.hero {
  position: relative;
  height: 750px; 
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.4);
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.7);
}

.hero-content h1 {
    font-size: 48px;
    margin: 0;
}

/* ------------------------ 標題與卡片容器 ------------------------ */
h2.section-title {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #333;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ------------------------ Footer 區塊 ------------------------ */
.site-footer {
  background-color: #b4b4b4;
  color: #333;
  padding: 30px 20px 10px;
  font-size: 14px;
  margin-top: 60px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo img { 
  height: 70px;
}

.footer-links a {
  display: block;
  color: #424242;
  text-decoration: none;
  margin: 4px 0;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-contact p {
  margin: 4px 0;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  border-top: 1px solid #999;
  padding-top: 10px;
  font-size: 12px;
  color: #666;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-links .link-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

html {
  scroll-behavior: smooth;
}


/* ------------------------ RWD 響應式設計 ------------------------ */
@media (max-width: 768px) {
  h2.section-title { font-size: 28px; }
  header {
    flex-direction: column;
    height: auto;
    padding: 15px;
  }
  .navbar-container {
    flex-direction: column;
  }
  .navbar-links {
    padding-left: 0;
    gap: 10px;
    margin-top: 15px;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  nav a { font-size: 16px; }
  .cards { justify-content: center; }
  .buttons { margin-top: 15px; }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .form-row { flex-direction: column; }
}

/* ===============================================================
  活動功能樣式
================================================================ */

/* ------------------------ 活動卡片樣式 ------------------------ */
.activity-item-card {
  flex: 1 1 300px;
  max-width: 380px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #eee;
  cursor: pointer;
}

.activity-item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.activity-item-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.activity-item-card:hover img {
  transform: scale(1.08);
}

.activity-item-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; 
}

.card-date {
  font-size: 14px;
  color: #888;
  margin: 0 0 12px 0;
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.card-location {
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #666;
  margin-top: auto;
}

.card-location svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  stroke: #888;
  flex-shrink: 0;
}

/* ========== 【全新動畫邏輯】彈出視窗樣式 (參照 feedback 頁面) ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: flex; /* 保持 flex 以便置中 */
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0; /* 預設透明 */
  pointer-events: none; /* 預設不可點擊 */
  transition: opacity 0.3s ease;
}

/* 當 JS 移除 .hidden class 時，觸發動畫 */
.modal-backdrop:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-pane { /* 這是 #details-modal-content 的共用 class */
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95); /* 預設縮小 */
  transition: transform 0.3s ease;
}

.modal-backdrop:not(.hidden) .modal-pane {
    transform: scale(1); /* 彈出時恢復正常大小 */
}

/* ------------------------ 活動詳情視窗樣式 ------------------------ */
#details-modal-content {
    max-width: 800px;
    width: 100%;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s, transform 0.2s;
}
.close-button:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

#details-modal-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.details-modal-text {
    padding: 30px 40px;
    overflow-y: auto;
}

#details-modal-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 16px 0;
}

.details-meta {
    font-size: 16px;
    color: #666;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

#details-modal-description {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.details-modal-button {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 28px;
  background-color: #f0c837;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  border-radius: 8px;
  transition: background-color 0.2s, transform 0.2s;
}

.details-modal-button:hover {
  background-color: #d8b431;
  transform: translateY(-2px);
}
