/* ============== 重置與全域樣式 ============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f0f0f;
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Noto Serif TC', serif;
    letter-spacing: 2px;
}

/* ============== 新導覽列 - 支援漢堡選單 ============== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
}

.nav-logo {
    width: 120px;
    height: auto;
}

/* 電腦版選單 */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 40px;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    transition: color 0.4s;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: #8b5cf6;
    transition: width 0.4s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 漢堡按鈕（手機版） */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 手機側邊選單 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;                  /* 預設隱藏在左側 */
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(10px);
    transition: left 0.4s ease;
    z-index: 999;
    padding-top: 100px;
    box-shadow: 5px 0 20px rgba(0,0,0,0.6);
}

.mobile-menu.active {
    left: 0;                      /* 點擊後滑出 */
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 30px 0;
}

.mobile-nav-links a {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    display: block;
    padding: 15px;
    transition: all 0.3s;
}

.mobile-nav-links a:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
}

/* ============== 首頁英雄區 ============== */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
    pointer-events: none;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 0 20px;
    z-index: 1;
}

.hero-logo {
    width: 350px;
    height: auto;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 24px;
    max-width: 800px;
    color: #ddd;
}

/* ============== 通用區塊 ============== */
.section {
    padding: 100px 50px 100px;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 10px;
    text-align: center;
}

.section h2 {
    font-size: 50px;
    margin-bottom: 50px;
    color: #8b5cf6;
}

.alternate {
    background: #1a1a1a;
}

/* 讓 alternate 背景區塊全寬 */
.section.alternate {
    background: #1a1a1a;
    padding: 100px 50px 80px;   /* 保持原本上下內距 */
    margin: 0;                  /* 取消 auto 置中 */
    max-width: none;            /* 取消寬度限制，讓它全寬 */
}

/* 裡面的內容還是置中、限制寬度 */
.section.alternate .content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* 關於我們卡片（目標卡片） */
.about-card {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 0 auto 40px;
    backdrop-filter: blur(10px);
}

.goal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.goal-text {
    font-size: 1.2rem;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* 作品集按鈕 */
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    text-decoration: none;
    background: transparent;
    color: white;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: #1a1a1a;
}

/* ============== 自我介紹白色格子（最新公告用） ============== */
.intro-card {
    background: #ffffff;
    color: #333333;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.intro-card:hover {
    transform: translateY(-5px);
}

.intro-card h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 28px;
    color: #8b5cf6;
    margin-bottom: 25px;
    letter-spacing: 3px;
}

/* ============== 團隊成員並排卡片 ============== */
.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 60px auto;
}

.member-card {
    background: #ffffff;
    color: #333333;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.member-card:hover {
    transform: translateY(-8px);
}

.member-card h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 28px;
    color: #8b5cf6;
    margin-bottom: 25px;
    letter-spacing: 3px;
}

.member-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 4px solid #8b5cf6;
}

.member-name {
    font-size: 22px;
    font-weight: 700;
    margin: 15px 0 20px;
    color: #000000;
}

.member-card a img {
    width: 50px;
    height: 50px;
    margin: 0 10px;
    transition: transform 0.3s;
}

.member-card a img:hover {
    transform: scale(1.2);
}

/* ============== 響應式調整 ============== */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        padding: 20px;
    }

    .nav-logo {
        width: 100px;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .hero-logo {
        width: 250px;
    }

    .hero-content p {
        font-size: 20px;
    }

    .section {
        padding: 90px 20px 60px;
    }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 40px auto;
    }

    .member-card {
        padding: 35px 25px;
    }

    .member-card h3 {
        font-size: 24px;
    }

    .member-name {
        font-size: 20px;
    }

    .intro-card {
        padding: 30px 20px;
        margin: 30px 15px;
    }

    .intro-card h3 {
        font-size: 24px;
    }
}

/* 漢堡按鈕點擊後變成 X */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 作品集頁面專用容器 */
.portfolio-container {
    padding: 120px 50px 100px;  /* 跟 .section 一致，避免被導覽列蓋住 */
    max-width: 1400px;
    margin: 0 auto;
}

.Instagram, .YouTube {
    margin-bottom: 100px;
}

/* 手機版調整 */
@media (max-width: 768px) {
    .portfolio-container {
        padding: 100px 20px 80px;
    }
}

/* ============== 作品集頁面專用 ============== */
.portfolio-section {
    padding: 120px 50px 100px;  /* 上方留空間，避免被導覽列蓋住 */
    background-color: #0f0f0f; /* 深色背景統一 */
    text-align: center;
}

.portfolio-section h2 {
    font-size: 50px;
    color: #8b5cf6;
    margin-bottom: 60px;
}

.social-embed {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

/* 讓 Elfsight 嵌入更適配深色主題（可選） */
.instagram-embed,
.youtube-embed {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 手機版調整 */
@media (max-width: 768px) {
    .portfolio-section {
        padding: 100px 20px 80px;
    }
    
    .portfolio-section h2 {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .social-embed {
        margin: 60px auto;
    }
}

/* ============== 聯絡我們按鈕 ============== */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap; /* 手機版自動換行 */
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    min-width: 220px;
}

.contact-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.btn-icon {
    width: 40px !important;   /* 強制固定寬度 */
    height: 40px !important;  /* 強制固定高度 */
    margin-right: 15px;
    object-fit: contain;      /* 保持比例不變形 */
    flex-shrink: 0;           /* 防止被壓縮 */
}

/* Email 按鈕 - 紫色主題 */
.email-btn {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    border: 2px solid #8b5cf6;
}

.email-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
}

/* LINE 按鈕 - 綠色主題（LINE 官方色） */
.line-btn {
    background: #00b900;
    border: 2px solid #00b900;
}

.line-btn:hover {
    background: #00a000;
}

/* Instagram 按鈕 - 官方粉紫漸層 */
.ig-btn {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    border: 2px solid #833ab4;
}

.ig-btn:hover {
    background: linear-gradient(135deg, #762fa0, #e91e63, #f56040);
    transform: translateY(-5px);
}

/* YouTube 按鈕 - 官方紅色 */
.yt-btn {
    background: #ff0000;
    border: 2px solid #ff0000;
}

.yt-btn:hover {
    background: #cc0000;
    transform: translateY(-5px);
}

/* TikTok 按鈕 - 官方黑白漸層（深色主題適合） */
.tiktok-btn {
    background: linear-gradient(135deg, #000000, #fe2c55, #25f4ee);
    border: 2px solid #fe2c55;
}

.tiktok-btn:hover {
    background: linear-gradient(135deg, #000000, #e91e63, #00f2ea);
    transform: translateY(-5px);
}

/* Facebook 按鈕 - 官方藍色 */
.fb-btn {
    background: #1877f2;
    border: 2px solid #1877f2;
}

.fb-btn:hover {
    background: #166fe5;
    transform: translateY(-5px);
}

/* 手機版調整 */
@media (max-width: 768px) {
    .contact-buttons {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .contact-btn {
        width: 80%;
        max-width: 300px;
        font-size: 18px;
        padding: 14px 30px;
    }
}

/* 手機版：四個按鈕自動換行，變成兩列或直排 */
@media (max-width: 992px) {
    .contact-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact-btn {
        flex: 1 1 45%;   /* 兩兩一排 */
        margin: 10px;
    }
}

@media (max-width: 768px) {
    .contact-buttons {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 80%;
        max-width: 320px;
    }
}

/* 手機版調整：六個按鈕自動換行（兩列或直排） */
@media (max-width: 1200px) {
    .contact-buttons {
        flex-wrap: wrap;
    }
    
    .contact-btn {
        flex: 1 1 45%;
        margin: 15px;
    }
}

@media (max-width: 768px) {
    .contact-buttons {
        flex-direction: column;
    }
    
    .contact-btn {
        width: 80%;
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .contact-buttons {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        padding: 0 20px;
    }
    
    .contact-btn {
        width: 90%;
        max-width: 350px;
        padding: 18px 20px;
        font-size: 18px;
        justify-content: center;  /* 圖示+文字置中 */
    }
    
    .btn-icon {
        width: 36px !important;
        height: 36px !important;
        margin-right: 12px;
    }
}

/* 自訂精選作品區 */
.custom-works {
    padding: 120px 50px 100px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    background-color: #0f0f0f;
}

.custom-works h2 {
    font-size: 50px;
    color: #8b5cf6;
    margin-bottom: 60px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 40px;
}

.work-item {
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.work-item:hover {
    transform: translateY(-10px);
}

.work-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.work-item h3 {
    font-size: 24px;
    padding: 20px 20px 10px;
    color: #8b5cf6;
    margin: 0;
}

.work-item p {
    padding: 0 20px 30px;
    color: #ccc;
    font-size: 16px;
    margin: 0;
}

/* 手機版調整 */
@media (max-width: 768px) {
    .custom-works {
        padding: 100px 20px 80px;
    }
    .custom-works h2 {
        font-size: 32px;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
    .work-item img {
        height: 280px;
    }
}

#最新公告 {
    padding: 120px 50px 100px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #0f0f0f;
}

#最新公告 h2 {
    font-size: 50px;
    color: #8b5cf6;
    text-align: center;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    #最新公告 {
        padding: 100px 20px 80px;
    }
    #最新公告 h2 {
        font-size: 32px;
    }
}