/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.2
 Text Domain:  bricks
*/

/* ================================
   文章內頁表格樣式
   ================================ */
.brxe-post-content .wp-block-table {
  margin-bottom: 32px;
}

.brxe-post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
}

/* 表頭 */
.brxe-post-content table thead tr {
  background: #111827;
}
.brxe-post-content table thead th {
  color: #fff;
  font-weight: 600;
  padding: 14px 20px;
  text-align: left;
  font-size: 14px;
  letter-spacing: 0.3px;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.brxe-post-content table thead th:last-child {
  border-right: none;
}

/* 表格本體 */
.brxe-post-content table tbody tr {
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.2s ease;
}
.brxe-post-content table tbody tr:last-child {
  border-bottom: none;
}
.brxe-post-content table tbody tr:nth-child(even) {
  background: #F9FAFB;
}
.brxe-post-content table tbody tr:hover {
  background: #EFF6FF;
}
.brxe-post-content table tbody td {
  padding: 14px 20px;
  color: #374151;
  vertical-align: middle;
  border-right: 1px solid #F3F4F6;
  line-height: 1.6;
}
.brxe-post-content table tbody td:last-child {
  border-right: none;
}

/* ================================
   文章內頁引言樣式
   ================================ */
.brxe-post-content blockquote {
  position: relative;
  margin: 32px 0;
  padding: 24px 28px 24px 36px;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  color: #1E293B;
  line-height: 1.8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* 左側裝飾線 */
.brxe-post-content blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: linear-gradient(180deg, #03A9F4, #0284C7);
  border-radius: 0 4px 4px 0;
}

/* 上引號 */
.brxe-post-content blockquote::after {
  content: '\201C';
  position: absolute;
  top: -4px;
  left: 14px;
  font-size: 40px;
  line-height: 1;
  color: #7DD3FC;
  font-family: Georgia, serif;
  font-weight: 700;
  opacity: 0.6;
}

.brxe-post-content blockquote p {
  margin: 0;
  position: relative;
  z-index: 1;
}

.brxe-post-content blockquote p + p {
  margin-top: 12px;
}

/* 引言中的引用來源 */
.brxe-post-content blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  color: #64748B;
}
.brxe-post-content blockquote cite::before {
  content: '\2014 \00a0';
}

/* ================================
   手機版
   ================================ */
@media (max-width: 768px) {
  .brxe-post-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 8px;
  }
  .brxe-post-content table thead th,
  .brxe-post-content table tbody td {
    padding: 10px 14px;
    font-size: 13px;
  }
  .brxe-post-content blockquote {
    padding: 20px 20px 20px 28px;
    font-size: 15px;
  }
  .brxe-post-content blockquote::after {
    left: 10px;
    font-size: 32px;
  }
}
/* ================================
   文章內頁標題大小
   ================================ */
.brxe-post-content h1 {
  font-size: clamp(26px, 5vw, 36px);
}
.brxe-post-content h2 {
  font-size: clamp(22px, 4vw, 30px);
}
.brxe-post-content h3 {
  font-size: clamp(18px, 3vw, 24px);
}
/* ================================
   文章內頁行距調整
   ================================ */
.brxe-post-content {
  line-height: 1.9;
}
.brxe-post-content p {
  line-height: 1.9;
  margin-bottom: 1.2em;
}

/* 標題與段落距離 */
.brxe-post-content h2 {
  margin-top: 2em;
  margin-bottom: 0.8em;
}
.brxe-post-content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}
/* ================================
   文章內頁文字顏色統一
   ================================ */
.brxe-post-content {
  color: #111827;
}
.brxe-post-content h1,
.brxe-post-content h2,
.brxe-post-content h3,
.brxe-post-content h4,
.brxe-post-content h5,
.brxe-post-content h6 {
  color: #111827;
}
.brxe-post-content table th {
  color: #fff;
}

/* ================================
   首頁進場動畫
   ================================ */

/* 預設狀態 - 全部正常顯示 */
.brxe-section {
  opacity: 1;
  transform: none;
}

/* 當 JS 加上 .aos-init 後才進入動畫準備狀態 */
.brxe-section.aos-init {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* 進場狀態 */
.brxe-section.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* 第一個區塊不要動畫 */
.brxe-section.aos-init:first-of-type {
  opacity: 1;
  transform: none;
  transition: none;
}
/* ================================
   全站圖片 Hover 效果（排除頁首+頁尾 Logo）
   ================================ */
.brxe-image:not(.bricks-site-logo) {
  overflow: hidden;
}
.brxe-image:not(.bricks-site-logo) img {
  transition: transform 0.4s ease, filter 0.4s ease;
}
.brxe-image:not(.bricks-site-logo):hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* 排除頁首頁尾的 Logo */
header .brxe-image:hover img,
footer .brxe-image:hover img {
  transform: none !important;
  filter: none !important;
}
header .brxe-image,
footer .brxe-image {
  overflow: visible;
}

/* ================================
   完整服務總覽 - 卡片 Hover
   (邊框發光 + 圖標強化 + 標題變色)
   ================================ */
.c-svc-mosaic__item {
  transition: box-shadow 0.3s ease;
}
.c-svc-mosaic__item:hover {
  box-shadow: 0 0 0 1px rgba(3,169,244,0.3), 0 8px 24px rgba(0,0,0,0.12);
}



/* ================================
   全站按鈕 Hover 效果
   ================================ */

/* 所有按鈕通用 */
.brxe-button {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  z-index: 0;
}

.brxe-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

/* ─── 類型1：實心按鈕 → 流光效果 ─── */
.brxe-button:not(.c-hero-v1__btn--secondary):not(.c-abt-dtl__action-w):not(.c-knw-grid__link-w)::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.brxe-button:not(.c-hero-v1__btn--secondary):not(.c-abt-dtl__action-w):not(.c-knw-grid__link-w):hover::after {
  left: 125%;
}

/* ─── 類型2：外框按鈕 → 邊框發光 ─── */
.brxe-button.c-hero-v1__btn--secondary {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.brxe-button.c-hero-v1__btn--secondary:hover {
  box-shadow: 0 0 12px rgba(3,169,244,0.4), 0 0 28px rgba(3,169,244,0.15), 0 8px 24px rgba(0,0,0,0.12);
  border-color: #03A9F4;
}

/* ─── 類型3：文字+箭頭按鈕 → 箭頭滑動 ─── */
.brxe-button.c-abt-dtl__action-w,
.brxe-button.c-knw-grid__link-w {
  overflow: visible;
  box-shadow: none !important;
  transform: none !important;
}
.brxe-button.c-abt-dtl__action-w:hover,
.brxe-button.c-knw-grid__link-w:hover {
  box-shadow: none !important;
  transform: none !important;
}
/* ================================
   服務卡片 Hover 效果
   （微縮放 + 發光 + 標題 + 副標題 + 圖標）
   ================================ */

/* 卡片：微縮放 + 邊框發光 + 深陰影 */
.c-svc-mosaic__item {
  background-position: center center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.c-svc-mosaic__item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 0 1px rgba(3,169,244,0.3), 0 12px 36px rgba(0,0,0,0.16);
}

/* 標題：變藍 */
.c-svc-mosaic__item .c-svc-mosaic__card-ttl {
  transition: color 0.3s ease;
}
.c-svc-mosaic__item:hover .c-svc-mosaic__card-ttl {
  color: #03A9F4;
}

/* 副標題：變淺藍，增添層次 */
.c-svc-mosaic__item .c-svc-mosaic__card-ttl-1 {
  transition: color 0.3s ease;
}
.c-svc-mosaic__item:hover .c-svc-mosaic__card-ttl-1 {
  color: #81D4FA;
}

/* 圖標強化：背景加深 + 圖案變白 */
.c-svc-mosaic__item .c-svc-mosaic__icn rect {
  transition: fill 0.3s ease, fill-opacity 0.3s ease;
}
.c-svc-mosaic__item:hover .c-svc-mosaic__icn rect {
  fill: #03A9F4;
  fill-opacity: 0.35;
}
.c-svc-mosaic__item .c-svc-mosaic__icn path {
  transition: stroke 0.3s ease;
}
.c-svc-mosaic__item:hover .c-svc-mosaic__icn path {
  stroke: #FFFFFF;
}

/* 客戶好評卡片背景 */
.c-rvw-sec__card {
  transition: background-size 0.4s ease !important;
}
.c-rvw-sec__card:hover {
  background-size: 105% !important;
}

/* ================================
   服務特色卡片 Hover
   ================================ */
.c-svc-feat__item--lg {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.c-svc-feat__item--lg:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
/* 主打服務卡片 Hover - 圖片縮放 + 濾鏡關閉 + 標題變色 */
.c-svc-feat__item--lg .c-svc-core__img::before {
  transition: opacity 0.4s ease;
}
.c-svc-feat__item--lg:hover .c-svc-core__img::before {
  opacity: 0 !important;
}
.c-svc-feat__item--lg:hover .c-svc-core__img img {
  transform: scale(1.05);
}
.c-svc-feat__item--lg .c-svc-core__ttl {
  transition: color 0.3s ease;
}
.c-svc-feat__item--lg:hover .c-svc-core__ttl {
  color: #03A9F4;
}

/* ================================
   知識文章卡片 Hover（全站通用）
   ================================ */
.bricks-layout-inner {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.bricks-layout-inner:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ================================
   精選文章區塊 Hover（部落格頁/分類頁）
   - 圖片微幅放大 + 標題變色
   - 內層 bricks-layout-inner 不重複通用效果
   ================================ */
.c-feat-post__side-l .bricks-layout-inner {
  transition: none !important;
  transform: none !important;
}
.c-feat-post__side-l .bricks-layout-inner:hover {
  transform: none !important;
  box-shadow: none !important;
}

.c-feat-post__side-l .image-wrapper img {
  transition: transform 0.4s ease;
}
.c-feat-post__side-l:hover .image-wrapper img {
  transform: scale(1.05);
}

.c-feat-post__side-l .content-wrapper h3.dynamic[data-field-id="36153f"] {
  transition: color 0.3s ease;
}
.c-feat-post__side-l:hover .content-wrapper h3.dynamic[data-field-id="36153f"] {
  color: #03A9F4;
}
/* CacheBuster: 1784179595193 */

/* ================================   文章分類徽章 Hover
   ================================ */
.c-post-item__badge.brxe-text-basic {
  color: #ffffff !important;
}
/* ================================
   部落格頁一般文章卡片 Hover
   ================================ */
.c-art-archive__grid .c-post-item__l-wrap {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.c-art-archive__grid .c-post-item__l-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.c-art-archive__grid .c-post-item__l-wrap .c-post-item__img img {
  transition: transform 0.4s ease;
}
.c-art-archive__grid .c-post-item__l-wrap:hover .c-post-item__img img {
  transform: scale(1.05);
}
.c-art-archive__grid .c-post-item__l-wrap .c-post-item__ttl {
  transition: color 0.3s ease;
}
.c-art-archive__grid .c-post-item__l-wrap:hover .c-post-item__ttl {
  color: #03A9F4;
}
/* ================================
   文章內頁 / 分類頁 / 首頁 文章卡片 Hover
   ================================ */
.bricks-layout-inner .image-wrapper img {
  transition: transform 0.4s ease;
}
.bricks-layout-inner:hover .image-wrapper img {
  transform: scale(1.05);
}
.bricks-layout-inner .content-wrapper h3.dynamic[data-field-id="36153f"] {
  transition: color 0.3s ease;
}
.bricks-layout-inner:hover .content-wrapper h3.dynamic[data-field-id="36153f"] {
  color: #03A9F4;
}