/* Force footer to show */
#footer { display: block !important; visibility: visible !important; opacity: 1 !important; }
.site-footer { display: block !important; visibility: visible !important; opacity: 1 !important; }
/* 將黑色TOP STORIES標題背景改為深藍色 */
.block-head[data-style="dark-bg"] .block-title, 
/* 將所有黑色背景區块標題改為深藍色 */
.block-head .block-title,
.block-title[style*="background"],
.heading-line.style-dark,
.dark-bg {
    background-color: #1e5a8e !important;
}.block-head .block-title {
    background-color: #1e5a8e !important;
}    background-color: #1e5a8e !important;
}

/* 將頂部黑色背景區域改為深藍色 */
.top-bar {
    background-color: #1a3a52 !important;
}

/* Hide footer social icons with dead links */
.elementor-widget-social-icons a[href="/#"] {
  display: none !important;
}

/* ===== HOMEPAGE REDESIGN V2 ===== */

/* Hide news ticker/carousel on homepage */
.home .elementor-element > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-element:first-child .small-list-block {
  display: none !important;
}

/* Style the main navigation with better spacing */
.navigation .menu > li > a {
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
}

/* Highlight the first nav item (獨家優惠) */
.navigation .menu > li:first-child > a {
  color: #e74c3c !important;
  font-weight: 700 !important;
}

/* Hide news ticker on homepage - target the first section with carousel */
.home .elementor-section:first-child .elementor-widget-smartmag-carousel,
.home .elementor-section:first-child .small-list-block {
  display: none !important;
}

/* Style 獨家優惠 as a button */
#menu-item-6609 > a {
  background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
  color: #fff !important;
  padding: 6px 16px !important;
  border-radius: 5px !important;
  font-weight: 700 !important;
}
#menu-item-6609 > a:hover {
  background: linear-gradient(135deg, #c0392b, #a93226) !important;
}

/* Ensure footer is visible */
#footer, .site-footer, footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hide TradingView widgets on homepage */
.home .elementor-widget-html iframe[src*="tradingview"],
.home iframe[src*="tradingview"],
.home .tradingview-widget-container {
  display: none !important;
}

/* Hide the TradingView section heading */
.home .elementor-element h2:has(+ .tradingview-widget-container) {
  display: none !important;
}

/* ===== CHRIS HERO SECTION STYLES ===== */
.chris-hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2f4a 50%, #0d1b2a 100%);
  padding: 60px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.chris-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(228,116,60,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.hero-text h1 {
  font-size: 2.4em;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
}
.hero-text h1 span {
  display: block;
  font-size: 0.55em;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
  letter-spacing: 0.02em;
}
.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1em;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 620px;
}
.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.stat {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 18px 24px;
  min-width: 140px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.stat-num {
  font-size: 1.8em;
  font-weight: 800;
  color: #e4743c;
  display: block;
  line-height: 1;
}
.stat-label {
  font-size: 0.78em;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  display: block;
}
.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, #e4743c, #c0392b);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1em;
  text-decoration: none;
  transition: all 0.3s;
  letter-spacing: 0.03em;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(228,116,60,0.4);
}
.hero-right {
  margin-top: 32px;
}
.hero-quote {
  background: rgba(255,255,255,0.05);
  border-left: 3px solid #e4743c;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  font-size: 0.95em;
  line-height: 1.7;
}
.hero-quote cite {
  display: block;
  margin-top: 8px;
  font-size: 0.85em;
  color: #e4743c;
  font-style: normal;
  font-weight: 600;
}
@media (max-width: 768px) {
  .chris-hero { padding: 40px 20px; }
  .hero-text h1 { font-size: 1.8em; }
  .hero-stats { gap: 12px; }
  .stat { min-width: 110px; padding: 14px 16px; }
}

/* ===== V2 MENU REDESIGN ===== */

/* Header background - dark gradient */
.site-header,
.header-inner,
#masthead {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 100%) !important;
  border-bottom: 1px solid rgba(99,102,241,0.2) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3) !important;
}

/* Logo area */
.site-branding .site-title a,
.site-branding .site-title {
  color: #ffffff !important;
}
.site-branding .site-description {
  color: rgba(255,255,255,0.6) !important;
}

/* Main nav links */
.navigation .menu > li > a,
.main-navigation .menu > li > a,
.nav-menu > li > a {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  letter-spacing: 0.3px !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  transition: all 0.2s !important;
}
.navigation .menu > li > a:hover,
.main-navigation .menu > li > a:hover,
.nav-menu > li > a:hover {
  color: #a5b4fc !important;
  background: rgba(99,102,241,0.15) !important;
}

/* Active/current nav item */
.navigation .menu > li.current-menu-item > a,
.navigation .menu > li.current_page_item > a,
.main-navigation .menu > li.current-menu-item > a {
  color: #a5b4fc !important;
  background: rgba(99,102,241,0.2) !important;
}

/* 獨家優惠 highlight button */
.navigation .menu > li:first-child > a,
.main-navigation .menu > li:first-child > a {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
}
.navigation .menu > li:first-child > a:hover,
.main-navigation .menu > li:first-child > a:hover {
  opacity: 0.85 !important;
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
}

/* Dropdown submenu */
.navigation .menu .sub-menu,
.main-navigation .menu .sub-menu,
.nav-menu .sub-menu {
  background: #1a1a3e !important;
  border: 1px solid rgba(99,102,241,0.25) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  padding: 8px !important;
  min-width: 180px !important;
}
.navigation .menu .sub-menu li a,
.main-navigation .menu .sub-menu li a,
.nav-menu .sub-menu li a {
  color: rgba(255,255,255,0.8) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  transition: all 0.2s !important;
}
.navigation .menu .sub-menu li a:hover,
.main-navigation .menu .sub-menu li a:hover {
  background: rgba(99,102,241,0.2) !important;
  color: #a5b4fc !important;
}

/* Subscribe/CTA button in header */
.header-btn,
.btn-cta-header,
.subscribe-btn {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  border: none !important;
}

/* Top bar */
.top-bar {
  background: #0a0a1a !important;
  border-bottom: 1px solid rgba(99,102,241,0.15) !important;
}
.top-bar a {
  color: rgba(255,255,255,0.6) !important;
}
.top-bar a:hover {
  color: #a5b4fc !important;
}

/* ===== V2 FEATURED SECTIONS ===== */

/* 推薦專題 cards redesign */
.featured-section-card,
.featured-box,
.block-type-featured {
  background: linear-gradient(135deg, #1a1a3e, #0d1b2a) !important;
  border: 1px solid rgba(99,102,241,0.2) !important;
  border-radius: 14px !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.featured-section-card:hover,
.featured-box:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 40px rgba(99,102,241,0.2) !important;
  border-color: rgba(99,102,241,0.5) !important;
}

/* Section headings */
.block-head,
.section-title,
.cat-heading {
  border-left: 3px solid #6366f1 !important;
  padding-left: 12px !important;
}

/* Post card redesign */
.post-item,
.article-item,
.small-post {
  border-radius: 10px !important;
  overflow: hidden !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.post-item:hover,
.article-item:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

/* Category tags */
.cat-label,
.category-tag,
.term-badge {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

/* ===== V2 FOOTER ===== */
.site-footer,
#colophon {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 100%) !important;
  border-top: 1px solid rgba(99,102,241,0.2) !important;
  color: rgba(255,255,255,0.7) !important;
}
.site-footer a,
#colophon a {
  color: rgba(255,255,255,0.7) !important;
}
.site-footer a:hover,
#colophon a:hover {
  color: #a5b4fc !important;
}
.site-footer .widget-title,
#colophon .widget-title {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ===== V2 MEGA MENU DROPDOWN ===== */

/* Menu bar dark background */
#mega-menu-wrap-main-navigation {
  background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 100%) !important;
  border-bottom: 2px solid rgba(108,59,255,0.4) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5) !important;
}

/* Top-level menu item links */
#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > a.mega-menu-link {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 0 14px !important;
  height: 55px !important;
  line-height: 55px !important;
  letter-spacing: 0.3px !important;
  transition: all 0.2s ease !important;
  border-bottom: 3px solid transparent !important;
}

/* Top-level hover & active */
#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > a.mega-menu-link:hover,
#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-current-menu-item > a.mega-menu-link,
#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item-has-children.mega-toggle-on > a.mega-menu-link {
  color: #ffffff !important;
  background: rgba(108,59,255,0.15) !important;
  border-bottom: 3px solid #6c3bff !important;
}

/* 獨家優惠 special highlight button style */
#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item:first-child > a.mega-menu-link {
  background: linear-gradient(135deg, #6c3bff, #a855f7) !important;
  border-radius: 6px !important;
  margin: 12px 8px !important;
  padding: 0 14px !important;
  height: 31px !important;
  line-height: 31px !important;
  font-size: 13px !important;
  border-bottom: none !important;
}

#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item:first-child > a.mega-menu-link:hover {
  background: linear-gradient(135deg, #5a2fd4, #9333ea) !important;
  border-bottom: none !important;
  transform: translateY(-1px) !important;
}

/* Dropdown arrow color */
#mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > a.mega-menu-link .mega-indicator {
  color: rgba(255,255,255,0.6) !important;
}

/* Dropdown sub-menu panel */
#mega-menu-wrap-main-navigation .mega-sub-menu {
  background: #12122a !important;
  border: 1px solid rgba(108,59,255,0.3) !important;
  border-top: 2px solid #6c3bff !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7) !important;
  border-radius: 0 0 10px 10px !important;
  min-width: 180px !important;
  padding: 8px 0 !important;
}

/* Sub-menu items */
#mega-menu-wrap-main-navigation .mega-sub-menu li.mega-menu-item > a.mega-menu-link {
  color: #cccccc !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 10px 22px !important;
  display: block !important;
  border-bottom: none !important;
  transition: all 0.2s ease !important;
  border-left: 3px solid transparent !important;
}

/* Sub-menu item hover */
#mega-menu-wrap-main-navigation .mega-sub-menu li.mega-menu-item > a.mega-menu-link:hover {
  color: #ffffff !important;
  background: rgba(108,59,255,0.2) !important;
  border-left: 3px solid #6c3bff !important;
  padding-left: 26px !important;
}

/* Mobile menu toggle button */
#mega-menu-wrap-main-navigation .mega-menu-toggle {
  background: #0d0d1a !important;
  color: #ffffff !important;
  border: 1px solid rgba(108,59,255,0.4) !important;
}

/* Mobile menu toggle icon */
#mega-menu-wrap-main-navigation .mega-menu-toggle .mega-toggle-block .mega-toggle-animated-box {
  background: #ffffff !important;
}

/* ===== V2 MEGA MENU FIXES - STRONGER SELECTORS ===== */

/* Force dropdown panel dark background */
body #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > ul.mega-sub-menu,
body div#mega-menu-wrap-main-navigation ul#mega-menu-main-navigation > li > ul.mega-sub-menu,
body .mega-menu-wrap .mega-sub-menu {
  background: #12122a !important;
  border: 1px solid rgba(108,59,255,0.3) !important;
  border-top: 3px solid #6c3bff !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7) !important;
  border-radius: 0 0 10px 10px !important;
  padding: 8px 0 !important;
}

/* Force dropdown item text color */
body #mega-menu-wrap-main-navigation #mega-menu-main-navigation ul.mega-sub-menu li.mega-menu-item a.mega-menu-link,
body div#mega-menu-wrap-main-navigation ul.mega-sub-menu a {
  color: #ccc !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 10px 22px !important;
  background: transparent !important;
  border-left: 3px solid transparent !important;
  transition: all 0.2s ease !important;
}

/* Force dropdown hover */
body #mega-menu-wrap-main-navigation #mega-menu-main-navigation ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:hover,
body div#mega-menu-wrap-main-navigation ul.mega-sub-menu a:hover {
  color: #fff !important;
  background: rgba(108,59,255,0.2) !important;
  border-left: 3px solid #6c3bff !important;
  padding-left: 26px !important;
}

/* Force top-level active/hover purple underline */
body #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > a.mega-menu-link:hover,
body #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item.mega-toggle-on > a.mega-menu-link {
  background: rgba(108,59,255,0.15) !important;
  border-bottom: 3px solid #6c3bff !important;
}

/* Force 獨家優惠 purple pill button */
body #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item:first-child > a.mega-menu-link {
  background: linear-gradient(135deg, #6c3bff, #a855f7) !important;
  border-radius: 6px !important;
  margin: 12px 8px !important;
  height: 31px !important;
  line-height: 31px !important;
  font-size: 13px !important;
  padding: 0 16px !important;
  border-bottom: none !important;
}

body #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item:first-child > a.mega-menu-link:hover {
  background: linear-gradient(135deg, #5a2fd4, #9333ea) !important;
  border-bottom: none !important;
}

/* ====== FIX: Target correct Mega Menu wrapper ID ====== */
/* Dark dropdown/flyout background */
body #mega-menu-wrap-smartmag-main ul.mega-sub-menu {
  background-color: #1a1a2e !important;
  border: 1px solid rgba(108,59,255,0.3) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  padding: 8px 0 !important;
}

/* Dropdown menu item links */
body #mega-menu-wrap-smartmag-main ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
  color: #e0e0e0 !important;
  background: transparent !important;
  padding: 10px 24px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

/* Dropdown hover state */
body #mega-menu-wrap-smartmag-main ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:hover {
  color: #fff !important;
  background: rgba(108,59,255,0.2) !important;
  border-left: 3px solid #6c3bff !important;
  padding-left: 21px !important;
}

/* ULTRA OVERRIDE: SmartMag navigation sub-menu dark background */
html body .bunyad-nav .mega-menu-wrap #mega-menu-wrap-smartmag-main ul.mega-sub-menu,
html body #mega-menu-wrap-smartmag-main ul.mega-sub-menu,
html body .navigation #mega-menu-wrap-smartmag-main ul.mega-sub-menu,
html body nav #mega-menu-wrap-smartmag-main ul.mega-sub-menu,
html body .site-nav #mega-menu-wrap-smartmag-main ul.mega-sub-menu {
  background: #12122a !important;
  background-color: #12122a !important;
  border: 1px solid rgba(108,59,255,0.4) !important;
  border-top: 3px solid #6c3bff !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7) !important;
  border-radius: 0 0 10px 10px !important;
}

html body #mega-menu-wrap-smartmag-main ul.mega-sub-menu li a.mega-menu-link {
  color: #d0d0d0 !important;
  background: transparent !important;
}

html body #mega-menu-wrap-smartmag-main ul.mega-sub-menu li a.mega-menu-link:hover {
  color: #fff !important;
  background: rgba(108,59,255,0.25) !important;
}

/* Hide excerpts homepage - title only display */
.home .elementor [class*="excerpt"],
.home .elementor [class*="summary"],
.home .elementor .e-loop-item__excerpt,
.home .elementor .elementor-post__excerpt,
.home .elementor p.ts-excerpt,
.home .elementor .entry-summary {
  display: none !important;
}

/* ===== CWL HERO V2 STYLES ===== */
.cwl-hero-v2 {
  background: linear-gradient(135deg, #0d1b35 0%, #1a2f5a 50%, #0d1b35 100%);
  padding: 60px 40px;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
}
.cwl-hero-v2__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
}
.cwl-hero-v2__left {
  flex: 1;
  min-width: 0;
}
.cwl-hero-v2__badge {
  display: inline-block;
  background: rgba(108,59,255,0.2);
  border: 1px solid rgba(108,59,255,0.5);
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.cwl-hero-v2__title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 16px 0;
}
.cwl-hero-v2__highlight {
  color: #6c3bff;
  background: linear-gradient(135deg, #6c3bff, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cwl-hero-v2__subtitle {
  font-size: 16px;
  color: #94a3b8;
  line-height: 1.7;
  margin: 0 0 32px 0;
}
.cwl-hero-v2__subtitle br {
  display: block;
}
.cwl-hero-v2__stats {
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cwl-hero-v2__stat {
  padding: 0 24px 0 0;
}
.cwl-hero-v2__stat:first-child {
  padding-left: 0;
}
.cwl-hero-v2__stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  display: block;
}
.cwl-hero-v2__stat-label {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}
.cwl-hero-v2__stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  margin: 0 24px 0 0;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .cwl-hero-v2 {
    padding: 40px 20px;
  }
  .cwl-hero-v2__inner {
    flex-direction: column;
  }
  .cwl-hero-v2__title {
    font-size: 28px;
  }
}

/* ===== CWL HERO V3 (v2 Design - Light) ===== */
.cwl-hero-v3 {
  padding: 64px 0 56px;
  background: #FAFAF8;
  border-bottom: 1px solid #E2DFD8;
  width: 100%;
  box-sizing: border-box;
}
.cwl-hero-v3__container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: center;
}
.cwl-hero-v3__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #0C4A6E;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
}
.cwl-hero-v3__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C2410C;
  animation: cwl-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes cwl-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.cwl-hero-v3__title {
  font-family: "Noto Serif TC", "Instrument Serif", Georgia, serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  color: #1C1917;
  margin: 0 0 16px 0;
  letter-spacing: -0.5px;
}
.cwl-hero-v3__title em {
  font-style: italic;
  color: #0C4A6E;
}
.cwl-hero-v3__desc {
  font-size: 16.5px;
  color: #44403C;
  line-height: 1.8;
  margin: 0 0 28px 0;
  max-width: 520px;
}
.cwl-hero-v3__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.cwl-hero-v3__btn-dark {
  background: #1C1917;
  color: #fff !important;
  padding: 11px 24px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.cwl-hero-v3__btn-dark:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cwl-hero-v3__btn-ghost {
  color: #44403C !important;
  padding: 11px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #E2DFD8;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}
.cwl-hero-v3__btn-ghost:hover {
  border-color: #78716C;
  color: #1C1917 !important;
}
.cwl-hero-v3__sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cwl-hero-v3__stat-card {
  background: #FFFFFF;
  border: 1px solid #EDEBE6;
  border-radius: 10px;
  padding: 20px 22px;
  transition: all 0.2s;
}
.cwl-hero-v3__stat-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.cwl-hero-v3__stat-card--accent {
  border-color: #0C4A6E;
  border-width: 1.5px;
  background: linear-gradient(135deg, #FAFAF8, #E0F2FE);
}
.cwl-hero-v3__stat-card--accent .cwl-hero-v3__stat-val {
  color: #0C4A6E;
}
.cwl-hero-v3__stat-label {
  font-size: 12px;
  color: #78716C;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  font-weight: 500;
}
.cwl-hero-v3__stat-val {
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: #1C1917;
  line-height: 1.2;
}
.cwl-hero-v3__stat-val span {
  font-size: 15px;
  color: #78716C;
  font-family: sans-serif;
  font-weight: 400;
  margin-left: 4px;
}
.cwl-hero-v3__stat-sub {
  font-size: 12.5px;
  color: #78716C;
  margin-top: 4px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .cwl-hero-v3__container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cwl-hero-v3__sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cwl-hero-v3__stat-card {
    flex: 1;
    min-width: 140px;
  }
}
@media (max-width: 600px) {
  .cwl-hero-v3 {
    padding: 40px 0;
  }
  .cwl-hero-v3__title {
    font-size: 26px;
  }
  .cwl-hero-v3__sidebar {
    flex-direction: column;
  }
}

/* MOBILE & TABLET RESPONSIVE FIXES */

@media (max-width: 1024px) and (min-width: 769px) {
  .cwl-hero-v3__container {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 32px;
  }
  .cwl-hero-v3 { padding: 48px 0 40px; }
  .cwl-hero-v3__title { font-size: 36px; }
  .cwl-hero-v3__sidebar {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    flex-direction: unset;
  }
  .cwl-hero-v3__stat-card {
    min-width: unset;
    flex: unset;
    padding: 16px 18px;
  }
  .cwl-hero-v3__stat-val { font-size: 22px; }
}

@media (max-width: 768px) {
  .cwl-hero-v3 { padding: 36px 0 28px; }
  .cwl-hero-v3__container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
  .cwl-hero-v3__title {
    font-size: 26px;
    letter-spacing: -0.3px;
  }
  .cwl-hero-v3__desc {
    font-size: 15px;
    margin-bottom: 18px;
  }
  div.cwl-hero-v3__actions {
    flex-direction: column !important;
  }
  a.cwl-hero-v3__btn-dark,
  a.cwl-hero-v3__btn-ghost {
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 13px 20px !important;
  }
  div.cwl-hero-v3__sidebar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    flex-direction: unset !important;
    gap: 10px !important;
  }
  div.cwl-hero-v3__stat-card:first-child {
    grid-column: 1 / -1 !important;
  }
  div.cwl-hero-v3__stat-card {
    flex: unset !important;
    min-width: unset !important;
    padding: 14px 16px !important;
  }
  .cwl-hero-v3__stat-val { font-size: 22px; }
  .cwl-hero-v3__stat-label { font-size: 11px; }
  body { overflow-x: hidden; }
	#colophon, .site-footer, footer.site-footer { display: block !important; visibility: visible !important; }
  .home .elementor-section,
  .home .elementor-container {
    max-width: 100vw;
    overflow-x: hidden;
  }
}


/* ===== MOBILE BOTTOM TAB BAR ===== */
#cwl-mobile-tabbar {
  display: none;
}
@media (max-width: 767px) {
  #cwl-mobile-tabbar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #1a1a2e;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  }
  #cwl-mobile-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 10px;
    line-height: 1.2;
    flex: 1;
    padding: 4px 0;
    transition: color 0.2s;
  }
  #cwl-mobile-tabbar a:hover,
  #cwl-mobile-tabbar a.active {
    color: #667eea;
  }
  #cwl-mobile-tabbar a .tab-icon {
    font-size: 20px;
    margin-bottom: 2px;
  }
  #cwl-mobile-tabbar a .tab-label {
    font-size: 10px;
    font-weight: 500;
  }
  /* Add bottom padding to body for tab bar */
  body {
    padding-bottom: 60px !important;
  }
  /* More menu overlay */
  #cwl-more-menu {
    display: none;
    position: fixed;
    bottom: 56px;
    left: 0;
    right: 0;
    z-index: 99998;
    background: #1a1a2e;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    border-radius: 16px 16px 0 0;
  }
  #cwl-more-menu.show {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  #cwl-more-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ccc;
    font-size: 11px;
    padding: 10px 4px;
    border-radius: 10px;
    transition: background 0.2s;
  }
  #cwl-more-menu a:hover {
    background: rgba(255,255,255,0.05);
  }
  #cwl-more-menu a .menu-icon {
    font-size: 22px;
    margin-bottom: 4px;
  }
  /* Hide WordPress admin bar bottom overlap on mobile */
  .admin-bar #cwl-mobile-tabbar {
    bottom: 0;
  }
}

/* ===== iPad LAYOUT OPTIMIZATIONS ===== */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Footer: 2x2 grid layout */
  .cwl-footer-top {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  .cwl-footer-subscribe {
    grid-column: 1 / -1 !important;
  }
  /* Recommend section: 2x2 grid */
  .elementor-widget-wrap > .elementor-element[data-widget_type="theme-post-content.default"] {
    width: 50% !important;
  }
}

/* Hide more menu by default */
#cwl-more-menu {
  display: none;
}

/* ===== MOBILE NAV MENU - SCROLLABLE + SMALLER ===== */
@media (max-width: 767px) {
  .elementor-nav-menu,
  .elementor-nav-menu--layout-horizontal .elementor-nav-menu,
  ul.elementor-nav-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .elementor-nav-menu::-webkit-scrollbar {
    display: none;
  }
  .elementor-nav-menu .menu-item,
  .elementor-nav-menu > li {
    flex-shrink: 0 !important;
  }
  .elementor-nav-menu .menu-item a,
  .elementor-nav-menu > li > a,
  .elementor-nav-menu--main .elementor-item {
    font-size: 12px !important;
    padding: 8px 6px !important;
    white-space: nowrap !important;
  }
}

/* ===== OFF CANVAS MOBILE MENU STYLING ===== */
@media (max-width: 767px) {
  #mega-menu-wrap-main-navigation .mega-menu-toggle + #mega-menu-main-navigation {
    background: #1a1a2e !important;
  }
  #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > a.mega-menu-link {
    color: #fff !important;
    font-size: 15px !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  }
  #mega-menu-wrap-main-navigation #mega-menu-main-navigation > li.mega-menu-item > a.mega-menu-link:hover {
    color: #f0c040 !important;
    background: rgba(255,255,255,0.05) !important;
  }
}

/* ===== MOBILE TAB BAR FOOTER SPACING ===== */
@media (max-width: 767px) {
  .cwl-footer-bottom {
    padding-bottom: 70px !important;
  }
  body {
    padding-bottom: 60px;
  }
}

/* ===== MOBILE SCROLLING MENU FIX ===== */
@media (max-width: 767px) {
  .smartmag-scroller .nav a {
    font-size: 11px !important;
    padding: 8px 6px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }
}

/* ===== RESPONSIVE AUDIT FIXES - April 2026 ===== */

/* FIX 1: Increase body/content font size for mobile readability (was 13-14px, needs 15px+) */
@media (max-width: 767px) {
  body,
  p,
  .entry-content,
  .entry-content p,
  .post-content p,
  article p {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
}

/* FIX 2: Fix mobile navigation - ensure horizontal nav tabs don't overflow on small screens */
@media (max-width: 767px) {
  .smartmag-scroller .nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
  }
  .smartmag-scroller .nav::-webkit-scrollbar {
    display: none !important;
  }
}

/* FIX 3: Ensure Buy Me Coffee button doesn't overlap main content on mobile */
@media (max-width: 767px) {
  #bmc-wbtn,
  .bmc-btn-container,
  [id*="bmc"] {
    bottom: 80px !important;
    right: 16px !important;
    z-index: 999 !important;
  }
}

/* FIX 4: Table overflow fix - ensure tables in articles scroll horizontally on mobile */
.wp-block-table {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

.wp-block-table table {
  min-width: 100% !important;
}

/* FIX 5: Ensure article content doesn't overflow on mobile */
@media (max-width: 767px) {
  .entry-content img,
  .post-content img,
  article img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .entry-content .wp-block-table,
  article .wp-block-table {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* FIX 6: Mobile bottom nav bar spacing - prevent footer overlap */
@media (max-width: 767px) {
  .site-main,
  .content-area {
    padding-bottom: 20px !important;
  }
}

/* FIX 7: Sticky header overlap - prevent menu from covering top content */
html {
  scroll-padding-top: 120px;
}
body.admin-bar {
  scroll-padding-top: 152px;
}
@media (max-width: 782px) {
  html { scroll-padding-top: 80px; }
  body.admin-bar { scroll-padding-top: 126px; }
}

/* Ensure first section on single/page has breathing room under sticky nav */
.single-post .entry-header,
.page .elementor > .elementor-section:first-child,
.single .elementor > .elementor-section:first-child {
  padding-top: 40px !important;
}

/* Anchor links offset so headings aren't hidden under sticky menu */
:target {
  scroll-margin-top: 120px;
}
@media (max-width: 782px) {
  :target { scroll-margin-top: 80px; }
}

/* ===== BREADCRUMB & TITLE OVERLAP FIX ===== */
.breadcrumbs-b {
  margin-bottom: 16px !important;
}
.s-head-large-b {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ===== HIDE JETPACK SHARE BUTTONS ===== */
.sharedaddy,
.sd-sharing-enabled,
.sd-block {
  display: none !important;
}


/* ===== HIDE AUTHOR BIO BOX ON POSTS ===== */
.author-box {
  display: none !important;
}

/* ===== MOBILE: 緊貼市場/熱門話題/ETF更新 - 放大與信用卡攻略看齊 ===== */
@media (max-width: 767px) {
  /* FIX: 移除巢狀容器 padding，增加內容寬度 */
  [data-id="ffba7d6"],
  [data-id="ffba7d6"] > .e-con-inner,
  [data-id="7709abd"],
  [data-id="7709abd"] > .e-con-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  [data-id="f04f185"],
  [data-id="0bdebef"],
  [data-id="53749d4"],
  [data-id="095770f"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 緊貼市場 (smartmag-postslist) - 全寬卡片 */
  [data-id="ddfc5ca"] .list-post {
    display: block !important;
    padding-bottom: 20px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  [data-id="ddfc5ca"] .list-post .media {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 12px !important;
  }
  [data-id="ddfc5ca"] .list-post .content {
    padding-left: 0 !important;
    width: 100% !important;
  }
  [data-id="ddfc5ca"] .list-post .post-title {
    font-size: 18px !important;
    line-height: 1.4 !important;
  }

  /* 熱門話題 (smartmag-postssmall) - 放大縮圖 */
  [data-id="6edd643"] .loop-small .media {
    width: 140px !important;
    max-width: 140px !important;
    min-width: 140px !important;
    height: 105px !important;
  }
  [data-id="6edd643"] .small-post {
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  [data-id="6edd643"] .small-post .post-title {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* ETF更新 (smartmag-grid) - 信用卡攻略尺寸 */
  [data-id="227f2ce"] .grid-post .media {
    margin-bottom: 14px !important;
  }
  [data-id="227f2ce"] .grid-post .post-title {
    font-size: 18px !important;
    line-height: 1.4 !important;
  }
}

/* ── SINGLE POST TYPOGRAPHY (mobile) ── */
@media (max-width: 767px) {
  body.wp-singular .breadcrumbs-b {
    display: none !important;
  }
  body.wp-singular .post-header .featured {
    margin-bottom: 16px !important;
  }
  body.wp-singular .post-header .entry-title {
    font-size: clamp(24px, 6.4vw, 26px) !important;
    line-height: 1.35 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 24px !important;
  }
}

/* ── BREADCRUMB / HEADER CLEARANCE (desktop/tablet) ── */
@media (min-width: 768px) {
  body.wp-singular .breadcrumbs-b .inner {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
  body.wp-singular .breadcrumbs-b {
    margin-bottom: 28px !important;
  }
}


/* ── HEADER-BREADCRUMB SPACING FIX (May 2026) ── */
/* Creates visible gap between dark header area and breadcrumb */
/* Also ensures post title area has proper breathing room */
@media (min-width: 768px) {
  body.wp-singular .breadcrumbs-b {
    margin-top: 4px !important;
  }
  .s-head-large-b {
    margin-top: 8px !important;
  }
}
