/*
Theme Name: WP Gazoulab Theme
Description: A custom WordPress theme for Gazoulab
Version: 1.3
Author: Your Name
Text Domain: wp-gazoulab-theme

Mobile Optimization Features:
- Responsive design for all screen sizes (480px, 768px, 1024px breakpoints)
- Touch-friendly button sizes (minimum 44px)
- Optimized typography for mobile reading
- Smart table layout with proper width allocation and text wrapping
- Improved accessibility and keyboard navigation
- Progressive enhancement approach
- No inline styles - all CSS is properly organized
- Clean mobile layout with hidden sidebar for better reading experience
- Full-width tables that adapt to content and screen size
*/

/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

/* CSS Variables */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 3.9%;
  --primary: 225 100% 60%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 96.1%;
  --secondary-foreground: 0 0% 9%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --accent: 0 0% 96.1%;
  --accent-foreground: 0 0% 9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 89.8%;
  --input: 0 0% 89.8%;
  --ring: 0 0% 3.9%;
  --radius: 0.5rem;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: 0.01em;
  color: #333333;
  background-color: hsl(var(--background));
  padding-top: 0;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Header Styles */
.site-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  overflow: visible;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1285px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  overflow: visible;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-title {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-decoration: none;
  line-height: 1;
  height: 64px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.site-title:hover {
  color: hsl(var(--muted-foreground));
}

.site-title img {
  height: 20px;
  width: auto;
}

/* Navigation Styles */
.main-navigation {
  display: flex;
  align-items: center;
  height: 64px;
  padding-left: 14px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  height: 64px;
  align-items: center;
}

.nav-item {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #251b32;
  font-weight: 400;
  font-size: 14px;
  padding: 0 0.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 64px;
  line-height: 1;
  box-sizing: border-box;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: hsl(var(--foreground));
}

/* Navigation Arrow Styles */
.nav-arrow {
  width: 12px;
  height: 12px;
  color: #251b32;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}

.nav-item:hover .nav-link {
  color: hsl(var(--foreground));
}

.nav-item:hover .nav-link .nav-arrow {
  color: hsl(var(--foreground));
}

/* Dropdown Styles */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 590px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1050;
}

@media (max-width: 1024px) {
  .dropdown-content {
    min-width: 400px;
  }
}

@media (max-width: 768px) {
  .dropdown-content {
    min-width: 280px;
    width: 90vw;
    max-width: 400px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }

  .nav-item:hover .dropdown-content {
    transform: translateX(-50%) translateY(0);
  }
}

.nav-item:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.dropdown-item {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: hsl(var(--popover-foreground));
  transition: background-color 0.2s ease;
  border: none;
  border-radius: 6px;
  background: transparent;
}

.dropdown-item:hover {
  background-color: hsl(var(--accent));
}

.item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.item-title {
  font-weight: 400;
  font-size: 14px;
  color: hsl(var(--popover-foreground));
  line-height: 1.2;
  text-align: center;
}

.item-description {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  line-height: 1.2;
  font-weight: 400;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}

.pricing-link {
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
  font-size: 14px;
  padding: 0 1rem;
  height: 64px;
  line-height: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.pricing-link:hover {
  color: hsl(var(--foreground));
}

.login-btn {
  background: #3366ff;
  color: #ffffff;
  padding: 0 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  height: 36px;
  line-height: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.login-btn:hover {
  background: hsl(var(--primary) / 0.9);
}

/* Main Content */
.site-main {
  width: 1185px;
  max-width: 100%;
  margin: 2rem auto;
  padding: 0;
  padding-top: 84px;
  box-sizing: border-box;
}

.content-area {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  width: 1185px;
  max-width: 100%;
  justify-items: end;
  box-sizing: border-box;
}

/* Post Styles */
.post {
  margin-bottom: 2rem;
  background: transparent;
}

.primary-content {
  background: #fff;
  padding: 2rem;
}

.post-title {
  font-size: 28px;
  line-height: auto;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.post-title a {
  text-decoration: none;
  color: inherit;
}

.post-title a:hover {
  color: hsl(var(--primary));
}

.post-meta {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-content {
  font-family: "Noto Sans JP", sans-serif;
  line-height: 28px;
  font-size: 17px;
  font-weight: 400;
  color: #333333;
  letter-spacing: 0.01em;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.post-content p {
  margin-bottom: 1.5rem;
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  color: #333333;
}

.post-content strong,
.post-content b {
  font-size: 17px;
  line-height: 28px;
  font-weight: 700;
  color: #333333;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  margin-top: 2rem;
  margin-bottom: 1rem;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.post-content h1 {
  font-size: 50px;
  font-weight: 700;
  line-height: 72.4px;
  text-align: center;
}

.post-content h2 {
  font-size: 28px;
  line-height: auto;
  text-align: left;
  background-color: #dfddff;
  padding: 1rem 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

.post-content h3 {
  font-size: 24px;
  line-height: auto;
  position: relative;
  padding-bottom: 0.5rem;
}

.post-content h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.8px;
  background-color: #9296ff;
}

.post-content .toc-title::after {
  display: none;
}

.post-content h4 {
  font-size: 20px;
  line-height: 32px;
}

.post-content h5 {
  font-size: 18px;
  line-height: 32px;
}

.post-content h6 {
  font-size: 17px;
  line-height: 28px;
}

/* Step Box Style */
.step-box {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  font-family: "Noto Sans JP", sans-serif;
}

h5.step-box {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  margin: 1.5rem 0;
}

.step-number {
  background-color: #5c62ff;
  color: white;
  font-size: 17px;
  font-weight: 600;
  padding: 0rem 0.375rem;
  border-radius: 6px;
  white-space: nowrap;
}

.step-text {
  color: #333;
  font-size: 18px;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  margin-left: 0rem;
  flex: 1;
}

/* Table Styles */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.post-content table th {
  font-size: 13px;
  font-weight: 600;
  color: white;
  background-color: #5c62ff;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  text-align: left;
}

.post-content table td {
  font-size: 12px;
  font-weight: 400;
  color: #44454b;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  line-height: 1.5;
}

.post-content table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.post-content table tbody tr:hover {
  background-color: #e9ecef;
}

/* List Styles */
.post-content ul,
.post-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.post-content ul ul,
.post-content ol ol,
.post-content ul ol,
.post-content ol ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

/* Image Styles */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

.post-content figure {
  margin: 1.5rem 0;
}

.post-content figure img {
  margin: 0;
}

.secondary-menu,
.sub-category {
  font-size: 14px;
  line-height: 28px;
}

/* Post Excerpt */
.post-excerpt {
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  color: #44454b;
  margin-bottom: 2rem;
}

.post-excerpt p {
  margin-bottom: 1.5rem;
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
}

.post-excerpt p:last-child {
  margin-bottom: 0;
}

.post-excerpt img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

/* Table of Contents */
.table-of-contents {
  border: 1px solid #702FE7;
  padding: 1.5rem;
  margin-bottom: 2rem;
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.toc-title {
  font-size: 16px;
  font-weight: 600;
  color: #702FE7;
  margin-bottom: 1rem;
  margin-top: 0;
  line-height: 1.4;
}

.toc-list {
  list-style: disc;
  margin: 0;
  padding-left: 1.5rem;
}

.toc-list li::marker {
  color: #702FE7;
}

.toc-list li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.toc-level-1 {
  font-weight: 450;
  font-size: 16px;
  color: #702FE7;
  margin-left: 0;
}

.toc-level-2 {
  font-weight: 450;
  font-size: 16px;
  color: #702FE7;
  margin-left: 1rem;
}

.toc-level-3 {
  font-weight: 350;
  font-size: 14px;
  color: #702FE7;
  margin-left: 2rem;
}

.toc-level-4 {
  font-weight: 350;
  font-size: 13px;
  color: #702FE7;
  margin-left: 3rem;
}

.toc-level-5 {
  font-weight: 350;
  font-size: 12px;
  color: #702FE7;
  margin-left: 4rem;
}

.toc-level-6 {
  font-weight: 350;
  font-size: 11px;
  color: #702FE7;
  margin-left: 5rem;
}

.toc-list a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: #702FE7;
  text-decoration: underline;
}

.toc-level-1 a:hover {
  color: #702FE7;
  text-decoration: underline;
}

.toc-level-2 a:hover,
.toc-level-3 a:hover,
.toc-level-4 a:hover,
.toc-level-5 a:hover,
.toc-level-6 a:hover {
  color: #702FE7;
  text-decoration: underline;
}

/* Sidebar Table of Contents */
.toc-widget {
  margin-bottom: 2rem;
}

/* Hide the original toc-widget space on desktop when using fixed positioning */
@media (min-width: 769px) {
  .toc-widget {
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
}

.sidebar-toc {
  position: fixed;
  top: 84px; /* 匹配固定header的实际高度 */
  right: calc((100vw - 1185px) / 2); /* 计算sidebar的位置 */
  width: 280px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0;
  box-sizing: border-box;
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

.sidebar-toc::-webkit-scrollbar {
  width: 4px;
}

.sidebar-toc::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-toc::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.3);
  border-radius: 2px;
}

.sidebar-toc::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.5);
}

.sidebar-toc.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.sidebar-toc:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-toc .table-of-contents {
  border: none;
  padding: 1.5rem;
  margin-bottom: 0;
  background: transparent;
  border-radius: 0;
}

.sidebar-toc .toc-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  margin-top: 0;
  line-height: 1.3;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f3f4f6;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-toc .toc-title::before {
  content: "📋";
  font-size: 14px;
  opacity: 0.8;
}

.sidebar-toc .toc-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #8e62df, #a855f7);
  border-radius: 1px;
}

.sidebar-toc .toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-toc .toc-list li {
  margin-bottom: 0.125rem;
  line-height: 1.4;
}

.sidebar-toc .toc-list a {
  display: block;
  padding: 0.625rem 0.875rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin: 0 -0.375rem;
}

.sidebar-toc .toc-list a:hover {
  background: rgba(142, 98, 223, 0.08);
  transform: translateX(4px);
}

.sidebar-toc .toc-list a.active {
  background: rgba(142, 98, 223, 0.15) !important;
  color: #8e62df !important;
  font-weight: 600 !important;
  transform: translateX(6px) !important;
  position: relative;
}

.sidebar-toc .toc-level-1 {
  font-weight: 450;
  font-size: 14px;
  color: #333333;
}

.sidebar-toc .toc-level-2 {
  font-weight: 450;
  font-size: 14px;
  color: #333333;
  margin-left: 0;
  padding-left: 1rem;
}

.sidebar-toc .toc-level-3 {
  font-weight: 350;
  font-size: 11px;
  color: #333333;
  margin-left: 0;
  padding-left: 2rem;
}

.sidebar-toc .toc-level-4 {
  font-weight: 350;
  font-size: 10px;
  color: #666666;
  margin-left: 0;
  padding-left: 2.5rem;
}

.sidebar-toc .toc-level-5 {
  font-weight: 350;
  font-size: 10px;
  color: #666666;
  margin-left: 0;
  padding-left: 3rem;
}

.sidebar-toc .toc-level-6 {
  font-weight: 350;
  font-size: 9px;
  color: #888888;
  margin-left: 0;
  padding-left: 3.5rem;
}

/* 添加向上箭头指示器 */
.sidebar-toc .toc-list a::after {
  content: "";
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-left: 6px solid transparent;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%) scale(0);
  transition: all 0.3s ease;
  opacity: 0;
}

.sidebar-toc .toc-list a:hover::after {
  transform: translateY(-50%) scale(1);
  opacity: 0.5;
  border-left-color: #8e62df;
}

.sidebar-toc .toc-list a.active::after {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  border-left-color: #8e62df;
}

/* Large screens - adjust TOC position */
@media (min-width: 1400px) {
  .sidebar-toc {
    right: calc((100vw - 1185px) / 2 - 20px);
  }
}

/* Medium-large screens */
@media (max-width: 1400px) and (min-width: 769px) {
  .sidebar-toc {
    right: 20px;
  }
}

/* Editor Styles */
.editor-styles-wrapper .wp-block-heading h2,
.block-editor-block-list__layout .wp-block-heading h2,
.editor-styles-wrapper h2 {
  font-size: 28px;
  line-height: auto;
  text-align: left;
  background-color: #dfddff;
  padding: 1rem 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  width: 100%;
  box-sizing: border-box;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.editor-styles-wrapper .wp-block-heading h1,
.editor-styles-wrapper h1 {
  font-size: 40px;
  line-height: 60px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  margin-top: 2rem;
  margin-bottom: 1rem;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.editor-styles-wrapper .wp-block-heading h3,
.editor-styles-wrapper h3 {
  font-size: 24px;
  line-height: auto;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.editor-styles-wrapper .wp-block-heading h3::after,
.editor-styles-wrapper h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.8px;
  background-color: #9296ff;
}

.editor-styles-wrapper .toc-title::after {
  display: none;
}

.editor-styles-wrapper .wp-block-heading h4,
.editor-styles-wrapper h4 {
  font-size: 20px;
  line-height: 32px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  margin-top: 2rem;
  margin-bottom: 1rem;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.editor-styles-wrapper .wp-block-heading h5,
.editor-styles-wrapper h5 {
  font-size: 18px;
  line-height: 32px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  margin-top: 2rem;
  margin-bottom: 1rem;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.editor-styles-wrapper .wp-block-heading h6,
.editor-styles-wrapper h6 {
  font-size: 17px;
  line-height: 28px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 600;
  color: #333333;
  margin-top: 2rem;
  margin-bottom: 1rem;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.editor-styles-wrapper p {
  font-size: 17px;
  line-height: 28px;
  font-family: "Noto Sans JP", sans-serif;
  color: #333333;
  font-weight: 400;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Editor Table Styles */
.editor-styles-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.editor-styles-wrapper table th {
  font-size: 13px;
  font-weight: 600;
  color: white;
  background-color: #5c62ff;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  text-align: left;
}

.editor-styles-wrapper table td {
  font-size: 12px;
  font-weight: 400;
  color: #44454b;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  line-height: 1.5;
}

.editor-styles-wrapper table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.editor-styles-wrapper table tbody tr:hover {
  background-color: #e9ecef;
}

/* Editor List Styles */
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.editor-styles-wrapper li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.editor-styles-wrapper ul ul,
.editor-styles-wrapper ol ol,
.editor-styles-wrapper ul ol,
.editor-styles-wrapper ol ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

/* Editor Step Box Style */
.editor-styles-wrapper .step-box {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  font-family: "Noto Sans JP", sans-serif;
}

.editor-styles-wrapper h5.step-box {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  margin: 1.5rem 0;
}

.editor-styles-wrapper .step-number {
  background-color: #5c62ff;
  color: white;
  font-size: 17px;
  font-weight: 600;
  padding: 0rem 0.375rem;
  border-radius: 6px;
  white-space: nowrap;
}

.editor-styles-wrapper .step-text {
  color: #333;
  font-size: 18px;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  margin-left: 0rem;
  flex: 1;
}

/* Editor Image Styles */
.editor-styles-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

.editor-styles-wrapper figure {
  margin: 1.5rem 0;
}

.editor-styles-wrapper figure img {
  margin: 0;
}

.editor-styles-wrapper {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: #333333;
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Post Hero Section */
.post-hero-section {
  margin: 0 auto 2rem auto;
  background: #fff;
  width: 1185px;
  max-width: 100%;
  height: 378px;
  overflow: hidden;
  box-sizing: border-box;
}

.post-hero-content {
  display: grid;
  grid-template-columns: 551px 634px;
  gap: 0;
  height: 378px;
  align-items: center;
}

.post-hero-left {
  padding: 3rem 2.5rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 378px;
  box-sizing: border-box;
}

.post-title-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.post-hero-left .post-title {
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 60px;
  margin-bottom: 0;
  color: #251b32;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-hero-left .post-meta {
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #44454b;
  margin-bottom: 0;
  line-height: 1.75;
  padding-bottom: 0;
}

.post-hero-left .post-meta span {
  display: block;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.post-hero-left .post-meta span:last-child {
  margin-bottom: 0;
}

.post-hero-left .post-meta .author-name {
  color: #8e62df;
  font-weight: 500;
  display: inline;
}

.post-hero-left .post-meta a {
  color: #4654ff;
  text-decoration: none;
  font-weight: 500;
}

.post-hero-left .post-meta a:hover {
  color: #5c62ff;
  text-decoration: underline;
}

.post-hero-right {
  position: relative;
  background: #ecf0f1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 634px;
  height: 378px;
}

.post-hero-right .post-thumbnail {
  width: 634px;
  height: 378px;
  position: relative;
  overflow: hidden;
}

.post-hero-right .post-thumbnail img {
  width: 634px;
  height: 378px;
  object-fit: cover;
}

/* Single post specific styles */
.single-post .post-hero-left .post-title {
  font-size: 40px;
  line-height: 60px;
}

/* When no featured image */
.post-hero-content:not(:has(.post-thumbnail)) {
  grid-template-columns: 1fr;
}

.post-hero-content:not(:has(.post-thumbnail)) .post-hero-left {
  text-align: center;
  padding: 4rem 3rem;
}

/* Sidebar */
.sidebar {
  background: #fff;
  padding: 2rem;
  height: fit-content;
  justify-self: end;
  width: 320px;
  text-align: left;
  position: relative;
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Popular Posts Widget */
.popular-posts-widget .widget-title {
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #251b32;
  margin-bottom: 1rem;
  margin-left: -2rem;
  margin-right: -2rem;
  line-height: 1.2;
  text-align: left !important;
  width: 320px;
}

.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.popular-post-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  border-bottom: none;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  text-align: left;
  width: 320px;
  margin-left: -2rem;
  margin-right: -2rem;
}

.popular-post-item:last-child {
  margin-bottom: 0;
}

.popular-post-thumbnail {
  width: 320px;
  height: 191px;
  overflow: hidden;
  position: relative;
}

.popular-post-thumbnail img {
  width: 320px;
  height: 191px;
  object-fit: cover;
}

.popular-post-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left !important;
  align-items: flex-start;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.popular-post-title {
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  text-align: left !important;
  width: 100%;
}

.popular-post-title a {
  color: #251b32;
  text-decoration: none;
  font-weight: 600;
  text-align: left !important;
  display: block;
  width: 100%;
}

.popular-post-title a:hover {
  color: #4654ff;
}

.popular-post-meta {
  display: none;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #3a3a52 0%, #2d2d42 100%);
  color: #fff;
  margin-top: 4rem;
  padding: 4rem 0 3rem 0;
}

.footer-container {
  max-width: 1191px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

/* Brand Section */
.footer-brand {
  max-width: 400px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #8e62df, #a855f7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  font-family: "Urbanist", sans-serif;
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  font-family: "Urbanist", sans-serif;
}

.brand-description {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  font-family: "Urbanist", sans-serif;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
}

.social-link:hover {
  background: rgba(142, 98, 223, 0.8);
  color: white;
  transform: translateY(-2px);
}

/* Links Section */
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.link-column {
  display: flex;
  flex-direction: column;
}

.column-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-family: "Urbanist", sans-serif;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-list li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: color 0.3s ease;
  font-family: "Urbanist", sans-serif;
}

.link-list li a:hover {
  color: #8e62df;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
  }

  .brand-logo {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* Responsive Design */
/* Mobile Menu Button */
.mobile-menu-button {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #251b32;
  transition: color 0.2s ease;
}

.mobile-menu-button:hover {
  color: #4654ff;
}

.mobile-menu-button svg {
  width: 20px;
  height: 20px;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: hsl(var(--background));
  border-left: 1px solid hsl(var(--border));
  z-index: 1001;
  transition: right 0.3s ease;
  overflow-y: auto;
}

@media (max-width: 480px) {
  .mobile-drawer {
    width: 100vw;
  }
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-title {
  font-size: 18px;
  font-weight: 600;
  color: #251b32;
}

.mobile-drawer-close {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #251b32;
}

.mobile-drawer-close svg {
  width: 20px;
  height: 20px;
}

.mobile-drawer-nav {
  padding: 1rem 0;
}

.mobile-nav-group {
  margin-bottom: 1rem;
}

.mobile-nav-trigger {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: #251b32;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
}

.mobile-nav-trigger:hover {
  background: hsl(var(--accent));
}

.mobile-nav-trigger svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.mobile-nav-trigger.open svg {
  transform: rotate(180deg);
}

.mobile-nav-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-nav-content.open {
  max-height: 1000px;
}

.mobile-nav-item {
  padding: 0.75rem 1.5rem;
  display: block;
  text-decoration: none;
  color: #251b32;
  transition: background-color 0.2s ease;
}

.mobile-nav-item:hover {
  background: hsl(var(--accent));
}

.mobile-nav-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #251b32;
  margin-bottom: 0.25rem;
}

.mobile-nav-item-desc {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  line-height: 1.4;
}

.mobile-nav-separator {
  padding: 1rem;
  border-top: 1px solid hsl(var(--border));
}

/* Small screens and mobile phones */
@media (max-width: 768px) {
  /* Header mobile optimization */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    padding: 0;
  }

  .header-container {
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    padding: 0 16px;
    flex-direction: row;
    gap: 1rem;
  }

  .header-left {
    gap: 1rem;
  }

  .site-title img {
    height: 16px;
  }

  .main-navigation {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .header-actions {
    height: 56px;
    gap: 0.5rem;
  }

  .pricing-link {
    display: none;
  }

  .login-btn {
    height: 32px;
    padding: 0 1rem;
    font-size: 13px;
  }

  /* Main content mobile optimization */
  .site-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 16px;
    padding-top: 76px;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .content-area {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100% !important;
    max-width: 100% !important;
    justify-items: stretch;
    box-sizing: border-box;
  }

  .primary-content {
    padding: 1.5rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Post content mobile optimization */
  .post-title {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .post-meta {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
  }

  .post-content {
    font-size: 16px;
    line-height: 1.6;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .post-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .post-content h1 {
    font-size: 28px;
    line-height: 1.2;
    text-align: left;
    margin: 1.5rem 0 1rem 0;
  }

  .post-content h2 {
    font-size: 22px;
    line-height: 1.3;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
  }

  .post-content h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 1.5rem 0 0.75rem 0;
  }

  .post-content h4 {
    font-size: 18px;
    line-height: 1.3;
    margin: 1.25rem 0 0.75rem 0;
  }

  .post-content h5 {
    font-size: 16px;
    line-height: 1.4;
    margin: 1rem 0 0.5rem 0;
  }

  .post-content h6 {
    font-size: 15px;
    line-height: 1.4;
    margin: 1rem 0 0.5rem 0;
  }

  /* Step box mobile optimization */
  .step-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
  }

  .step-number {
    font-size: 14px;
    padding: 0.25rem 0.5rem;
  }

  .step-text {
    font-size: 16px;
    padding: 0;
    margin: 0;
  }

  /* Table mobile optimization */
  .post-content table {
    font-size: 12px;
    margin: 1rem 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    table-layout: fixed;
    border-collapse: collapse;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Fallback: if table content is still too wide, provide smooth horizontal scrolling */
  .post-content table {
    min-width: 100%;
  }

  /* Enhanced table container for smooth scrolling when absolutely necessary */
  .post-content .table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
  }

  .post-content .table-responsive::-webkit-scrollbar {
    height: 6px;
  }

  .post-content .table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .post-content .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
  }

  .post-content .table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }

  .post-content table th {
    font-size: 11px;
    padding: 0.5rem 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .post-content table td {
    font-size: 10px;
    padding: 0.5rem 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* List mobile optimization */
  .post-content ul,
  .post-content ol {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
  }

  .post-content li {
    margin-bottom: 0.375rem;
    line-height: 1.5;
    font-size: 16px;
  }

  /* Image mobile optimization */
  .post-content img {
    margin: 1rem 0;
    border-radius: 8px;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }

  .post-content figure {
    margin: 1rem 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .post-content figure img {
    margin: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* Hide TOC completely on mobile for better reading experience */
  .sidebar-toc {
    display: none !important;
  }

  /* Hero section mobile optimization */
  .post-hero-section {
    margin: 0 auto 1.5rem auto;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    background: #fff;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .post-hero-content {
    grid-template-columns: 1fr;
    gap: 0;
    height: auto;
    align-items: stretch;
  }

  .post-hero-left {
    padding: 1.5rem;
    height: auto;
    order: 2;
  }

  .post-hero-left .post-title {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .post-hero-left .post-meta {
    font-size: 14px;
    line-height: 1.5;
  }

  .post-hero-left .post-meta span {
    display: block;
    margin-bottom: 0.25rem;
    white-space: normal;
  }

  .post-hero-right {
    width: 100%;
    height: 200px;
    order: 1;
  }

  .post-hero-right .post-thumbnail {
    width: 100%;
    height: 200px;
  }

  .post-hero-right .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  /* Hide sidebar completely on mobile for better reading experience */
  .sidebar {
    display: none !important;
  }

  /* Hide all sidebar widgets on mobile */
  .widget,
  .popular-posts-widget,
  .toc-widget {
    display: none !important;
  }

  /* Hide individual sidebar components */
  .popular-posts-list,
  .popular-post-item,
  .table-of-contents {
    display: none !important;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .header-container {
    padding: 0 12px;
  }

  .site-main {
    padding: 0 12px;
    padding-top: 76px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .primary-content {
    padding: 1rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .content-area {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .post-hero-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .post-content {
    font-size: 15px;
  }

  .post-content p {
    font-size: 15px;
  }

  .post-content h1 {
    font-size: 24px;
  }

  .post-content h2 {
    font-size: 20px;
    padding: 0.5rem 0.75rem;
  }

  .post-content h3 {
    font-size: 18px;
  }

  .post-content h4 {
    font-size: 16px;
  }

  /* Extra small screen table optimization */
  .post-content table {
    font-size: 11px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .post-content table th {
    font-size: 10px;
    padding: 0.375rem 0.125rem;
  }

  .post-content table td {
    font-size: 9px;
    padding: 0.375rem 0.125rem;
  }

  .post-hero-left {
    padding: 1rem;
  }

  .post-hero-left .post-title {
    font-size: 20px;
  }

  /* Keep sidebar hidden on extra small screens */
  .sidebar {
    display: none !important;
  }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-main {
    width: 100% !important;
    padding: 0 32px;
    max-width: 900px !important;
    box-sizing: border-box;
  }

  .content-area {
    width: 100% !important;
    max-width: 900px !important;
    gap: 1.5rem;
    box-sizing: border-box;
  }

  .post-hero-section {
    width: 100% !important;
    max-width: 900px !important;
    height: auto;
    box-sizing: border-box;
  }

  .post-hero-content {
    grid-template-columns: 1fr;
    height: auto;
  }

  .post-hero-left {
    padding: 2rem;
  }

  .post-hero-right {
    width: 100%;
    height: 300px;
  }

  .post-hero-right .post-thumbnail {
    width: 100%;
    height: 300px;
  }

  .post-hero-right .post-thumbnail img {
    width: 100%;
    height: 300px;
  }

  /* Hide sidebar on tablet as well for better reading experience */
  .sidebar {
    display: none !important;
  }
}

/* WordPress Editor Mobile Optimization */
@media (max-width: 768px) {
  .editor-styles-wrapper {
    font-size: 16px;
    line-height: 1.6;
    padding: 0 16px;
  }

  .editor-styles-wrapper .wp-block-heading h1,
  .editor-styles-wrapper h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 1.5rem 0 1rem 0;
  }

  .editor-styles-wrapper .wp-block-heading h2,
  .editor-styles-wrapper h2 {
    font-size: 22px;
    line-height: 1.3;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
  }

  .editor-styles-wrapper .wp-block-heading h3,
  .editor-styles-wrapper h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.375rem;
  }

  .editor-styles-wrapper .wp-block-heading h4,
  .editor-styles-wrapper h4 {
    font-size: 18px;
    line-height: 1.3;
    margin: 1.25rem 0 0.75rem 0;
  }

  .editor-styles-wrapper .wp-block-heading h5,
  .editor-styles-wrapper h5 {
    font-size: 16px;
    line-height: 1.4;
    margin: 1rem 0 0.5rem 0;
  }

  .editor-styles-wrapper .wp-block-heading h6,
  .editor-styles-wrapper h6 {
    font-size: 15px;
    line-height: 1.4;
    margin: 1rem 0 0.5rem 0;
  }

  .editor-styles-wrapper p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }

  .editor-styles-wrapper table {
    font-size: 12px;
    margin: 1rem 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    table-layout: fixed;
    border-collapse: collapse;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .editor-styles-wrapper table th {
    font-size: 11px;
    padding: 0.5rem 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .editor-styles-wrapper table td {
    font-size: 10px;
    padding: 0.5rem 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .editor-styles-wrapper ul,
  .editor-styles-wrapper ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
  }

  .editor-styles-wrapper li {
    margin-bottom: 0.375rem;
    line-height: 1.5;
    font-size: 16px;
  }

  .editor-styles-wrapper .step-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
  }

  .editor-styles-wrapper .step-number {
    font-size: 14px;
    padding: 0.25rem 0.5rem;
  }

  .editor-styles-wrapper .step-text {
    font-size: 16px;
    padding: 0;
    margin: 0;
  }

  .editor-styles-wrapper img {
    margin: 1rem 0;
    border-radius: 8px;
  }

  .editor-styles-wrapper figure {
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  .editor-styles-wrapper {
    font-size: 15px;
    padding: 0 12px;
  }

  .editor-styles-wrapper p {
    font-size: 15px;
  }

  .editor-styles-wrapper .wp-block-heading h1,
  .editor-styles-wrapper h1 {
    font-size: 24px;
  }

  .editor-styles-wrapper .wp-block-heading h2,
  .editor-styles-wrapper h2 {
    font-size: 20px;
    padding: 0.5rem 0.75rem;
  }

  .editor-styles-wrapper .wp-block-heading h3,
  .editor-styles-wrapper h3 {
    font-size: 18px;
  }

  .editor-styles-wrapper .wp-block-heading h4,
  .editor-styles-wrapper h4 {
    font-size: 16px;
  }

  /* Extra small screen editor table optimization */
  .editor-styles-wrapper table {
    font-size: 11px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .editor-styles-wrapper table th {
    font-size: 10px;
    padding: 0.375rem 0.125rem;
  }

  .editor-styles-wrapper table td {
    font-size: 9px;
    padding: 0.375rem 0.125rem;
  }
}

/* Touch-friendly and accessibility improvements */
@media (max-width: 768px) {
  /* Touch-friendly button sizes */
  .login-btn,
  .mobile-menu-button,
  .mobile-drawer-close,
  .mobile-nav-trigger {
    min-height: 44px;
    min-width: 44px;
  }

  /* Better tap targets for links */
  .nav-link,
  .mobile-nav-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.5rem;
  }

  /* Improved focus states for keyboard navigation */
  .mobile-nav-trigger:focus,
  .mobile-nav-item:focus,
  .login-btn:focus,
  .mobile-menu-button:focus {
    outline: 2px solid #4654ff;
    outline-offset: 2px;
  }

  /* Better scroll behavior */
  html {
    scroll-behavior: smooth;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  /* Universal width control for mobile */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Ensure all content elements respect container width */
  .post-content *,
  .primary-content *,
  .site-main * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Special handling for pre and code blocks */
  .post-content pre {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-sizing: border-box;
  }

  .post-content code {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Emergency overflow prevention */
  .site,
  .site-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Ensure viewport meta tag behavior */
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Improved table scrolling */
  .post-content table {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  }

  .post-content table::-webkit-scrollbar {
    height: 6px;
  }

  .post-content table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .post-content table::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
  }

  .post-content table::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
  }

  /* Better mobile form styling */
  input[type="search"],
  input[type="text"],
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ccc;
  }

  /* Mobile-optimized search form */
  .search-form {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
  }

  .search-field {
    flex: 1;
    min-height: 44px;
  }

  .search-submit {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem;
    background: #4654ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }

  /* Better mobile typography */
  .post-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Improved mobile spacing */
  .post,
  .widget {
    margin-bottom: 1.5rem;
  }

  /* Mobile-optimized blockquotes */
  .post-content blockquote {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 4px solid #4654ff;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
  }

  /* Mobile code blocks */
  .post-content pre,
  .post-content code {
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    overflow-x: auto;
    word-wrap: break-word;
  }

  .post-content pre {
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
  }

  /* Mobile pagination */
  .pagination {
    margin: 2rem 0;
    text-align: center;
  }

  .pagination a,
  .pagination span {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0.25rem;
    min-height: 44px;
    min-width: 44px;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #4654ff;
    background: white;
    box-sizing: border-box;
  }

  .pagination .current {
    background: #4654ff;
    color: white;
  }

  /* Loading states */
  .loading {
    opacity: 0.6;
    pointer-events: none;
  }

  /* Dark mode media query support */
  @media (prefers-color-scheme: dark) {
    .post-content pre,
    .post-content code {
      background: #2d3748;
      color: #e2e8f0;
    }

    .post-content blockquote {
      background: #2d3748;
      color: #e2e8f0;
    }
  }
}
