/**
 * 移动端响应式样式
 * 适配所有页面的移动端显示
 */

/* ========================
   基础响应式断点
   ======================== */
/* 
  - 超小屏幕 (手机): < 576px
  - 小屏幕 (平板): 576px - 768px  
  - 中等屏幕 (小笔记本): 768px - 992px
  - 大屏幕 (桌面): 992px - 1200px
  - 超大屏幕: > 1200px
*/

/* ========================
   平板设备样式 (768px - 992px)
   ======================== */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    /* 导航调整 */
    .navbar-menu {
        flex-wrap: wrap;
    }
    
    /* 服务卡片 */
    .service-card {
        margin-bottom: 30px;
    }
    
    /* 团队成员 */
    .team-stats .row {
        justify-content: center;
    }
    
    /* 页面标题 */
    .page-title {
        font-size: 36px !important;
    }
    
    .page-banner p {
        font-size: 18px !important;
    }
}

/* ========================
   移动设备样式 (小于768px)
   ======================== */
@media (max-width: 768px) {
    /* 全局调整 */
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    /* ========================
       头部导航移动端适配
       ======================== */
    .navbar {
        padding: 10px 0;
        position: relative;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    /* 移动端汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 5px;
        margin-left: auto;
    }
    
    /* 桌面端隐藏汉堡菜单 */
    @media (min-width: 769px) {
        .mobile-menu-toggle {
            display: none !important;
        }
    }
    
    /* 移动端导航菜单 */
    .navbar-menu {
        display: none !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .navbar-menu.active {
        display: block !important;
    }
    
    .navbar-menu ul {
        flex-direction: column !important;
        padding: 0;
        margin: 0;
    }
    
    .navbar-menu .nav-item {
        width: 100%;
        margin: 0;
        display: block !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-menu .nav-link {
        display: block !important;
        padding: 15px 20px !important;
        text-align: left !important;
        white-space: normal !important;
        width: 100% !important;
    }
    
    .navbar-menu .nav-item.active .nav-link::after {
        display: none !important;
    }
    
    /* 移动端遮罩层 */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* ========================
       首页关于部分 - 图片在上文字在下
       ======================== */
    .about-section-row {
        flex-direction: column-reverse !important;
    }
    
    .company-image {
        margin-bottom: 20px;
    }
    
    /* ========================
       首页资质证书 - 已设置为col-6，一行两个
       ======================== */
    .certificate-card {
        padding: 10px !important;
    }
    
    .certificate-card h4 {
        font-size: 12px !important;
        margin-top: 8px;
    }
    
    /* ========================
       底部CTA按钮对齐
       ======================== */
    .contact-cta .col-lg-4 {
        text-align: center !important;
        margin-top: 20px;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    /* ========================
       首页轮播图
       ======================== */
    .hero-slide {
        height: 300px;
    }
    
    .hero-title {
        font-size: 28px !important;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
        margin-bottom: 20px;
    }
    
    .hero-content .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* ========================
       章节标题
       ======================== */
    .section-title h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .section-title p {
        font-size: 14px;
    }
    
    .title-line {
        width: 60px;
        height: 3px;
    }
    
    /* ========================
       服务项目
       ======================== */
    .service-item {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .service-item .icon {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .service-item h3 {
        font-size: 18px;
    }
    
    .service-categories {
        padding: 15px 0;
    }
    
    .category-tabs {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: flex-start;
    }
    
    .category-tab {
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 13px;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.5;
        border-radius: 5px;
    }
    
    /* 服务列表页 */
    .service-card {
        margin-bottom: 20px;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    /* ========================
       新闻列表
       ======================== */
    .news-hero {
        padding: 60px 0 40px;
    }
    
    .news-hero h1 {
        font-size: 32px;
    }
    
    .news-hero p {
        font-size: 16px;
    }
    
    .news-tabs {
        padding: 15px 0;
    }
    
    .news-tabs .nav {
        flex-wrap: wrap !important;
        gap: 5px;
    }
    
    .news-tabs .nav-link {
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 13px;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.5;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 0;
    }
    
    .news-card {
        margin-bottom: 20px;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .news-card-body {
        padding: 15px;
    }
    
    .news-card-title {
        font-size: 16px;
    }
    
    .news-card-summary {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .news-card-meta {
        font-size: 11px;
    }
    
    /* ========================
       新闻详情页
       ======================== */
    .news-detail-hero {
        padding: 60px 0 40px;
    }
    
    .news-detail-hero h1 {
        font-size: 24px !important;
        line-height: 1.3;
    }
    
    .news-detail-hero p {
        font-size: 14px !important;
    }
    
    .news-meta {
        font-size: 12px !important;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .news-content {
        padding: 20px;
        font-size: 14px;
        line-height: 1.8;
    }
    
    .news-content img {
        max-width: 100%;
        height: auto;
    }
    
    .news-sidebar {
        margin-top: 30px;
        position: static;
    }
    
    /* ========================
       关于我们页面
       ======================== */
    .page-banner {
        padding: 60px 0 40px !important;
    }
    
    .page-banner h1,
    .page-title {
        font-size: 32px !important;
    }
    
    .page-banner p {
        font-size: 16px !important;
    }
    
    /* 公司简介 */
    .about-content {
        padding: 30px 0;
    }
    
    .about-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .about-images {
        margin-top: 30px;
    }
    
    .experience-badge {
        position: static;
        margin-top: 20px;
        padding: 15px;
    }
    
    .experience-badge .number {
        font-size: 28px;
    }
    
    /* 团队介绍 */
    .team-description h3 {
        font-size: 20px;
    }
    
    .team-description p.lead {
        font-size: 16px;
    }
    
    .team-stats .stat-item h4 {
        font-size: 24px;
    }
    
    .team-stats .stat-item p {
        font-size: 12px;
    }
    
    .team-photo-container {
        margin-top: 30px;
    }
    
    /* 设备展示 */
    .equipment-card {
        margin-bottom: 20px;
    }
    
    /* 资质证书 */
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .certificate-card {
        padding: 15px;
    }
    
    /* ========================
       资质认证页面
       ======================== */
    .cert-hero {
        padding: 60px 0 40px;
    }
    
    .cert-hero h1 {
        font-size: 32px;
    }
    
    /* ========================
       服务详情页
       ======================== */
    .service-hero {
        padding: 60px 0 40px;
    }
    
    .service-hero h1 {
        font-size: 28px !important;
    }
    
    .service-content {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .service-sidebar {
        position: static;
        margin-top: 20px;
        padding: 20px;
    }
    
    /* ========================
       联系我们页面
       ======================== */
    .contact-hero {
        padding: 60px 0 40px;
    }
    
    .contact-hero h1 {
        font-size: 32px !important;
    }
    
    .contact-cards {
        margin-top: -30px;
    }
    
    .contact-card {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .contact-card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .contact-card-icon i {
        font-size: 24px;
    }
    
    .contact-card h3 {
        font-size: 20px;
    }
    
    .contact-card-content {
        font-size: 16px;
    }
    
    /* 业务范围 */
    .business-scope {
        padding: 40px 0;
    }
    
    .scope-item {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .scope-item i {
        font-size: 36px;
    }
    
    .scope-item h4 {
        font-size: 18px;
    }
    
    .scope-item p {
        font-size: 14px;
    }
    
    /* ========================
       设备展示页面
       ======================== */
    .equipment-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* ========================
       页脚
       ======================== */
    .site-footer {
        padding-top: 40px;
    }
    
    .footer-widget {
        margin-bottom: 30px;
    }
    
    .widget-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-links {
        font-size: 14px;
    }
    
    .contact-info {
        font-size: 14px;
    }
    
    .contact-info li {
        padding: 6px 0 !important;
        margin-bottom: 0 !important;
        display: block !important;
        line-height: 20px !important;
        min-height: 20px !important;
        height: auto !important;
    }
    
    .contact-info li:first-child {
        padding-top: 0 !important;
    }
    
    .contact-info li:last-child {
        padding-bottom: 0 !important;
    }
    
    .contact-info i,
    .contact-info li > span:first-child,
    .contact-info li > svg:first-child {
        display: inline-block !important;
        vertical-align: middle !important;
        width: 16px !important;
        margin-right: 10px !important;
        text-align: center !important;
    }
    
    .contact-info li > span:not(:first-child),
    .contact-info a {
        display: inline !important;
        vertical-align: middle !important;
    }
    
    .footer-bottom {
        padding: 15px 0;
        text-align: center;
    }
    
    .footer-links-bottom {
        margin-top: 10px;
        font-size: 12px;
    }
    
    .copyright {
        font-size: 12px;
    }
    
    /* ========================
       表单元素
       ======================== */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* ========================
       分页
       ======================== */
    .pagination {
        font-size: 14px;
    }
    
    .page-link {
        padding: 8px 12px;
    }
    
    /* ========================
       在线客服
       ======================== */
    .online-service {
        bottom: 100px;
        right: 15px;
    }
    
    .service-btn {
        width: 45px;
        height: 45px;
        line-height: 45px;
        margin-bottom: 8px;
    }
    
    /* 微信弹窗移动端适配 */
    .wechat-modal-content {
        width: 85% !important;
        max-width: 280px !important;
        padding: 20px !important;
    }
    
    .wechat-qrcode-box {
        width: 150px !important;
        height: 150px !important;
    }
    
    .wechat-modal-content h3 {
        font-size: 16px !important;
    }
    
    /* ========================
       工具类
       ======================== */
    .d-mobile-none {
        display: none !important;
    }
    
    .text-mobile-center {
        text-align: center !important;
    }
    
    .mobile-mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* ========================
   超小屏幕 (手机竖屏 < 576px)
   ======================== */
@media (max-width: 576px) {
    /* 容器内边距进一步缩小 */
    .container {
        padding: 0 10px;
    }
    
    /* 新闻分类标签更小 */
    .news-tabs .nav-link {
        padding: 5px 10px;
        font-size: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.5;
    }
    
    /* 服务分类标签更小 */
    .category-tab {
        padding: 5px 10px !important;
        font-size: 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.5 !important;
    }
    
    /* 标题尺寸 */
    .hero-title {
        font-size: 24px !important;
    }
    
    .hero-subtitle {
        font-size: 14px !important;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .page-title,
    .page-banner h1 {
        font-size: 28px !important;
    }
    
    /* 新闻网格单列 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 服务网格单列 */
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    /* 资质证书单列 */
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    /* 统计数据两列 */
    .team-stats .row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 设备统计两列 */
    .equipment-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 联系卡片 */
    .contact-card {
        padding: 20px;
    }
    
    /* 业务范围单列 */
    .business-scope .row {
        display: flex;
        flex-direction: column;
    }
    
    /* 表格响应式 */
    table {
        font-size: 12px;
    }
    
    /* 分页按钮更小 */
    .page-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* 按钮尺寸 */
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* 隐藏不必要的元素 */
    .d-mobile-none,
    .hide-mobile {
        display: none !important;
    }
    
    /* 页脚调整 */
    .footer-bottom .col-md-6 {
        text-align: center !important;
        margin-bottom: 10px;
    }
    
    /* 图片最大宽度 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 卡片内边距 */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
}

/* ========================
   横屏模式优化
   ======================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slide {
        height: 250px;
    }
    
    .page-banner {
        padding: 40px 0 30px !important;
    }
    
    .navbar {
        padding: 8px 0;
    }
}

/* ========================
   打印样式
   ======================== */
@media print {
    .navbar,
    .site-footer,
    .back-to-top,
    .mobile-menu-toggle,
    .news-tabs,
    .pagination {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
    }
    
    .news-content,
    .service-content {
        box-shadow: none;
        padding: 0;
    }
}
