/* 响应式布局优化 - 流光溯影 */

/* ========== 全局断点规范 ========== */
/* 
  xs: < 640px   (手机竖屏)
  sm: 640px+    (手机横屏/小平板)
  md: 768px+    (平板)
  lg: 1024px+   (桌面)
  xl: 1280px+   (大屏)
  2xl: 1536px+  (超大屏)
*/

/* ========== 容器与间距优化 ========== */
.responsive-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;  /* 16px */
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .responsive-container {
        padding-left: 1.5rem;  /* 24px */
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .responsive-container {
        padding-left: 2rem;  /* 32px */
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) {
    .responsive-container {
        max-width: 1280px;
    }
}

/* ========== 文字响应式 ========== */
/* Hero 标题 */
.hero-title {
    font-size: 1.875rem;  /* 30px */
    line-height: 1.2;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 2.25rem;  /* 36px */
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;  /* 40px */
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3rem;  /* 48px */
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: 3.75rem;  /* 60px */
    }
}

/* 章节标题 */
.section-title {
    font-size: 1.5rem;  /* 24px */
    line-height: 1.3;
}

@media (min-width: 640px) {
    .section-title {
        font-size: 1.875rem;  /* 30px */
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 2.25rem;  /* 36px */
    }
}

@media (min-width: 1280px) {
    .section-title {
        font-size: 2.5rem;  /* 40px */
    }
}

/* 正文 */
.body-text {
    font-size: 0.875rem;  /* 14px */
    line-height: 1.6;
}

@media (min-width: 640px) {
    .body-text {
        font-size: 0.938rem;  /* 15px */
    }
}

@media (min-width: 768px) {
    .body-text {
        font-size: 1rem;  /* 16px */
    }
}

@media (min-width: 1024px) {
    .body-text {
        font-size: 1.063rem;  /* 17px */
    }
}

/* ========== 卡片网格优化 ========== */
.card-grid {
    display: grid;
    gap: 1rem;  /* 16px */
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .card-grid {
        gap: 1.5rem;  /* 24px */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        gap: 2rem;  /* 32px */
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 两列卡片 */
.card-grid-2 {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .card-grid-2 {
        gap: 1.5rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid-2 {
        gap: 2rem;
    }
}

/* 四列卡片 */
.card-grid-4 {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .card-grid-4 {
        gap: 1.5rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid-4 {
        gap: 2rem;
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== 图文布局优化 ========== */
.content-with-image {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    align-items: center;
}

@media (min-width: 1024px) {
    .content-with-image {
        gap: 3rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .content-with-image {
        gap: 5rem;
    }
}

/* ========== 表单优化 ========== */
.form-group {
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .form-group {
        margin-bottom: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .form-group {
        margin-bottom: 1.5rem;
    }
}

/* 表单输入框 */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;  /* 12px 16px */
    font-size: 0.875rem;  /* 14px */
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

@media (min-width: 640px) {
    .form-input {
        padding: 0.875rem 1rem;  /* 14px 16px */
        font-size: 0.938rem;  /* 15px */
    }
}

@media (min-width: 1024px) {
    .form-input {
        padding: 1rem 1.25rem;  /* 16px 20px */
        font-size: 1rem;  /* 16px */
    }
}

.form-input:focus {
    outline: none;
    border-color: #9718E2;
    box-shadow: 0 0 0 3px rgba(151, 24, 226, 0.1);
}

/* 表单两列布局 */
.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .form-row {
        gap: 1.5rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 按钮优化 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;  /* 12px 24px */
    font-size: 0.875rem;  /* 14px */
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

@media (min-width: 640px) {
    .btn {
        padding: 0.875rem 2rem;  /* 14px 32px */
        font-size: 0.938rem;  /* 15px */
    }
}

@media (min-width: 1024px) {
    .btn {
        padding: 1rem 2.5rem;  /* 16px 40px */
        font-size: 1rem;  /* 16px */
    }
}

.btn-primary {
    background: #9718E2;
    color: white;
}

.btn-primary:hover {
    background: #7A12B8;
    box-shadow: 0 10px 25px rgba(151, 24, 226, 0.2);
}

.btn-secondary {
    background: white;
    color: #9718E2;
    border: 2px solid #9718E2;
}

.btn-secondary:hover {
    background: #9718E2;
    color: white;
}

/* ========== 间距系统 ========== */
/* Section 间距 */
.section-py {
    padding-top: 3rem;  /* 48px */
    padding-bottom: 3rem;
}

@media (min-width: 640px) {
    .section-py {
        padding-top: 4rem;  /* 64px */
        padding-bottom: 4rem;
    }
}

@media (min-width: 1024px) {
    .section-py {
        padding-top: 5rem;  /* 80px */
        padding-bottom: 5rem;
    }
}

@media (min-width: 1280px) {
    .section-py {
        padding-top: 7rem;  /* 112px */
        padding-bottom: 7rem;
    }
}

/* Hero Section 间距 */
.hero-section {
    padding-top: 5rem;  /* 80px */
    padding-bottom: 3rem;  /* 48px */
}

@media (min-width: 1024px) {
    .hero-section {
        padding-top: 8rem;  /* 128px */
        padding-bottom: 5rem;  /* 80px */
    }
}

@media (min-width: 1280px) {
    .hero-section {
        padding-top: 10rem;  /* 160px */
        padding-bottom: 6rem;  /* 96px */
    }
}

/* ========== 图片优化 ========== */
.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    object-fit: cover;
}

.hero-img {
    height: 250px;
}

@media (min-width: 640px) {
    .hero-img {
        height: 300px;
    }
}

@media (min-width: 768px) {
    .hero-img {
        height: 350px;
    }
}

@media (min-width: 1024px) {
    .hero-img {
        height: 400px;
    }
}

@media (min-width: 1280px) {
    .hero-img {
        height: 500px;
    }
}

/* 卡片图片 */
.card-img {
    height: 180px;
}

@media (min-width: 640px) {
    .card-img {
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .card-img {
        height: 240px;
    }
}

/* ========== 弹窗优化 ========== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 36rem;  /* 576px */
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .modal-content {
        max-width: 42rem;  /* 672px */
    }
}

@media (min-width: 1024px) {
    .modal-content {
        max-width: 48rem;  /* 768px */
    }
}

/* ========== Stats 数字统计优化 ========== */
.stat-number {
    font-size: 2rem;  /* 32px */
    font-weight: 700;
    line-height: 1;
}

@media (min-width: 640px) {
    .stat-number {
        font-size: 2.5rem;  /* 40px */
    }
}

@media (min-width: 1024px) {
    .stat-number {
        font-size: 3rem;  /* 48px */
    }
}

@media (min-width: 1280px) {
    .stat-number {
        font-size: 3.5rem;  /* 56px */
    }
}

.stat-label {
    font-size: 0.75rem;  /* 12px */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 640px) {
    .stat-label {
        font-size: 0.813rem;  /* 13px */
    }
}

@media (min-width: 1024px) {
    .stat-label {
        font-size: 0.875rem;  /* 14px */
    }
}

/* ========== 联系方式两列布局（手机端）========== */
.contact-grid-mobile {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .contact-grid-mobile {
        gap: 1.5rem;
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== FAQ 手风琴优化 ========== */
.faq-item {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.faq-button {
    width: 100%;
    padding: 1rem 1.25rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .faq-button {
        padding: 1.25rem 1.5rem;
        font-size: 0.938rem;
    }
}

@media (min-width: 1024px) {
    .faq-button {
        padding: 1.5rem;
        font-size: 1rem;
    }
}

.faq-content {
    padding: 0 1.25rem 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #6B7280;
}

@media (min-width: 640px) {
    .faq-content {
        padding: 0 1.5rem 1.25rem;
        font-size: 0.938rem;
    }
}

@media (min-width: 1024px) {
    .faq-content {
        padding: 0 1.5rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========== 表格响应式 ========== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    font-size: 0.875rem;
}

@media (min-width: 1024px) {
    .table {
        font-size: 1rem;
    }
}

/* ========== 导航面包屑优化 ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .breadcrumb {
        font-size: 0.875rem;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
}

/* ========== 页脚响应式 ========== */
.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        gap: 3rem;
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 页脚法律链接 */
.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.813rem;
}

@media (min-width: 640px) {
    .footer-legal {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        font-size: 0.875rem;
    }
}

/* ========== 隐藏/显示工具类 ========== */
.hide-mobile {
    display: none;
}

@media (min-width: 1024px) {
    .hide-mobile {
        display: block;
    }
}

.hide-desktop {
    display: block;
}

@media (min-width: 1024px) {
    .hide-desktop {
        display: none;
    }
}

/* ========== 打印优化 ========== */
@media print {
    .no-print {
        display: none !important;
    }
    
    .section-py {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .card-grid,
    .card-grid-2,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========== 触摸设备优化 ========== */
@media (hover: none) and (pointer: coarse) {
    /* 增大可点击区域 */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .faq-button {
        min-height: 48px;
    }
    
    /* 移除 hover 效果 */
    .card-hover:hover {
        transform: none;
    }
}

/* ========== 暗色模式支持（预留）========== */
@media (prefers-color-scheme: dark) {
    /* 暂不启用，保留结构 */
}
