/* =========================================================================
   Intel-inspired Enterprise Theme - Design Tokens & Stylesheet (Mobile Optimized)
   ========================================================================= */

:root {
  --theme-primary: #0068b5;
  --theme-primary-hover: #004a80;
  --theme-primary-light: #e5f1f8;
  --theme-bg: #f5f5f7;
  --theme-surface: #ffffff;
  --theme-text-main: #262626;
  --theme-text-muted: #555555;
  --theme-border: #d7d7d7;
  --theme-radius-sm: 4px;
  --theme-radius-card: 8px;
  --theme-font-sans: "Intel Clear", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --theme-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --theme-container-width: 1320px;
  --theme-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --theme-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --theme-shadow-lg: 0 10px 24px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--theme-font-sans);
  background-color: var(--theme-bg);
  color: var(--theme-text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--theme-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--theme-primary-hover);
}

.container {
  max-width: var(--theme-container-width);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* =========================================================================
   Modern Enterprise Header (Intel/Apple/SaaS Grade) - Clean Non-sticky
   ========================================================================= */
header.site-header {
  position: relative; /* 非吸顶，随页面自然滚动 */
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .header-container {
    height: 56px;
    gap: 0.5rem;
  }
}

/* 1. Brand & Logo */
.header-brand-wrap {
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 104, 181, 0.2));
  transition: transform 0.2s ease;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.04);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f172a 0%, #0068b5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  background: #e0f2fe;
  color: #0284c7;
  border-radius: 9999px;
  border: 1px solid #bae6fd;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.625rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* 2. Middle Navigation Links */
.header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 992px) {
  .header-nav {
    display: flex;
  }
}

.header-nav .nav-item {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-nav .nav-item:hover,
.header-nav .nav-item.active {
  color: #0068b5;
  background: rgba(0, 104, 181, 0.06);
}

/* Dropdown Menu (Game Categories) */
.nav-item.has-dropdown {
  position: relative;
  cursor: pointer;
  padding: 0;
  height: 68px;
  display: inline-flex;
  align-items: center;
}

.dropdown-trigger {
  background: transparent;
  border: none;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.nav-item.has-dropdown:hover .dropdown-trigger {
  color: #0068b5;
  background: rgba(0, 104, 181, 0.06);
}

.chevron-icon {
  width: 14px;
  height: 14px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .chevron-icon {
  transform: rotate(180deg);
  color: #0068b5;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 0.75rem;
  z-index: 1001;
  margin-top: 0;
  animation: dropdownFadeIn 0.15s ease-out;
}

/* 关键悬浮桥接层：杜绝鼠标划向展开卡片时由于空隙丢失 hover 状态 */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -18px;
  left: -20px;
  right: -20px;
  height: 20px;
  background: transparent;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translate(-50%, -4px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.nav-item.has-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.dropdown-link-item:hover {
  background: #f1f5f9;
}

.item-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.item-text {
  display: flex;
  flex-direction: column;
}

.item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.item-desc {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.dropdown-footer {
  border-top: 1px solid #f1f5f9;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  text-align: right;
}

.dropdown-footer a {
  font-size: 0.75rem;
  color: #0068b5;
  font-weight: 600;
  text-decoration: none;
}

/* 3. Header Actions (Search + Lang + CTA) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Pill Search Input */
.header-search-form {
  position: relative;
  display: none;
}

@media (min-width: 640px) {
  .header-search-form {
    display: block;
  }
}

.search-svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.15s ease;
}

.header-search-form input {
  height: 38px;
  width: 150px;
  padding: 0 0.75rem 0 2.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.8125rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-search-form input:focus {
  width: 200px;
  background: #ffffff;
  border-color: #0068b5;
  box-shadow: 0 0 0 3px rgba(0, 104, 181, 0.12);
}

.header-search-form input:focus + .search-svg,
.header-search-form:focus-within .search-svg {
  color: #0068b5;
}

/* Clean Language Switcher */
.header-lang-switch select {
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.header-lang-switch select:hover,
.header-lang-switch select:focus {
  border-color: #cbd5e1;
  background: #ffffff;
}

/* Premium Download CTA Button */
.header-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 1.25rem;
  background: linear-gradient(135deg, #0068b5 0%, #008be5 100%);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 104, 181, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.header-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 104, 181, 0.45);
  background: linear-gradient(135deg, #005a9e 0%, #007bc9 100%);
}

.download-svg {
  width: 15px;
  height: 15px;
}

/* Mobile Toggle Button */
.mobile-toggle-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .mobile-toggle-btn {
    display: none;
  }
}

.mobile-toggle-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: #334155;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* =========================================================================
   Mobile Layout Protections (杜绝组件过多撑破移动端横向布局)
   ========================================================================= */
@media (max-width: 991px) {
  .header-search-form {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .header-lang-switch {
    display: none !important; /* 移动端语言切换已整合进侧滑抽屉 */
  }

  .brand-sub {
    display: none !important; /* 移动端隐藏英文长标，杜绝挤占横向宽度 */
  }

  .brand-logo-img {
    height: 32px;
  }

  .brand-name {
    font-size: 1.1rem;
    white-space: nowrap;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-download-btn {
    height: 34px;
    padding: 0 0.85rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .mobile-toggle-btn {
    width: 34px;
    height: 34px;
    padding: 7px;
  }
}

@media (max-width: 480px) {
  .brand-tag {
    display: none !important; /* 超小屏隐藏“全天免费”徽章，杜绝标题挤压 */
  }

  .header-download-btn {
    height: 30px;
    padding: 0 0.65rem;
    font-size: 0.75rem;
  }

  .header-download-btn .download-svg {
    display: none;
  }
}

@media (max-width: 360px) {
  .header-download-btn {
    display: none !important; /* 极窄屏仅保留汉堡图标，抽屉内具有下载大按钮 */
  }
}

/* Mobile Slide-in Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: #ffffff;
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  animation: drawerSlideIn 0.25s ease-out;
}

@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1rem;
}

.drawer-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-search-form {
  margin-bottom: 1rem;
}

.drawer-search-form input {
  width: 100%;
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.85rem;
  color: #1e293b;
  outline: none;
}

.drawer-search-form input:focus {
  border-color: #0068b5;
  background: #ffffff;
}

.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.5rem;
}

.drawer-links a {
  display: block;
  padding: 0.65rem 0.5rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.drawer-links a:hover {
  background: #f1f5f9;
  color: #0068b5;
}

.drawer-lang-wrap {
  margin-top: 0.35rem;
}

.drawer-lang-select {
  width: 100%;
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.85rem;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

.drawer-download-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.75rem 0;
  background: linear-gradient(135deg, #0068b5 0%, #008be5 100%);
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 104, 181, 0.35);
}

/* Subheader Banner */
.sub-banner {
  background: #ffffff;
  border-bottom: 1px solid var(--theme-border);
  padding: 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--theme-text-main);
}

/* Hero Section */
.intel-hero,
.prose .intel-hero {
  background: linear-gradient(135deg, #002c5f 0%, #0068b5 100%);
  color: #ffffff !important;
  padding: 3rem 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--theme-radius-card);
}

@media (min-width: 768px) {
  .intel-hero,
  .prose .intel-hero {
    padding: 4.5rem 0;
    margin-bottom: 2rem;
  }
}

.intel-hero h1,
.prose .intel-hero h1,
.prose h1.entry-title,
.page-hero-banner h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

@media (min-width: 768px) {
  .intel-hero h1,
  .prose .intel-hero h1,
  .prose h1.entry-title,
  .page-hero-banner h1 {
    font-size: 2.75rem;
  }
}

.intel-hero p,
.prose .intel-hero p {
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: rgba(255, 255, 255, 0.95) !important;
}

.intel-hero-search {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.intel-hero-search input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border-radius: var(--theme-radius-sm);
  border: none;
  font-size: 0.95rem;
  box-shadow: var(--theme-shadow-md);
  outline: none;
}

.intel-hero-search::before {
  content: "🔍";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

/* Notice Banner */
.notice-banner {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  padding: 1rem;
  text-align: center;
  margin: 1rem auto 2rem;
  border-radius: var(--theme-radius-sm);
  font-size: 0.9rem;
  max-width: var(--theme-container-width);
  box-shadow: var(--theme-shadow-sm);
}

.notice-banner a {
  font-weight: 600;
  text-decoration: underline;
}

/* Main Layout & Grid */
main {
  flex: 1;
  padding: 1rem 0 3rem;
}

@media (min-width: 768px) {
  main {
    padding: 1.5rem 0 4rem;
  }
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .layout-grid.with-sidebar {
    grid-template-columns: 1fr 340px;
    gap: 2rem;
  }
}

/* Card Component & Card Grid Optimization */
.card {
  background: var(--theme-surface);
  border-radius: var(--theme-radius-card);
  border: 1px solid var(--theme-border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--theme-shadow-sm);
  transition: all 0.2s ease;
  word-break: break-word;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .card {
    padding: 1.75rem;
    margin-bottom: 1.5rem;
  }
}

.card:hover {
  box-shadow: var(--theme-shadow-md);
  border-color: var(--theme-primary);
}

/* Articles grid layout helper for uniform height cards */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.articles-grid .card {
  margin-bottom: 0;
  height: 100%;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .post-title {
    font-size: 1.35rem;
  }
}

.post-title a {
  color: var(--theme-text-main);
}

.post-title a:hover {
  color: var(--theme-primary);
  text-decoration: none;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--theme-text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .post-meta {
    font-size: 0.85rem;
  }
}

.post-excerpt {
  color: var(--theme-text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.925rem;
  flex: 1;
}

@media (min-width: 768px) {
  .post-excerpt {
    font-size: 0.975rem;
  }
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
  }
}

.product-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--theme-text-main);
  transition: all 0.2s ease;
  box-shadow: var(--theme-shadow-sm);
}

.product-card:hover {
  border-color: var(--theme-primary);
  box-shadow: var(--theme-shadow-md);
  color: var(--theme-primary);
  text-decoration: none;
}

.product-icon {
  font-size: 1.5rem;
  color: var(--theme-primary);
}

/* TOC & Sidebar Box */
.toc-box {
  background: var(--theme-bg);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  padding: 1rem;
  margin: 1.25rem 0;
  overflow-x: auto;
}

@media (min-width: 768px) {
  .toc-box {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
  }
}

.toc-box ul {
  list-style: none;
  margin-top: 0.5rem;
}

.toc-box li {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.toc-box a {
  color: var(--theme-text-muted);
}

.toc-box a:hover {
  color: var(--theme-primary);
  text-decoration: none;
}

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 84px;
  align-self: start;
}

.sidebar .card {
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .sidebar .card {
    padding: 1.5rem;
  }
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin: 0.5rem 0;
}

.sidebar a {
  color: var(--theme-text-muted);
  font-size: 0.95rem;
}

.sidebar a:hover {
  color: var(--theme-primary);
  text-decoration: none;
}

/* Typography (.prose) */
.prose {
  color: var(--theme-text-main);
  font-size: 1rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .prose {
    font-size: 1.05rem;
  }
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin: 1.5rem 0 0.75rem;
  color: var(--theme-text-main);
  font-weight: 700;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--theme-border);
  padding-bottom: 0.4rem;
}

@media (min-width: 768px) {
  .prose h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
  }
}

.prose h3 {
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .prose h3 {
    font-size: 1.35rem;
  }
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.prose a {
  color: var(--theme-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose blockquote {
  border-left: 4px solid var(--theme-primary);
  padding: 0.85rem 1rem;
  color: var(--theme-text-muted);
  font-style: italic;
  margin: 1.25rem 0;
  background: var(--theme-bg);
  border-radius: 0 var(--theme-radius-sm) var(--theme-radius-sm) 0;
}

.prose pre {
  background: #111827;
  color: #f3f4f6;
  padding: 1rem;
  border-radius: var(--theme-radius-sm);
  overflow-x: auto;
  margin: 1.25rem 0;
  font-family: var(--theme-font-mono);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .prose pre {
    padding: 1.5rem;
    font-size: 0.9rem;
  }
}

.prose code {
  background: var(--theme-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: var(--theme-font-mono);
  font-size: 0.85em;
  border: 1px solid var(--theme-border);
  word-break: break-all;
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  word-break: normal;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--theme-radius-sm);
  margin: 1.25rem 0;
}

/* Footer Component */
footer {
  background: var(--theme-surface);
  border-top: 1px solid var(--theme-border);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--theme-text-muted);
  margin-top: auto;
}

@media (min-width: 768px) {
  footer {
    padding: 2.5rem 0;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 500;
}

@media (min-width: 768px) {
  .footer-nav {
    gap: 2rem;
  }
}

.footer-nav a {
  color: var(--theme-text-muted);
}

.footer-nav a:hover {
  color: var(--theme-primary);
}

.icp-meta {
  font-size: 0.8rem;
  color: #888;
}

.icp-meta a {
  color: inherit;
}

.icp-meta a:hover {
  text-decoration: underline;
}

/* =========================================================================
   Theme Polish & Bug Fixes: Floating Widget, Hero Contrast, Reader Layout
   ========================================================================= */

/* 1. Dark Hero Banner & Cover Contrast Fix (Ensure H1/H2 readable on dark bg) */
.page-hero-banner,
.wp-block-cover,
.entry-hero {
  color: #ffffff !important;
}

.page-hero-banner h1,
.page-hero-banner h2,
.page-hero-banner h3,
.page-hero-banner .entry-title,
.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3 {
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.page-hero-banner p,
.wp-block-cover p {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* 2. Floating QR / Banner Widget (Fixed desktop, completely hidden on mobile) */
.floating-banner-widget {
  text-align: center;
  position: fixed;
  right: 24px;
  bottom: 80px;
  z-index: 999;
  max-width: 140px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  padding: 6px;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-banner-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2);
}

.floating-banner-widget img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* 3. Single Post & Page Reader Layout (Max-width 880px for optimal typography) */
.single-post-card {
  max-width: 880px;
  margin: 0 auto 2rem;
  padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
  .single-post-card {
    padding: 3rem 2.5rem;
  }
}

/* 4. Post CTA Download Card */
.post-download-cta {
  background: linear-gradient(135deg, #004a80 0%, #0068b5 100%);
  color: #ffffff;
  padding: 1.75rem 2rem;
  border-radius: 10px;
  margin: 2.5rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 10px 20px -5px rgba(0, 104, 181, 0.3);
}

.post-download-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #ffffff !important;
}

.post-download-cta p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92) !important;
  margin-bottom: 0;
}

.post-download-cta .cta-btn {
  background: #ffffff;
  color: #0068b5;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-download-cta .cta-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
  color: #004a80;
}

/* 5. Figure & Figcaption Formatting */
.prose figure {
  margin: 1.5rem 0;
  text-align: center;
}

.prose figure img {
  margin: 0 auto 0.5rem;
  border-radius: var(--theme-radius-card);
  box-shadow: var(--theme-shadow-sm);
}

.prose figcaption,
.prose .wp-element-caption {
  font-size: 0.85rem;
  color: var(--theme-text-muted);
  text-align: center;
  margin-top: 0.35rem;
}

/* 6. Search Keywords Highlight */
mark {
  background-color: #fef08a;
  color: #854d0e;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
