/* 响应式样式 */

/* 大屏幕设备 (桌面电脑, 1200px及以上) */
@media (min-width: 1200px) {
    /* 无需添加特殊样式，使用默认样式即可 */
}

/* 中等屏幕设备 (笔记本电脑, 992px到1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        width: 960px;
    }
    
    .service-item {
        width: 48%;
        margin-bottom: 20px;
    }
    
    .footer-nav dl {
        margin-right: 40px;
    }
}

/* 平板设备 (768px到991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        width: 720px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .main-nav a {
        font-size: 14px;
        padding: 12px 0;
    }
    
    .banner-slide img {
        height: 350px;
    }
    
    .banner-info h2 {
        font-size: 24px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .service-item {
        width: 48%;
        margin-bottom: 20px;
    }
    
    .news-featured, .news-list {
        width: 100%;
        padding-right: 0;
    }
    
    .news-featured {
        margin-bottom: 20px;
    }
    
    .footer-nav, .footer-contact {
        flex-direction: column;
    }
    
    .footer-nav {
        margin-bottom: 30px;
    }
    
    .footer-nav dl {
        margin-right: 0;
        margin-bottom: 20px;
        width: 50%;
    }
    
    .qrcode {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

/* 手机设备 (767px及以下) */
@media (max-width: 767px) {
    body.nav-active {
        overflow: hidden;
    }
    
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    .header-top {
        flex-direction: column;
        padding: 10px 0;
        position: relative;
    }
    
    .logo {
        margin-bottom: 10px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    /* 移动端导航样式 */
    .mobile-nav-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 20px;
        z-index: 1000;
        border: none;
        background: transparent;
        cursor: pointer;
        width: 40px;
        height: 40px;
        text-align: center;
        padding: 0;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    /* 汉堡包菜单样式 */
    .hamburger-menu {
        width: 25px;
        height: 20px;
        position: relative;
        margin: 10px auto;
        transform: rotate(0deg);
        transition: 0.5s ease-in-out;
    }
    
    .hamburger-menu span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: #2d71e5;
        border-radius: 3px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
    }
    
    .hamburger-menu span:nth-child(1) {
        top: 0px;
    }
    
    .hamburger-menu span:nth-child(2),
    .hamburger-menu span:nth-child(3) {
        top: 8px;
    }
    
    .hamburger-menu span:nth-child(4) {
        top: 16px;
    }
    
    /* 汉堡菜单激活状态 */
    .mobile-nav-toggle.active .hamburger-menu span:nth-child(1) {
        top: 8px;
        width: 0%;
        left: 50%;
    }
    
    .mobile-nav-toggle.active .hamburger-menu span:nth-child(2) {
        transform: rotate(45deg);
    }
    
    .mobile-nav-toggle.active .hamburger-menu span:nth-child(3) {
        transform: rotate(-45deg);
    }
    
    .mobile-nav-toggle.active .hamburger-menu span:nth-child(4) {
        top: 8px;
        width: 0%;
        left: 50%;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: linear-gradient(135deg, #2d71e5, #1e5fc8);
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease-in-out;
        border-radius: 0;
        margin-bottom: 0;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 60px 0 0 0;
    }
    
    .main-nav li {
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex: none;
    }
    
    .main-nav a {
        padding: 15px 20px;
        justify-content: flex-start;
        border-bottom: none;
    }
    
    .main-nav li.active a, 
    .main-nav a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: none;
        border-bottom: none;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        transition: opacity 0.3s;
        opacity: 0;
    }
    
    .overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* 返回顶部按钮样式调整 */
    .back-to-top {
        width: 35px;
        height: 35px;
        line-height: 35px;
        right: 15px;
        bottom: -50px;
    }
    
    .back-to-top.visible {
        bottom: 15px;
    }
    
    .back-to-top .bi {
        font-size: 16px;
    }
    
    /* 轮播图样式调整 */
    .banner {
        margin: 10px 0;
    }
    
    .banner-slide img {
        height: 200px;
    }
    
    .banner-info {
        padding: 10px;
    }
    
    .banner-info h2 {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .banner-info p {
        font-size: 12px;
    }
    
    .banner-controls button {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .banner-indicators {
        bottom: 10px;
        right: 10px;
    }
    
    .banner-indicators span {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    /* 服务专区样式调整 */
    .services {
        padding: 30px 0;
    }
    
    .section-title {
        margin-bottom: 20px;
    }
    
    .section-title h2 {
        font-size: 20px;
    }
    
    .section-title p {
        font-size: 14px;
    }
    
    .service-item {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* 新闻动态样式调整 */
    .news {
        padding: 30px 0;
    }
    
    .news-featured, .news-list {
        width: 100%;
        padding-right: 0;
    }
    
    .news-featured {
        margin-bottom: 20px;
    }
    
    .news-img img {
        height: 200px;
    }
    
    .news-info h3 {
        font-size: 16px;
    }
    
    .news-info p {
        height: auto;
        margin-bottom: 10px;
    }
    
    .news-item {
        padding: 10px 0;
    }
    
    /* 底部样式调整 */
    .footer {
        padding-top: 30px;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-nav {
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .footer-nav dl {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .footer-contact {
        flex-direction: column;
    }
    
    .qrcode {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .footer-bottom {
        padding: 15px 0;
    }
}

@media (max-width: 576px) {
    .logo {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .logo img {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .mobile-nav-toggle {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .hamburger-menu {
        width: 22px;
        height: 18px;
        margin: 8px auto;
    }
    
    .main-nav {
        width: 85%;
    }
    
    .banner-slide img {
        height: 180px;
    }
    
    .banner-info h2 {
        font-size: 16px;
    }
    
    .news-img img {
        height: 180px;
    }
    
    .footer-nav dl {
        width: 100%;
    }
    
    .back-to-top {
        width: 32px;
        height: 32px;
        line-height: 32px;
        right: 10px;
    }
    
    .back-to-top.visible {
        bottom: 10px;
    }
}

/* 移动设备强制样式重置 */
@media screen and (max-width: 767px) {
    /* 基本布局重置 */
    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* 容器宽度强制100% */
    .container, .header, .banner, .services, .news, .footer {
        width: 100% !important;
        min-width: 320px !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* 强制显示移动端导航按钮 */
    .mobile-nav-toggle {
        display: block !important;
    }
    
    /* 强制隐藏桌面导航 */
    .main-nav:not(.active) {
        display: none !important;
    }
    
    /* 强制单列布局 */
    .service-items, .news-container, .footer-top {
        display: block !important;
    }
    
    .service-item, .news-featured, .news-list {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
} 