@media (max-width: 767px) {
  .mobile-chat-heading .elementor-heading-title {
    font-size: 2.5rem !important;
  }
}

.blog, .archive {
  background-color: #000000;
}
.blog .ast-post-grid article,
.archive .ast-post-grid article {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 20px;
}

.blog .ast-post-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}


/* 調整上一篇和下一篇的文字顏色 */
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
    color: #F7CF43; /* 調整為你想要的顏色 */
}

/* 只對單篇文章內部內容應用圓角 */
.single-post .post {
    border-radius: 20px; /* 設定圓角半徑 */
    overflow: hidden; /* 確保內容不會超出圓角 */
}

/* 👉 確保 blog 和 post 頁面 header 文字 & icon 是白色，僅在桌面版生效 */
@media (min-width: 1025px) {
    .blog .site-header a,
    .blog .ast-builder-menu .menu-item a,
    .single-post .site-header a,
    .single-post .ast-builder-menu .menu-item a,
    .single-post .ast-header-social-inner a,
    .single-post .ast-builder-social-element a,
	.page-id-2174 .site-header a,
    .page-id-2174 .ast-builder-menu .menu-item a,
    .page-id-2174 .ast-header-social-inner a,
    .page-id-2174 .ast-builder-social-element a,
		.page-id-3838 .site-header a,
    .page-id-3838 .ast-builder-menu .menu-item a,
		.page-id-3838 .ast-header-social-inner a,
		.page-id-3838 .ast-builder-social-element a{
        color: white !important; /* 設定為白色 */
        fill: white !important;
    }
}

/* 👉 確保下拉選單文字顏色不會受到其他設定影響 */
.ast-builder-menu .sub-menu .menu-item a {
    color: black !important;  /* 設定下拉選單文字顏色為黑色 */
}

/* 👉 下拉選單項目 hover 時，文字顏色變為 #1E77F2 */
.ast-builder-menu .sub-menu .menu-item a:hover {
    color: #1E77F2 !important;  /* 設定下拉選單 hover 時文字顏色為 #1E77F2 */
}

/* 👉 主選單項目 hover 時，文字變色 */
.ast-builder-menu .menu-item a:hover {
    color: #1E77F2 !important;  /* 設定為灰色或其他顏色 */
}

/* 👉 blog 和 post 頁面 header 滾動後 → 文字 & icon 變黑 */
.blog .site-header.scrolled a,
.blog .site-header.scrolled .ast-builder-menu .menu-item a,
.blog .site-header.scrolled .ast-header-social-inner a,
.blog .site-header.scrolled .ast-builder-social-element a,
.single-post .site-header.scrolled a,
.single-post .site-header.scrolled .ast-builder-menu .menu-item a,
.single-post .site-header.scrolled .ast-header-social-inner a,
.single-post .site-header.scrolled .ast-builder-social-element a,
.page-id-2174 .site-header.scrolled a,
.page-id-2174 .site-header.scrolled .ast-builder-menu .menu-item a,
.page-id-2174 .site-header.scrolled .ast-header-social-inner a,
.page-id-2174 .site-header.scrolled .ast-builder-social-element a,
.page-id-3838 .site-header.scrolled a,
.page-id-3838 .site-header.scrolled .ast-builder-menu .menu-item a,
.page-id-3838 .site-header.scrolled .ast-header-social-inner a,
.page-id-3838 .site-header.scrolled .ast-builder-social-element a{

    color: black !important;
    fill: black !important;
}


/* ✅ blog 和 post 頁面一開始 → 換成 blog logo */
.blog .ast-site-identity img,
.single-post .ast-site-identity img,
.page-id-2174 .ast-site-identity img,
.page-id-3838 .ast-site-identity img{
    content: url('https://befriend.cc/wp-content/uploads/2025/05/Img_logo_dark.png');
}

/* ✅ blog 和 post 頁面 header 滾動後 → 換回原本 logo */
.blog .site-header.scrolled .ast-site-identity img,
.single-post .site-header.scrolled .ast-site-identity img,
.page-id-2174 .site-header.scrolled .ast-site-identity img,
.page-id-3838 .site-header.scrolled .ast-site-identity img{
    content: url('https://befriend.cc/wp-content/uploads/2025/04/Img_logo.webp');
}

/* 👉 如果有登入 WordPress 後台，避免 admin bar 擋到 header */
.admin-bar .site-header {
    top: 32px !important; /* WordPress admin bar 高度 */
}


/* 👉 頁首 header 預設狀態：背景透明、設定過渡動畫 */
.site-header {
    background-color: transparent;
    transition: background-color 0.6s ease;
}

/* 👉 滾動後 header 狀態：加上背景顏色*/
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 1.00); /* 可改成其他顏色 */
}

/* 👉 調整 menu-toggle 按鈕 */
.ast-menu-toggle {
    top: 15px !important;      
    right: 20px ;
    box-shadow: none !important; 
}


/* 首頁的文章高度解決 */
.eael-grid-post-holder {
	position: relative;
}

.eael-grid-post-holder .eael-entry-content {
	height: 20px;
}

.eael-grid-post-holder .eael-grid-post-excerpt {
 	position: absolute;
	bottom: 15px;
	right: 15px;
}

/* 文章內頁的相關文章 Tag 跑版解決 */
.ast-related-cat-style--badge .cat-links > a, .ast-related-tag-style--badge .tags-links > a {
	white-space: nowrap;
	display: inline-block;
  margin-bottom:4px
}

/* 文章內頁的首圖圓角 */
.post-thumb img{
	border-radius: 20px;
}

/* 文章內頁的文章對首圖的margin-top */
.ast-separate-container .ast-article-single {
	margin-top: px;
}

@media (max-width: 768px) {
  .e--n-tabs-heading {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    scrollbar-width: thin;
  }

  .e--n-tab-title {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 14px;
    padding: 6px 10px;
  }
}
/* --- Nuclear: hide all Previous/Next variants across Astra, Core, Gutenberg --- */
/* Containers themselves */
.nav-links .nav-previous,
.nav-links .nav-next,
.navigation .nav-previous,
.navigation .nav-next,
.navigation.pagination .nav-links .nav-previous,
.navigation.pagination .nav-links .nav-next,
.ast-pagination .prev,
.ast-pagination .next,
.pagination .prev,
.pagination .next,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
  display: none !important;
}
/* Any children inside those containers (anchors, spans, icons) */
.nav-links .nav-previous *,
.nav-links .nav-next *,
.navigation .nav-previous *,
.navigation .nav-next *,
.navigation.pagination .nav-links .nav-previous *,
.navigation.pagination .nav-links .nav-next *,
.ast-pagination .prev *,
.ast-pagination .next *,
.pagination .prev *,
.pagination .next *,
.wp-block-query-pagination-previous *,
.wp-block-query-pagination-next * {
  display: none !important;
}
/* Attribute fallbacks (some themes use rel/aria-label) */
.nav-links a[rel="prev"],
.navigation a[rel="prev"],
.nav-links a[aria-label*="Older"],
.navigation a[aria-label*="Older"],
.nav-links a[aria-label*="上一頁"],
.nav-links a[aria-label*="較舊"],
.nav-links a.prev,
.nav-links a.previous,
.ast-pagination a.prev,
.ast-pagination a.next {
  display: none !important;
}

/* --- Center & style numeric pagination (Astra / PageNavi / Query Loop) --- */
.wp-pagenavi,
.ast-pagination,
.wp-block-query-pagination-numbers {
  text-align: center;
  margin: 24px 0 40px;
}

.ast-pagination .page-numbers,
.wp-block-query-pagination-numbers .page-numbers,
.wp-pagenavi a, .wp-pagenavi span,
.page-numbers, .page-numbers a, .page-numbers li a, .page-numbers li span {
  display: inline-block;
  min-width: 36px;
  padding: 10px 12px;
  margin: 0 4px;
  border: 1px solid #ddd !important;
  border-radius: 6px;
  background: #fff !important;
  color: #111 !important;
  text-decoration: none !important;
  line-height: 1.2;
}

.ast-pagination .page-numbers.current,
.wp-block-query-pagination-numbers .page-numbers.current,
.wp-pagenavi span.current,
.page-numbers .current {
  background: #111 !important;
  color: #fff !important;
  font-weight: 700;
}

.ast-pagination .page-numbers:hover,
.wp-block-query-pagination-numbers .page-numbers:hover,
.wp-pagenavi a:hover,
.page-numbers a:hover {
  background: #555 !important;
  color: #fff !important;
}
.wp-block-query-pagination-previous { outline: 3px solid red !important; }
/* === FR 頁面 header 白字設定 === */
@media (min-width: 1025px) {
  /* 頂層白色：主選單＋社群 icon＋當前語言按鈕 */
  .page-id-4121 .main-header-menu > .menu-item > a,
  .page-id-4121 .ast-header-social-inner a,
  .page-id-4121 .wpml-ls-current-language > a {
    color: #fff !important;
    fill: #fff !important;
  }
}

/* 滾動後 → 黑色 */
.page-id-4121 .site-header.scrolled .main-header-menu > .menu-item > a,
.page-id-4121 .site-header.scrolled .ast-header-social-inner a,
.page-id-4121 .site-header.scrolled .wpml-ls-current-language > a {
  color: #000 !important;
  fill: #000 !important;
}

/* Logo 置換 */
.page-id-4121 .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/05/Img_logo_dark.png');
}
.page-id-4121 .site-header.scrolled .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/04/Img_logo.webp');
}

/* 下拉選單保持黑字白底，不被頂層樣式干擾 */
.site-header .main-header-menu .sub-menu,
.site-header .wpml-ls-sub-menu {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 8px;
  z-index: 10000;
}

.site-header .main-header-menu .sub-menu a,
.site-header .wpml-ls-sub-menu a {
  color: #111 !important;
}

.site-header .main-header-menu .sub-menu a:hover,
.site-header .wpml-ls-sub-menu a:hover {
  color: #1E77F2 !important;
}
/* === DE 頁面 header 白字設定 === */
@media (min-width: 1025px) {
  /* 頂層白色：主選單＋社群 icon＋當前語言按鈕 */
  .page-id-4140 .main-header-menu > .menu-item > a,
  .page-id-4140 .ast-header-social-inner a,
  .page-id-4140 .wpml-ls-current-language > a {
    color: #fff !important;
    fill: #fff !important;
  }
}

/* 滾動後 → 黑色 */
.page-id-4140 .site-header.scrolled .main-header-menu > .menu-item > a,
.page-id-4140 .site-header.scrolled .ast-header-social-inner a,
.page-id-4140 .site-header.scrolled .wpml-ls-current-language > a {
  color: #000 !important;
  fill: #000 !important;
}

/* Logo 置換 */
.page-id-4140 .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/05/Img_logo_dark.png');
}
.page-id-4140 .site-header.scrolled .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/04/Img_logo.webp');
}

/* 下拉選單保持黑字白底，不被頂層樣式干擾 */
.site-header .main-header-menu .sub-menu,
.site-header .wpml-ls-sub-menu {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 8px;
  z-index: 10000;
}

.site-header .main-header-menu .sub-menu a,
.site-header .wpml-ls-sub-menu a {
  color: #111 !important;
}

.site-header .main-header-menu .sub-menu a:hover,
.site-header .wpml-ls-sub-menu a:hover {
  color: #1E77F2 !important;
}
/* === PT 頁面 header 白字設定 === */
@media (min-width: 1025px) {
  /* 頂層白色：主選單＋社群 icon＋當前語言按鈕 */
  .page-id-4147 .main-header-menu > .menu-item > a,
  .page-id-4147 .ast-header-social-inner a,
  .page-id-4147 .wpml-ls-current-language > a {
    color: #fff !important;
    fill: #fff !important;
  }
}

/* 滾動後 → 黑色 */
.page-id-4147 .site-header.scrolled .main-header-menu > .menu-item > a,
.page-id-4147 .site-header.scrolled .ast-header-social-inner a,
.page-id-4147 .site-header.scrolled .wpml-ls-current-language > a {
  color: #000 !important;
  fill: #000 !important;
}

/* Logo 置換 */
.page-id-4147 .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/05/Img_logo_dark.png');
}
.page-id-4147 .site-header.scrolled .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/04/Img_logo.webp');
}

/* 下拉選單保持黑字白底，不被頂層樣式干擾 */
.site-header .main-header-menu .sub-menu,
.site-header .wpml-ls-sub-menu {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 8px;
  z-index: 10000;
}

.site-header .main-header-menu .sub-menu a,
.site-header .wpml-ls-sub-menu a {
  color: #111 !important;
}

.site-header .main-header-menu .sub-menu a:hover,
.site-header .wpml-ls-sub-menu a:hover {
  color: #1E77F2 !important;
}
/* === ES 頁面 header 白字設定 === */
@media (min-width: 1025px) {
  /* 頂層白色：主選單＋社群 icon＋當前語言按鈕 */
  .page-id-4145 .main-header-menu > .menu-item > a,
  .page-id-4145 .ast-header-social-inner a,
  .page-id-4145 .wpml-ls-current-language > a {
    color: #fff !important;
    fill: #fff !important;
  }
}

/* 滾動後 → 黑色 */
.page-id-4145 .site-header.scrolled .main-header-menu > .menu-item > a,
.page-id-4145 .site-header.scrolled .ast-header-social-inner a,
.page-id-4145 .site-header.scrolled .wpml-ls-current-language > a {
  color: #000 !important;
  fill: #000 !important;
}

/* Logo 置換 */
.page-id-4145 .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/05/Img_logo_dark.png');
}
.page-id-4145 .site-header.scrolled .ast-site-identity img {
  content: url('https://befriend.cc/wp-content/uploads/2025/04/Img_logo.webp');
}

/* 下拉選單保持黑字白底，不被頂層樣式干擾 */
.site-header .main-header-menu .sub-menu,
.site-header .wpml-ls-sub-menu {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 8px;
  z-index: 10000;
}

.site-header .main-header-menu .sub-menu a,
.site-header .wpml-ls-sub-menu a {
  color: #111 !important;
}

.site-header .main-header-menu .sub-menu a:hover,
.site-header .wpml-ls-sub-menu a:hover {
  color: #1E77F2 !important;
}

/* =========================================
   Befriend 聖誕雪花特效 (純 CSS 版)
   ========================================= */

/* 設定雪花層，利用 body 的偽元素來製作，不需要額外 HTML */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* 讓滑鼠點擊穿透，不擋功能 */
  z-index: 999999; /* 確保在最上層 */
  background-repeat: repeat;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

/* 第一層雪花：小顆、較密、飄得快 */
body::before {
  background-image: 
    radial-gradient(2px 2px at 15% 15%, rgba(200, 200, 200, 0.9) 50%, transparent),
    radial-gradient(2px 2px at 35% 45%, rgba(200, 200, 200, 0.8) 50%, transparent),
    radial-gradient(2px 2px at 55% 25%, rgba(200, 200, 200, 0.9) 50%, transparent),
    radial-gradient(2px 2px at 85% 65%, rgba(200, 200, 200, 0.8) 50%, transparent);
  background-size: 350px 350px;
  animation-name: snowFallBefore;
  animation-duration: 10s;
}

/* 第二層雪花：大顆、較稀疏、飄得慢 (製造景深) */
body::after {
  background-image: 
    radial-gradient(3px 3px at 20% 30%, rgba(200, 200, 200, 0.9) 50%, transparent),
    radial-gradient(4px 4px at 60% 70%, rgba(200, 200, 200, 0.9) 50%, transparent),
    radial-gradient(3px 3px at 90% 40%, rgba(200, 200, 200, 0.8) 50%, transparent);
  background-size: 500px 500px;
  animation-name: snowFallAfter;
  animation-duration: 15s;
}

/* 定義飄落動畫 */
@keyframes snowFallBefore {
  0% { background-position: 0 0; }
  100% { background-position: 50px 350px; }
}

@keyframes snowFallAfter {
  0% { background-position: 0 0; }
  100% { background-position: 50px 500px; }
}

/* 手機版優化：隱藏大顆雪花，避免擋字 */
@media (max-width: 768px) {
  body::after { display: none; }
}