/**
 * Professional Footer Design
 * Inspired by Apple, Nike, and other major companies
 * Fully responsive with clean visual hierarchy
 */

.footer {
    background: #2d2d2d;
    color: #ffffff;
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Main Footer Content */
.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: start; /* 確保所有欄位頂部對齊 */
}

/* Brand Section (First Column) */
.footer-section:first-child {
    grid-column: span 1;
}

.footer-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.footer-text {
    font-size: 14px;
    line-height: 1.8;
    color: #b0b0b0;
    margin: 0 0 24px 0;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    width: 40px;
    height: 40px;
}

.social-link:hover {
    background: #e63946;
    border-color: #e63946;
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Other Sections */
.footer-subtitle {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #ffffff;
    line-height: 1.2; /* 統一行高 */
}

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

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

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.2s ease;
    display: block;
    word-break: break-word;
}

.footer-links a:hover {
    color: #e63946;
}

/* Language Switcher */
.footer-lang-switcher,
.language-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.current-lang {
    color: #ffffff;
    font-weight: 500;
}

.lang-switch-link {
    color: #b0b0b0;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-switch-link:hover {
    color: #ffffff;
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.1);
}

/* Language Buttons */
.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: #b0b0b0;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: #ffffff;
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.1);
}

.lang-btn.active {
    color: #ffffff;
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.2);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

/* Footer Bottom */
.footer-bottom {
    padding: 16px 0 24px; /* 縮小上邊距，與政策頁面保持一致 */
    text-align: left; /* 改為靠左對齊 */
    border-top: none; /* 移除多餘的上邊框線 */
}

.footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: #808080;
    line-height: 1.6;
}

.footer-bottom a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #e63946;
}

/* Tablet Layout (768px - 1024px) */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
        padding: 50px 0 35px;
    }

    .footer-section:first-child {
        grid-column: span 3;
    }

    .footer-title {
        font-size: 22px;
    }

    .footer-subtitle {
        font-size: 15px;
    }
}

/* Mobile Layout (<768px) */
@media (max-width: 767px) {
    .footer {
        padding: 0;
    }

    .footer .container {
        padding: 0 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0 30px;
    }

    .footer-section:first-child {
        grid-column: span 1;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .footer-text {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .footer-social {
        gap: 10px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .footer-subtitle {
        font-size: 15px;
        margin-bottom: 16px;
    }

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

    .footer-links a {
        font-size: 13px;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .footer-bottom p {
        font-size: 12px;
        line-height: 1.8;
    }

    /* Stack language switcher vertically on very small screens */
    .language-switcher {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Extra Small Mobile (<480px) */
@media (max-width: 480px) {
    .footer .container {
        padding: 0 12px;
    }

    .footer-content {
        gap: 28px;
        padding: 32px 0 24px;
    }

    .footer-title {
        font-size: 18px;
    }

    .footer-social {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }
}

/* Accessibility Improvements */
.footer a:focus {
    outline: 2px solid #e63946;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .footer {
        background: #ffffff;
        color: #000000;
        border-top: 2px solid #000000;
    }

    .footer-social,
    .language-switcher {
        display: none;
    }

    .footer-text,
    .footer-links a,
    .footer-bottom p,
    .footer-bottom a {
        color: #000000;
    }
}

