/* ========================================
   证券公司官网 - 响应式样式
   kommnz.com
   ======================================== */

/* ==================== Tablet (768px - 1024px) ==================== */
@media (max-width: 1024px) {
    :root {
        --spacing-4xl: 4rem;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .section {
        padding: var(--spacing-3xl) 0;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Navigation */
    .nav-desktop {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: flex;
    }
    
    /* Page Banner */
    .page-banner {
        height: 260px;
    }
    
    .page-banner-title {
        font-size: 2.25rem;
    }
    
    /* Hero */
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== Mobile Large (576px - 768px) ==================== */
@media (max-width: 768px) {
    :root {
        --spacing-3xl: 2.5rem;
        --spacing-4xl: 3rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.625rem; }
    h3 { font-size: 1.375rem; }
    h4 { font-size: 1.125rem; }
    
    body {
        font-size: 0.9375rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-lg {
        padding: var(--spacing-3xl) 0;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Hero */
    .hero {
        min-height: 500px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Page Banner */
    .page-banner {
        height: 220px;
    }
    
    .page-banner-title {
        font-size: 1.875rem;
    }
    
    .page-banner-subtitle {
        font-size: 1rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Cards */
    .card-body {
        padding: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: var(--spacing-xl);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    /* Tables */
    .table th,
    .table td {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8125rem;
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
}

/* ==================== Mobile Small (< 576px) ==================== */
@media (max-width: 576px) {
    :root {
        --spacing-2xl: 1.5rem;
        --spacing-3xl: 2rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-desc {
        font-size: 1rem;
    }
    
    /* Hero */
    .hero {
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    /* Page Banner */
    .page-banner {
        height: 180px;
    }
    
    .page-banner-title {
        font-size: 1.5rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Feature Cards */
    .feature-icon {
        width: 56px;
        height: 56px;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    /* Modal */
    .modal-content {
        margin: var(--spacing-md);
        max-height: calc(100vh - 2rem);
    }
}

/* ==================== Large Desktop (> 1400px) ==================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    h1 { font-size: 3.25rem; }
    h2 { font-size: 2.5rem; }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.75rem;
    }
}

/* ==================== Ultra Wide (> 1920px) ==================== */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    
    .container {
        max-width: 1600px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    .header,
    .footer,
    .nav,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    img {
        max-width: 100% !important;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ==================== Hover States for Touch Devices ==================== */
@media (hover: none) {
    .card:hover,
    .feature-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ==================== Dark Mode Support ==================== */
@media (prefers-color-scheme: dark) {
    /* 可选：支持系统深色模式 */
    /* 证券网站通常使用固定配色，此处预留接口 */
}

/* ==================== Landscape Mobile ==================== */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }
    
    .page-banner {
        height: 200px;
    }
}

/* ==================== High Resolution ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 高分辨率屏幕优化 */
    body {
        -webkit-font-smoothing: antialiased;
    }
}
