/* ========================================
   内容页面样式表 - 水米田农业官网
   ======================================== */

/* 页面标题 */
.page-header {
  position: relative;
  background: radial-gradient(circle farthest-corner at 20% 20%, rgba(31, 122, 77, 0.88), rgba(27, 106, 201, 0.75));
  color: white;
  padding: var(--spacing-5xl) 0 var(--spacing-4xl);
  margin-top: 82px;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(15, 27, 19, 0.65), rgba(15, 27, 19, 0.4)), url('../images/Vd6DvytFk87m.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.56;
  mix-blend-mode: soft-light;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 55%;
  background: radial-gradient(circle, rgba(247, 183, 51, 0.42), transparent 60%);
  filter: blur(50px);
  opacity: 0.8;
}

.page-header .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  align-items: flex-start;
  text-align: left;
}

.page-header h1 {
  color: white;
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-6xl);
  max-width: 720px;
}

.page-subtitle {
  font-size: var(--font-size-xl);
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  max-width: 680px;
  line-height: 1.7;
}

/* 页面内容 */
.page-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.9fr);
  gap: var(--spacing-3xl);
  align-items: start;
  margin-top: calc(-1 * var(--spacing-3xl));
}

.content-main {
  min-width: 0;
}

.article {
  background: var(--surface-elevated);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-3xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(190, 201, 195, 0.35);
  position: relative;
  overflow: hidden;
}

.article-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-2xl);
  box-shadow: var(--shadow-md);
}

.article h2 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid rgba(31, 122, 77, 0.25);
}

.article h3 {
  color: var(--primary-color);
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
}

.article p {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-xl);
}

.article ul {
  margin-left: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.article li {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
}

.article li::before {
  content: '✓ ';
  color: var(--primary-color);
  font-weight: var(--font-weight-bold);
  margin-right: var(--spacing-sm);
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  position: sticky;
  top: 120px;
}

.sidebar-widget {
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(190, 201, 195, 0.35);
  backdrop-filter: blur(18px);
}

.sidebar-widget h4 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-xl);
  font-size: var(--font-size-lg);
}

.sidebar-links,
.sidebar-news {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-links li,
.sidebar-news li {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid rgba(190, 201, 195, 0.35);
  padding-bottom: var(--spacing-lg);
}

.sidebar-links li:last-child,
.sidebar-news li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-links a,
.sidebar-news a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
  display: block;
  padding: var(--spacing-sm) 0;
}

.sidebar-links a:hover,
.sidebar-news a:hover {
  color: var(--primary-color);
  padding-left: var(--spacing-md);
}

/* 表格样式 */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
}

.article table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article table thead {
  background: linear-gradient(120deg, var(--primary-dark), var(--secondary-dark));
  color: white;
}

.article table th {
  padding: var(--spacing-lg);
  text-align: left;
  font-weight: 600;
}

.article table td {
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(190, 201, 195, 0.4);
}

.article table tbody tr:hover {
  background-color: rgba(69, 168, 104, 0.08);
}

.article table tbody tr:last-child td {
  border-bottom: none;
}

/* 相关产品 */
.related-products {
  margin-top: var(--spacing-4xl);
}

.related-products .card {
  transition: all var(--transition-base);
}

.related-products .card:hover {
  transform: translateY(-8px);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .page-header {
    margin-top: 70px;
    padding: var(--spacing-4xl) 0;
  }

  .page-header h1 {
    font-size: var(--font-size-5xl);
  }

  .page-content {
    grid-template-columns: 1fr;
    margin-top: var(--spacing-2xl);
  }

  .sidebar {
    position: static;
    flex-direction: row;
    gap: var(--spacing-xl);
  }

  .sidebar-widget {
    flex: 1;
  }

  .article-image {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .page-header {
    margin-top: 64px;
    padding: var(--spacing-3xl) 0;
  }

  .page-header h1 {
    font-size: var(--font-size-4xl);
  }

  .page-subtitle {
    font-size: var(--font-size-base);
  }

  .article {
    padding: var(--spacing-2xl);
  }

  .article-image {
    height: 240px;
    margin-bottom: var(--spacing-xl);
  }

  .sidebar {
    flex-direction: column;
  }

  .sidebar-widget {
    padding: var(--spacing-xl);
  }

  .sidebar-widget h4 {
    margin-bottom: var(--spacing-lg);
  }

  table {
    font-size: var(--font-size-sm);
  }

  table th,
  table td {
    padding: var(--spacing-md);
  }
}

@media (max-width: 576px) {
  .page-header {
    padding: var(--spacing-2xl) 0;
  }

  .page-header h1 {
    font-size: var(--font-size-3xl);
  }

  .page-subtitle {
    font-size: var(--font-size-sm);
  }

  .article {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
  }

  .article h2 {
    font-size: var(--font-size-2xl);
  }

  .article h3 {
    font-size: var(--font-size-lg);
  }

  .article-image {
    height: 200px;
    margin-bottom: var(--spacing-lg);
  }

  .article p {
    font-size: var(--font-size-sm);
  }

  .sidebar-widget {
    padding: var(--spacing-lg);
  }

  .sidebar-links a:hover,
  .sidebar-news a:hover {
    padding-left: 0;
  }

  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: var(--spacing-sm);
  }
}

/* 动画效果 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article {
  animation: slideIn 0.6s ease-out;
}

.sidebar-widget {
  animation: slideIn 0.6s ease-out;
}

.sidebar-widget:nth-child(2) {
  animation-delay: 0.1s;
}

/* 打印样式 */
@media print {
  .navbar,
  .footer,
  .sidebar,
  .page-header {
    display: none;
  }

  .page-content {
    grid-template-columns: 1fr;
  }

  .article {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }

  a {
    color: var(--text-primary);
  }
}
