/* =================================================== */
/* Contact 頁面專屬版面佈局 */
/* =================================================== */

.contact-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 0 100px;
    display: flex;
    align-items: center; /* 讓左側文字垂直置中 */
    box-sizing: border-box;
    background-color: #050505; /* 極致黑背景 */
}

/* =================================================== */
/* 左側：大標題與 Email 區域 */
/* =================================================== */
.contact-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: -10vh; /* 微微往上提一點，視覺更平衡 */
}

.huge-title {
  font: 100px "NEW", sans-serif; 
  font-weight: 500;
    color: #ffffff;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.02em;
}

.email-row {
    display: flex;
    align-items: center;
    gap: 20px; /* 箭頭與文字的距離 */
}

.arrow-icon {
    width: 50px;
    height: 50px;
}

.email-text {
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 400;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.email-text:hover {
    color: #cccccc;
    transform: translateX(10px); /* 滑鼠碰到時微微往右滑 */
}

/* =================================================== */
/* 右下角：正方形圖片區塊 */
/* =================================================== */
.contact-right-images {
    position: absolute;
    bottom: 80px;
    right: 100px;
    display: flex;
    gap: 60px; /* 兩個正方形之間的距離 */
}

.image-box {
    width: 120px;
    height: 120px;
    background-color: #5bbf6c; /* 截圖中的綠色，作為預設底色 */
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0; /* 預設隱藏，直到有 src 才會顯示 */
    transition: opacity 0.3s ease, transform 0.8s ease;
}

/* 當圖片有內容時顯示出來 */
.image-box img[src]:not([src=""]) {
    opacity: 1;
}

/* 滑鼠碰到圖片時的互動特效 */
.image-box:hover {
    transform: translateY(-10px);
}
.image-box:hover img {
    transform: scale(1.1);
}

/* =================================================== */
/* 手機版適配 (RWD) */
/* =================================================== */
@media (max-width: 900px) {
    .contact-section {
        padding: 150px 30px 50px 30px;
        align-items: flex-start;
    }
    
    .contact-left {
        margin-top: 0;
    }

    .huge-title { font-size: 4rem; }
    
    .arrow-icon { width: 30px; height: 30px; }
    
    .email-text { font-size: 1.5rem; }

    /* 手機版時將圖片移到文字下方 */
    .contact-right-images {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 80px;
        gap: 20px;
    }

    .image-box {
        width: 100px;
        height: 100px;
    }
}

/* =================================================== */
/* 底部社群連結 (Social Links Bottom) 基礎排版 */
/* =================================================== */
.social-links-bottom {
    position: absolute;
    bottom: 60px; 
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center; 
    gap: 25vw; 
    z-index: 10;
}

/* =================================================== */
/* 底部社群連結 (基礎設定與微互動特效) */
/* =================================================== */

.social-links-bottom a {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    
    /* ⚠️ 魔法 1：必須設定為 inline-block 才能完美支援放大變形 */
    display: inline-block; 
    position: relative; /* 為了定位底線而設 */
    padding-bottom: 5px; /* 留一點空間給底線，避免太擠 */
    
    /* 文字本身的漸變與放大過渡效果 */
    transition: color 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ⚠️ 魔法 2：用虛擬元素畫出一條隱形的底線 */
.social-links-bottom a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* 底線的粗細 */
    background-color: #ffffff; /* 底線的顏色 */
    
    /* 預設寬度為 0 (隱形)，並且設定變形起點在「最左邊」 */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- 滑鼠移上去時的觸發狀態 --- */

.social-links-bottom a:hover {
    color: #ffffff; /* 保持白色，讓視覺焦點集中在動畫上 */
    /* ⚠️ 文字整體放大 1.1 倍 */
    transform: scale(1.1); 
}

.social-links-bottom a:hover::after {
    /* ⚠️ 底線從左邊展開到 100% 寬度 */
    transform: scaleX(1); 
}

/* =================================================== */
/* 🌟 終極魔法：頁面載入階梯式進場動畫 */
/* =================================================== */

/* 1. 預設狀態與鋼琴般絲滑的動畫曲線 */
.contact-left,
.contact-right-images,
.social-links-bottom {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 2. 初始隱藏狀態：當網頁剛載入 (body.loading) 時，全部沉在下方並保持透明 */
body.loading .contact-left,
body.loading .contact-right-images,
body.loading .social-links-bottom {
    opacity: 0 !important;
    transform: translateY(40px) !important;
}

/* 3. 分配每個區塊的出場時間 (Delay)，配合黑幕拉開的節奏！ */
.contact-left {
    transition-delay: 0.5s; /* 黑幕拉開到一半時，主標題先出 */
}

.contact-right-images {
    transition-delay: 0.7s; /* 右邊的圖片緊跟著出 */
}

.social-links-bottom {
    transition-delay: 1.0s; /* ⚠️ 底部的文字等大家都定位了，最後壓軸浮現！ */
}