/**
 * 楚海能源官网 - 响应式样式
 * 断点：768px（移动端）, 1024px（平板）
 */

/* ========== 平板设备 (768px - 1024px) ========== */
@media (max-width: 1024px) {
  /* 区块间距调整 */
  .section {
    padding: var(--spacing-3xl) var(--spacing-md);
  }
  
  /* 标题字体调整 */
  .hero-title {
    font-size: 44px;
  }
  
  .section-title h2 {
    font-size: 32px;
  }
  
  /* 业务卡片网格 */
  .business-grid {
    gap: var(--spacing-lg);
  }
  
  /* 数据统计网格 */
  .stats-grid {
    gap: var(--spacing-lg);
  }
  
  .stat-number {
    font-size: 40px;
  }
  
  /* 关于我们网格 */
  .about-grid {
    gap: var(--spacing-2xl);
  }
  
  .about-image {
    height: 350px;
  }
  
  /* 页脚网格 */
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }
}

/* ========== 移动端设备 (< 768px) ========== */
@media (max-width: 768px) {
  /* 移动端强制禁止所有动画，防止闪烁 */
  *,
  *::before,
  *::after {
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition: opacity 0s !important;
  }

  /* 强制所有元素立即可见 */
  .hero-content,
  .business-card,
  .stat-item,
  .service-item,
  .about-content,
  .about-image,
  .contact-form,
  .contact-info,
  section,
  section > * {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* 导航栏 */
  .navbar {
    height: 64px;
  }
  
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--spacing-xl);
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-xl);
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-link {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-body-lg);
    border-bottom: 1px solid var(--color-bg-tertiary);
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-cta {
    margin-left: 0;
    margin-top: var(--spacing-lg);
    padding: 0 var(--spacing-lg);
  }
  
  .nav-cta .btn {
    width: 100%;
  }
  
  /* 汉堡菜单按钮 */
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  /* Hero区块 */
  .hero {
    min-height: 100vh;
    padding: var(--spacing-3xl) var(--spacing-md);
    padding-top: calc(64px + var(--spacing-3xl));
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-subtitle {
    font-size: 18px;
    margin-bottom: var(--spacing-xl);
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .scroll-indicator {
    bottom: var(--spacing-lg);
  }
  
  /* 区块标题 */
  .section-title {
    margin-bottom: var(--spacing-2xl);
  }
  
  .section-title h2 {
    font-size: 28px;
  }
  
  .section-title p {
    font-size: var(--font-size-body);
  }
  
  /* 核心业务区块 */
  .business-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .business-card {
    padding: var(--spacing-xl);
  }
  
  .business-icon {
    width: 56px;
    height: 56px;
  }
  
  .business-icon svg {
    width: 28px;
    height: 28px;
  }
  
  /* 数据展示区块 */
  .stats-section {
    padding: var(--spacing-2xl) var(--spacing-md);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .stat-number {
    font-size: 36px;
  }
  
  .stat-label {
    font-size: var(--font-size-body-sm);
  }
  
  /* 关于我们区块 */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
  
  .about-image {
    height: 250px;
    order: -1;
  }
  
  .about-content h2 {
    font-size: 28px;
  }
  
  .about-text {
    font-size: var(--font-size-body);
  }
  
  .about-features {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  /* 业务范围区块 */
  .service-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .service-icon {
    width: 64px;
    height: 64px;
  }
  
  .service-icon svg {
    width: 32px;
    height: 32px;
  }
  
  .service-item:hover {
    transform: translateY(-4px);
  }
  
  /* 联系我们区块 */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
  
  .contact-form {
    padding: var(--spacing-lg);
  }
  
  .contact-info h3 {
    font-size: var(--font-size-h4);
  }
  
  .contact-item {
    gap: var(--spacing-sm);
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
  }
  
  .contact-icon svg {
    width: 20px;
    height: 20px;
  }
  
  /* 页脚 */
  .footer {
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .footer-brand {
    text-align: center;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links ul {
    align-items: center;
  }
  
  /* 返回顶部按钮 */
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }
  
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
  
  /* 隐藏类 */
  .hide-mobile {
    display: none !important;
  }
}

/* ========== 小屏手机 (< 480px) ========== */
@media (max-width: 480px) {
  /* 标题更小 */
  .hero-title {
    font-size: 28px;
  }
  
  .section-title h2 {
    font-size: 24px;
  }
  
  .about-content h2 {
    font-size: 24px;
  }
  
  /* 数据统计字体 */
  .stat-number {
    font-size: 28px;
  }
  
  /* 按钮尺寸 */
  .btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-body);
  }
  
  /* 关于图片 */
  .about-image {
    height: 200px;
  }
}

/* ========== 大屏设备 (> 1280px) ========== */
@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
  
  /* Hero区块 */
  .hero-title {
    font-size: 64px;
  }
  
  .hero-subtitle {
    font-size: 28px;
  }
}

/* ========== 打印样式 ========== */
@media print {
  .navbar,
  .back-to-top,
  .scroll-indicator {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: var(--spacing-xl);
    background: none;
    color: var(--color-text-primary);
  }
  
  .section {
    page-break-inside: avoid;
  }
}

/* ========== 辅助类 ========== */

/* 桌面端隐藏 */
@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* 文本对齐 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Flex布局 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* 间距工具类 */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
