/* ===== 移动端响应式样式 ===== */

/* 文章详情页：移动端隐藏右侧精选案例 + 代码块适配 */
@media (max-width: 768px) {
  .article-page-layout {
    flex-direction: column;
  }
  .article-page-main {
    width: 100%;
    padding-right: 0;
  }
  .portfolio-sidebar {
    display: none;
  }
  .article-page-content {
    max-width: 100%;
  }
  .article-page-content pre {
    padding: 14px;
  }
  .article-page-content pre code {
    font-size: 12px;
  }
}

/* 服务网格响应式布局 */
@media (max-width: 1200px) {
  .services-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
  }
}

@media (max-width: 768px) {
  .services-grid {
      grid-template-columns: 1fr;
      gap: 15px;
  }
  
  .service-card {
      padding: 25px;
      min-height: auto;
  }
}

/* MyApps 响应式布局 */
@media (max-width: 1200px) {
  .myapps-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
  }
}

@media (max-width: 768px) {
  .myapps {
      padding: 60px 0;
  }

  .myapps-grid {
      grid-template-columns: 1fr;
      gap: 16px;
  }

  .myapp-card {
      padding: 24px;
      min-height: auto;
  }

  .myapp-card-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
  }

  .myapp-number {
      font-size: 28px;
  }

  .myapp-card-header h3 {
      font-size: 20px;
  }

  .myapp-description {
      font-size: 14px;
      -webkit-line-clamp: 2;
  }
}

/* Showcase 响应式设计 */
@media (max-width: 1024px) {
  .showcase {
      padding: 60px 0 40px;
  }

  .showcase-wrapper {
      padding: 30px 0 0;
  }

  .showcase-item {
      min-height: 520px;
      width: clamp(320px, 50vw, 800px);
  }
  
  .showcase-wrapper {
      min-height: 520px;
  }
  
  .showcase-track {
      padding-left: 4%;
  }

  .showcase-content {
      left: 30px;
      right: 30px;
      top: 50%;
      transform: translateY(-50%);
      max-width: 100%;
      padding: 0;
  }

  .showcase-title {
      font-size: 24px;
      margin-bottom: 12px;
  }

  .showcase-number {
      font-size: 70px;
      margin-bottom: -30px;
  }

  .showcase-description {
      font-size: 16px;
      margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .showcase {
      padding: 50px 0 30px;
  }

  .showcase-wrapper {
      padding: 20px 0 0;
      min-height: auto;
  }

  .showcase-item {
      min-height: 350px;
      height: 350px;
      width: clamp(280px, 85vw, 600px);
  }
  
  .showcase-track {
      gap: 20px;
      padding-left: 4%;
  }

  .showcase-image {
      height: 350px;
      width: 100%;
      position: absolute;
      inset: 0;
  }

  .showcase-content {
      position: absolute;
      inset: 0;
      transform: none;
      max-width: 100%;
      padding: 15px;
     
      backdrop-filter: blur(2px);
      border-radius: 20px;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      overflow: visible;
      z-index: 2;
  }

  /* 移动端显示所有内容，但优化布局 */
  .showcase-subtitle {
      display: block;
      font-size: 14px;
      margin-bottom: 8px;
      opacity: 0.9;
  }

  .showcase-description {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      font-size: 13px;
      line-height: 1.5;
      margin-bottom: 10px;
  }

  .showcase-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 10px;
  }

  .showcase-tags .tag {
      font-size: 11px;
      padding: 4px 10px;
  }

  .showcase-link {
      display: inline-block;
      font-size: 13px;
      padding: 8px 20px;
      margin-top: 8px;
  }

  /* 优化字体大小 */
  .showcase-title {
      font-size: 18px;
      margin-bottom: 6px;
      line-height: 1.3;
  }

  .showcase-number {
      font-size: 40px;
      margin-bottom: -10px;
      opacity: 0.2;
  }
}

/* Hero幻灯片响应式 */
@media (max-width: 768px) {
  .hero-nav {
      width: 40px;
      height: 40px;
      opacity: 0.6;
  }

  .hero-nav-prev {
      left: 15px;
  }

  .hero-nav-next {
      right: 15px;
  }

  .hero-indicators {
      bottom: 30px;
      gap: 8px;
  }

  .hero-indicator {
      width: 10px;
      height: 10px;
  }

  .hero-indicator.active {
      width: 24px;
  }

  .scroll-indicator {
      bottom: 80px;
  }
}

/* 导航菜单响应式 */
@media (max-width: 768px) {
  .nav-menu {
      position: fixed;
      top: 70px;
      left: -100%;
      flex-direction: column;
      background: var(--dark-bg);
      width: 100%;
      padding: 20px;
      transition: left 0.3s ease;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .nav-menu.active {
      left: 0;
  }

  .nav-actions {
      order: 2;
      margin-left: auto;
  }
  
  .nav-toggle {
      display: flex;
      order: 3;
  }

  .hero-title {
      font-size: 48px;
  }

  .about-content,
  .contact-content {
      grid-template-columns: 1fr;
  }

  .stats {
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
  }

  .stat-item {
      padding: 15px 8px;
  }

  .stat-number {
      font-size: 24px !important;
  }

  .stat-label {
      font-size: 12px !important;
  }

  .team-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 30px;
  }

  .news-grid {
      grid-template-columns: 1fr;
      gap: 18px;
  }

  .news-card {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      min-height: 140px;
  }

  /* 资讯列表和详情页的左右分栏在小屏幕时堆叠 */
  main[style*="width: 66%"] {
      width: 100% !important;
      padding-right: 0 !important;
      margin-bottom: 32px;
  }

  aside[style*="width: 34%"] {
      width: 100% !important;
      padding-left: 0 !important;
      position: static !important;
  }

  .news-image {
      width: 40%;
      min-width: 120px;
      height: auto;
      flex-shrink: 0;
  }

  .news-image-inner,
  .news-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
  }

  .news-content {
      width: 60%;
      padding: 16px;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }
  
  .info-columns {
      display: flex;
      flex-direction: column;
      gap: 12px;
  }
  
  .info-columns .footer-section {
      width: 100%;
  }
  
  .info-columns {
      display: flex;
      flex-direction: column;
      gap: 12px;
  }
  
  .info-columns .footer-section {
      width: 100%;
  }

  .news-title {
      font-size: 20px;
  }

  .footer-content {
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
      row-gap: 20px;
  }

  .footer-section h4 {
      font-size: 16px;
      margin-bottom: 12px;
      font-weight: 600;
  }

  .footer-section ul {
      margin: 0;
      padding: 0;
  }

  .footer-section ul li {
      margin-bottom: 10px;
  }

  .footer-section ul li a {
      font-size: 14px;
      line-height: 1.6;
      display: block;
      padding: 4px 0;
      transition: all 0.2s ease;
    }

  .footer-section ul li a:hover {
      padding-left: 8px;
  }

  .footer-section:first-child {
      display: none;
  }

  .footer-section:last-child {
      grid-column: 1 / -1;
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
  }

  .footer-section:last-child h4 {
      text-align: center;
      margin-bottom: 16px;
  }

  .social-links {
      justify-content: center;
  }
}

/* 小屏幕响应式 */
@media (max-width: 480px) {
  .hero-buttons {
      flex-direction: column;
      width: 100%;
  }

  .btn {
      width: 100%;
      text-align: center;
  }

  .team-grid {
      grid-template-columns: 1fr;
  }

  .news-grid {
      grid-template-columns: 1fr;
  }

  .news-card {
      flex-direction: row;
      min-height: 120px;
  }

  .news-image {
      width: 35%;
      min-width: 100px;
      height: auto;
      flex-shrink: 0;
  }

  .news-title {
      font-size: 18px;
  }

  .news-excerpt {
      font-size: 14px;
  }

  .stats {
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
  }

  .stat-item {
      padding: 12px 6px;
  }

  .stat-number {
      font-size: 20px !important;
      margin-bottom: 4px;
  }

  .stat-label {
      font-size: 11px !important;
  }
}

