/* Bfolio 之上：Markdown 與小區塊微調（不覆蓋主題主結構） */
.markdown-theme-block,
.markdown-body {
  font-size: 1.05rem;
  line-height: 1.75;
}

.markdown-theme-block h1,
.markdown-body h1,
.markdown-theme-block h2,
.markdown-body h2,
.markdown-theme-block h3,
.markdown-body h3 {
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.markdown-theme-block h1:first-child,
.markdown-body h1:first-child,
.markdown-theme-block h2:first-child,
.markdown-body h2:first-child {
  margin-top: 0;
}

.markdown-theme-block table,
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown-theme-block th,
.markdown-body th,
.markdown-theme-block td,
.markdown-body td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.markdown-theme-block code,
.markdown-body code {
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.markdown-theme-block pre,
.markdown-body pre {
  overflow: auto;
  padding: 1rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
}

.tp-service-item a {
  text-decoration: none;
  color: inherit;
}

.tp-service-item a:hover {
  color: var(--tp-theme-primary, #5b6cff);
}

/* portfolio-light 縮圖佔位（精簡主題目錄無 img/portfolio/*.jpg） */
.case-portfolio-thumb-placeholder {
  aspect-ratio: 4 / 3;
  min-height: 220px;
  background: linear-gradient(135deg, #e4e6ec 0%, #f5f5f5 45%, #dcdfe8 100%);
  border-radius: 4px;
}

/* contact-us-light 裝飾區（無 assets/img/update/contact/shape.png 時） */
.bf-contact-us-shape--fallback {
  width: min(280px, 100%);
  height: 120px;
  margin-top: 1rem;
  border-radius: 50% 40% 60% 35%;
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.12), rgba(0, 0, 0, 0.04));
}

.bf-contact-map-fallback {
  min-height: 360px;
  background: #eceef2;
}

.bf-contact-map-box iframe {
  width: 100%;
  min-height: 360px;
  display: block;
}

/* 案例內頁 blog-details 橫幅（無 hero 圖時） */
.postbox-title.fs-80 {
  font-size: clamp(1.75rem, 4vw, 4.5rem);
  line-height: 1.15;
}

.case-detail-banner-placeholder {
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 200px;
  max-height: 420px;
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.2) 0%, rgba(0, 0, 0, 0.06) 50%, rgba(91, 108, 255, 0.12) 100%);
  border-radius: 4px;
}

/*
 * main.css 之 .bf-header-white：未 sticky 為白字（假設疊暗色全幅 hero）。
 * 本站 light 首屏多為淺底，未捲動前須與 .header-sticky 相同為深色字／深色 logo，否則看似「消失」。
 */
.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-logo .logo-white,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-logo .logo-white {
  display: none !important;
}

.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-logo .logo-dark,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-logo .logo-dark {
  display: block !important;
}

.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-main-menu nav > ul > li > a,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-main-menu nav > ul > li > a {
  color: var(--tp-common-black, #0a0a0a);
}

.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-main-menu nav > ul > li:hover > a,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-main-menu nav > ul > li:hover > a {
  color: var(--tp-grey-1, #5d5d66);
}

.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-search,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-search {
  color: var(--tp-common-black, #0a0a0a);
}

.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-menu-btn,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-menu-btn {
  background: var(--tp-common-black, #0a0a0a);
}

.bfolio-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-menu-btn span,
.your-tom-light #header-sticky.bf-header-white:not(.header-sticky) .tp-header-menu-btn span {
  background: var(--tp-common-white, #fff);
}

/* 頁首導覽：xl 以上單行、避免約 1440px 斷行（與 base 之 site-header-* 搭配） */
@media (min-width: 1200px) {
  .site-header-bar .site-header-nav .tp-mobile-menu-active > ul {
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    gap: 0;
  }

  .site-header-bar .site-header-nav .tp-mobile-menu-active > ul > li > a {
    white-space: nowrap;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.875rem;
  }
}


/* Flash messages: ensure visible above sticky header */
.site-flash-messages {
  position: fixed;
  top: 0.75rem;
  left: 0;
  right: 0;
  z-index: 20000;
  pointer-events: none;
}

.site-flash-messages .alert {
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border-radius: 10px;
}
