/* Footer Styles */

.footer {
    background: #ffffff; /* Changed to white background */
    color: #333; /* Changed to black text */
    padding: 20px 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05); /* Add top shadow to enhance separation effect */
}

/* Footer Menu */
.footer-menu {
    text-align: center;
    margin-bottom: 20px;
}

.footer-menu-list {
    list-style: none; /* Ensure no numbering */
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-menu-list li {
    position: relative;
    margin: 0 15px;
    list-style: none; /* Ensure no numbering */
}

/* Primary category container - desktop only styles */
@media (min-width: 769px) {
    .footer-menu-list {
        align-items: flex-start; /* Top alignment */
    }
    
    .footer-menu-list > li {
        display: flex;
        flex-direction: column;
        min-height: 60px; /* Fixed minimum height to ensure consistency */
        align-items: center; /* Horizontal centering */
        list-style: none; /* Ensure no numbering */
    }
    
    /* Primary category link styles */
    .footer-menu-list > li > a {
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 15px;
        box-sizing: border-box;
        flex: 1; /* Occupy available space */
        min-height: 60px; /* Ensure minimum height */
        width: 100%; /* Ensure consistent width */
    }
    
    /* Secondary menu styles */
    .footer-menu-list ul {
        list-style: none; /* Ensure no numbering */
        width: 100%;
        text-align: center;
        margin-top: 5px;
        padding: 0; /* Remove default padding */
    }
    
    .footer-menu-list ul li {
        margin: 2px 0;
        list-style: none; /* Ensure no numbering */
    }
    
    .footer-menu-list ul a {
        font-weight: normal;
        padding: 3px 0;
        display: block;
    }
}

/* General styles */
.footer-menu-list a {
    text-decoration: none;
    color: #333;
    font-weight: normal;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 0;
    text-align: center;
    box-sizing: border-box;
}

.footer-menu-list a:hover {
    color: #007bff;
}

/* Footer Content */
.footer-content {
    text-align: center;
    width: 100%;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Footer Links and Icons */
.footer-link {
    color: #007bff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.footer-icon {
    margin-right: 0.3rem;
    font-size: 1rem;
}

.footer-separator {
    margin: 0 0.5rem;
    color: #666;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    max-width: calc(100% - 30px); /* Ensure button does not exceed viewport width */
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}

.back-to-top:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-menu-list {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-menu-list li {
        margin: 5px 0;
        list-style: none; /* Ensure no numbering */
    }
    
    /* Mobile primary category bold */
    .footer-menu-list > li > a {
        font-weight: bold;
    }
    
    .back-to-top {
        bottom: calc(50px + env(safe-area-inset-bottom, 0px)); /* 调整回到顶部按钮位置以适配Microsoft Edge */
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    .footer {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); /* 为页脚添加更多安全区域支持以适配Microsoft Edge */
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: calc(40px + env(safe-area-inset-bottom, 0px)); /* 调整回到顶部按钮位置以适配Microsoft Edge */
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    .footer {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); /* 为页脚添加更多安全区域支持以适配Microsoft Edge */
    }
}