/**
 * Footer Simple Styles
 * 简洁页脚样式
 * 
 * Features:
 * - Clean and minimal design
 * - Better widget compatibility
 * - Gutenberg block support
 * - Responsive layout
 * 
 * @package DUX
 * @since 9.6
 */

/* ========================================
   Footer Base
   ======================================== */

.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 60px;
}

.site-footer a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #3498db;
}

/* ========================================
   Footer Widgets Area
   ======================================== */

.footer-widgets-area {
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget-column {
    min-width: 0; /* Prevent grid blowout */
}

/* Widget Styles */
.footer-widget-column .widget {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
}

.footer-widget-column .widget:last-child {
    margin-bottom: 0;
}

.footer-widget-column .widget-title,
.footer-widget-column .widgettitle,
.footer-widget-column h3,
.footer-widget-column h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.footer-widget-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-widget-column ul li {
    margin-bottom: 10px;
    padding-left: 0;
    line-height: 1.6;
}

.footer-widget-column ul li a {
    display: inline-block;
    padding: 5px 0;
    color: #ecf0f1;
    transition: all 0.3s ease;
}

.footer-widget-column ul li a:hover {
    padding-left: 5px;
    color: #3498db;
}

.footer-widget-column p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #ecf0f1;
}

/* Fix for theme widgets */
.footer-widget-column .widget img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.footer-widget-column .widget .focus {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
}

.footer-widget-column .widget .focus img {
    width: 100%;
    transition: transform 0.3s ease;
}

.footer-widget-column .widget .focus:hover img {
    transform: scale(1.05);
}

.footer-widget-column .widget .item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget-column .widget .item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.footer-widget-column .widget .title {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 5px;
}

.footer-widget-column .widget .title a {
    color: #ecf0f1;
    text-decoration: none;
}

.footer-widget-column .widget .title a:hover {
    color: #3498db;
}

.footer-widget-column .widget .meta {
    font-size: 12px;
    color: #95a5a6;
}

.footer-widget-column .widget .excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: #bdc3c7;
    margin-top: 8px;
}

/* Gutenberg Block Support */
.footer-widget-column .wp-block-group,
.footer-widget-column .wp-block-column {
    margin-bottom: 0;
}

.footer-widget-column .wp-block-heading {
    color: #fff;
    margin-bottom: 20px;
}

.footer-widget-column .wp-block-list {
    padding-left: 0;
}

.footer-widget-column .wp-block-list li {
    list-style: none;
}

.footer-widget-column .wp-block-button__link {
    background: #3498db;
    border-radius: 4px;
}

.footer-widget-column .wp-block-button__link:hover {
    background: #2980b9;
}

.footer-widget-column .wp-block-image img {
    max-width: 100%;
    height: auto;
}

.footer-widget-column .wp-block-social-links {
    padding-left: 0;
}

/* ========================================
   Footer Info
   ======================================== */

.footer-info {
    padding: 30px 0;
    background: #1a252f;
}

.footer-info-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Footer Links */
.footer-links {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links li {
    margin: 0;
}

.footer-links strong {
    color: #3498db;
    margin-right: 10px;
}

/* Copyright */
.footer-copyright {
    flex: 1;
}

.footer-copyright p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #3498db;
    transform: translateY(-3px);
}

/* Custom Code */
.footer-custom-code {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* ========================================
   Back to Top Button
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   WeChat QR Modal
   ======================================== */

.wechat-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.wechat-qr-content {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    z-index: 1;
}

.wechat-qr-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.wechat-qr-close:hover {
    color: #000;
}

.wechat-qr-image {
    display: block;
    max-width: 300px;
    height: auto;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .site-footer {
        margin-top: 40px;
    }
    
    .footer-widgets-area {
        padding: 40px 0 20px;
    }
    
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-info {
        padding: 20px 0;
    }
    
    .footer-info-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright {
        order: 2;
    }
    
    .footer-social {
        order: 1;
        margin-bottom: 15px;
    }
    
    .footer-links ul {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer-widgets-area {
        padding: 30px 0 15px;
    }
    
    .footer-widget-column .widget-title,
    .footer-widget-column .widgettitle,
    .footer-widget-column h3,
    .footer-widget-column h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-copyright p {
        font-size: 13px;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ========================================
   Dark Mode Support
   ======================================== */

.darking .site-footer {
    background: #1a1a1a;
}

.darking .footer-info {
    background: #0d0d0d;
}

.darking .wechat-qr-content {
    background: #2a2a2a;
}

.darking .wechat-qr-close {
    color: #ccc;
}

.darking .wechat-qr-close:hover {
    color: #fff;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .site-footer,
    .back-to-top,
    .wechat-qr-modal {
        display: none;
    }
}
