﻿/* 探索台灣旅遊博客 - 完整樣式文件 */
/* 版本：1.0.0 | 最後更新：2023年12月1日 */

/* ==================== CSS重置與基礎樣式 ==================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 主色調 - 現代高級感配色 */
  --primary-color: #3a86ff;
  --primary-dark: #2a76ef;
  --secondary-color: #ff006e;
  --accent-color: #8338ec;
  --highlight-color: #fb5607;
  --light-color: #f0f7ff;

  /* 中性色調 */
  --dark-color: #1a1a2e;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --background-color: #ffffff;
  --gray-light: #f8f9fa;
  --gray-medium: #e9ecef;
  --gray-dark: #6c757d;

  /* 字體 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* 間距 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* 邊框半徑 */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 20px;
  --border-radius-circle: 50%;

  /* 陰影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.15);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.05);

  /* 轉場效果 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* z-index層級 */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  --z-index-notification: 1080;
}

/* 基礎元素樣式 */
html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 排版元素 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: var(--dark-color);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-sm);
  word-break: break-word;
  overflow-wrap: break-word;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

a:hover,
a:focus {
  color: var(--secondary-color);
  outline: none;
}

a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

ul,
ol {
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-md);
  list-style: none;
}

li {
  margin-bottom: var(--spacing-xs);
  line-height: inherit;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none;
}

img[loading="lazy"] {
  /* opacity: 0; */
  transition: opacity var(--transition-normal);
}

img[loading="lazy"].loaded {
  opacity: 1;
}

figure {
  margin: 0 0 var(--spacing-md);
}

figcaption {
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
  margin-top: var(--spacing-xs);
}

blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  font-style: italic;
  color: var(--text-light);
  background-color: var(--gray-light);
  padding: var(--spacing-md);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--spacing-lg) 0;
}

.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.line-clamp-4 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

/* 表格樣式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-md);
}

th,
td {
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  text-align: left;
}

th {
  background-color: var(--gray-light);
  font-weight: 600;
}

/* 代碼樣式 */
code {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--gray-light);
  padding: 0.2em 0.4em;
  border-radius: var(--border-radius-sm);
  color: var(--secondary-color);
}

pre {
  background-color: var(--gray-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* 容器與佈局 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

@media (min-width: 576px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* 工具類 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

.font-weight-normal {
  font-weight: 400;
}

.font-weight-medium {
  font-weight: 500;
}

.font-weight-semibold {
  font-weight: 600;
}

.font-weight-bold {
  font-weight: 700;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.text-success {
  color: #4CAF50;
}

.text-danger {
  color: #F44336;
}

.text-warning {
  color: #FF9800;
}

.text-info {
  color: #2196F3;
}

.text-light {
  color: var(--text-light);
}

.text-dark {
  color: var(--dark-color);
}

.bg-primary {
  background-color: var(--primary-color);
}

.bg-secondary {
  background-color: var(--secondary-color);
}

.bg-light {
  background-color: var(--gray-light);
}

.bg-dark {
  background-color: var(--dark-color);
}

.d-none {
  display: none !important;
}

.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-block {
  display: block !important;
}

.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.flex-column {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.justify-content-start {
  justify-content: flex-start;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-around {
  justify-content: space-around;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: flex-end;
}

.align-items-stretch {
  align-items: stretch;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.mw-100 {
  max-width: 100%;
}

.mh-100 {
  max-height: 100%;
}

.m-0 {
  margin: 0 !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mr-0 {
  margin-right: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.ml-0 {
  margin-left: 0 !important;
}

.m-1 {
  margin: var(--spacing-xs) !important;
}

.mt-1 {
  margin-top: var(--spacing-xs) !important;
}

.mr-1 {
  margin-right: var(--spacing-xs) !important;
}

.mb-1 {
  margin-bottom: var(--spacing-xs) !important;
}

.ml-1 {
  margin-left: var(--spacing-xs) !important;
}

.m-2 {
  margin: var(--spacing-sm) !important;
}

.mt-2 {
  margin-top: var(--spacing-sm) !important;
}

.mr-2 {
  margin-right: var(--spacing-sm) !important;
}

.mb-2 {
  margin-bottom: var(--spacing-sm) !important;
}

.ml-2 {
  margin-left: var(--spacing-sm) !important;
}

.p-0 {
  padding: 0 !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.pr-0 {
  padding-right: 0 !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}

.pl-0 {
  padding-left: 0 !important;
}

.p-1 {
  padding: var(--spacing-xs) !important;
}

.pt-1 {
  padding-top: var(--spacing-xs) !important;
}

.pr-1 {
  padding-right: var(--spacing-xs) !important;
}

.pb-1 {
  padding-bottom: var(--spacing-xs) !important;
}

.pl-1 {
  padding-left: var(--spacing-xs) !important;
}

.p-2 {
  padding: var(--spacing-sm) !important;
}

.pt-2 {
  padding-top: var(--spacing-sm) !important;
}

.pr-2 {
  padding-right: var(--spacing-sm) !important;
}

.pb-2 {
  padding-bottom: var(--spacing-sm) !important;
}

.pl-2 {
  padding-left: var(--spacing-sm) !important;
}

.rounded {
  border-radius: var(--border-radius-md);
}

.rounded-sm {
  border-radius: var(--border-radius-sm);
}

.rounded-lg {
  border-radius: var(--border-radius-lg);
}

.rounded-circle {
  border-radius: var(--border-radius-circle);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-none {
  box-shadow: none !important;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-visible {
  overflow: visible;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.position-fixed {
  position: fixed;
}

.position-sticky {
  position: sticky;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== 按鈕樣式 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
  gap: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--primary-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--dark-color);
  border: 1px solid var(--border-color);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--gray-light);
  border-color: var(--text-light);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-icon {
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
}

/* ==================== 表單元素 ==================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-color);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background-color);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.15);
}

.form-control::placeholder {
  color: var(--gray-dark);
  opacity: 1;
}

.form-control:disabled {
  background-color: var(--gray-light);
  opacity: 0.7;
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-xs);
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

.form-check-label {
  margin-bottom: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.form-row>.form-group {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
}

/* ==================== 導航欄 ==================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: var(--z-index-sticky);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  flex-wrap: wrap;
}

.logo a {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--dark-color);
  text-decoration: none;
}

.logo svg {
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: all var(--transition-normal);
}

.nav-menu li {
  margin-left: var(--spacing-md);
}

.nav-menu a {
  color: var(--text-color);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--primary-color);
}

.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform-origin: left;
  animation: slideInRight var(--transition-normal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  width: 2.5rem;
  height: 2.5rem;
}

.search-btn:hover,
.search-btn:focus {
  background-color: var(--gray-light);
  color: var(--primary-color);
  outline: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: var(--z-index-fixed);
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all var(--transition-normal);
  transform-origin: left center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(-4px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-1px) rotate(-45deg);
}

/* 搜索容器 */
.search-container {
  height: 0;
  overflow: hidden;
  transition: height var(--transition-normal);
  background-color: var(--gray-light);
}

.search-container.active {
  height: 80px;
}

.search-form {
  display: flex;
  height: 100%;
  align-items: center;
}

.search-form input {
  flex: 1;
  padding: 0 var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
  font-size: 1rem;
  height: 3rem;
}

.search-form button {
  padding: 0 var(--spacing-md);
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  cursor: pointer;
  font-weight: 600;
  height: 3rem;
  min-width: 80px;
}

.search-form button:hover {
  background-color: var(--primary-dark);
}

/* ==================== 頁面區塊通用樣式 ==================== */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--spacing-xs);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: var(--border-radius-sm);
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: var(--spacing-sm) auto 0;
  line-height: 1.6;
}

/* 麵包屑導航 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  list-style: none;
  padding: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

/* .breadcrumb-item+.breadcrumb-item::before {
  content: '/';
  margin: 0 0.5rem;
  color: var(--text-light);
} */

.breadcrumb a {
  color: var(--text-color);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb span {
  color: var(--text-light);
}

/* ==================== 首頁專用樣式 ==================== */

/* 特色目的地區塊 */
.featured-destinations {
  padding: var(--spacing-xl) 0;
  background-color: var(--gray-light);
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.destination-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.destination-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.destination-card.large-card {
  grid-column: span 2;
}

.destination-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
}

.destination-card.large-card .destination-image {
  height: 320px;
}

.destination-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.destination-card:hover .destination-image img {
  transform: scale(1.05);
}

.destination-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.destination-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary-color);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-xs);
}

.destination-title a {
  color: white;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.destination-excerpt {
  /* color: rgba(255, 255, 255, 0.9); */
  font-size: 0.95rem;
  line-height: 1.5;
}

.destination-info {
  padding: var(--spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.destination-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meta-item svg {
  flex-shrink: 0;
}

.read-more {
  font-weight: 600;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  align-self: flex-start;
}

.read-more:hover {
  color: var(--secondary-color);
  gap: 0.75rem;
}

/* 分類瀏覽區塊 */
.categories-section {
  padding: var(--spacing-xl) 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.category-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-icon {
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
  display: flex;
  justify-content: center;
}

.category-icon svg {
  width: 40px;
  height: 40px;
}

.category-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.category-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
}

.category-stats {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-sm);
  justify-content: center;
}

.category-link {
  font-weight: 600;
  font-size: 30px;
  color: var(--primary-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.category-link:hover {
  color: var(--secondary-color);
  gap: 0.75rem;
}

/* 旅行貼士區塊 */
.travel-tips {
  padding: var(--spacing-xl) 0;
  background-color: var(--gray-light);
}

.tips-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.tip-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  /* overflow: hidden; */
}

.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.tip-number {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 40px;
  height: 40px;
  background-color: var(--highlight-color);
  color: white;
  border-radius: var(--border-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  z-index: 1;
}

.tip-title {
  font-size: 1.25rem;
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.tip-content {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 精選文章 + 標籤雲兩列佈局 */
.featured-tags-section {
  padding: var(--spacing-xl) 0;
}

.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--spacing-xl);
}

/* 精選文章 */
.featured-articles {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.featured-article {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--spacing-md);
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.featured-article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.article-image {
  position: relative;

  overflow: hidden;
  flex-shrink: 0;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-article:hover .article-image img {
  transform: scale(1.05);
}

.article-tag {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary-color);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  z-index: 1;
}

.article-tag:hover {
  color: var(--background-color);
}

.article-content {
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 0;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.article-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.article-title a {
  color: var(--dark-color);
}

.article-title a:hover {
  color: var(--primary-color);
}

.article-excerpt {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  flex-grow: 1;
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.article-author img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-circle);
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-weight: 600;
  display: block;
  color: var(--dark-color);
}

.author-title {
  color: var(--text-light);
  font-size: 0.875rem;
}

.pagination {
  margin-top: var(--spacing-xl);
  text-align: center;
}

/* 側邊欄 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.sidebar-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--border-color);
  color: var(--dark-color);
}

/* 標籤雲 */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--gray-light);
  color: var(--text-color);
  border-radius: var(--border-radius-md);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.tag:hover,
.tag:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.tag-large {
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
}

/* 側邊欄訂閱 */
.newsletter-sidebar {
  background: linear-gradient(135deg, var(--light-color), #e6f0ff);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
}

.newsletter-sidebar p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

/* 統計數據 */
.statistics {
  background-color: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.stat-item {
  text-align: center;
  padding: var(--spacing-sm);
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* 用戶評價區塊 */
.testimonials {
  padding: var(--spacing-xl) 0;
  background-color: var(--gray-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.testimonial-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.testimonial-rating {
  color: #ffc107;
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  letter-spacing: 2px;
}

.star {
  display: inline-block;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-left: var(--spacing-md);
  flex-grow: 1;
}

.testimonial-text::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 0;
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.testimonial-author img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-circle);
  object-fit: cover;
  flex-shrink: 0;
}

.author-location {
  color: var(--text-light);
  font-size: 0.875rem;
  display: block;
}

/* 訂閱區塊 */
.subscribe-section {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--dark-color), #2d3748);
  color: white;
  position: relative;
  overflow: hidden;
}

.subscribe-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(58, 134, 255, 0.1) 0%, rgba(58, 134, 255, 0) 70%);
  border-radius: var(--border-radius-circle);
}

.subscribe-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.subscribe-title {
  color: white;
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

.subscribe-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-lg);
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.6;
}

.subscribe-form .form-group {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.subscribe-form input,
.subscribe-form select {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--dark-color);
}

.subscribe-form select {
  color: var(--text-light);
}

.form-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin-top: var(--spacing-sm);
}

.subscribe-image svg {
  width: 100%;
  height: auto;
  max-width: 300px;
  margin: 0 auto;
  display: block;
}

/* ==================== 詳情頁專用樣式 ==================== */

/* 文章頭部區域 */
.article-header {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/destinations/alishan.jpg') center/cover no-repeat;
  color: white;
  margin-bottom: var(--spacing-xl);
  position: relative;
}

.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(58, 134, 255, 0.1), rgba(131, 56, 236, 0.1));
}

.article-header .container {
  position: relative;
  z-index: 1;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  color: white;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.article-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-md);
  max-width: 800px;
  line-height: 1.6;
}

.article-meta-detail {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.meta-item-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.meta-item-detail svg {
  flex-shrink: 0;
}

/* 文章內容佈局 */
.article-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.article-body {
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-body h2 {
  font-size: 1.8rem;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  color: var(--dark-color);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--border-color);
  scroll-margin-top: 100px;
}

.article-body h3 {
  font-size: 1.5rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--dark-color);
  scroll-margin-top: 100px;
}

.article-body p {
  margin-bottom: var(--spacing-md);
}

.article-body img {
  height: auto;
  border-radius: var(--border-radius-lg);
  margin: var(--spacing-lg) auto;
  box-shadow: var(--shadow-md);
}

/* 亮點卡片 */
.highlight-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
}

.highlight-card {
  background: linear-gradient(135deg, var(--light-color), #e6f0ff);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  transition: transform var(--transition-normal);
}

.highlight-card:hover {
  transform: translateY(-5px);
}

.highlight-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: var(--border-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.highlight-content h4 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--dark-color);
}

.highlight-content p {
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.6;
}

/* 文章標籤 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.article-tags a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--gray-light);
  color: var(--text-color);
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.article-tags a:hover,
.article-tags a:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* 分享區塊 */
.share-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md);
  background-color: var(--gray-light);
  border-radius: var(--border-radius-lg);
}

.share-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: white;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-color);
}

.share-btn:hover,
.share-btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn.facebook:hover {
  background-color: #1877f2;
  color: white;
  border-color: #1877f2;
}

.share-btn.twitter:hover {
  background-color: #1da1f2;
  color: white;
  border-color: #1da1f2;
}

.share-btn.line:hover {
  background-color: #00b900;
  color: white;
  border-color: #00b900;
}

.stats-info {
  display: flex;
  gap: var(--spacing-md);
  color: var(--text-light);
  font-size: 0.95rem;
}

.stat-item-article {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 作者卡片 */
.author-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.author-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--border-radius-circle);
  object-fit: cover;
  margin: 0 auto var(--spacing-md);
  border: 3px solid var(--primary-color);
  display: block;
}

.author-name {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  color: var(--dark-color);
}

.author-title {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.author-bio {
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.author-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
}

.author-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--gray-light);
  border-radius: var(--border-radius-circle);
  color: var(--text-color);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.author-link:hover,
.author-link:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* 文章目錄 */
.table-of-contents {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
}

.toc-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--border-color);
  color: var(--dark-color);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: var(--spacing-xs);
}

.toc-list a {
  color: var(--text-color);
  display: block;
  padding: 0.5rem 0;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  padding-left: var(--spacing-sm);
  text-decoration: none;
}

.toc-list a:hover,
.toc-list a:focus {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  padding-left: calc(var(--spacing-sm) + 5px);
}

.toc-list ul {
  list-style: none;
  padding-left: var(--spacing-md);
  margin-top: 0.5rem;
}

/* 相關文章 */
.related-articles {
  margin-top: var(--spacing-xl);
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.related-article-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.related-article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.related-article-image {
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.related-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.related-article-card:hover .related-article-image img {
  transform: scale(1.05);
}

.related-article-content {
  padding: var(--spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.related-article-title {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
  flex-grow: 1;
}

.related-article-title a {
  color: var(--dark-color);
}

.related-article-title a:hover {
  color: var(--primary-color);
}

.related-article-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: auto;
}

/* 評論區塊 */
.comments-section {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 2px solid var(--border-color);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.comments-count {
  font-size: 1.25rem;
  color: var(--dark-color);
  font-weight: 600;
}

.comment-form {
  background-color: var(--gray-light);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-xl);
}

.comment-form h3 {
  margin-bottom: var(--spacing-md);
  color: var(--dark-color);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.comment {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.comment-author img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-circle);
  object-fit: cover;
  flex-shrink: 0;
}

.comment-author-info h4 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  color: var(--dark-color);
}

.comment-author-info span {
  color: var(--text-light);
  font-size: 0.875rem;
}

.comment-time {
  color: var(--text-light);
  font-size: 0.875rem;
}

.comment-content {
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
}

.comment-actions {
  display: flex;
  gap: var(--spacing-md);
}

.comment-action {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.comment-action:hover {
  color: var(--primary-color);
}

/* ==================== 列表頁專用樣式 ==================== */

/* 分類頭部區域 */
.category-header {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--light-color), #e6f0ff);
  margin-bottom: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.category-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(58, 134, 255, 0.05) 0%, rgba(58, 134, 255, 0) 70%);
  border-radius: var(--border-radius-circle);
}

.category-header .container {
  position: relative;
  z-index: 1;
}

.category-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--dark-color);
}

.category-description {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto var(--spacing-md);
  line-height: 1.6;
}

.category-stats {
  display: flex;
  gap: var(--spacing-md);
  color: var(--text-light);
  font-size: 0.95rem;
  flex-wrap: wrap;
}


.breadcrumb-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-item {
  margin-right: var(--spacing-sm);
  font-size: 0.875rem;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: var(--spacing-sm);
  color: var(--gray);
}

.breadcrumb-item a {
  color: var(--gray);
}

.breadcrumb-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* 篩選區塊 */
.filters-section {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-xl);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.filters-title {
  font-size: 1.25rem;
  color: var(--dark-color);
}

.clear-filters {
  color: var(--primary-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  user-select: none;
}

.clear-filters:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.filter-group {
  margin-bottom: var(--spacing-sm);
}

.filter-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  font-size: 0.95rem;
}

.filter-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  background-color: white;
  color: var(--text-color);
  transition: border-color var(--transition-fast);
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.15);
}

/* 列表內容佈局 */
.list-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

/* 文章卡片列表 */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.article-card-list {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--spacing-md);
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.article-card-list:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.article-image-list {
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.article-image-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card-list:hover .article-image-list img {
  transform: scale(1.05);
}

.article-content-list {
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 0;
  display: flex;
  flex-direction: column;
}

.article-category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-sm);
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-title-list {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.article-title-list a {
  color: var(--dark-color);
}

.article-title-list a:hover {
  color: var(--primary-color);
}

.article-excerpt-list {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
  flex-grow: 1;
}

.article-meta-list {
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.read-more-list {
  font-weight: 600;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  margin-top: auto;
}

.read-more-list:hover {
  color: var(--secondary-color);
  gap: 0.75rem;
}

/* 側邊欄列表頁樣式 */
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* 熱門文章側邊欄 */
.popular-articles-sidebar {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.popular-articles-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.popular-article-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
}

.popular-article-nomal {
  display: grid;
  grid-template-columns: none;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
}

.popular-article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-article-image {
  width: 80px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.popular-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.popular-article-item:hover .popular-article-image img {
  transform: scale(1.05);
}

.popular-article-content h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.popular-article-content h4 a {
  color: var(--dark-color);
}

.popular-article-content h4 a:hover {
  color: var(--primary-color);
}

.popular-article-meta {
  color: var(--text-light);
  font-size: 0.75rem;
}

/* 標籤雲側邊欄 */
.tags-sidebar {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.tags-container-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.tag-sidebar {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--gray-light);
  color: var(--text-color);
  border-radius: var(--border-radius-md);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.tag-sidebar:hover,
.tag-sidebar:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.tag-sidebar.tag-popular {
  background-color: var(--primary-color);
  color: white;
}

/* 訂閱提示 */
.subscribe-reminder {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.subscribe-reminder::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: var(--border-radius-circle);
}

.subscribe-reminder h3 {
  color: white;
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
}

.subscribe-reminder p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 1;
}

/* 分頁 */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  background-color: white;
  color: var(--text-color);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  text-decoration: none;
  user-select: none;
}

.page-link:hover,
.page-link:focus {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-link.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  cursor: default;
}

.page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-link.disabled:hover,
.page-link.disabled:focus {
  background-color: white;
  color: var(--text-color);
  border-color: var(--border-color);
}

.prev-next {
  display: flex;
  gap: var(--spacing-sm);
}


.post-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  padding-left: 0;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  background-color: white;
  color: var(--text-color);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  text-decoration: none;
  user-select: none;
}

/* ==================== 頁腳樣式 ==================== */
.main-footer {
  background-color: var(--dark-color);
  color: white;
  padding-top: var(--spacing-xl);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo svg {
  display: block;
}

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-circle);
  color: white;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-links a:hover,
.social-links a:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.footer-title {
  color: white;
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-bottom: var(--spacing-xs);
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-subscribe {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.footer-subscribe input {
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.footer-subscribe input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.footer-subscribe input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
}

.contact-info p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-md) 0;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.copyright p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus {
  color: white;
}

/* ==================== 通用組件 ==================== */

/* 返回頂部按鈕 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: var(--z-index-fixed);
  box-shadow: var(--shadow-md);
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  outline: none;
}

/* 動畫 */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/*author*/
.author-info {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin: 10px 0;
  background: #dff0f8;
  border-radius: 20px;

}

.author-info img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  overflow: clip;
  margin: 0;
}

.author-name {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

/* ==================== 響應式設計 ==================== */

/* 大型桌面 (1200px以上) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* 中型桌面 (1024px - 1199px) */
@media (max-width: 1199px) {
  .destinations-grid {
    grid-template-columns: 1fr 1fr;
  }

  .destination-card.large-card {
    grid-column: span 2;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tips-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-column-layout,
  .article-content-wrapper,
  .list-content-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .featured-article,
  .article-card-list {
    grid-template-columns: 250px 1fr;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .subscribe-container {
    grid-template-columns: 1fr;
  }

  .subscribe-image {
    display: none;
  }
}

/* 平板 (768px - 1023px) */
@media (max-width: 1023px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .section-header {
    margin-bottom: var(--spacing-lg);
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: var(--z-index-fixed);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    margin: var(--spacing-xs) 0;
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .nav-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .destination-card {
    grid-column: span 2;
  }

  .destinations-grid {
    grid-template-columns: 1fr;
  }

  .destination-card.large-card {
    grid-column: span 1;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .tips-container {
    grid-template-columns: 1fr;
  }

  .featured-article,
  .article-card-list {
    grid-template-columns: 1fr;
  }

  .article-content,
  .article-content-list {
    padding: var(--spacing-md);
  }

  .highlight-cards {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .related-articles-grid {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .category-header {
    padding: 0;
  }

  .article-content-wrapper {
    display: block;
  }
}

/* 手機 (576px - 767px) */
@media (max-width: 767px) {
  .main-header {
    position: relative;
  }

  .navbar {
    padding: 5px 0;
  }

  .nav-menu {
    top: 48px;
  }

  .author-info {
    flex-direction: column;
    align-items: center;
  }

  .author-name {
    text-align: center;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .article-title,
  .category-title {
    font-size: 1.75rem;
  }

  .article-subtitle,
  .category-description {
    font-size: 1rem;
  }

  .subscribe-form .form-group,
  .form-row {
    flex-direction: column;
  }

  .share-section {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .comments-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination-container {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .article-header {
    padding: var(--spacing-lg) 0;
  }
}

/* 小型手機 (575px以下) */
@media (max-width: 575px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2rem;
    --spacing-md: 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
  }

  .section-title::after {
    width: 40px;
    bottom: -8px;
  }

  .article-meta-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .comment-actions {
    flex-wrap: wrap;
  }
}

/* 打印樣式 */
@media print {

  .main-header,
  .search-container,
  .back-to-top,
  .subscribe-section,
  .main-footer,
  .comments-section,
  .share-section,
  .sidebar,
  .filters-section,
  .pagination-container {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
    font-weight: normal;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  h2,
  h3,
  h4 {
    page-break-before: auto;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  blockquote {
    border-left: 3px solid #000;
    margin: 1em 0;
    padding-left: 1em;
  }

  .article-body {
    font-size: 12pt;
    line-height: 1.6;
  }
}