/* 首页专用样式 */

.home-page {
    background: #faefdeff;
}

/* 顶部背景图 */
.home-header {
    position: relative;
    width: 100%;
    height: 247px;
    overflow: hidden;
}
.home-header-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 主横幅卡片 */
.home-banner {
    margin: -174px 6px 0;
    position: relative;
    z-index: 10;
}
.home-banner img,
.home-banner video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid #f9e1ae;
    display: block;
    background: #000;
    object-fit: cover;
}
/* 右下角静音切换按钮 */
.home-banner-mute {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background-color .2s, transform .2s;
}
.home-banner-mute:active {
    transform: scale(0.92);
    background: rgba(0, 0, 0, 0.75);
}
.home-banner-mute svg {
    pointer-events: none;
}

/* 四功能入口 */
.home-nav-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 16px 20px;
    margin: 10px 6px 10px;
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, #fdf5de, #fdfdf1);
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.1);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
    box-sizing: border-box;
    gap: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.nav-item span {
    font-size: 14px;
    font-weight: 500;
    color: #5e3a00;
    line-height: 1.43;
}

/* 三张横幅 */
.home-banners {
    padding: 0 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 10;
}
.banner-card {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.banner-card:active {
    opacity: .85;
}

/* 专项退款 banner 覆盖文字 */
.banner-card-refund {
    position: relative;
    display: block;
    overflow: hidden;
}
.banner-card-refund img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}
.refund-channel-label {
    position: absolute;
    left: 50%;
    top: 64%;
    transform: translateX(-50%);
    color: #000;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(255,255,255,.4);
    white-space: nowrap;
    pointer-events: none;
}
.refund-channel-cta {
    position: absolute;
    right: 12px;
    bottom: 10px;
    background: linear-gradient(to bottom, #ffd27a, #ffa43a);
    color: #8a2e00;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 100px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    letter-spacing: 1px;
    pointer-events: none;
}

/* 底部两卡片 */
.home-contact-row {
    display: flex;
    gap: 8px;
    padding: 14px 6px 0;
    position: relative;
    z-index: 10;
}
.contact-card {
    flex: 1;
    background: #fff;
    border-radius: 15px;
    padding: 6px 5px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.contact-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #d00300;
    text-align: center;
    margin: 0 0 4px;
    line-height: 1.22;
}
.qr-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 10px;
}
.qr-border {
    width: 130px;
    height: 130px;
    background: #e6001d;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-img {
    width: 120px;
    height: 120px;
    background: #fff;
    display: block;
}
.contact-btns {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    padding: 0 2px;
}
.btn-action {
    flex: 1;
    height: 32px;
    background: #e6001d;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    line-height: 32px;
    text-align: center;
}
.btn-action:active { opacity: .8; }
.btn-outline {
    flex: 1;
    height: 32px;
    background: #fce4df;
    color: #e6001d;
    border: 1px solid #e6001d;
    border-radius: 100px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
}
.btn-outline:active { opacity: .8; }

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -1px 4px rgba(0,0,0,.06);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 1px;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.bottom-nav-item span {
    font-size: 8px;
    color: #6d6d6d;
    line-height: 1.2;
}
.bottom-nav-item.active span {
    color: #dd0200;
}
/* 隐藏底部导航栏中的"项目"入口 */
.bottom-nav-item[href="project.php"] {
    display: none !important;
}

/* 弹窗内二维码 */
.qr-modal-box {
    max-width: 320px;
}
.qr-modal-img-wrap {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #e6001d;
}
.qr-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.btn-qr-action {
    display: block;
    width: 100%;
    height: 42px;
    line-height: 42px;
    background: #dd0200;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    margin-bottom: 10px;
    font-family: inherit;
}
.btn-qr-action:active { opacity: .8; }
.btn-qr-download {
    display: block;
    width: 100%;
    height: 38px;
    line-height: 36px;
    background: #fce4df;
    color: #e6001d;
    border: 1px solid #e6001d;
    border-radius: 100px;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}
.btn-qr-download:active { opacity: .8; }

/* 桌面端底部导航居中 */
@media (min-width: 480px) {
    .bottom-nav {
        max-width: 393px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================================
   首页公告弹窗（顺序弹出）
   ========================================================== */
.ann-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: annFadeIn .18s ease-out;
}
.ann-modal-mask.active { display: flex; }

.ann-modal-box {
    width: 100%;
    max-width: 420px;
    max-height: 82vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: annPopIn .22s cubic-bezier(.2,.8,.2,1);
}

@keyframes annFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes annPopIn {
    from { transform: translateY(20px) scale(.96); opacity: 0; }
    to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

.ann-modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.ann-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
.ann-modal-close {
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}
.ann-modal-close:hover { color: #374151; }

.ann-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
    color: #374151;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
}

.ann-img,
.ann-img-link img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}
.ann-img-link { display: block; }

.ann-text {
    margin-top: 12px;
    line-height: 1.5;
    word-break: break-word;
}
.ann-text br { line-height: 1; }
.ann-text .ann-red {
    color: #dc0000;
    font-weight: 600;
}
.ann-img + .ann-text,
.ann-img-link + .ann-text { margin-top: 14px; }

.ann-btns {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ann-btn {
    display: block;
    text-align: center;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
    user-select: none;
}
.ann-btn-primary {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}
.ann-btn-primary:active { background: #1d4ed8; }

.ann-btn-ghost {
    background: #fff;
    color: #2563eb;
    border: 1px solid #2563eb;
}
.ann-btn-ghost:active { background: #eff6ff; }

.ann-btn-link {
    background: transparent;
    color: #2563eb;
    border: none;
    padding: 8px;
    text-decoration: underline;
}

.ann-modal-footer {
    padding: 12px 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fafafa;
}
.ann-modal-counter {
    font-size: 12px;
    color: #9ca3af;
}
.ann-btn-close {
    border: none;
    background: #2563eb;
    color: #fff;
    padding: 8px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.ann-btn-close:active { background: #1d4ed8; }
