/* ==================== 响应式设计 ==================== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .slide-title {
        font-size: 40px;
    }

    .slide-subtitle {
        font-size: 18px;
    }

    .about-content {
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: 1fr 1fr;
    }

    .news-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .news-card.featured .news-image {
        height: 250px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 移动设备 (最大 768px) */
@media (max-width: 768px) {
    /* 导航栏 */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a {
        display: block;
        padding: 15px 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Banner */
    .hero-slider {
        height: 450px;
    }

    .slide-title {
        font-size: 32px;
    }

    .slide-subtitle {
        font-size: 16px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    /* 关于协会 */
    .about-section {
        padding: 60px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 28px;
    }

    /* 核心业务 */
    .services-section {
        padding: 60px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 新闻动态 */
    .news-section {
        padding: 60px 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card.featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .news-card.featured .news-image {
        height: 200px;
    }

    .news-card.featured .news-title {
        font-size: 20px;
    }

    /* 会员CTA */
    .membership-cta {
        padding: 60px 0;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-content > p {
        font-size: 16px;
    }

    .cta-benefits {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    /* 页脚 */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
}

/* 小型移动设备 (最大 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-slider {
        height: 400px;
        margin-top: 70px;
    }

    .slide-title {
        font-size: 24px;
    }

    .slide-subtitle {
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .about-text .lead {
        font-size: 16px;
    }

    .stat-number {
        font-size: 28px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon img {
        width: 30px;
        height: 30px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-content {
        padding: 20px;
    }

    .cta-content h2 {
        font-size: 24px;
    }

    .benefit-item {
        font-size: 14px;
    }

    .footer-col h4 {
        font-size: 16px;
    }

    .slider-controls {
        padding: 0 10px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

/* 超小型设备 (最大 360px) */
@media (max-width: 360px) {
    .logo span {
        font-size: 14px;
    }

    .logo img {
        height: 35px;
    }

    .hero-slider {
        height: 350px;
    }

    .slide-title {
        font-size: 20px;
    }

    .slide-subtitle {
        font-size: 13px;
    }

    .section-title {
        font-size: 22px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 100vh;
    }

    .nav-menu {
        height: calc(100vh - 75px);
        overflow-y: auto;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hamburger,
    .slider-controls,
    .slider-dots,
    .back-to-top,
    .membership-cta {
        display: none;
    }

    .hero-slider {
        margin-top: 0;
        height: auto;
        page-break-after: always;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
    }

    a {
        text-decoration: underline;
    }

    .section-title {
        page-break-after: avoid;
    }

    .news-card,
    .service-card {
        page-break-inside: avoid;
    }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .slide-title {
        font-size: 56px;
    }

    .slide-subtitle {
        font-size: 22px;
    }

    .section-title {
        font-size: 42px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-menu a,
    .news-card,
    .service-card {
        -webkit-tap-highlight-color: transparent;
    }

    .btn:active {
        transform: scale(0.98);
    }

    .slider-btn {
        width: 50px;
        height: 50px;
    }
}

/* 深色模式支持 (可选) */
@media (prefers-color-scheme: dark) {
    /* 如果需要支持深色模式，可以在这里添加样式 */
    /* 目前保持浅色主题 */
}

/* 减少动画 (用户偏好设置) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 3px;
    }

    .title-underline {
        height: 5px;
    }

    .nav-menu a::after {
        height: 3px;
    }
}