/**
 * ArtZone Theme - Responsive Styles
 * Three breakpoints: 992px (tablet), 768px (small tablet), 480px (mobile)
 */

/* --- Tablet (max-width: 992px) --- */
@media (max-width: 992px) {
    .header-search { display: none; }
    .header-phone .phone-number { font-size: 16px; }
    .nav-menu li a { padding: 10px 12px; font-size: 14px; }
    .main-right { width: 280px; }
    .inner-right { width: 280px; }
    .card-grid { grid-template-columns: repeat(2, 2fr); }
    .card-img img { 
        width: 100%; 
        height: 100%;
        aspect-ratio: 4/3; 
        object-fit: cover; 
        object-position: center center;
    }
    .work-grid { grid-template-columns: repeat(2, 2fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-qrcode { grid-column: 1 / -1; }
    .tags_box .container { flex-direction: column; }
    .news-item { width: calc((100% - 17px) / 2); }
    .swiper-container-cat { overflow: hidden; }
    .post-nav { flex-direction: column; gap: 10px; }
    .post-nav a { width: 100%; }
    .breadcrumb-bar { font-size: 12px; word-break: break-all; }
    .sec-title h3 { font-size: 16px; }
    .content-header h2 { font-size: 16px; }
	.flash {aspect-ratio: 980/380; margin-bottom:20px; }
	.flash .swiper-button-prev,
.flash .swiper-button-next { 
    width:30px; 
    height:30px; 
    background: rgba(255,255,255,.85); 
    border-radius: 50%; 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 10; 
    cursor: pointer; 
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.flash .swiper-button-prev:hover,
.flash .swiper-button-next:hover { 
    background: #715B4D; 
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.flash .swiper-button-prev { left:5px; }
.flash .swiper-button-next { right:5px; }
.flash .swiper-button-prev::after,
.flash .swiper-button-next::after { 
    content: ''; 
    display: block; 
    width: 12px; 
    height: 12px; 
    border-left: 2.5px solid #715B4D; 
    border-bottom: 2.5px solid #715B4D; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transition: border-color .3s;
}
.flash .swiper-button-prev::after { 
    transform: translate(-30%, -50%) rotate(45deg); 
}
.flash .swiper-button-next::after { 
    transform: translate(-70%, -50%) rotate(-135deg); 
}
.flash .swiper-button-prev:hover::after,
.flash .swiper-button-next:hover::after { 
    border-color: #fff; 
}

    /* ★★★ 修复平板端标签间距 ★★★ */
    .card-meta .card-tag,
    .card-meta .card-cat,
    .home-side-tags a,
    .related-list .card-tag,
    .related-list .card-cat {
        margin-right: 6px !important;
        margin-bottom: 4px !important;
        display: inline-block;
    }
}

/* --- Small Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
    body { overflow-x: hidden; padding-bottom: 55px; }
    body.nav-open { overflow: hidden; }
    .header_top .container { flex-wrap: wrap; gap: 10px; }
    .header-content .container { flex-wrap: wrap; }
    .header-phone { order: 0; width: auto; text-align: right; flex-shrink: 0; }
    .site-nav { min-height: 50px; }
    .nav-toggle { 
        display: block;
        position: relative;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        width: 44px;
        height: 44px;
        padding: 10px;
        z-index: 1001;
        cursor: pointer;
        border: none;
        flex-shrink: 0;
        margin: 0;
    }
    .nav-toggle span {
        display: block;
        width: 24px;
        height: 3px;
        background: #fff;
        margin: 5px auto;
        transition: all 0.3s ease;
        border-radius: 3px;
    }
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    .nav-menu { 
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(47,47,47,0.98) 0%, rgba(113,91,77,0.98) 100%);
        flex-direction: column;
        z-index: 1000;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.95);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 80px 0 120px;
        justify-content: flex-start;
    }
    .nav-menu.active { 
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(207,169,112,0.2);
        position: relative;
    }
    .nav-menu li a { 
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 40px;
        font-size: 18px;
        color: #fff;
        text-decoration: none;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    .nav-menu li a:hover {
        background: rgba(207,169,112,0.15);
        color: #CFA970;
        padding-left: 50px;
    }
    .nav-menu li a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 0;
        background: linear-gradient(180deg, #CFA970 0%, #D4AF37 100%);
        transition: height 0.3s ease;
    }
    .nav-menu li a:hover::before {
        height: 100%;
    }
    .menu-item-has-children > a::after {
        content: '+';
        font-size: 24px;
        font-weight: 300;
        color: #CFA970;
        transition: transform 0.3s ease;
        margin-left: 10px;
    }
    .menu-item-has-children.active > a::after {
        content: '−';
    }
    /* ★★★ 子菜单折叠与横向展开 ★★★ */
    .nav-menu .sub-menu {
        max-height: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-wrap: wrap !important;
        transition: max-height 0.5s ease !important;
        padding: 0 20px !important;
        margin: 0 !important;
        background: rgba(0,0,0,0.15) !important;
        border: none !important;
        box-shadow: none !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .menu-item-has-children.active .sub-menu {
        max-height: 600px !important;
        overflow-y: auto !important;
    }
    .nav-menu .sub-menu li {
        flex: 0 1 auto !important;
        width: auto !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .nav-menu .sub-menu li a {
        display: inline-flex !important;
        padding: 8px 20px !important;
        font-size: 15px !important;
        color: rgba(255,255,255,0.9) !important;
        border: 1px solid rgba(255,255,255,0.12) !important;
        border-radius: 30px !important;
        background: rgba(255,255,255,0.06) !important;
        min-height: 40px !important;
        white-space: nowrap !important;
        transition: all 0.25s ease !important;
        text-decoration: none !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .nav-menu .sub-menu li a:hover {
        background: #CFA970 !important;
        color: #fff !important;
        border-color: #CFA970 !important;
    }
    .nav-menu .sub-menu li a::before {
        display: none !important;
    }
    /* ★★★ 底部关闭按钮 - 强制固定在底部中间 ★★★ */
    .nav-close-bottom {
        display: none !important;
        position: fixed !important;
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1002 !important;   /* 高于导航层 */
        width: 60px !important;
        height: 60px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        border: 2px solid rgba(255, 255, 255, 0.25) !important;
        border-radius: 50% !important;
        color: #fff !important;
        font-size: 30px !important;
        line-height: 60px !important;
        text-align: center !important;
        cursor: pointer !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
        user-select: none !important;
        transition: all 0.3s ease !important;
    }
    .nav-close-bottom:hover {
        background: rgba(207, 169, 112, 0.4) !important;
        border-color: #CFA970 !important;
        transform: translateX(-50%) scale(1.05) !important;
    }
    /* 当导航激活时显示关闭按钮 */
    .nav-menu.active ~ .nav-close-bottom {
        display: block !important;
    }
    .main-grid { flex-direction: column; }
    .main-left { width: 100% !important; flex: none !important; }
    .main-right { width: 100% !important; position: static !important; flex: none !important; }
    .inner-grid { flex-direction: column; }
    .inner-left { width: 100% !important; flex: none !important; }
    .inner-right { width: 100% !important; position: static !important; flex: none !important; }
    .card-grid { grid-template-columns: repeat(2, 2fr); }
    .card-img img { 
        width: 100%; 
        height: 100%;
        aspect-ratio: 4/3; 
        object-fit: cover; 
        object-position: center center;
    }
    .work-grid { grid-template-columns: repeat(2, 2fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .mobile-bottom-nav { display: block; }
    .back-to-top { bottom: 70px; }
    .flash .swiper-button-prev,
    .flash .swiper-button-next { width: 30px; height: 30px; font-size: 14px; }
    .flash {aspect-ratio: 980/380; margin-bottom:20px; }
    .news-item { width: calc((100% - 17px) / 2); }
    .post-nav { flex-direction: column; gap: 10px; }
    .post-nav a { width: 100%; }
    .breadcrumb-bar { font-size: 12px; word-break: break-all; }
    .sec-title h3 { font-size: 16px; }
    .content-header h2 { font-size: 16px; }
    .swiper-container-cat { overflow: hidden; }
    .cat-card img { width: 100%; height: auto; }
	.flash {aspect-ratio: 980/380; margin-bottom:20px; }
	.flash .swiper-button-prev,
.flash .swiper-button-next { 
    width:30px; 
    height:30px; 
    background: rgba(255,255,255,.85); 
    border-radius: 50%; 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 10; 
    cursor: pointer; 
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.flash .swiper-button-prev:hover,
.flash .swiper-button-next:hover { 
    background: #715B4D; 
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.flash .swiper-button-prev { left:5px; }
.flash .swiper-button-next { right:5px; }
.flash .swiper-button-prev::after,
.flash .swiper-button-next::after { 
    content: ''; 
    display: block; 
    width: 12px; 
    height: 12px; 
    border-left: 2.5px solid #715B4D; 
    border-bottom: 2.5px solid #715B4D; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transition: border-color .3s;
}
.flash .swiper-button-prev::after { 
    transform: translate(-30%, -50%) rotate(45deg); 
}
.flash .swiper-button-next::after { 
    transform: translate(-70%, -50%) rotate(-135deg); 
}
.flash .swiper-button-prev:hover::after,
.flash .swiper-button-next:hover::after { 
    border-color: #fff; 
}
}

/* --- Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    body { overflow-x: hidden; }
    .header-logo img {width:180px; height: auto;}
    .header-phone .phone-number { font-size: 14px; }
    .header-phone { margin-bottom: 0; }
    .header-logo { flex: 0 1 auto; }
    .site-title-text { font-size: 20px; line-height: 1.4; }
    .nav-menu li a { padding: 10px 15px; font-size: 13px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .card-img img { 
        width: 100%; 
        height: 100%;
        aspect-ratio: 4/3; 
        object-fit: cover; 
        object-position: center center;
    }
    .work-grid { grid-template-columns: repeat(2, 1fr); }
    .news-item { width: calc((100% - 17px) / 2); }
    .content-header h2 { font-size: 18px; }
    .content-body .post-title { font-size: 18px; }
    .content-body { padding: 15px; }
    .home-side-news .side-news-img { width: 60px; height: 45px; }
    .tags_box .container { flex-direction: column; align-items: flex-start; }
    .related-list li { width: 100%; }
    .page_bg { padding: 30px 0 20px; }
    .swiper-container-cat { overflow: hidden; }
    .cat-card-text { padding: 10px 10px 12px; }
    .cat-card-text h6 { font-size: 14px; }
    .home-side-section { padding: 14px; }
    .post-nav a { font-size: 13px; padding: 8px 12px; }
    .main-grid { gap: 12px; }
    .inner-grid { gap: 12px; }
    .breadcrumb-bar { font-size: 11px; word-break: break-all; margin-bottom: 10px; }
    .sec-title { margin-bottom: 12px; }
    .sec-title h3 { font-size: 15px; }
    .content-header h2 { font-size: 15px; }
    .back-to-top { display: none !important; }
    .work-card-title { font-size: 14px; }
    .news-text h4 { font-size: 14px; }
    .home-side-title { font-size: 15px; }
    .work-card-img img { aspect-ratio: 4/3; }
	.flash {aspect-ratio: 980/380; margin-bottom:20px; }
	.flash .swiper-button-prev,
.flash .swiper-button-next { 
    width:30px; 
    height:30px; 
    background: rgba(255,255,255,.85); 
    border-radius: 50%; 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 10; 
    cursor: pointer; 
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.flash .swiper-button-prev:hover,
.flash .swiper-button-next:hover { 
    background: #715B4D; 
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.flash .swiper-button-prev { left:5px; }
.flash .swiper-button-next { right:5px; }
.flash .swiper-button-prev::after,
.flash .swiper-button-next::after { 
    content: ''; 
    display: block; 
    width: 12px; 
    height: 12px; 
    border-left: 2.5px solid #715B4D; 
    border-bottom: 2.5px solid #715B4D; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transition: border-color .3s;
}
.flash .swiper-button-prev::after { 
    transform: translate(-30%, -50%) rotate(45deg); 
}
.flash .swiper-button-next::after { 
    transform: translate(-70%, -50%) rotate(-135deg); 
}
.flash .swiper-button-prev:hover::after,
.flash .swiper-button-next:hover::after { 
    border-color: #fff; 
}

    .nav-menu .sub-menu li a {
        padding: 6px 16px !important;
        font-size: 13px !important;
        min-height: 34px !important;
    }
    .menu-item-has-children.active .sub-menu {
        max-height: 400px !important;
    }
    .nav-close-bottom {
        width: 52px !important;
        height: 52px !important;
        font-size: 26px !important;
        line-height: 52px !important;
        bottom: 30px !important;
    }
}

/* --- Ultra Small (max-width: 360px) --- */
@media (max-width: 360px) {
    .work-grid { grid-template-columns: 1fr; }
    .news-item { width: 100%; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-menu .sub-menu li a {
        padding: 5px 12px !important;
        font-size: 12px !important;
        min-height: 30px !important;
    }
    .menu-item-has-children.active .sub-menu {
        max-height: 300px !important;
    }
    .nav-close-bottom {
        width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
        line-height: 44px !important;
        bottom: 25px !important;
    }
}

/* 桌面端强制隐藏关闭按钮 */
@media (min-width: 769px) {
    .nav-close-bottom {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        z-index: -9999 !important;
    }
}