@import url('./fonts/fonts.css');

:root {
  --logo: #009cff;
  --nav: #f5f6f7;
  --body: #0b7d39;
  --font: #333;
  --a: #333;
  --theme:#4d9e76;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', 'Roboto', sans-serif;
}

/* Headings use Lilita One font */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lilita One', 'Inter', 'Roboto', sans-serif;
}

/* Ensure spans inside headings also use Lilita One font */
h1 span, h2 span, h3 span, h4 span, h5 span, h6 span {
  font-family: 'Lilita One', 'Inter', 'Roboto', sans-serif;
}

body {
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--font);
  background: var(--body);
  background-size: contain;
}
html {
  font-size: 16px;
}
img {
  object-fit: cover;
}
a {
  line-height: 20px;
  text-decoration: none;
  color: var(--a);
  margin: 0;
}

a:hover,
a:active {
  text-decoration: none;
}

strong {
  font-weight: bolder;
}


/* 定义全局滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  border-radius: 4px;
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #c1c1c1;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 菜单弹窗样式 */
.menu-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background-color: rgba(0, 0, 0, 0.5);
  z-index: 13;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.menu-content {
  background-color: white;
  width: 85%;
  max-width: 400px;
  padding: 10px;
  padding-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.menu-items {
  padding: 20px;
}

.menu-item {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  color: #333;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.menu-item:hover {
  color: var(--logo);
}

/* 页脚样式 */
.footer {
  background-color: #f8f9fa;
  padding: 40px 0 20px;
  border-top: 1px solid #eee;
}

.footer-container {
  width: 80%;
  max-width: 1500px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo {
  height: 40px;
  margin-bottom: 15px;
}

.footer-desc {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.footer-title {
  font-size: 1rem;
  color: #343a40;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--logo);
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-link {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-link:hover {
  color: var(--logo);
}

.footer-info .footer-text {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}
.detail-title {
  font-size: 36px;
  font-weight: bold;
}
.copyright {
  color: #6c757d;
  font-size: 0.85rem;
  margin: 0;
}
/* 横向滚动容器样式 */
.horizontal-scroll-container {
  width: 100%;
  position: relative;
  padding: 5px 0 25px;
}

.horizontal-scroll-list {
  display: flex;
  gap: 20px;
  padding: 5px 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  overflow-y: hidden;
}

/* 横向滚动项目样式 */
.horizontal-item {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s ease forwards;
  cursor: pointer;
}

.horizontal-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.horizontal-item .image-placeholder {
  height: 160px;
}

.horizontal-item .item-info {
  padding: 18px 15px;
}

.horizontal-item .item-title {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.horizontal-item .item-excerpt {
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #6b7280;
}

/* 滚动指示器 */
.scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: rgba(0, 156, 255, 0.3);
  border-radius: 2px;
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.6;
    width: 40px;
  }
  50% {
    opacity: 1;
    width: 50px;
  }
}
@media (min-width: 1024px) {
  .featured-section {
    grid-template-columns: repeat(4, 1fr);
    margin: 0 auto 45px;
  }
}

@media (max-width: 767px) {
  #markdown-content h2 {
    font-size: 18px;
  }
  #markdown-content h3 {
    font-size: 16px;
  }
  .detail-title {
    font-size: 20px;
  }
  .image-placeholder.small {
    /* height: 85px; */
    width: 120px;
  }
  .search-input.active {
    width: 100px;
  }
  .featured-large .image-placeholder {
    height: 180px;
    flex: none;
  }
  .horizontal-scroll-list {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 隐藏滚动条但保留功能 */
  }

  .horizontal-scroll-list::-webkit-scrollbar {
    display: none;
  }
  .horizontal-scroll-container {
    padding: 5px 10px 25px;
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }

  .horizontal-item {
    flex: 0 0 240px;
  }

  .horizontal-item .image-placeholder {
    height: 140px;
  }
  .content-container {
    width: 98%;
  }
  .section-title {
    margin: 15px 0 15px;
  }
  .section-title h2 {
    font-size: 1.45rem;
  }
  .featured-section {
    gap: 18px;
    margin-bottom: 30px;
    grid-template-columns: 1fr;
  }

  /* 新增：移动端统一卡片尺寸 */
  .featured-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .item-info {
    padding: 10px 8px 8px;
  }
  .item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5; /* 设置合适的行高 */
    max-height: 3em; /* 两行高度，根据实际行高调整 */
  }
  .featured-large .item-title {
    font-size: 1.2rem;
  }
  .article-item {
    gap: 15px;
    padding: 15px;
  }
}

/* Group hover effects to replace Tailwind group-hover classes */
.group:hover .group-hover-text-orange {
  color: #d67738 !important;
}

/* Marquee animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marquee 30s linear infinite;
}

/* For marquee animation pause on group hover */
.group:hover .marquee-track {
  animation-play-state: paused;
}