/**
 * 对齐 demo/src/app/components/Footer.tsx
 * 深色底 · max-w-7xl · 四栏（联系方式占两栏）· 底栏版权与链接
 */

/*
 * CTA 与页脚之间的「白缝」来源：Metronic 的 #kt_app_content_container（app-container）
 * 对底部有 padding，全宽 CTA 仍是容器最后一个子元素，底部内边距会露白。
 */
#kt_app_content_container.app-container {
    padding-bottom: 0 !important;
}

#kt_app_content.app-content {
    padding-bottom: 0 !important;
}

.demo-hp-cta {
    margin-bottom: 0 !important;
}

.demo-site-footer {
    margin-top: 0 !important;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    background: #0f172a;
    color: #cbd5e1;
}

.demo-site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 16px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .demo-site-footer__inner {
        padding-left: 32px;
        padding-right: 32px;
    }
}

.demo-site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 768px) {
    .demo-site-footer__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 48px;
    }
}

.demo-site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.demo-site-footer__logo-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

a.demo-site-footer__logo-link {
    text-decoration: none;
    color: inherit;
    width: fit-content;
}

a.demo-site-footer__logo-link:hover .demo-site-footer__logo-text {
    color: #fff;
}

.demo-site-footer__logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.demo-site-footer__logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #fff;
}

.demo-site-footer__lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.625;
    color: #9ca3af;
}

.demo-site-footer__socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

.demo-site-footer__social {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    transition:
        background 0.2s,
        color 0.2s;
}

.demo-site-footer__social:hover {
    background: #2563eb;
    color: #fff;
}

.demo-site-footer__social i {
    font-size: 18px;
}

.demo-site-footer__col-title {
    margin: 0 0 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.demo-site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
}

.demo-site-footer__links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.demo-site-footer__links a:hover {
    color: #3b82f6;
}

/* 联系方式：md 起占两列 */
.demo-site-footer__contact {
    min-width: 0;
}

@media (min-width: 768px) {
    .demo-site-footer__contact {
        grid-column: span 2;
    }
}

.demo-site-footer__contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .demo-site-footer__contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.demo-site-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.demo-site-footer__contact-item--wide {
    margin-top: 8px;
}

@media (min-width: 640px) {
    .demo-site-footer__contact-item--wide {
        grid-column: span 2;
    }
}

.demo-site-footer__icon-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #3b82f6;
    font-size: 22px;
}

.demo-site-footer__contact-label {
    margin: 0 0 4px;
    font-size: 12px;
    color: #6b7280;
}

.demo-site-footer__contact-value {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

.demo-site-footer__contact-value--addr {
    font-size: 14px;
    line-height: 1.65;
}

.demo-site-footer__bottom {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

@media (min-width: 768px) {
    .demo-site-footer__bottom {
        flex-direction: row;
    }
}

.demo-site-footer__bottom-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.demo-site-footer__bottom-links a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.demo-site-footer__bottom-links a:hover {
    color: #d1d5db;
}

.demo-site-footer__copy {
    margin: 0;
    text-align: center;
}

.demo-site-footer__copy p {
    margin: 0;
}

@media (min-width: 768px) {
    .demo-site-footer__copy {
        text-align: left;
    }
}

/* 悬浮客服按钮 — 简版对齐 FloatingCustomerService */
.demo-float-cs {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 100;
}

.demo-float-cs__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 9999px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
    transition:
        background 0.3s,
        box-shadow 0.3s,
        transform 0.3s;
    font-size: 22px;
}

.demo-float-cs__btn:hover {
    background: #1d4ed8;
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.55);
    transform: translateY(-4px);
}

.demo-float-cs__ping {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
}

.demo-float-cs__ping::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #f87171;
    animation: demo-float-cs-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.demo-float-cs__ping::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #ef4444;
    border: 2px solid #fff;
}

@keyframes demo-float-cs-ping {
    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .demo-float-cs__ping::before {
        animation: none;
    }

    .demo-float-cs__btn:hover {
        transform: none;
    }
}
