/* ============================================================================
 * common/pages/post.css — 跨主題共用貼文頁面（列表 + 詳情）
 * ============================================================================
 *
 * 用途：
 *   提供 6 個前台主題共用的貼文頁面樣式 baseline：貼文列表頁
 *   （posts/index）的舊版與新版兩種卡片佈局、貼文詳情頁
 *   （posts/show）的標題、內文、章節標題、區段標題等。
 *
 * 設計意圖：
 *   - common/pages/post.css = default baseline（未來所有網站的基礎標準）
 *   - themes/default/pages/post.css 故意保持空殼（default 不需覆寫自己的 baseline）
 *   - 其他主題透過 themes/{theme}/pages/post.css 對 baseline 做差異化覆寫
 *
 * 內容索引：
 *   區段 1: 舊版列表卡片（.blog-img / .blog-title / .blog-desc / .blog-item /
 *           .blog-item .blog-desc::before/::after 裝飾 / hover 動畫 / .read-more）
 *   區段 2: 新版列表卡片（.blog-item-2 / .blog-title-2 / .blog-title-border /
 *           .blog-image / .blog-desc / .read-more / .blog-item-2:hover）
 *   區段 3: 貼文詳情頁（.blog-details-area / .blog-details-title /
 *           .blog-description（含 p img、img 巢狀規則）/ .blog-section-title）
 *
 * 使用頁面：
 *   - resources/views/web/posts/index.blade.php（貼文列表）
 *   - resources/views/web/posts/show.blade.php（貼文詳情）
 *
 * 載入順序：
 *   common/{base,header,sidebar,footer,widget}.css → themes/default/{同}.css →
 *   common/pages/post.css（本檔）→ themes/default/pages/post.css → custom.css
 *
 * 抽取來源：public/web/css/default.css 3 個區段：
 *   - line 4948~5041：舊版列表卡片
 *   - line 5098~5189：新版列表卡片
 *   - line 5836~5906：貼文詳情頁
 *
 * 詳細規格：openspec/specs/web-theme-css/spec.md（Requirement R.FUNC.1 / R.FUNC.8）
 * 變更記錄：openspec/changes/issue518-web-theme-css-modularization/（task 6.2）
 * ============================================================================
 */


/* ============================================================================
 * 區段 1：舊版列表卡片（.blog-img / .blog-title / .blog-desc / .blog-item / .read-more）
 *   抽取自 default.css line 4948~5041
 *   對應 blade：posts/index.blade.php（舊版佈局）
 * ============================================================================
 */

.blog-img>a {
  display: block;
}

.blog-img img {
  width: 100%;
}

.blog-title {
  text-transform: uppercase;
}

.blog-desc p {
  margin-bottom: 25px;
}

.blog-item .read-more {
  margin-bottom: 45px;
}

.read-more a {
  color: #2c2c2c;
  font-size: 16px;
  padding: 10px 16px;
  text-transform: uppercase;
}

.blog-item {
  margin-bottom: 30px;
  overflow: hidden;
  position: relative;
}

.blog-item img {
  width: 100%;
}

.blog-item .blog-desc {
  backface-visibility: hidden;
  background: rgba(255, 127, 0, 0.95) none repeat scroll 0 0;
  height: 100%;
  left: 0;
  padding: 40px;
  position: absolute;
  top: 0;
  width: 100%;
  opacity: 0;
  transition: all 0.5s ease 0s;
}

.blog-item .blog-desc::before,
.blog-item .blog-desc::after {
  bottom: 20px;
  content: "";
  left: 20px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 20px;
  top: 20px;
  transition: opacity 0.35s ease 0s, transform 0.5s ease 0s;
}

.blog-item .blog-desc::before {
  border-bottom: 1px solid #fefefe;
  border-top: 1px solid #fefefe;
  transform: scale(0, 1);
}

.blog-item .blog-desc::after {
  border-left: 1px solid #fefefe;
  border-right: 1px solid #fefefe;
  transform: scale(1, 0);
}

.blog-item:hover .blog-desc::before,
.blog-item:hover .blog-desc::after {
  opacity: 1;
  transform: scale(1);
}

.blog-item:hover .blog-desc {
  opacity: 1;
}

.blog-item .blog-title,
.blog-item .blog-desc p,
.blog-item .read-more a {
  color: #fefefe;
}

.blog-item .blog-title:hover a,
.blog-item .read-more a:hover {
  color: #ccc;
}


/* ============================================================================
 * 區段 2：新版列表卡片（.blog-item-2 系列）
 *   抽取自 default.css line 5098~5189
 *   對應 blade：posts/index.blade.php（新版佈局）
 * ============================================================================
 */

.blog-item-2 {
  margin-bottom: 30px;
  background: #ffffff;
  border-radius: 0px;
  overflow: hidden;
}

.blog-item-2 img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: all 0.3s ease 0s;
}

.blog-item-2 .blog-desc {
  text-align: start;
  padding: 10px 20px 10px 0;
}

.blog-title-2 {
  color: #333333;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.blog-title-2>a {
  padding-bottom: 4px;
}

.blog-title-2>a:hover {
  color: #2c2c2c;
}

.blog-desc>p {
  color: #333333;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.blog-item-2 .blog-image {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.date-box {
  margin: 8px;
  width: fit-content;
}

.date-text {
  margin-bottom: 0;
  /* font-size: 14px; */
  text-align: end;
}

.read-more {
  width: 100px;
}

/* .read-more a {
  padding: 10px 16px;
} */

.blog-title-border {
  border-bottom: 1px solid #333333;
  display: inline-block;
}

@media screen and (max-width: 767px) {
  .blog-item-2 .blog-image {
    padding: 16px;
    border-radius: 10px;
    overflow: hidden;
  }

  .blog-item-2 .blog-image img {
    border-radius: 10px;
  }
}

.blog-item-2:hover img {
  opacity: 0.4;
  transform: scale3d(1.1, 1.1, 1);
}


/* ============================================================================
 * 區段 3：貼文詳情頁（.blog-details-area / .blog-details-title / .blog-description / .blog-section-title）
 *   抽取自 default.css line 5836~5906
 *   對應 blade：posts/show.blade.php
 * ============================================================================
 */

.blog-details-area {
  background: #ffffff;
  border-radius: 10px;
  min-height: 300px;
  height: fit-content;
  padding: 40px 20px;
}

.blog-details-area .blog-details-title {
  font-size: 24px;
  line-height: 32px;
  color: #333333;
}

.blog-details-area .blog-description {
  font-size: 16px;
  line-height: 28px;
  color: #333333;
}

.blog-details-area .blog-description p img {
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;

}

.blog-details-area .blog-description img {
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;

}

@media screen and (max-width: 768px) {

  .blog-details-area {
    overflow-x: hidden;
  }

  .blog-details-area .blog-description p img {
    width: auto;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .blog-details-area .blog-descriptio img {
    width: auto;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
  }
}

.blog-details-title {
  color: #666;
  /* font-size: 24px; */
  font-weight: 700;
  /* line-height: 16px; */
}

/* .blog-section-title 已遷至 common/base.css；contactUs / 其他頁面亦使用 */
