/* ===================================
   响应式布局样式
   =================================== */

/* 平板设备 (最大宽度 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        gap: 2rem;
    }

    .training-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .join-content {
        gap: 2rem;
    }
}

/* 小平板和大手机 (最大宽度 768px) */
@media screen and (max-width: 768px) {
    /* 导航栏 */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

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

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .hamburger {
        display: flex;
    }

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

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

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

    /* 英雄区域 */
    .hero {
        height: 80vh;
        min-height: 500px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 80%;
        max-width: 300px;
    }

    /* 数据统计 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* 新闻动态 */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* 关于我们 */
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    /* 训练体系 */
    .training-grid {
        grid-template-columns: 1fr;
    }

    /* 训练安排 */
    .schedule-content {
        grid-template-columns: 1fr;
    }

    /* 教练团队 */
    .coaches-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* 辉煌成就 */
    .achievement-gallery {
        grid-template-columns: 1fr;
    }

    .achievement-highlights {
        grid-template-columns: 1fr;
    }

    /* 全国分部 */
    .branches-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 会员福利 */
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    /* 加入我们 */
    .join-content {
        grid-template-columns: 1fr;
    }

    .join-info {
        order: -1;
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* 返回顶部按钮 */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* 手机设备 (最大宽度 480px) */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    /* 导航栏 */
    .logo {
        font-size: 1rem;
    }

    .logo span {
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 英雄区域 */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    /* 区块间距 */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* 数据统计 */
    .stats {
        padding: 2rem 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem 1rem;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* 新闻动态 */
    .news-card {
        padding: 1.5rem;
    }

    .news-card h3 {
        font-size: 1.2rem;
    }

    .news-date {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    /* 关于我们 */
    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-text .highlight {
        font-size: 1.1rem;
    }

    /* 训练体系 */
    .training-card {
        padding: 1.5rem;
    }

    .training-icon {
        width: 50px;
        height: 50px;
    }

    .training-icon i {
        font-size: 1.5rem;
    }

    .training-card h3 {
        font-size: 1.3rem;
    }

    /* 训练安排 */
    .schedule-item {
        padding: 1.5rem;
    }

    .schedule-day {
        flex-direction: column;
        text-align: center;
    }

    .schedule-day h3 {
        font-size: 1.5rem;
    }

    .schedule-details h4 {
        font-size: 1.3rem;
    }

    /* 教练团队 */
    .coaches-grid {
        grid-template-columns: 1fr;
    }

    .coach-image {
        height: 250px;
    }

    /* 辉煌成就 */
    .gallery-item {
        height: 250px;
    }

    .highlight-item {
        padding: 1.5rem;
    }

    /* 全国分部 */
    .branches-grid {
        grid-template-columns: 1fr;
    }

    .branch-card {
        padding: 1.5rem;
    }

    /* 会员福利 */
    .benefit-card {
        padding: 1.5rem;
    }

    .benefit-icon {
        width: 70px;
        height: 70px;
    }

    .benefit-icon i {
        font-size: 1.8rem;
    }

    /* 加入我们 */
    .join-info h3 {
        font-size: 1.5rem;
    }

    .join-reasons li {
        padding: 0.75rem;
    }

    .join-form {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    /* 页脚 */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-section h3 {
        font-size: 1.2rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    /* 返回顶部按钮 */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .back-to-top i {
        font-size: 1rem;
    }
}

/* 超小设备 (最大宽度 360px) */
@media screen and (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

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

    .stat-number {
        font-size: 1.8rem;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .scroll-indicator {
        display: none;
    }

    section {
        padding: 3rem 0;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .back-to-top,
    .join-form,
    .hamburger {
        display: none !important;
    }

    .hero {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
    }

    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    .footer {
        page-break-before: always;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #d32f2f;
        --text-dark: #000000;
        --text-light: #424242;
        --border-color: #000000;
    }

    .btn {
        border-width: 3px;
    }

    .nav-link::after {
        height: 3px;
    }
}

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

    .scroll-indicator {
        animation: none;
    }

    .hero {
        background-attachment: scroll;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e0e0e0;
        --text-light: #b0b0b0;
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --border-color: #404040;
    }

    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .navbar {
        background: #2d2d2d;
    }

    .stat-item,
    .news-card,
    .training-card,
    .coach-card,
    .branch-card,
    .join-form {
        background: #2d2d2d;
    }

    .news-excerpt {
        color: #b0b0b0;
    }

    .about-text p,
    .training-card p,
    .coach-desc,
    .schedule-details p,
    .schedule-details li {
        color: #b0b0b0;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #404040;
    }
}
