/* ====================== 页脚模块基础样式 ====================== */
.footer-modules-wrapper {
    width: 100%;
    overflow: visible; /* 改为 visible，允许负 margin 可见 */
    position: relative;
}

.footer-module {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: var(--module-height, auto);
    min-height: 0 !important;
    max-height: none !important;
}

/* ===== 模块1：全宽横幅 ===== */
.footer-banner {
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: height 0.3s ease;
    height: var(--banner-height, 350px);
}

.footer-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.footer-banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    animation: fadeInUp 0.8s ease;
}

.footer-banner-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.footer-banner-subtitle {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.footer-banner-button {
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.footer-banner-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-banner-button:active {
    transform: translateY(-1px);
}

/* ===== 模块2：通讯订阅 ===== */
.footer-newsletter {
    background: #f8f9fa;
    transition: height 0.3s ease, background-color 0.3s ease;
    height: var(--newsletter-height, 250px);
}

.footer-newsletter-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 60px;
    height: 100%;
}

.footer-newsletter-left {
    flex: 1;
    width: 600px;
}

.footer-newsletter-left h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.footer-newsletter-left p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.footer-newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.footer-newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.footer-newsletter-form input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.footer-newsletter-form button {
    padding: 15px 30px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-newsletter-form button:hover {
    background: #219653;
    transform: translateY(-2px);
}

.footer-newsletter-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.footer-newsletter-message {
    margin-top: 15px;
    font-size: 14px;
    display: none;
}

.footer-newsletter-message.success {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #27ae60;
}

.footer-newsletter-message.error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

.footer-newsletter-note {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

.footer-newsletter-right {
    text-align: center;
    animation: fadeIn 0.8s ease;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.footer-newsletter-right h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.footer-social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
}

.footer-social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.footer-social-icon.touch-active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* ===== 模块3：五列菜单（无LOGO，五列等分） ===== */
.footer-menus {
    color: white;
    transition: height 0.3s ease, background-color 0.3s ease;
    height: var(--menus-height, 400px);
}

.footer-menus-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 五列等分 */
    gap: 40px;
    padding: 20px;
    height: 100%;
}

.footer-menu-column {
    text-align: left; /* 强制左对齐 */
    animation: fadeIn 0.8s ease;
}

.footer-menu-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 0; /* 移除下划线预留空间 */
    border-bottom: none;
    /* 无下划线动画 */
}

.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list li {
    margin-bottom: 4px; /* 原6px，缩小为4px */
}

.footer-menu-list li:last-child {
    margin-bottom: 0;
}

.footer-menu-list a {
    text-decoration: none;
    font-size: 14px;
    color: #bdc3c7;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0; /* 移除多余内边距 */
}

.footer-menu-list a:hover {
    color: #27ae60; /* 仅颜色变化 */
}

/* 移除所有伪元素和滑动效果 */
.footer-menu-list li::before {
    display: none;
}

.custom-text-content {
    font-size: 14px;
    line-height: 1.6;
    color: #bdc3c7;
    text-align: left;
}

/* 全局联系信息样式 */
.footer-contact-info {
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.footer-contact-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #bdc3c7;
    text-align: left;
    justify-content: flex-start;
}

.footer-contact-info i {
    font-size: 16px;
    margin-top: 3px;
    color: #27ae60;
    min-width: 20px;
    /* 增强 FontAwesome 兼容性 */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif;
    font-weight: 900;
}

.footer-contact-info a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.footer-contact-info a:hover {
    color: #27ae60;
}

/* 第五列联系信息特殊加强（确保左对齐和颜色一致） */
.footer-menu-column-5 .footer-contact-info p {
    color: #bdc3c7;
    text-align: left;
    justify-content: flex-start;
}

.footer-menu-column-5 .footer-contact-info i {
    color: #27ae60;
}

/* 第五列联系链接特殊样式 */
.footer-menu-column-5 .footer-contact-link a {
    font-weight: 600;
    color: #27ae60;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}
.footer-menu-column-5 .footer-contact-link a:hover {
    text-decoration: underline;
    color: #219653;
}

/* ===== 模块4：版权信息 ===== */
.footer-copyright {
    color: #95a5a6;
    transition: height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    height: var(--copyright-height, 100px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-copyright-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    height: 100%;
    width: 100%;
}

.footer-copyright-left {
    flex: 1;
    min-width: 300px;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.footer-copyright-right {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.footer-copyright-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.footer-copyright-menu li {
    margin: 0;
    position: relative;
    line-height: 1.6;
    display: flex;
    align-items: center;
}

.footer-copyright-menu li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -9px;
    color: #5d6d7e;
    top: 50%;
    transform: translateY(-50%);
}

.footer-copyright-menu a {
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
    display: inline-block;
    line-height: 1.6;
}

.footer-copyright-menu a:hover {
    color: #27ae60;
}

/* ===== 动画关键帧 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 加载动画 ===== */
.footer-banner.loaded .footer-banner-overlay {
    animation: fadeIn 0.5s ease;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .footer-banner-title {
        font-size: 40px;
    }
    
    .footer-menus-inner {
        gap: 30px;
    }
}

/* ===== 移动端强制覆盖（使用 !important 确保生效） ===== */
@media (max-width: 1024px) {
    /* 取消所有模块的高度限制 */
    .footer-newsletter,
    .footer-menus,
    .footer-copyright {
        height: auto !important;
    }

    /* 模块3菜单区域：自适应列宽，强制覆盖电脑端5列布局 */
    body .footer-menus-inner {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 30px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px !important;
    }
}

@media (max-width: 768px) {
    .footer-banner-title {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .footer-banner-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .footer-banner-button {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    /* 订阅区域内部改为列布局，确保订阅和关注上下排列 */
    .footer-newsletter-inner {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 15px;
    }
    
    /* 订阅区域底部增加间距，与关注区域明显区分 */
    .footer-newsletter-left {
        margin-bottom: 30px;
        width: 100%;
    }
    
    .footer-newsletter-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .footer-newsletter-form input,
    .footer-newsletter-form button {
        width: 100%;
    }
    
    .footer-newsletter-right h3 {
        margin-top: 10px;
    }
    
    /* 继续覆盖高度自适应 */
    .footer-newsletter,
    .footer-menus,
    .footer-copyright {
        height: auto !important;
    }
    
    /* 菜单网格调整为更小的最小列宽，适应手机 */
    body .footer-menus-inner {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 30px 20px !important;
        padding: 15px !important;
    }
    
    .footer-menu-column h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-copyright-inner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 0 15px;
    }
    
    .footer-copyright-menu {
        justify-content: center;
        gap: 15px;
    }
    
    .footer-copyright-menu li:not(:last-child)::after {
        position: static;
        transform: none;
        margin-left: 5px;
    }
    
    .footer-copyright-menu li {
        display: flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .footer-banner-title {
        font-size: 24px;
        letter-spacing: 0.5px;
    }
    
    .footer-banner-content {
        padding: 15px;
    }
    
    .footer-newsletter-left h3,
    .footer-newsletter-right h3 {
        font-size: 20px;
    }
    
    /* 继续覆盖高度自适应 */
    .footer-newsletter,
    .footer-menus,
    .footer-copyright {
        height: auto !important;
    }
    
    /* 极窄屏幕下，菜单网格最小列宽进一步缩小，确保至少一列 */
    body .footer-menus-inner {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 25px !important;
        padding: 15px !important;
    }
    
    .footer-menu-column {
        text-align: left;
    }
    
    .footer-contact-info p {
        justify-content: flex-start;
    }
    
    .footer-copyright-inner {
        padding: 0 12px;
    }
    
    .footer-copyright-left,
    .footer-copyright-right {
        min-width: 100%;
        width: 100%;
    }
    
    .footer-copyright-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-copyright-menu li:not(:last-child)::after {
        display: inline-block;
        margin: 0 5px;
    }
}

@media (max-width: 360px) {
    .footer-banner-title {
        font-size: 20px;
    }
    
    .footer-banner-subtitle {
        font-size: 13px;
    }
    
    .footer-social-icons {
        gap: 10px;
    }
    
    .footer-social-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* 极端小屏幕下，菜单列最小宽度再缩小，但保留可读性 */
    body .footer-menus-inner {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        padding: 10px !important;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .footer-module {
        page-break-inside: avoid;
    }
    
    .footer-banner-button,
    .footer-newsletter-form,
    .footer-social-icons {
        display: none !important;
    }
    
    .footer-banner {
        background: none !important;
        color: #000 !important;
    }
    
    .footer-banner-overlay {
        display: none;
    }
    
    .footer-newsletter,
    .footer-menus,
    .footer-copyright {
        border: 1px solid #ddd;
    }
}

/* ===== 高对比度模式支持 ===== */
@media (prefers-contrast: high) {
    .footer-banner-button {
        border: 2px solid currentColor;
    }
    
    .footer-social-icon {
        border: 1px solid currentColor;
    }
}

/* ===== 减少动画模式支持 ===== */
@media (prefers-reduced-motion: reduce) {
    .footer-module,
    .footer-banner-button,
    .footer-social-icon,
    .footer-menu-list a {
        transition: none !important;
        animation: none !important;
    }
    
    .footer-banner-content,
    .footer-banner-title,
    .footer-banner-subtitle,
    .footer-banner-button {
        animation: none !important;
    }
    
    .footer-social-icon {
        opacity: 1 !important;
        transform: none !important;
    }
}