/* ==========================================
   膠藝所專屬 🌿 部落格輕奢樣式優化
   ========================================== */

#blog {
  background: #fcfbfa; /* 改為高奢的大地輕奢灰白襯底 */
  margin-top: -20px;
  padding-bottom: 50px; /* 增加下方呼吸留白 */
}

#blog .full-width {
  padding-left: 0;
  padding-right: 0;
}

#blog .blog_title {
  padding: 35px 0 20px 0; /* 增加大標題的舒適間距 */
}

#blog .blog_title h1 {
  color: #333333; /* 提升文字辨識度 */
  font-size: 1.8rem; /* 微調放大標題 */
  font-weight: 500; /* 增加一點點分量感 */
  line-height: 45px;
  margin: 0;
  letter-spacing: 1px; /* 寬字距更有洗練感 */
}

#blog #blog_articles {
  margin: -15px;
}

#blog #blog_articles > div {
  padding: 15px;
}

#blog #all_blogs_title {
  padding: 0;
}

/* 上方分類導覽列優化 */
#blog #all_blogs_title .blogs_group {
  display: block;
  text-align: center;
  justify-content: center;
  align-items: center;
  background: #f5f3f0; /* 改為柔和暖調的灰白色 */
  padding: 20px 0;
  border-radius: 8px; /* 柔和圓角 */
}

#blog #all_blogs_title .blogs_group h5 {
  margin: 5px 20px;
  font-size: 1.1rem;
  color: #565656;
}

#blog #all_blogs_title .blogs_group a {
  display: inline-block;
  padding-bottom: 5px;
  color: #565656;
  margin: auto 15px;
  font-weight: 400;
  transition: all 0.3s ease; /* 絲滑轉場 */
}

#blog #all_blogs_title .blogs_group a:hover {
  text-decoration: none;
  color: #b09987; /* 懸停時轉為膠藝所奶茶金 */
  transform: translateY(-2px); /* 微微上浮 */
}

#blog #all_blogs_title .blog_title, #blog #all_blogs_title hr {
  display: none;
}

#blog #all_blogs_title .mobile_blogs_group {
  display: none;
}

/* 文章主卡片框架改造 */
#blog .article {
  background: #ffffff;
  border-radius: 12px; /* 柔和圓角 */
  overflow: hidden; /* 確保內件不衝出圓角 */
  box-shadow: 0 10px 30px rgba(176, 153, 135, 0.06); /* 膠藝所專屬暖奶茶色偏光微影 */
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* 劇場級轉場線條 */
  display: grid;
  grid-template-rows: 262.5px auto 60px 50px 40px;
  grid-template-areas: "image" "date" "title" "content" "readmore";
  -ms-grid-rows: 262.5px auto 60px 50px 40px;
  -ms-grid-columns: auto auto auto auto auto;
}

/* 卡片懸停動態效果 */
#blog .article:hover {
  transform: translateY(-6px); /* 懸停時優雅上浮 */
  box-shadow: 0 15px 35px rgba(176, 153, 135, 0.12); /* 影子加深，立體感倍增 */
}

#blog .article .article_image {
  grid-area: image;
  overflow: hidden;
}

#blog .article .article_image a {
  background-size: cover; /* 改為 cover 讓圖片完美填滿格子 */
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
  height: 100%;
  width: 100%;
  transition: transform 0.6s ease; /* 圖片放大動畫 */
}

/* 懸停時大圖緩慢微縮放，非常有沉浸感 */
#blog .article:hover .article_image a {
  transform: scale(1.05); 
}

#blog .article .article_date, #blog .article .article_title, #blog .article .article_content, #blog .article .article_readmore {
  padding: 8px 24px; /* 稍微增加左右內距，讓字體呼吸 */
}

#blog .article .article_date {
  color: #b09987; /* 日期改用品牌標誌色，細節更精緻 */
  font-size: 13px;
  font-weight: 300;
  grid-area: date;
  line-height: 25px;
}

#blog .article .article_title {
  grid-area: title;
}

#blog .article .article_title a {
  display: inline-block;
  text-decoration: none !important;
}

#blog .article .article_title h2 {
  margin: 0;
  color: #424242;
  font-size: 1.15rem; /* 字體微調大氣 */
  font-weight: 500;
  line-height: 28px;
  display: -webkit-box;
  display: block\0 ;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.3s ease;
}

#blog .article:hover .article_title h2 {
  color: #b09987; /* 懸停時標題文字變色 */
}

#blog .article .article_content {
  grid-area: content;
  color: #8c8c8c; /* 微調字色，更符合現代閱讀美學 */
  font-size: 14px;
  font-weight: 300;
  line-height: 22px;
}

#blog .article .article_readmore {
  grid-area: readmore;
  align-self: center;
}

#blog .article .article_readmore a {
  color: #b09987; /* 改用品牌色，勾引點擊 */
  font-size: 0.85rem;
  font-weight: 400;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

#blog .article .article_readmore a:hover {
  opacity: 0.7;
}

/* ==========================================
   側邊欄 / 精選推薦區塊優化
   ========================================== */

#blog #selected_blog .selected_articles {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 25px rgba(176, 153, 135, 0.04);
}

#blog #selected_blog .selected_articles .row {
  margin: 0;
}

#blog #selected_blog .selected_articles .row > div {
  padding: 12px 15px;
}

#blog #selected_blog .selected_article {
  grid-template-columns: 35% 1fr; /* 微調比例 */
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "image title" "image date" "image tags";
  transition: all 0.3s ease;
  border-radius: 8px;
}

#blog #selected_blog .selected_article:hover {
  background-color: #fcfbfa; /* 側邊欄懸停有柔和襯底 */
}

#blog #selected_blog .selected_article .article_image a {
  height: 90px;
  border-radius: 6px; /* 小圖也加上精緻圓角 */
  background-size: cover;
}

#blog #selected_blog .selected_article .article_title, #blog #selected_blog .selected_article .article_date, #blog #selected_blog .selected_article .article_tags {
  padding: 0 15px;
}

#blog #selected_blog .selected_article .article_title {
  max-height: 60px;
  overflow-y: hidden;
  padding: 2px 15px;
}

#blog #selected_blog .selected_article .article_title a {
  display: inline-block;
  text-decoration: none !important;
}

#blog #selected_blog .selected_article .article_title h3 {
  color: #424242;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  margin: 0;
  transition: color 0.3s ease;
}

#blog #selected_blog .selected_article:hover .article_title h3 {
  color: #b09987;
}

#blog #selected_blog .selected_article .article_date {
  align-self: center;
  color: #b09987;
  font-size: 12px;
}

#blog #selected_blog .selected_article .article_tags {
  grid-area: tags;
  align-self: center;
}

/* 標籤按鈕高奢化 */
#blog #selected_blog .selected_article .article_tags a {
  border: 1px solid #e0dbd5; /* 改用優雅的大地色細框 */
  color: #8c8c8c;
  background: #fcfbfa;
  transition: all ease-in-out 0.25s;
  text-align: center;
  border-radius: 15px;
  display: inline-block;
  font-size: 11px;
  min-width: 55px;
  margin: 2px 0;
  padding: 3px 8px;
  text-decoration: none;
}

#blog #selected_blog .selected_article .article_tags a:hover {
  background: #b09987; /* 懸停時染成品牌色滿版 */
  border-color: #b09987;
  color: #ffffff;
}

#blog .swiper-container {
  display: none;
}

/* ==========================================
   RWD 響應式斷點防護調整
   ========================================== */

@media (max-width: 1199px) {
  #blog .article {
    grid-template-rows: 217.5px auto 60px 50px 40px;
  }
}
@media (max-width: 991px) {
  #blog .article {
    grid-template-rows: 247.5px auto 60px 50px 40px;
  }
  #blog #all_blogs_title .blogs_group {
    display: none;
  }
  #blog #all_blogs_title .mobile_blogs_group {
    display: block;
    position: relative;
    width: 100%;
    text-align: left;
    background-color: #f5f3f0;
    border-radius: 6px;
  }
  #blog #all_blogs_title .mobile_blogs_group h1 {
    position: relative;
    margin: 0;
    padding: 14px 20px;
    color: #424242;
    font-size: 14px;
    font-weight: 400;
  }
  #blog #all_blogs_title .mobile_blogs_group h1:after {
    position: absolute;
    content: "";
    top: 50%;
    right: 20px;
    width: 8px;
    height: 8px;
    border: 1.5px solid #b09987; /* 改用品牌色箭頭 */
    border-width: 1.5px 1.5px 0 0;
    transform: translateY(-60%) rotate(135deg);
    transition: transform 0.3s ease;
  }
  #blog #all_blogs_title .mobile_blogs_group:not(.collapsed) h1:after {
    transform: translateY(-30%) rotate(-45deg);
  }
  #blog #all_blogs_title .mobile_blogs_group .blogs {
    padding: 10px 20px;
    margin: 0;
    list-style-type: none;
    background-color: #fcfbfa;
    border: 1px solid #f5f3f0;
    border-top: none;
    border-radius: 0 0 6px 6px;
  }
  #blog #all_blogs_title .mobile_blogs_group .blogs li {
    padding: 12px 0;
  }
  #blog #all_blogs_title .mobile_blogs_group .blogs li a {
    color: #565656;
    font-size: 14px;
    text-decoration: none;
  }
  #blog #all_blogs_title .mobile_blogs_group .blogs li:not(:last-child) {
    border-bottom: 1px solid #f5f3f0;
  }
}
@media (max-width: 768px) {
  #blog .article {
    grid-template-rows: 320px auto auto auto 40px; /* 手機平板調降高度防拉伸 */
  }
  #blog #all_blogs_title .blogs_group {
    display: none;
    flex-direction: column;
  }
}
@media (max-width: 575px) {
  #blog .article {
    grid-template-rows: calc(65vw) auto auto auto 40px; /* 黃金視覺比例 RWD 盾牌 */
  }
  #blog #blog_articles {
    margin: -7px -15px;
  }
  #blog #blog_articles > div {
    padding: 12px 15px; /* 優化手機版間距 */
  }
}