/* ============================================================
   页尾（Footer）公共样式
   与 header.html / load-header.js 配套使用，支持响应式布局。
   依赖：common.css（CSS 变量、容器、根字号体系）
   ============================================================ */

/* ---------- 页尾外层 ---------- */
.moki-footer {
    position: relative;
    width: 100%;
    color: #ccc;
    overflow: hidden;
}

/* 顶部品牌栏 */
.footer-top {
    padding: 2.5rem 0 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    display: block;
    height: 2rem;
    width: auto;
}

.footer-logo img {
    height: 100%;
    width: auto;
    display: block;
}

.footer-slogan {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--moki-accent);
    letter-spacing: 0.12em;
}

.footer-backtop {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0.4rem 0;
    outline: none;
}

.footer-backtop:hover {
    color: var(--moki-accent);
}

.footer-backtop .iconfont {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.footer-backtop:hover .iconfont {
    transform: translateY(-2px);
}

/* ---------- 链接导航区 ---------- */
.footer-links {
    padding: 2.75rem 0 2rem;
}

.footer-links-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 1.25rem;
}

.footer-col {
    flex: 1 1 0;
    min-width: 135px;
}

/* 最后一列（订阅我们）内容较宽，给更多弹性空间 */
.footer-col:last-child {
    flex: 1.2 1 180px;
}

.footer-col-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--moki-accent);
    margin-bottom: 1.25rem;
    white-space: nowrap;
    letter-spacing: 1px;
}

.footer-col-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-col-list li {
    line-height: 1.4;
}

.footer-col-list a {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    color: #aaa;
    transition: color 0.25s ease;
    line-height: 1.5;
}

.footer-col-list a:hover {
    color: var(--moki-accent);
}

/* 订阅我们 */
.footer-subscribe-desc {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

.footer-subscribe-form {
    display: flex;
    align-items: stretch;
    max-width: 18rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.25rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 1.1rem;
}

.footer-subscribe-form input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 0.8rem;
    padding: 0 0.85rem;
}

.footer-subscribe-form input::placeholder {
    color: #777;
    font-size: 0.75rem;
}

.footer-subscribe-form button {
    flex: 0 0 auto;
    padding: 0 1rem;
    border: none;
    outline: none;
    background: linear-gradient(90deg, var(--moki-bg-1) 0%, var(--moki-bg-2) 100%);
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.footer-subscribe-form button:hover {
    opacity: 0.88;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 1rem;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.footer-social a:hover {
    transform: translateY(-3px);
    background: var(--moki-accent);
    color: #000;
}

.footer-social a svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* ---------- 联系信息区 ---------- */
.footer-contact {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-contact-inner {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-contact-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--moki-accent);
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #aaa;
}

.footer-contact-info a {
    color: #aaa;
    transition: color 0.25s ease;
}

.footer-contact-info a:hover {
    color: var(--moki-accent);
}
.footer-contact-info a .iconfont {
    margin-right: 0.25rem;
}
.footer-qr {
    width: 5rem;
    height: 5rem;
    border-radius: 0.25rem;
    background: #fff;
    padding: 0.35rem;
    overflow: hidden;
}

.footer-qr img,
.footer-qr svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- 版权栏 ---------- */
.footer-bottom {
    padding: 1.1rem 0;
    background: rgba(0, 0, 0, 0.45);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #888;
}

.footer-copyright {
    line-height: 1.6;
}

.footer-copyright a {
    color: #888;
    transition: color 0.25s ease;
}

.footer-copyright a:hover {
    color: var(--moki-accent);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-legal a {
    color: #888;
    transition: color 0.25s ease;
}

.footer-legal a:hover {
    color: var(--moki-accent);
}

/* ============================================================
   响应式适配
   ============================================================ */

/* 平板横屏 / 小桌面 */
@media screen and (max-width: 1200px) {
    .footer-col {
        flex: 1 1 calc(25% - 1.25rem);
        min-width: 180px;
    }

    .footer-col:last-child {
        flex: 1 1 calc(25% - 1.25rem);
    }

    .footer-contact-inner {
        gap: 3rem;
    }
}

/* 平板竖屏 */
@media screen and (max-width: 768px) {
    .footer-top {
        padding: 2rem 0 1.5rem;
    }

    .footer-links {
        padding: 2rem 0 1.5rem;
    }

    .footer-links-inner {
        gap: 1.75rem 1.25rem;
    }

    .footer-col {
        flex: 1 1 calc(50% - 1.25rem);
        min-width: 160px;
    }

    .footer-col:last-child {
        flex: 1 1 calc(50% - 1.25rem);
    }

    .footer-contact-inner {
        gap: 2rem;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}

/* 手机 */
@media screen and (max-width: 480px) {
    .footer-links-inner {
        gap: 0;
    }

    .footer-col {
        flex: 1 1 100%;
        min-width: 0;
    }

    .footer-col:last-child {
        flex: 1 1 100%;
    }

    /* 折叠面板：标题可点击（增大触摸区域） */
    .footer-col-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        user-select: none;
        margin-bottom: 0;
        padding: 0.85rem 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 1rem;
        min-height: 3rem;
    }

    /* 订阅我们 不折叠，去掉箭头交互 */
    .footer-col:last-child .footer-col-title {
        cursor: default;
        border-bottom: none;
    }

    /* 折叠箭头（增大点击区域） */
    .footer-col-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        flex-shrink: 0;
    }

    .footer-col-toggle::after {
        content: '';
        display: block;
        width: 0.5rem;
        height: 0.5rem;
        border-right: 2px solid #bafff0;
        border-bottom: 2px solid #bafff0;
        transform: rotate(-45deg);
        transition: transform 0.3s ease;
    }

    /* 展开时箭头向下 */
    .footer-col.active .footer-col-toggle::after {
        transform: rotate(45deg);
    }

    /* 默认隐藏列表 */
    .footer-col-list {
        display: none;
    }

    /* 展开时显示列表，增大链接触摸区域 */
    .footer-col.active .footer-col-list {
        display: flex;
        padding: 0.65rem 0.25rem 0.45rem;
    }

    .footer-col-list a {
        font-size: 0.9rem;
        padding: 0.35rem 0;
        display: block;
    }

    /* 订阅表单移动端优化 */
    .footer-subscribe-desc {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .footer-subscribe-form {
        height: 2.8rem;
    }

    .footer-subscribe-form input {
        font-size: 0.9rem;
    }

    .footer-subscribe-form button {
        font-size: 0.9rem;
        padding: 0 1.2rem;
    }

    /* 社交图标移动端增大 */
    .footer-social a {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.15rem;
    }

    .footer-contact-inner {
        flex-direction: row;
        gap: 1.75rem;
    }

    .footer-qr {
        width: 5.5rem;
        height: 5.5rem;
    }

    /* 版权栏移动端字间距优化 */
    .footer-copyright {
        font-size: 0.78rem;
        line-height: 1.8;
    }

    .footer-legal a {
        padding: 0.35rem 0;
        display: inline-block;
        font-size: 0.8rem;
    }
}
