/* ═══════════════════════════════════════════════════════════════
   Industry Explore — Clean Redesign v9
   原則：professional / magazine-style / 砍掉所有不必要裝飾
   ═══════════════════════════════════════════════════════════════ */

/* ───── 1) 完全移除舊版 v7/v8 重裝飾 ───── */
.cafe-scene, .scene-box, .scene-box *,
.coffee-float, .niche-float,
.v7-blob, .v7-grain, .v7-cursor, .v7-progress,
.v7-marquee, .v7-section-num,
.v8-mesh, .v8-spot,
[class*="brand-watermark"] {
  display: none !important;
}

/* ───── 2) 全域配色 — 專業 navy + coral accent ───── */
:root {
  --ie-navy:    #0a2540;
  --ie-navy-2:  #1a3a5c;
  --ie-blue:    #0080ff;
  --ie-coral:   #ff6b35;
  --ie-gold:    #f5b800;
  --ie-bg:      #fafbfc;
  --ie-card:    #ffffff;
  --ie-text:    #1a1f2e;
  --ie-text-2:  #5a6478;
  --ie-border:  #e5eaf2;
}

/* ───── 3) Body / general ───── */
body {
  background: var(--ie-bg) !important;
  color: var(--ie-text);
  font-family: 'Inter', 'Segoe UI', -apple-system, 'Microsoft JhengHei', sans-serif !important;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* 微妙背景紋理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0,128,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(255,107,53,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* ───── 4) Header — clean ───── */
.site-header, header.entry-header, .ast-primary-header-bar, [class*="header"] {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--ie-border);
  box-shadow: 0 1px 0 rgba(10,37,64,0.04);
}

/* navigation 文字 */
.ast-primary-header-bar a,
.main-navigation a,
nav a {
  color: var(--ie-text) !important;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.ast-primary-header-bar a:hover,
.main-navigation a:hover,
nav a:hover {
  color: var(--ie-coral) !important;
}

/* ───── 5) Custom Logo via SVG ───── */
.site-branding, .site-logo, .site-logo-img, .custom-logo-link {
  display: inline-block !important;
  vertical-align: middle;
}
.custom-logo-link {
  width: 240px !important;
  height: 60px !important;
}
.custom-logo-link img,
.site-logo-img img,
.custom-logo {
  width: 240px !important;
  height: 60px !important;
  max-height: none !important;
  display: block !important;
  object-fit: contain;
}
/* 如果 theme 用 site-title text logo，替換成 SVG */
.site-title a, .site-title {
  position: relative;
  display: inline-block;
  padding-left: 60px;
  font-size: 0 !important;
  min-width: 220px;
  height: 50px;
  background: url('./ie-logo.svg') no-repeat left center;
  background-size: contain;
}

/* ───── 6) Hero / Page title area — 只在有 page-title 時顯示 dark hero ───── */
.page-header:has(.page-title),
.entry-header:has(.entry-title),
.ast-archive-description {
  background: linear-gradient(135deg, var(--ie-navy) 0%, var(--ie-navy-2) 100%);
  padding: 60px 24px 50px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}
.page-header:has(.page-title)::before,
.entry-header:has(.entry-title)::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
}
/* 沒有 page-title 的 hero（首頁）→ 不要顯示暗色塊 */
.page-header:not(:has(.page-title)),
.entry-header:not(:has(.entry-title)),
header.entry-header:empty,
.elementor-section[data-id]:empty {
  display: none !important;
}
.page-title, .entry-title, .archive-title {
  color: white !important;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.3);
  position: relative;
}

/* 首頁 hero：用 light gradient 取代 dark 塊 */
body.home .page-header,
body.home .entry-header {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(245,248,252,0.5) 100%) !important;
  color: var(--ie-navy);
  padding: 20px 0 !important;
  border-radius: 0 !important;
  text-align: left;
}
body.home .page-header::before,
body.home .entry-header::before { display: none !important; }
body.home .page-title, body.home .entry-title {
  color: var(--ie-navy) !important;
  text-shadow: none !important;
}

/* ───── 7) 主內容區 magazine grid ───── */
.site-content, main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* 文章卡片 */
article, .post, .blog-layout-1, .blog-layout-2 {
  background: var(--ie-card) !important;
  border: 1px solid var(--ie-border);
  border-radius: 12px;
  padding: 28px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 1px 3px rgba(10,37,64,0.04), 0 1px 2px rgba(10,37,64,0.06);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
article:hover, .post:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px -10px rgba(10,37,64,0.15);
  border-color: var(--ie-blue);
}

article .entry-title, .post .entry-title,
article h2.entry-title, .post h2.entry-title {
  color: var(--ie-navy) !important;
  font-size: 22px !important;
  font-weight: 700;
  text-shadow: none;
  margin-bottom: 8px;
  line-height: 1.35;
}
article .entry-title a, .post .entry-title a {
  color: var(--ie-navy) !important;
  transition: color 0.2s;
  background: none !important;
}
article .entry-title a:hover, .post .entry-title a:hover {
  color: var(--ie-coral) !important;
}

article .entry-meta, .post .entry-meta {
  color: var(--ie-text-2);
  font-size: 13px;
  font-weight: 500;
}
article .entry-meta a { color: var(--ie-blue) !important; }

article .entry-content, .post .entry-content {
  color: var(--ie-text);
  font-size: 16px;
}

/* ───── 8) Sidebar widget — 簡潔卡片 ───── */
.widget, aside .widget, .sidebar-main .widget {
  background: var(--ie-card) !important;
  border: 1px solid var(--ie-border) !important;
  border-radius: 10px !important;
  padding: 24px !important;
  margin-bottom: 20px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.widget-title, .widgettitle, .widget h2, .widget h3 {
  color: var(--ie-navy) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid var(--ie-coral);
  display: inline-block;
}
.widget-title::after { display: none !important; }

.widget ul li, .widget ol li {
  padding: 8px 0;
  border-bottom: 1px solid var(--ie-border);
  font-size: 14px;
}
.widget ul li:last-child { border-bottom: none; }
.widget a {
  color: var(--ie-text) !important;
  font-weight: 500;
  text-decoration: none;
  background: none !important;
  display: block;
  transition: color 0.2s, transform 0.2s;
}
.widget a:hover {
  color: var(--ie-coral) !important;
  transform: translateX(4px);
}

/* ───── 9) Hide useless big number markers ───── */
[class*="section-num"],
.entry-meta time + *:has(text),
h1::before, h2::before {
  display: none !important;
}

/* ───── 10) Buttons — minimal modern ───── */
button, .button, .btn, input[type="submit"],
.wp-block-button__link, .elementor-button {
  background: var(--ie-navy) !important;
  color: white !important;
  border: none !important;
  padding: 12px 28px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
  box-shadow: 0 2px 8px rgba(10,37,64,0.15);
  position: relative;
  overflow: hidden;
}
button:hover, .button:hover, .btn:hover,
.wp-block-button__link:hover, .elementor-button:hover {
  background: var(--ie-coral) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,107,53,0.35) !important;
}

/* ───── 11) Footer ───── */
.site-footer, footer.site-footer {
  background: var(--ie-navy) !important;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
  margin-top: 80px;
}
.site-footer a {
  color: rgba(255,255,255,0.85) !important;
  background: none !important;
}
.site-footer a:hover { color: var(--ie-coral) !important; }

/* ───── 12) Typography ───── */
h1, h2, h3, h4, h5, h6 {
  color: var(--ie-navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 22px; }

/* ───── 13) Links in content ───── */
.entry-content a, article a {
  color: var(--ie-blue);
  text-decoration: underline;
  text-decoration-color: rgba(0,128,255,0.3);
  text-underline-offset: 3px;
  background: none !important;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.entry-content a:hover, article a:hover {
  color: var(--ie-coral);
  text-decoration-color: var(--ie-coral);
}

/* ───── 14) Images ───── */
.entry-content img, article img {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(10,37,64,0.08);
}

/* ───── 15) Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ───── Elementor sections — 移除 theme demo 的 dark image backgrounds ───── */
.elementor-section,
.elementor-top-section,
.elementor-section[class*="elementor-element-"] {
  background-image: none !important;
  background-color: transparent !important;
}
.elementor-element-populated {
  background-color: transparent !important;
}

/* 關鍵：移除 dark overlay */
.elementor-background-overlay {
  background-image: none !important;
  background-color: transparent !important;
  display: none !important;
}

/* Elementor "Recent Posts" / heading sections — 給 light card */
.elementor-section:has(.elementor-widget-heading),
.elementor-section:has(.recent-posts) {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important;
  border-radius: 16px;
  margin: 30px auto !important;
  padding: 40px !important;
  max-width: 1100px;
  box-shadow: 0 1px 3px rgba(10,37,64,0.06);
}

.elementor-heading-title {
  color: var(--ie-navy) !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3 {
  color: var(--ie-navy) !important;
}

/* Elementor 自帶 button */
.elementor-button {
  background: var(--ie-navy) !important;
  color: white !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 28px !important;
}
.elementor-button:hover {
  background: var(--ie-coral) !important;
}

/* ───── 16) Mobile responsive ───── */
@media (max-width: 768px) {
  .site-content, main { padding: 24px 16px; }
  article, .post { padding: 20px !important; }
  .page-header { padding: 50px 16px 40px; }
}
