/* ==========================================================================
   全域變數與基本設定
   ========================================================================== */
:root {
  --primary-color: #2b6cb0;
  --primary-hover: #2c5282;
  --bg-color: #f7fafc;
  --card-bg: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --accent-color: #dd6b20;
  --notice-bg: #fffaf0;
  --notice-border: #feebc8;
  --notice-text: #c05621;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding: 30px 0;
}

/* ==========================================================================
   版面配置 (Layout)
   ========================================================================== */
.layout-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.content-section {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* ==========================================================================
   活動簡介與圖片輪播
   ========================================================================== */
.activity-intro {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: center;
}

.activity-intro-img {
  width: 100%;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.activity-intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.activity-intro-text h2 {
  font-size: 1.45rem;
  line-height: 1.4;
  color: #1a202c;
  margin-bottom: 12px;
}

.activity-intro-text p {
  font-size: 0.96rem;
  line-height: 1.9;
  color: #4a5568;
  margin-bottom: 10px;
}

.image-gallery {
  width: 100%;
  height: 400px;
  background-color: #ddd;
  position: relative;
  overflow: hidden;
  margin-top: 20px;
}

.image-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  z-index: 10;
}

.thumb-container {
  display: flex;
  gap: 10px;
  padding: 14px 32px 0;
  overflow-x: auto;
}

.thumb-container::-webkit-scrollbar {
  height: 4px;
}

.thumb-container::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.thumb-item {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.thumb-item:hover {
  opacity: 0.8;
}

.thumb-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(43, 108, 176, 0.4);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   熱門活動區塊
   ========================================================================== */
.hot-activity-card {
  background: #fff;
  border-radius: 28px;
  padding: 28px 34px 30px;
  box-shadow: 0 10px 28px rgba(7, 90, 156, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.65);
}

.hot-activity-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hot-mini-icon {
  width: 34px;
  height: 34px;
  border: 2px solid #ff6b6b;
  border-radius: 50%;
  color: #ff6b6b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  position: relative;
}

.hot-mini-icon::before {
  content: "♨";
  position: absolute;
  top: -5px;
  left: 8px;
  font-size: 13px;
  color: #ff6b6b;
}

.hot-mini-label {
  background: #ff6b6b;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 14px;
  border-radius: 999px;
}

.hot-activity-title {
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.55;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}

.hot-main-image {
  height: 330px;
  margin-top: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.hot-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-main-image .gallery-badge {
  display: none;
}

.hot-thumb-list {
  padding: 12px 0 0;
  gap: 9px;
}

.hot-thumb-list .thumb-item {
  width: 58px;
  height: 42px;
  border-radius: 7px;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(45, 55, 72, 0.12);
}

.hot-thumb-list .thumb-item.active {
  border-color: #2f9cf4;
  box-shadow: 0 0 0 2px rgba(47, 156, 244, 0.18);
}

.hot-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hot-tag-list span {
  border: 1px solid #d9a06e;
  color: #c27a3f;
  background: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hot-activity-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 20px;
}

.hot-time-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hot-time-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #075a9c;
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.hot-time-title svg {
  width: 20px;
  height: 20px;
  fill: #075a9c;
  flex-shrink: 0;
}

.hot-time-pill {
  background: #eef8ff;
  color: #075a9c;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.hot-time-pill strong {
  margin-right: 4px;
}

.hot-time-pill strong:not(:first-child) {
  margin-left: 12px;
}

.hot-price {
  color: #ff6b6b;
  font-weight: 900;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.hot-price span {
  font-size: 0.9rem;
}

.hot-price strong {
  font-size: 2rem;
  line-height: 1;
}

.hot-price em {
  color: #ff6b6b;
  font-style: normal;
  font-size: 0.9rem;
}

.hot-activity-card .image-gallery {
  width: 100%;
  position: relative;
}

/* ==========================================================================
   內容詳細卡片區
   ========================================================================== */
.tour-result-card {
  margin: 18px 0 0;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(45,55,72,0.08);
  border: 1px solid rgba(226,232,240,0.85);
}

.activity-schedule-img {
  margin-top: 18px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 22px rgba(45, 55, 72, 0.08);
}

.activity-schedule-img img {
  width: 100%;
  height: auto;
  display: block;
}

.notice-title {
  color: #1A70B4;
  font-weight: 700;
}

.notice-card-list {
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  list-style-type: none;
  font-weight: 500;
}

.notice-card-list li {
  margin-bottom: 8px;
}

/* ==========================================================================
   右側欄位 (Sidebar)
   ========================================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 8px;
}

.booking-card,
.info-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* 選擇票種 */
.booking-card.ticket-card {
  background: #eaf6fd;
  border: 0;
  border-radius: 26px;
  padding: 30px 40px 26px;
  box-shadow: none;
}

.ticket-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #075a9c;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 18px;
}

.ticket-title svg {
  width: 24px;
  height: 24px;
  fill: #075a9c;
  flex-shrink: 0;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.ticket-row {
  min-height: 52px;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 24px;
  display: grid;
  grid-template-columns: 1fr 110px 150px;
  align-items: center;
  gap: 16px;
}

.ticket-name {
  color: #222222;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.ticket-price {
  color: #ff6b6b;
  font-size: 1rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.ticket-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ticket-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #2797e8;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ticket-btn:hover {
  background: #0b7ed0;
}

.ticket-count {
  width: 84px;
  height: 31px;
  border-radius: 999px;
  background: #eaf6fd;
  color: #222222;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-row.company-row {
  grid-template-columns: 1fr;
}

.company-text {
  color: #222222;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

/* 活動時間 */
.activity-time-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 22px 24px 0;
}

.activity-time-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.activity-time-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #075a9c;
  font-size: 1.15rem;
  font-weight: 900;
  white-space: nowrap;
}

.activity-time-title svg {
  width: 26px;
  height: 26px;
  fill: #075a9c;
  flex-shrink: 0;
}

.activity-time-pill {
  background: #eaf6fd;
  border-radius: 999px;
  padding: 11px 28px;
  color: #075a9c;
  font-size: 1.05rem;
  font-weight: 900;
  white-space: nowrap;
}

.notice-heading-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #075a9c;
  font-size: 0.95rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.notice-heading-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #1a70b4;
}

/* 總金額 */
.total-price-area {
  border-top: 1px dashed var(--border-color);
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.total-label {
  font-size: 1rem;
  color: var(--text-muted);
}

.total-amount {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--accent-color);
}

/* ==========================================================================
   響應式網頁設計 (RWD 媒體查詢)
   ========================================================================== */
@media (max-width: 968px) {
  .activity-intro {
    grid-template-columns: 1fr;
  }

  .activity-intro-img {
    height: 260px;
  }

  body {
    height: auto;
    overflow: visible;
    padding: 0;
  }

  .layout-container {
    grid-template-columns: 1fr;
    height: auto;
    padding: 20px;
  }

  .content-section,
  .sidebar {
    height: auto;
    overflow-y: visible;
  }

  .hot-activity-card {
    padding: 24px 22px 26px;
  }

  .hot-main-image {
    height: 300px;
  }

  .hot-activity-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .hot-time-area {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .hot-time-pill {
    width: 100%;
    white-space: normal;
    line-height: 1.7;
  }

  .hot-price {
    align-self: flex-end;
  }
}

@media (max-width: 576px) {
  .activity-intro-img {
    height: 210px;
  }

  .activity-intro-text h2 {
    font-size: 1.25rem;
  }

  .activity-intro-text p {
    font-size: 0.92rem;
  }

  .hot-activity-card {
    border-radius: 22px;
    padding: 20px 16px 22px;
  }

  .hot-activity-title {
    font-size: 0.98rem;
  }

  .hot-main-image {
    height: 220px;
    border-radius: 14px;
  }

  .hot-thumb-list .thumb-item {
    width: 54px;
    height: 40px;
  }

  .hot-tag-list {
    gap: 7px;
  }

  .hot-tag-list span {
    font-size: 0.75rem;
    padding: 4px 11px;
  }

  .hot-time-pill strong:not(:first-child) {
    margin-left: 0;
  }

  .hot-time-pill strong:strong:nth-of-type(2) {
    display: block;
    margin-top: 2px;
  }

  .hot-price strong {
    font-size: 1.75rem;
  }

  .activity-schedule-img {
    margin-top: 14px;
    border-radius: 12px;
  }

  .layout-container {
    padding: 14px;
  }

  .tour-result-card {
    margin: 16px 0 0;
    padding: 14px;
  }

  .booking-card.ticket-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .ticket-row {
    grid-template-columns: 1fr;
    border-radius: 22px;
    gap: 8px;
    padding: 14px 18px;
  }

  .ticket-price {
    text-align: left;
  }

  .ticket-controls {
    justify-content: flex-end;
  }

  .ticket-count {
    width: 78px;
  }

  .ticket-row.company-row {
    grid-template-columns: 1fr;
  }

  .company-text {
    text-align: left;
    white-space: normal;
  }

  .activity-time-card {
    padding: 18px 0 0;
  }

  .activity-time-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .activity-time-pill {
    white-space: normal;
    width: 100%;
    line-height: 1.7;
  }
}