/* 移動端工作流程樣式 */
@media screen and (max-width: 1400px) {
    /* 頭部大圖 - start */
    #headerContainer img {
        width: 100%;
    }

    .service-list {
        grid-template-columns: repeat(1, 1fr);
        gap: 16px;
        margin-top: 16px;
    }

    .service-item {
        width: 100%;
    }
    /* 頭部大圖 - end    */

    /* 我們的服務範圍 - start */
    #areaSection .area-list {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    #areaSection .area-item {   
        width: 100%;
        margin-top: 16px;
        padding: 16px;
    }

    #areaSection .icon-wrapper {
        width: 100%;
        height: auto;
        margin-bottom: 0;
    }

    #areaSection .area-title {
        margin-top: 16px;
        margin-bottom: 4px;
    }

    #areaSection .icon-wrapper .area-icon {
        width: 60px;
        height: 60px;
    }

    .d-item {
        margin-bottom: 0;
    }
    /* 我們的服務範圍 - end */

    /* 我們的服務流程 - start */

    .step-item::after {
        /* left: 50%;
        right: auto;
        transform:  rotate(218deg) translateX(-50%) !important;
        top: 100%; */
        display: none;
    }

    .step-item {
        width: 100%;
        margin-top: 16px !important;
    }

    .step-icon {
        margin-bottom: 16px;
    }
    /* 我們的服務流程 - end */

    /* 甲醛的危害 - start */
    #formaldehydeDangerSection {
        padding-bottom: 0;
    }
    
    #formaldehydeDangerSection .my-container {
        flex-flow: column-reverse;
    }

    #formaldehydeDangerSection .my-container .right-wrapper {
        padding-left: 0;
    }

    .section-sub-title {
        display: flex;
        justify-content: center;
    }
    /* 甲醛的危害 - end */
    
    .title-text {
        font-size: 16px;
    }
    
    .title-underline {
        width: 30px;
        margin-left: 10px;
    }
    
    .main-heading {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .process-steps {
        flex-direction: column;
        gap: 30px;
        max-width: 100%;
    }
    
    .process-steps::before {
        display: none;
    }
    
    .step-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }
    
    .step-icon svg {
        width: 45px;
        height: 45px;
    }
    
    .step-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .step-description {
        font-size: 15px;
        max-width: 100%;
        padding: 0 10px;
    }

    .danger-content {
        gap: 16px;
    }

    .danger-item {
        align-items: center;
        justify-content: center;
    }

    .danger-details {
        margin-bottom: 12px;
    }

    .process-steps {
        flex-direction: column;
        gap: 30px;
        max-width: 100%;
    }
    
    .process-steps::before {
        display: none;
    }
    
    .step-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }
    
    .step-icon svg {
        width: 45px;
        height: 45px;
    }
    
    .step-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .step-description {
        font-size: 15px;
        max-width: 100%;
        padding: 0 10px;
    }

    .step-item {
        padding: 20px 16px;
        border: 1px solid #eeeeee;
        border-radius: 12px;
        margin-top: 0 !important;
        background-color: #ffffff;
    }

    .step-icon {
        border: none;
    }

    .process-steps {
        gap: 16px;
    }

    #serviceProcessSection .container {
        padding: 0 16px;
    }
}

@media screen and (max-width: 768px) {
    #serviceProcessSection {
        padding: 30px 15px;
    }
    
    .main-heading {
        font-size: 28px;
    }
    
    .step-icon {
        width: 80px;
        height: 80px;
    }
    
    .step-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .step-description {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .main-heading {
        font-size: 24px;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
    }
    
    .step-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 13px;
    }
}

/* 移動端服務網格樣式 */
@media screen and (max-width: 1280px) {
    #serviceSection {
        padding: 60px 20px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 100%;
    }
    
    .service-image {
        width: 160px;
        height: 160px;
    }
    
    .service-title {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    #serviceSection {
        padding: 40px 15px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-image {
        width: 140px;
        height: 140px;
        border-width: 2px;
    }
    
    .service-title {
        font-size: 15px;
    }
    
    /* 移動端彈跳動畫調整 */
    .service-item:hover .service-image {
        animation: bounce-twice-mobile 0.5s ease-in-out;
    }
    
    @keyframes bounce-twice-mobile {
        0%, 100% {
            transform: translateY(0) scale(1);
        }
        25% {
            transform: translateY(-10px) scale(1.03);
        }
        50% {
            transform: translateY(0) scale(1);
        }
        75% {
            transform: translateY(-8px) scale(1.02);
        }
    }
}

@media screen and (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .service-image {
        width: 180px;
        height: 180px;
    }
    
    .service-title {
        font-size: 16px;
    }
}

/* 觸控設備優化 */
@media (hover: none) and (pointer: coarse) {
    .service-item:active .service-image {
        animation: bounce-twice 0.4s ease-in-out;
        transform: scale(1.02);
    }
    
    .service-item:active .service-image img {
        transform: scale(1.05);
    }
}

/* 移動端服務範圍樣式 */
@media screen and (max-width: 1280px) {
    #areaSection {
        padding: 60px 20px;
    }
    
    .area-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 100%;
    }
    
    .area-item {
        padding: 35px 25px 25px;
    }
    
    .icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .area-title {
        font-size: 22px;
    }
    
    .sub-title {
        font-size: 15px;
    }
    
    .d-item {
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    #areaSection {
        padding: 40px 15px;
    }
    
    .area-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .area-item {
        padding: 30px 20px 25px;
    }
    
    .icon-wrapper {
        width: 65px;
        height: 65px;
        margin-bottom: 18px;
    }
    
    .area-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .sub-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .d-item {
        font-size: 13px;
    }
    
    .read-more-link {
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .area-list {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .area-item {
        padding: 35px 25px 25px;
    }
    
    .icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .area-title {
        font-size: 22px;
    }
    
    .sub-title {
        font-size: 15px;
    }
    
    .d-item {
        font-size: 14px;
    }
}

/* 甲醛危害区域移动端适配 */
@media screen and (max-width: 1200px) {
    .danger-section {
        padding: 80px 20px;
    }
    
    .danger-content {
        grid-template-columns: 1fr;
        gap: 16x;
    }
    
    .danger-info {
        padding-left: 0;
    }
    
    .danger-visual {
        order: -1;
    }
    
    .danger-details {
        gap: 24px;
    }
    
    .danger-item {
        padding: 20px;
        gap: 16px;
    }
    
    .danger-text h3 {
        font-size: 18px;
    }
    
    .danger-text p {
        font-size: 14px;
    }
    
    .source-info {
        padding: 16px 20px;
    }
    
    .source-text {
        font-size: 13px;
    }
}

@media screen and (max-width: 768px) {
    .danger-section {
        padding: 60px 15px;
    }
    
    .danger-details {
        gap: 20px;
    }
    
    .danger-item {
        padding: 16px;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .danger-text h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .danger-text p {
        font-size: 14px;
    }
    
    .source-info {
        padding: 12px 16px;
        margin-top: 20px;
    }
    
    .source-text {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .danger-section {
        padding: 40px 10px;
    }
    
    .danger-details {
        gap: 16px;
    }
    
    .source-info {
        padding: 10px 12px;
        margin-top: 16px;
    }
    
    .source-text {
        font-size: 11px;
    }
}

/* 服务流程区域移动端适配 */
@media screen and (max-width: 1200px) {
    #serviceProcessSection {
        padding: 80px 20px;
    }
    
    .process-steps {
        flex-direction: column;
        gap: 30px;
    }
    
    .step-item::after {
        display: none;
    }
    
    .step-item {
        margin-top: 0 !important;
        width: 100%;
    }
    
    .step-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .step-icon svg {
        width: 50px;
        height: 50px;
    }
    
    .step-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .step-description {
        font-size: 14px;
        max-width: 100%;
        padding: 0 10px;
    }
}

@media screen and (max-width: 768px) {
    #serviceProcessSection {
        padding: 60px 15px;
    }
    
    .process-steps {
        gap: 24px;
    }
    
    .step-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }
    
    .step-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .step-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .step-description {
        font-size: 13px;
        padding: 0 5px;
    }
}

@media screen and (max-width: 480px) {
    #serviceProcessSection {
        padding: 40px 10px;
    }
    
    .process-steps {
        gap: 20px;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }
    
    .step-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .step-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .step-description {
        font-size: 12px;
        padding: 0;
    }
}

/* 移动端触摸和滚动优化 */
@media screen and (max-width: 1024px) {
    /* 触摸区域优化 */
    .danger-item,
    .step-item {
        min-height: 44px;
        touch-action: manipulation;
        cursor: pointer;
    }
    
    /* 滚动优化 */
    .danger-section,
    #serviceProcessSection {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止水平滚动 */
    .container,
    .danger-content,
    .process-steps,
    .contact-info {
        overflow-x: hidden;
    }
}

/* 移动端特殊交互效果 */
@media screen and (max-width: 768px) {
    /* 危险项目卡片点击效果 */
    .danger-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* 服务流程步骤点击效果 */
    .step-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* 移动端字体大小优化 */
@media screen and (max-width: 480px) {
    
    .danger-text p,
    .step-description {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .section-sub-title,
    .source-text,
    .tip {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* 移动端间距优化 */
@media screen and (max-width: 768px) {
    /* 减少不必要的间距 */
    .danger-section,
    #serviceProcessSection {
        padding: 60px 0;
    }
    
    .danger-details,
    .process-steps {
        gap: 20px;
    }
}

@media screen and (max-width: 480px) {
    /* 进一步减少间距 */
    .danger-section,
    #serviceProcessSection {
        padding: 40px 0;
    }
    
    .danger-details,
    .process-steps {
        gap: 16px;
    }
}

/* 移动端视频优化 */
@media screen and (max-width: 768px) {
    .danger-video {
        border-radius: 12px;
    }
    
    .video-wrapper {
        border-radius: 12px;
        padding: 0;
    }
    
    /* 减少视频加载对性能的影响 */
    .danger-video {
        background-color: #f5f5f5;
    }
}

/* 移动端动画优化 */
@media screen and (max-width: 768px) {
    /* 减少动画以提高性能 */
    .danger-item:hover,
    .step-item:hover {
        transform: none;
        transition: none;
    }
    
    /* 保留必要的动画 */
    .danger-item:active,
    .step-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* 减少背景装饰动画 */
    .danger-section .decoration-circle {
        animation-duration: 12s;
    }
    
    .danger-section .decoration-line {
        animation-duration: 16s;
    }
}

/* 移动端背景装饰优化 */
@media screen and (max-width: 768px) {
    /* 简化背景装饰 */
    .danger-section .circle-1 {
        width: 80px;
        height: 80px;
    }
    
    .danger-section .circle-2 {
        width: 60px;
        height: 60px;
    }
    
    .danger-section .circle-3 {
        width: 70px;
        height: 70px;
    }
    
    .danger-section .line-1,
    .danger-section .line-2 {
        width: 100px;
        height: 1px;
    }
}

@media screen and (max-width: 480px) {
    /* 进一步简化背景装饰 */
    .danger-section .circle-1 {
        width: 60px;
        height: 60px;
    }
    
    .danger-section .circle-2 {
        width: 40px;
        height: 40px;
    }
    
    .danger-section .circle-3 {
        width: 50px;
        height: 50px;
    }
    
    .danger-section .line-1,
    .danger-section .line-2 {
        width: 80px;
        height: 1px;
    }
}