/* ==========================================================================
   Product Search Header (top.php)
   ========================================================================== */

.section-product-search-header {
  background-color: #ffffff;
}

/* 頂部橫幅圖片高與定位 */
.section-product-search-header .header-hero-banner {
  height: 280px;
  overflow: hidden;
}

.section-product-search-header .hero-img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 圖片右下角標註文字 */
.section-product-search-header .photo-credit {
  position: absolute;
  bottom: 12px;
  right: 16px;
  color: #ffffff;
  font-size: 11px;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

/* 左側重疊卡片定位 */
.section-product-search-header .header-content-container {
  margin-top: -80px; /* 向上重疊至 Banner 上 */
  z-index: 3;
}

.section-product-search-header .search-header-card {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-left: 0;
}

/* 頂部膠囊 Badge */
.section-product-search-header .search-badge {
  background-color: #0096a4;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 18px;
  border-radius: 50px;
  display: inline-block;
}

/* 主標題 & 內文 */
.section-product-search-header .search-title {
  font-size: 36px;
  line-height: 1.25;
  color: #061838;
  letter-spacing: 0.5px;
}

.section-product-search-header .search-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #4a5568 !important;
}

/* --------------------------------------------------------------------------
   RWD 響應式切換
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .section-product-search-header .header-hero-banner {
    height: 220px;
  }

  .section-product-search-header .header-content-container {
    margin-top: -50px;
  }

  .section-product-search-header .search-title {
    font-size: 28px;
  }
}

/* 響應式微調 */
@media (max-width: 767.98px) {
  .section-product-search-header .search-header-card {
    margin-left: 0;
    border-top-right-radius: 16px !important;
  }
}

@media (max-width: 575.98px) {
  .section-product-search-header .header-hero-banner {
    height: 180px;
  }

  .section-product-search-header .header-content-container {
    margin-top: -30px;
  }

  .section-product-search-header .search-title {
    font-size: 24px;
  }

  .section-product-search-header .search-header-card {
    border-radius: 16px !important;
  }
}

/* ==========================================================================
   Section Search1 (Case Study Search & Filter) - 依設計圖比例與字級精準調校
   ========================================================================== */

.section-product-search {
  background-image: url('../img/casestudy/search1/search1.png'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 桌機版控制內容最大寬度為 960px，重現設計圖緊湊比例 */
@media (min-width: 992px) {
  .section-product-search .case-search-container {
    max-width: 960px;
  }
}

.text-teal {
  color: #0096a4 !important;
}

/* 1. 頂部「ピックアップ事例」區塊與底部分隔線 */
.type-search-wrapper {
  /* border-bottom: 1px solid rgba(6, 24, 56, 0.12); */
}

.type-search-heading {
  font-size: 15px;
  color: #061838;
  white-space: nowrap;
  line-height: 1.4;
  flex-shrink: 0;
}

.type-cards-grid {
  flex: 1;
}

/* 桌機版固定每張ピックアップ卡片寬度約 145px，避免過度拉寬，貼合設計圖比例 */
.type-card {
  flex: 0 1 145px;
  min-width: 0;
  transition: transform 0.2s ease;
}

.type-card:hover {
  transform: translateY(-4px);
}

.type-img-box {
  width: 100%;
  height: 86px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.type-name {
  font-size: 12px;
  font-weight: 600;
  color: #061838;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* RWD 平板適應 */
@media (max-width: 991.98px) {
  .type-search-wrapper .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .type-search-heading {
    margin-bottom: 15px;
  }

  .type-cards-grid {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .type-card {
    min-width: 135px;
  }
}

/* 2. 左側邊欄與右側列表頂部標題列水平對齊 */
.filter-header-bar,
.product-list-header {
  min-height: 34px;
}

.filter-title,
.case-count-text {
  font-size: 15px;
  color: #061838;
  letter-spacing: 0.3px;
}

.sort-label {
  font-size: 12px;
  color: #475569;
}

.product-sort-box .form-select {
  font-size: 12.5px;
  color: #061838;
  padding-top: 6px;
  padding-bottom: 6px;
  min-width: 125px;
}

/* 左側白色篩選卡片 */
.filter-sidebar {
  border: 1px solid #e2e8f0;
  padding: 22px 18px;
}

.filter-subtitle {
  font-size: 13px;
  color: #061838;
}

.filter-sidebar .form-check-label {
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.filter-sidebar .form-check-input {
  width: 14px;
  height: 14px;
  margin-top: 0.25em;
}

.filter-sidebar .form-check-input:checked {
  background-color: #0096a4;
  border-color: #0096a4;
}

/* 搜尋提交按鈕 */
.btn-search-submit {
  background-color: #051937;
  border: none;
  font-size: 12px;
  padding: 10px 12px;
  transition: background-color 0.2s ease;
}

#submitImg{
  width: 15px;
}

.btn-search-submit:hover {
  background-color: #0096a4;
}

/* 3. 右側事例卡片 (強制固定卡片與圖片高度，不受原始圖片尺寸影響) */
.product-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
}

/* 確保圖片強制填滿固定容器並自動裁切置中，不撐開高度 */
.product-img-box {
  width: 100% !important;
  height: 185px !important;
  min-height: 185px !important;
  max-height: 185px !important;
  overflow: hidden !important;
}

.product-img-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

@media (min-width: 768px) {
  /* 桌機版固定整張卡片高度為 185px，確保每張卡片高度 100% 一致 */
  .product-card {
    height: 185px !important;
  }

  .product-card > .row {
    height: 100% !important;
  }

  .case-card-img-col,
  .maker-card-img-col,
  .product-card-img-col {
    width: 43.5%;
    flex: 0 0 43.5%;
    height: 185px !important;
  }

  .product-card-body {
    width: 56.5%;
    flex: 0 0 56.5%;
    height: 185px !important;
    padding: 18px 24px !important;
  }
}

.product-meta {
  font-size: 11px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 標題固定單行，超出顯示省略號，避免換行影響卡片高度 */
.product-title {
  font-size: 18px;
  color: #061838;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 內文固定最多顯示 2 行，超出自動省略，確保卡片高度一致 */
.product-desc {
  font-size: 15px;
  color: #334155;
  line-height: 1.6;
  max-width: 85%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}




/* 右側圓角膠囊標籤 */
.badge-tag {
  background-color: #f0f9fa;
  color: #0096a4;
  border: 1px solid #bce3e8;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
}

/* 右下角圓形箭頭按鈕 */
.btn-circle-arrow {
  width: 32px;
  height: 32px;
  background-color: #f0f9fa;
  border: 1px solid #bce3e8;
  color: #0096a4;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

#than {
  filter: brightness(0) invert(1);
}

.btn-circle-arrow:hover {
  background-color: #0096a4;
  border-color: #0096a4;
  color: #ffffff;
}

.btn-circle-arrow:hover .fourShirushi {
  filter: brightness(0) invert(1);
}

/* 加載更多按鈕 */
.btn-load-more {
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-load-more:hover {
  border-color: #0096a4 !important;
  color: #0096a4 !important;
}

.btn-load-more .btn-arrow {
  width: 20px;
  height: 20px;
  background-color: #0096a4;
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ==========================================================================
   Section Search2 (Specialty Search Section)
   ========================================================================== */

/* 膠囊標籤 */
.specialty-badge {
  display: inline-block;
  background-color: #0096a4;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 18px;
  border-radius: 50px;
}

/* 主標題 */
.specialty-title {
  color: #081d3c;
  font-size: 28px;
  letter-spacing: 0.5px;
}

/* 容器限制最大寬度 */
.specialty-cards-wrapper {
  max-width: 960px;
}

/* 分類大卡片 (深藍底) */
.specialty-category-card {
  background-color: #073875;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Banner 圖片區域 */
.category-banner {
  height: 240px;
}

.category-banner-overlay {
  background: linear-gradient(180deg, rgba(7, 24, 48, 0.1) 0%, rgba(7, 24, 48, 0.75) 100%);
}

.category-banner-title {
  font-size: 22px;
  letter-spacing: 0.5px;
}

/* 深藍色內部 Padding */
.category-body {
  background-color: #073875;
}

/* 白色品牌小卡片 */
.brand-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Logo 容器框 (黑/深藍底) */
.brand-logo-box {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 文字樣式 */
.text-dark-navy {
  color: #081d3c;
}

.brand-name {
  font-size: 15px;
}

.brand-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b !important;
}

/* 青綠色圓形箭頭 */
.brand-card .btn-circle-arrow {
  width: 24px;
  height: 24px;
  border: 1px solid #0096a4;
  color: #0096a4;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.brand-card:hover .btn-circle-arrow {
  background-color: #0096a4;
  color: #ffffff;
}

.brand-card:hover .fourShirushi {
  filter: brightness(0) invert(1);
}

/* 響應式調整 */
@media (max-width: 767.98px) {
  .specialty-title {
    font-size: 22px;
  }
  .category-banner {
    height: 180px;
  }
  .category-banner-title {
    font-size: 18px;
  }
}

/* ==========================================================================
   Section Search1 (Case Study Search & Filter) 手機版專用樣式
   (僅在 767.98px 以下生效，PC 版完全不變)
   ========================================================================== */
@media (max-width: 767.98px) {
  .section-product-search {
    padding-top: 32px !important;
    padding-bottom: 40px !important;
  }

  /* 1. 頂部「ピックアップ事例」改為 2欄 x 2列 網格 */
  .section-product-search .type-search-wrapper {
    margin-bottom: 24px !important;
    padding-bottom: 16px !important;
  }

  .section-product-search .type-search-heading {
    font-size: 16px !important;
    margin-bottom: 12px !important;
  }

  .section-product-search .type-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }

  .section-product-search .type-card {
    min-width: 0 !important;
    width: 100% !important;
  }

  .section-product-search .type-img-box {
    height: 96px !important;
    border-radius: 12px !important;
  }

  .section-product-search .type-name {
    font-size: 12px !important;
    white-space: normal !important;
    line-height: 1.35 !important;
  }

  /* 2. 手機版「条件で絞り込む」下拉選單卡片 */
  .section-product-search .filter-mobile-heading {
    font-size: 16px;
    color: #061838;
  }

  .section-product-search .filter-mobile-card {
    border: 1px solid #e2e8f0;
  }

  .section-product-search .mobile-filter-select {
    font-size: 13px;
    color: #061838;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 36px 12px 14px;
    background-color: #ffffff;
    box-shadow: none !important;
  }

  .section-product-search .mobile-filter-select:focus {
    border-color: #0096a4;
  }

  /* 藍綠色搜尋提交按鈕 + 右側白底圓形箭頭 */
  .section-product-search .btn-mobile-search-submit {
    background-color: #0096a4;
    border: none;
    font-size: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .section-product-search .btn-mobile-search-submit:hover {
    background-color: #007d89;
  }

  .section-product-search .btn-submit-arrow {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 16px;
  }

  /* 3. 列表頂部「該当する事例」與「並び替え」改為上下兩行靠左 */
  .section-product-search .product-list-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-top: 8px;
  }

  .section-product-search .product-sort-box {
    width: auto;
  }

  .section-product-search .product-sort-box .form-select {
    min-width: 140px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 13px;
  }

  /* 4. 事例卡片手機版細節調整 */
  .section-product-search .product-img-box {
    height: 190px !important;
  }

  .section-product-search .product-card-body {
    padding: 16px !important;
  }

  .section-product-search .product-desc {
    max-width: 100%;
  }

  /* 依照設計圖，將事例卡片的標籤靠右對齊 */
  .section-product-search .product-tags {
    justify-content: flex-end !important;
    margin-bottom: 14px !important;
  }

  .section-product-search .btn-circle-arrow {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
}
  

/* ==========================================================================
   UP-Vision 品牌風格分頁導覽列 (Pagination)
   ========================================================================== */

.up-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.up-pagination ul.page-numbers li {
  margin: 0;
}

/* 頁碼按鈕基礎外觀 (白底卡片 + 淺藍灰細邊框 + 深海軍藍文字) */
.up-pagination .page-numbers:not(ul) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background-color: #ffffff;
  color: #061838;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(6, 24, 56, 0.04);
  transition: all 0.2s ease;
}

/* 滑鼠移入效果 */
.up-pagination a.page-numbers:hover {
  border-color: #0096a4;
  color: #0096a4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 150, 164, 0.15);
}

/* 當前所在頁碼 (Active 狀態：品牌青綠實心底色) */
.up-pagination .page-numbers.current {
  background-color: #0096a4;
  border-color: #0096a4;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 150, 164, 0.25);
}

/* 省略號 (...) 樣式 */
.up-pagination .page-numbers.dots {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
  min-width: 24px;
  padding: 0;
  color: #64748b;
}

/* 上一頁 / 下一頁 文字按鈕加寬內距 */
.up-pagination .prev.page-numbers,
.up-pagination .next.page-numbers {
  padding: 0 18px;
}

/* 按鈕內的青綠色圓圈箭頭 Icon */
.up-pagination .page-btn-circle {
  width: 20px;
  height: 20px;
  background-color: #0096a4;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.up-pagination a.prev.page-numbers:hover .page-btn-circle {
  transform: translateX(-2px);
  background-color: #007d89;
}

.up-pagination a.next.page-numbers:hover .page-btn-circle {
  transform: translateX(2px);
  background-color: #007d89;
}

/* 手機版響應式微調 */
@media (max-width: 767.98px) {
  .up-pagination ul.page-numbers {
    gap: 6px;
  }

  .up-pagination .page-numbers:not(ul) {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    padding: 0 10px;
  }

  .up-pagination .prev.page-numbers,
  .up-pagination .next.page-numbers {
    padding: 0 14px;
  }

}

