/**
 * Apple-style Footer Styles
 * 金唯达塑料瓶产品展示网站 - Footer组件
 */

/* Footer主容器 */
.apple-footer {
    background: #e8e8ed !important;
    border-top: 1px solid var(--apple-border-light, #d2d2d7);
    margin-top: auto;
    position: relative;
}

.apple-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--apple-spacing-md, 24px);
    position: relative;
}

/* 主要内容区域 */
.footer-main-section {
    padding: var(--apple-spacing-xl, 48px) 0 var(--apple-spacing-lg, 32px);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--apple-spacing-lg, 32px);
    margin-bottom: var(--apple-spacing-lg, 32px);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column-title {
    font-family: var(--apple-font-family, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif);
    font-size: 17px;
    font-weight: 600;
    color: #0000008f;
    margin: 0 0 var(--apple-spacing-sm, 16px) 0;
    line-height: 1.24;
}

/* Footer链接样式 */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-family: var(--apple-font-family, -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 12px;
    color: #0000008f;
    text-decoration: none;
    line-height: 1.43;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--apple-blue, #007aff);
}


/* 分隔线 */
.footer-divider {
    height: 1px;
    background: var(--apple-border-light, #d2d2d7);
    margin: 0 0 var(--apple-spacing-md, 24px) 0;
}

/* 底部版权区域 */
.footer-bottom {
    padding-bottom: var(--apple-spacing-lg, 32px);
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--apple-spacing-sm, 16px);
    text-align: center;
}

.footer-copyright {
    font-family: var(--apple-font-family, -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 16px;
    color: #0000008f;
    line-height: 1.38;
    margin: 0;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--apple-spacing-sm, 16px);
}

.legal-link {
    font-family: var(--apple-font-family, -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 12px;
    color: #0000008f;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.legal-link:hover,
.legal-link:focus {
    color: var(--apple-blue, #007aff);
}

.legal-link:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: calc(-1 * var(--apple-spacing-sm, 16px) / 2);
    color: #0000008f;
}

.footer-icp {
    font-family: var(--apple-font-family, -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 12px;
    color: #0000008f;
    text-align: center;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: var(--apple-spacing-lg, 32px);
    right: var(--apple-spacing-lg, 32px);
    width: 48px;
    height: 48px;
    background: var(--apple-bg-elevated, #ffffff);
    border: 1px solid var(--apple-border-light, #d2d2d7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--apple-bg-hover, #f5f5f7);
    border-color: var(--apple-blue, #007aff);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.back-to-top svg {
    color: var(--apple-text-secondary, #86868b);
    transition: color 0.2s ease;
}

.back-to-top:hover svg {
    color: var(--apple-blue, #007aff);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .apple-footer {
        background: #2c2c2e !important;
        border-top-color: var(--apple-border-dark, #424245);
    }

    .footer-column-title {
        color: var(--apple-text-primary-dark, #f5f5f7);
    }

    .footer-links a,
    .contact-item,
    .contact-item a {
        color: var(--apple-text-secondary-dark, #a1a1a6);
    }

    .footer-links a:hover,
    .footer-links a:focus,
    .contact-item a:hover,
    .contact-item a:focus {
        color: var(--apple-blue-dark, #0a84ff);
    }

    .footer-divider {
        background: var(--apple-border-dark, #424245);
    }

    .footer-copyright,
    .legal-link,
    .footer-icp {
        color: var(--apple-text-tertiary-dark, #86868b);
    }

    .legal-link:hover,
    .legal-link:focus {
        color: var(--apple-blue-dark, #0a84ff);
    }

    .back-to-top {
        background: var(--apple-bg-elevated-dark, #1c1c1e);
        border-color: var(--apple-border-dark, #424245);
    }

    .back-to-top:hover {
        background: var(--apple-bg-hover-dark, #2c2c2e);
        border-color: var(--apple-blue-dark, #0a84ff);
    }

    .back-to-top svg {
        color: var(--apple-text-secondary-dark, #a1a1a6);
    }

    .back-to-top:hover svg {
        color: var(--apple-blue-dark, #0a84ff);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .apple-footer-container {
        padding: 0 var(--apple-spacing-sm, 16px);
    }

    .footer-main-section {
        padding: var(--apple-spacing-lg, 32px) 0 var(--apple-spacing-md, 24px);
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: var(--apple-spacing-md, 24px);
        max-width: 100%;
    }

    .footer-column {
        text-align: left;
    }

    .footer-bottom-content {
        gap: 12px;
    }

    .footer-legal-links {
        flex-direction: column;
        gap: 8px;
    }

    .legal-link:not(:last-child)::after {
        display: none;
    }

    .back-to-top {
        bottom: var(--apple-spacing-md, 24px);
        right: var(--apple-spacing-md, 24px);
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: var(--apple-spacing-sm, 16px);
    }

    .footer-column-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    .contact-item {
        font-size: 13px;
    }

    .footer-copyright,
    .legal-link,
    .footer-icp {
        font-size: 12px;
    }
}

/* 打印样式 */
@media print {
    .apple-footer {
        background: transparent;
        border-top: 1px solid #000;
    }

    .back-to-top {
        display: none;
    }

    .footer-links a,
    .contact-item a {
        color: #000;
        text-decoration: underline;
    }
}