/* 卡片容器（3 欄 or auto-fill）*/
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 20px;
  }
  
  /* 卡片本體 */
  .card {
    border-radius: 15px;
    overflow: hidden;
    background: #ffffff8f;
    box-shadow: 0 4px 12px rgba(0,0,0,.07);
    transition: transform .18s ease;
  }
  .card:hover { transform: translateY(-4px); }
  
  /* 圖片 */
  .card-thumb img { width: 100%; height: auto; display: block; }
  
  /* meta & title */
  .card-meta {
    font-size: 14px;
    color: #666;
    padding: 12px 16px 0;
  }
  .card-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 4px 16px 16px;
    color: #526D82;
  }
  /* 版心：讓整頁置中且有左右白邊 */
.city-archive,
.archive-stays,
.archive-dine {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 卡片網格：auto-fit + justify-items:center 讓單行置中 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  justify-items: center;
}

/* 卡片本體寬度限制（讓小螢幕一樣漂亮）*/
.card {
  width: 100%;
  max-width: 320px;
}

/* 單行範例按鈕：簡易樣式 */
.btn {
  display: inline-block;
  margin-top: 16px;
  color: #0A5;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { text-decoration: underline; }

/* 區塊標題 */
.preview > h2,
.archive-stays > h1,
.archive-dine > h1 {
  margin: 0 0 24px;
  font-size: 24px;
  text-align: left;
}

/* ===== Related Posts 外層 Section ===== */
.related-wrap {
  /* 讓 Related Posts 區塊與 city-archive 置中對齊 */
  max-width: 1200px;     /* 和其他 archive 一致 */
  margin: 0 auto;        /* 置中 */
  padding: 40px 20px;    /* 左右留白與上下間距 (可依整體頁面做微調) */
  background: transparent; /* 保持背景透明，不要多餘底色 */
}

/* ===== Related Posts 標題 h2 ===== */
/* 跟 preview > h2、archive-stays > h1 一致，只是要置中對齊 */
.related-wrap > h2 {
  margin: 0 0 24px;         /* 下方留 24px；上方無 margin (可微調) */
  font-size: 36px;          /* 跟 preview > h2 相同 */
  font-weight: 500;         /* 半粗字 */
  text-align: center;       /* 水平置中 */
  color: #526D82;      
}


  /* 卡片和圖片全面自適應 */
  .dish-item,
  .card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .dish-image,
  .card-thumb {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .dish-image img,
  .card-thumb img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }



.dishes-wrapper {
  display: grid;
  grid-template-columns: 30% 30% 30%;
  gap: 20px;  /* 三欄間距 20px */
}



/* 統一所有組件的響應式斷點 */
@media (max-width: 1024px) { /* 平板 */ }
@media (max-width: 768px) { /* 中型螢幕 */ }  
@media (max-width: 480px) { /* 手機 */ }

/* 卡片圖片容器固定 3:2 比例，內容自動裁切填滿 */
.card-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;      /* 3:2 橫向比例 */
  position: relative;
  overflow: hidden;
  background: #f0f0f0;      /* 預設底色，可自行調整 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* 核心：多餘部分自動裁切，完全不變形 */
  object-position: center;
  display: block;
  transition: transform .3s;
}
.card-thumb img:hover {
  transform: scale(1.03);   /* 滑鼠移入微微放大，有質感 */
}

/* fadeup 動畫效果（僅限手機尺寸） */
@media (max-width: 768px) {
  .card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .card.fadeup-in {
    opacity: 1;
    transform: translateY(0);
  }
}