/**
 * Astra 主题自定义美化样式 - 宽屏版本 v2.0
 * Version: 2.0.0
 * 功能: 宽屏模式、现代化设计、优化布局
 */

:root {
  --primary-color: #2d7a3e;
  --secondary-color: #f5a623;
  --light-bg: #f8f9fa;
  --dark-text: #2c3e50;
  --transition: all 0.3s ease;
  --max-width: 1400px;
  --content-width: 100%;
  --sidebar-width: 320px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-text);
  margin: 0;
  padding: 0;
  background: #fff;
}

/* ============ 页头美化 ============ */
.site-header {
  background: linear-gradient(135deg, #fff, #f8f9fa);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
  border-bottom: 1px solid #e8e8e8;
}

.site-header .ast-container {
  max-width: 100%;
  padding: 0 20px;
}

@media (min-width: 1200px) {
  .site-header .ast-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
  }
}

/* ============ 标题样式 ============ */
.site-title {
  color: var(--primary-color) !important;
  transition: var(--transition);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 !important;
}

.site-title:hover {
  color: var(--secondary-color) !important;
  transform: scale(1.02);
}

.site-description {
  color: #666;
  font-size: 14px;
  font-weight: 400;
  margin-top: 5px !important;
}

/* 页面标题 */
.page-title,
.entry-title {
  color: var(--dark-text);
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-text);
  transition: var(--transition);
  line-height: 1.3;
}

h1 { font-size: 38px; font-weight: 700; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 26px; font-weight: 600; }
h4 { font-size: 22px; font-weight: 600; }
h5 { font-size: 18px; font-weight: 600; }
h6 { font-size: 16px; font-weight: 600; }

/* ============ 导航菜单 ============ */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 0;
}

.main-navigation a {
  color: var(--dark-text);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 16px;
}

.main-navigation a:hover {
  color: var(--primary-color) !important;
  background: rgba(45, 122, 62, 0.08);
  border-radius: 4px;
}

.main-navigation .current-menu-item > a {
  color: var(--primary-color) !important;
  border-bottom: 3px solid var(--primary-color);
}

/* ============ 网站容器宽屏化 ============ */
.site-content,
.content-area,
.ast-container {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 1200px) {
  .ast-container {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
  }
  
  .site-content {
    max-width: 100%;
    display: flex;
    gap: 30px;
  }
  
  .content-area {
    flex: 1;
  }
  
  .sidebar {
    width: var(--sidebar-width);
  }
}

/* ============ 文章卡片 ============ */
.post,
.entry-content,
.wp-block-group {
  max-width: 100%;
}

.post {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: var(--transition);
  margin-bottom: 30px;
  padding: 20px;
  overflow: hidden;
}

.post:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  transform: translateY(-6px);
}

.post-thumbnail {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  transition: var(--transition);
}

.post:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-header {
  margin-bottom: 15px;
}

.post-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}

.post-excerpt,
.post-content {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

/* ============ 按钮样式 ============ */
.button, 
.btn, 
.wp-block-button__link, 
a.button,
button {
  background: linear-gradient(135deg, var(--primary-color), #1e5f2e);
  color: #fff !important;
  border-radius: 6px;
  padding: 12px 28px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(45, 122, 62, 0.2);
}

.button:hover, 
.btn:hover, 
.wp-block-button__link:hover,
a.button:hover,
button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(45, 122, 62, 0.3);
}

.button:active,
.btn:active,
button:active {
  transform: translateY(-1px);
}

/* 次要按钮 */
.button.secondary,
.btn.secondary {
  background: var(--light-bg);
  color: var(--dark-text) !important;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.button.secondary:hover,
.btn.secondary:hover {
  background: #fff;
  border-color: var(--primary-color);
  color: var(--primary-color) !important;
}

/* ============ 小部件 ============ */
.widget {
  background: var(--light-bg);
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  border-radius: 8px;
  transition: var(--transition);
  margin-bottom: 25px;
}

.widget:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.widget-title {
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

.widget ul,
.widget ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--dark-text);
  text-decoration: none;
  transition: var(--transition);
}

.widget a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* ============ 页脚美化 ============ */
.site-footer {
  background: linear-gradient(135deg, #2c3e50, #1a252f);
  color: #ecf0f1;
  padding: 50px 0 20px;
  margin-top: 60px;
}

.site-footer .ast-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.site-footer a {
  color: #bdc3c7;
  transition: var(--transition);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-nav,
.footer-info {
  font-size: 14px;
  line-height: 1.8;
}

.site-info {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #95a5a6;
}

/* ============ 响应式设计 ============ */
@media (max-width: 1199px) {
  :root {
    --max-width: 100%;
  }
  
  .site-header .ast-container,
  .ast-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
  
  .site-content {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --max-width: 100%;
  }
  
  .site-header .ast-container,
  .ast-container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .site-title {
    font-size: 24px !important;
  }
  
  .page-title,
  .entry-title {
    font-size: 28px;
  }
  
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
  
  .post {
    margin-bottom: 20px;
    padding: 15px;
  }
  
  .main-navigation a {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .button, .btn, .wp-block-button__link, a.button {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .widget {
    padding: 15px;
  }
  
  .site-footer .ast-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-header .ast-container,
  .ast-container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .site-title {
    font-size: 20px !important;
  }
  
  .page-title,
  .entry-title {
    font-size: 24px;
  }
  
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }
  
  .post {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
  }
  
  .button, .btn, .wp-block-button__link, a.button {
    padding: 8px 16px;
    font-size: 12px;
    width: auto;
  }
}

/* ============ 打印样式 ============ */
@media print {
  .site-header,
  .site-footer,
  .sidebar {
    display: none;
  }
  
  body {
    background: #fff;
  }
}
