/*
Theme Name: SGET 拾給設計
Author: AWEI
Author URI: https://dafatime.idv.tw
Description: 一個自訂 WordPress 主題為 SGET (拾給設計) 網站.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sget
Tags: custom-theme, responsive, bootstrap5, wordpress
*/
 
/* 設定grid-wrapper內的div元素為flex容器,並置中內容 */

h1, h4, h5 {
  font-weight: bold;
}

p {
  font-weight: bold;
}

.grid-wrapper > div {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 修正a標籤造成的區塊高度撐開問題 */

.grid-wrapper > div > a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* 設定grid-wrapper內的圖片填滿容器並保持比例 */

.grid-wrapper > div > img, .grid-wrapper > div > a > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

/* 滑鼠懸停時圖片明度降低 */

.grid-wrapper > div > a:hover > img {
  filter: brightness(0.7);
}

/* 查看更多文字樣式 */

.grid-wrapper > div > a::after {
  content: "查看更多";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 18px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* 滑鼠懸停時顯示文字 */

.grid-wrapper > div > a:hover::after {
  opacity: 1;
}

/* 設定主要網格容器的排版方式 */

.grid-wrapper {
  display: grid;
  grid-gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-auto-rows: 300px;
  grid-auto-flow: dense;
}

/* 設定寬格式佔據1欄 */

.grid-wrapper .wide {
  grid-column: span 1;
}

/* 設定高格式佔據2列 */

.grid-wrapper .tall {
  grid-row: span 2;
}

.img-text-bottom {
  color: #ffffff;
  background: rgba(0,0,0,0.8);
  padding: 10px;
  margin: 0;
}

/* 設定大格式佔據2欄2列 */

.grid-wrapper .big {
  grid-column: span 2;
  grid-row: span 2;
}

/* 設定grid-gallery內的div元素為flex容器,並置中內容 */

.grid-gallery > div {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 修正a標籤造成的區塊高度撐開問題 */

.grid-gallery > div > a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* 設定grid-gallery內的圖片填滿容器並保持比例 */

.grid-gallery > div > img, .grid-gallery > div > a > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

/* 滑鼠懸停時圖片明度降低 */

.grid-gallery > div > a:hover > img {
  filter: brightness(0.7);
}

/* 查看更多文字樣式 */

/* 放大鏡圖示樣式 */

.grid-gallery > div > a::after {
  content: "🔍";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  opacity: 0;
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

/* 滑鼠懸停時顯示文字 */

.grid-gallery > div > a:hover::after {
  opacity: 1;
}

/* 設定主要網格容器的排版方式 */

.grid-gallery {
  display: grid;
  grid-gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-auto-rows: 300px;
  grid-auto-flow: dense;
}

/* 設定寬格式佔據1欄 */

.grid-gallery .wide {
  grid-column: span 1;
}

/* 設定高格式佔據2列 */

.grid-gallery .tall {
  grid-row: span 2;
}

/* 設定大格式佔據2欄2列 */

.grid-gallery .big {
  grid-column: span 2;
  grid-row: span 2;
}

/* 
home time line 
*/

.timeline {
  position: relative;
  padding: 40px 0 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.timeline::before {
  content: '';
  position: absolute;
  left: calc(50% / 5.5);
  right: calc(50% / 5.5);
  top: 67px;
  height: 4px;
  background: #848985;
  z-index: 0;
}

.timeline-item {
  position: relative;
  flex: 1;
  text-align: center;
  z-index: 1;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #647355;
  border-radius: 50%;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.padding-topbon {
  padding-top: 22px;
  padding-bottom: 20px;
  color: #FFF;
  margin: 0px;
}

.padding-topbon-sp {
  color: #FFF;
  padding-top: 10px;
  padding-bottom: 5px;
}

.timeline-content {
  padding: 15px;
  background: #738464;
  border-radius: 8px;
  position: relative;
  margin-top: 60px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}
.timeline-content h3 {
  font-weight: bold;
  font-size: x-large;
  margin: 0;
}

.timeline-content::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-bottom-color: #738464;
}

@media (max-width: 767.98px) {
  .timeline {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .padding-topbon {
    padding-top: 2px;
    padding-bottom: 0px;
  }
}

@media (max-width: 767.98px) {
  .timeline::before {
    top: 0;
    bottom: 0;
    top: calc(50% / 5);
    bottom: calc(50% / 4);
    left: 18px;
    width: 4px;
    height: auto;
    background: #848985;
  }
}

@media (max-width: 767.98px) {
  .timeline-item {
    text-align: left;
    margin-bottom: 30px;
    width: 85%;
  }
}

@media (max-width: 767.98px) {
  .timeline-item::before {
    left: 20px;
    top: 20px;
  }
}

@media (max-width: 767.98px) {
  .timeline-content {
    margin-top: 0;
    margin-left: 40px;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .timeline-content::before {
    bottom: auto;
    left: -20px;
    top: 20px;
    transform: none;
    border-right-color: #738464;
    border-bottom-color: transparent;
  }
}

/* 
文章列表圖片統一高度
*/
/* 確保圖片容器有固定高度或比例 */
.ps-height .col {
  position: relative;
  overflow: hidden;
}
.bcolor {
  position: relative;
  overflow: hidden;
  background-color: #f8f9fa; /* 背景色，增加可讀性 */
  border-radius: 0.375rem;

}

.ps-height .col img {
  width: 100%;
  height: 250px; /* 固定高度，可根據需求調整 */
  object-fit: cover; /* 保持圖片比例，填滿容器 */
  object-position: center; /* 圖片居中顯示 */
  transition: transform 0.3s ease; /* 滑鼠懸停時的縮放效果 */
}

/* 滑鼠懸停時圖片放大效果（可選） */
.ps-height .col img:hover {
  transform: scale(1.05);
}

/* 響應式調整 */
@media (max-width: 768px) {
  .ps-height .col img {
    height: 200px; /* 小螢幕時圖片高度 */
  }
}

/* Custom Pagination Styles */
.custom-pagination .page-link {
  color: #738464;
  background-color: #fff;
  border-color: #738464;
}

.custom-pagination .page-link:hover {
  color: #fff;
  background-color: #738464;
  border-color: #738464;
}

.custom-pagination .page-item.active .page-link {
  background-color: #738464;
  border-color: #738464;
  color: #fff;
}

.custom-pagination .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(115, 132, 100, 0.25);
}