/* ==========================================
   🏔️ 頁尾樣式 - 地底 / 土壤層主題
   ========================================== */

.footer {
    background: linear-gradient(to bottom, #3E2723 0%, #2C1810 100%);
    color: #F5E6D3;
    position: relative;
    overflow: hidden;
}

/* 頂部裝飾 - 草地邊緣 */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--secondary-color) 0px,
        var(--secondary-color) 20px,
        #7FA82E 20px,
        #7FA82E 40px
    );
    box-shadow: 0 2px 0 var(--border-color);
}

/* 土壤紋理 */
.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 10px,
            rgba(0, 0, 0, 0.1) 10px,
            rgba(0, 0, 0, 0.1) 11px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0px,
            transparent 10px,
            rgba(0, 0, 0, 0.05) 10px,
            rgba(0, 0, 0, 0.05) 11px
        );
    pointer-events: none;
    opacity: 0.3;
}

/* ==========================================
   頁尾頂部區域
   ========================================== */

.footer-top {
    background-color: rgba(26, 37, 47, 0.5);
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    border-bottom: 3px solid rgba(93, 64, 55, 0.5);
}

/* Widget 標題樣式 */
.widget-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}



@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(10deg);
    }
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    border-radius: 2px;
}

/* ==========================================
   頁尾文字與連結
   ========================================== */

.footer-brand-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5));
}

.footer-text {
    color: rgba(245, 230, 211, 0.85);
    font-size: 0.95rem;
    line-height: 1.8;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* 社交連結 */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 158, 44, 0.3) 0%, rgba(255, 158, 44, 0.1) 100%);
    border: 3px solid var(--border-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(93, 64, 55, 0.3);
    position: relative;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px) rotate(10deg) scale(1.1);
    box-shadow: 
        0 6px 0 rgba(93, 64, 55, 0.3),
        0 0 20px rgba(255, 158, 44, 0.5);
}

.social-link:active {
    transform: translateY(-2px) rotate(5deg) scale(1.05);
    box-shadow: 0 3px 0 rgba(93, 64, 55, 0.3);
}

/* ==========================================
   頁尾導航連結
   ========================================== */

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.9rem;
}

.footer-links a {
    color: rgba(245, 230, 211, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.footer-links a i {
    color: var(--secondary-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 8px;
    text-shadow: 0 0 10px rgba(255, 158, 44, 0.5);
}

.footer-links a:hover i {
    color: var(--primary-color);
    transform: translateX(5px) scale(1.2);
}

/* ==========================================
   聯絡資訊
   ========================================== */

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    color: rgba(245, 230, 211, 0.85);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.footer-contact li:hover {
    background: rgba(255, 158, 44, 0.1);
    padding-left: 1rem;
}

.footer-contact li a {
    color: rgba(245, 230, 211, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    transition: color 0.3s ease;
}

.footer-contact li a:hover {
    color: var(--primary-color);
}

.footer-contact li img {
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.footer-contact li:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* ==========================================
   訂閱表單 (如果有)
   ========================================== */

.footer-subscribe .form-control {
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid var(--border-color);
    color: white;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.footer-subscribe .form-control:focus {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 158, 44, 0.3);
}

.footer-subscribe .form-control::placeholder {
    color: rgba(245, 230, 211, 0.6);
}

.footer-subscribe .btn {
    padding: 0.9rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF8A00 100%);
    border: 3px solid var(--border-color);
    color: white;
    font-weight: 700;
    border-radius: 25px;
    box-shadow: 0 4px 0 rgba(93, 64, 55, 0.3);
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-subscribe .btn:hover {
    background: linear-gradient(135deg, #FFB555 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 6px 0 rgba(93, 64, 55, 0.3),
        0 0 20px rgba(255, 158, 44, 0.5);
}

.footer-subscribe .btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(93, 64, 55, 0.3);
}

/* ==========================================
   頁尾底部 (版權區)
   ========================================== */

.footer-bottom {
    background-color: rgba(19, 30, 39, 0.8);
    position: relative;
    z-index: 1;
    padding: 1.5rem 0;
    border-top: 2px solid rgba(93, 64, 55, 0.5);
}

/* 底部裝飾條 */
.footer-bottom::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--danger-color) 0px,
        var(--danger-color) 15px,
        transparent 15px,
        transparent 30px
    );
}

.copyright-text {
    color: rgba(245, 230, 211, 0.7);
    font-size: 0.9rem;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    margin: 0;
    font-weight: 500;
    text-align: center;
}

/* 底部連結 */
.footer-bottom-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: rgba(245, 230, 211, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.footer-bottom-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 158, 44, 0.5);
}

.footer-bottom-links a:hover::after {
    width: 100%;
}

/* ==========================================
   SEO 內容隱藏區
   ========================================== */

.seo-content {
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
    clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================
   響應式調整
   ========================================== */

@media (max-width: 768px) {
    .footer-top {
        padding: 2rem 0;
    }

    .widget-title {
        font-size: 1.2rem;
        padding-left: 2.5rem;
    }

    .widget-title::before {
        left: 0;
        font-size: 1.1rem;
    }

    .footer-brand-logo {
        height: 40px;
    }

    .footer-text {
        font-size: 0.88rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-contact li {
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding: 1.2rem 0;
    }

    .footer-bottom-links {
        justify-content: flex-start;
        margin-top: 1rem;
        gap: 1rem;
    }

    .copyright-text {
        text-align: center;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .footer-bottom-links a {
        font-size: 0.85rem;
    }
}

/* ==========================================
   額外裝飾元素 (可選)
   ========================================== */

/* 隨機小石頭裝飾 */
.footer-top::before {
    content: '🪨 🪨 🪨';
    position: absolute;
    top: 1rem;
    right: 2rem;
    opacity: 0.2;
    font-size: 1.5rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    .footer-top::before {
        display: none;
    }
}

/* Widget 容器額外美化 */
.footer-widget {
    position: relative;
    padding: 1rem;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.footer-widget:hover {
    background: rgba(255, 158, 44, 0.05);
}