/* 常州正河源数控工具有限公司 - 响应式样式 */

/* ==================== 大屏幕设备 (1200px+) ==================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .container-wide {
        max-width: 1340px;
    }
}

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

    /* 页面标题 */
    .page-header {
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    /* 章节标题 */
    .section-title h2 {
        font-size: 26px;
    }

    /* 卡片网格 */
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* 按钮 */
    .btn-lg {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* ==================== 手机设备 (576px - 767px) ==================== */
@media (max-width: 767px) {
    /* 容器 */
    .container {
        padding: 0 15px;
    }

    /* 页面标题 */
    .page-header {
        padding: 30px 0;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .page-header p {
        font-size: 14px;
    }

    /* 章节样式 */
    .section {
        padding: 40px 0;
    }

    .section-title {
        margin-bottom: 30px;
    }

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

    .section-title p {
        font-size: 14px;
    }

    /* 列网格 */
    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* 按钮 */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

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

    /* 表单 */
    .form-control {
        font-size: 16px; /* 防止iOS自动缩放 */
    }

    /* 卡片 */
    .card-body {
        padding: 15px;
    }
}

/* ==================== 小手机设备 (最大575px) ==================== */
@media (max-width: 575px) {
    /* 容器 */
    .container {
        padding: 0 10px;
    }

    /* 页面标题 */
    .page-header {
        padding: 25px 0;
    }

    .page-header h1 {
        font-size: 20px;
    }

    /* 章节样式 */
    .section {
        padding: 30px 0;
    }

    .section-title h2 {
        font-size: 20px;
    }

    .section-title h2::after {
        width: 40px;
        height: 2px;
    }

    /* 按钮 */
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-sm {
        display: inline-block;
        width: auto;
    }

    /* 表单 */
    .form-control {
        padding: 10px 12px;
    }

    /* 卡片 */
    .card-img {
        height: 160px;
    }

    /* 间距 */
    .mt-1, .mt-2, .mt-3, .mt-4 {
        margin-top: 15px;
    }

    .mb-1, .mb-2, .mb-3, .mb-4 {
        margin-bottom: 15px;
    }

    .pt-1, .pt-2, .pt-3, .pt-4 {
        padding-top: 15px;
    }

    .pb-1, .pb-2, .pb-3, .pb-4 {
        padding-bottom: 15px;
    }
}

/* ==================== 超小屏幕 (最大360px) ==================== */
@media (max-width: 360px) {
    body {
        font-size: 14px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .section-title h2 {
        font-size: 18px;
    }

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

    .form-control {
        font-size: 14px;
    }
}

/* ==================== 横屏模式 ==================== */
@media (orientation: landscape) and (max-height: 600px) {
    .page-header {
        padding: 20px 0;
    }

    .section {
        padding: 30px 0;
    }
}

/* ==================== 高分辨率屏幕 (2K/4K) ==================== */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .container-wide {
        max-width: 1600px;
    }

    body {
        font-size: 18px;
    }

    .page-header h1 {
        font-size: 42px;
    }

    .section-title h2 {
        font-size: 38px;
    }
}

/* ==================== 触摸设备优化 ==================== */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标大小 */
    .btn,
    a,
    button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 移除悬停效果 */
    .card:hover {
        transform: none;
    }
}

/* ==================== 暗色模式支持 ==================== */
@media (prefers-color-scheme: dark) {
    /* 如果需要支持暗色模式，可以在这里添加样式 */
    /* 目前工业类网站通常不使用暗色模式，所以留空 */
}

/* ==================== 打印样式 ==================== */
@media print {
    .section {
        page-break-inside: avoid;
    }

    .page-header {
        background: none;
        color: #000;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ==================== 无障碍功能 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
