/* ============================================
   desktop.css - 網頁版樣式
   ============================================ */

/* === 全局設定 === */
.mobile-break {
    display: none;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #3b82f6;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* === 導航欄 === */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* 1. 固定定位 */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    
    /* 2. 外觀設定 (實色背景) */
    background-color: #121212; /* 使用與網頁背景一致的深色，或 #000 */
    padding: 20px 5%;          /* 固定內距，不會因為滾動而縮小 */
    box-sizing: border-box;    /* 確保寬度不爆版 */
    
    /* 3. 陰影與層級 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5); /* 加上陰影讓它與內容區分開 */
    z-index: 1000;             /* 最上層 */
    
    /* 4. 取消過渡動畫 (因為高度不再變化) */
    transition: none; 
}

nav a.active {
    color: #3b82f6;
    font-weight: bold;
}

nav.scrolled {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-fullbleed {
    margin-top: 90px; /* 根據導航欄的高度調整 (約 80px) */
    height: calc(100vh - 90px); /* 扣除導航欄高度，避免 Hero 太長 */
}

.gallery-section, 
.youtube-section,
.photo-category-section {
    padding-top: 140px !important; 
    margin-top: 0 !important; /* 清除可能干擾的 margin */
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    position: relative;
    z-index: 1002;
    white-space: nowrap;
}

.logo a {
    position: relative;
    z-index: 1003;
    display: inline-block;
    color: white;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    opacity: 0.7;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* === HERO 全幅背景輪播 === */
.hero-fullbleed {
    position: relative;
    width: 100%;
    height: 93vh;
    overflow: hidden;
    display: flex;
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 (新增) */
}

/* --- 背景輪播 (保持不變) --- */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slideshow .slide.active {
    opacity: 1;
}

.hero-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease-out;
}

.hero-slideshow .slide.active img {
    transform: scale(1);
}

/* --- 漸層遮罩 (修改為適合居中文字) --- */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* 改成全黑半透明，或者從下往上的漸層，確保中間文字清晰 */
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* 加強底部的漸層，讓白色文字更明顯 */
.hero-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 整體壓暗一點 */
}

/* --- 文字內容 (修改為居中) --- */
.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 0;      /* 移除左邊距 */
    max-width: 800px;     /*稍微加寬 */
    text-align: center;   /* 文字居中 */
    display: flex;
    flex-direction: column;
    align-items: center;  /* 讓子元素(如按鈕)水平居中 */
    margin-top: -90px
}

.hero-subtitle {
    display: flex;
    align-items: center;
    justify-content: center; /* 子標題居中 */
    gap: 15px;
    font-size: 0.9rem;       /* 稍微加大 */
    letter-spacing: 6px;     /* 字距拉寬更有氣勢 */
    color: #3b82f6;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* 如果你想保留短線，可以改成這樣（或是直接在HTML移除 span.subtitle-line） */
.subtitle-line {
    display: block;
    width: 40px;
    height: 2px;
    background-color: #3b82f6;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.05;
    color: white;
    margin: 0 0 25px 0;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 40px;
    margin-top: -0.5px;
    max-width: 480px;
}

/* --- CTA 按鈕 --- */
.hero-cta {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-primary {
    padding: 14px 36px;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: black;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-play {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-play i {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-play:hover {
    color: white;
}

.btn-play:hover i {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* --- 輪播指示器 --- */
.slide-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    border-color: white;
}

.indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* --- 滾動提示 --- */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    right: 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.scroll-hint span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    letter-spacing: 3px;
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.3;
        transform: scaleY(0.6);
    }
}

/* === 作品集 Gallery === */
.gallery-section {
    padding: 60px 10%;
    scroll-margin-top: 12vh;
    padding-bottom: 160px;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-section h2 {
    font-size: 2rem;
    margin-top: -10px;
    padding-left: 20px;
    margin-left: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

.project-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.media-wrapper {
    position: relative;
    padding-bottom: 110%;
    height: 0;
    overflow: hidden;
    background-color: #1e1e1e;
}

.media-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.info {
    padding: 20px;
}

.info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.info p {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

/* === Lightbox (Viewer) === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    scroll-margin-top: 20vh;
    height: 100vh;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 2px;
}

.lightbox.single-view .prev-btn,
.lightbox.single-view .next-btn,
.lightbox.single-view .image-counter {
    display: none !important;
}

.lightbox.single-view img {
    cursor: default;
}

.close-btn, .prev-btn, .next-btn {
    position: absolute;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    padding: 10px;
}

.close-btn:hover, .prev-btn:hover, .next-btn:hover {
    color: #3b82f6;
}

.close-btn { top: 20px; right: 30px; }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.image-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1001;
}

.prev-btn.disabled, .next-btn.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* === YouTube 專區 === */
.youtube-section {
    padding: 80px 10%;
    background-color: #0f0f0f;
    border-bottom: 1px solid #333;
}

.yt-section-title {
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    margin-top: 10px;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    padding-left: 20px;
    margin-left: 0;
    max-width: 1600px;
    margin-right: auto;
}

.channel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 50px;
    flex-wrap: wrap;
}

.channel-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1f1f1f;
}

.channel-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: white;
}

.sub-count {
    color: #aaa;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.channel-desc {
    color: #ccc;
    max-width: 500px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #cc0000;
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

.yt-btn:hover {
    background-color: #ff0000;
    transform: scale(1.05);
}

.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.yt-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.yt-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.4);
    border-color: #555;
    background: #252525;
}

.yt-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.yt-card:hover .yt-thumb img {
    transform: scale(1.05);
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.yt-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-title {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-meta {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.yt-desc {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Photo Category (Gallery) === */
.photo-category-section {
    padding: 50px 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
}

.photo-category-section img {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.photo-category-section .photo-card:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.photo-category-section img:active {
    transform: scale(0.98);
}

.container-80 {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.main-section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: left;
    border-left: 6px solid var(--accent-color);
    padding-left: 20px;
    line-height: 1;
    margin-top: 0px;
}

.photo-group {
    margin-bottom: 100px;
}

.category-title {
    font-size: 1.7rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
}

.photo-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.photo-card {
    display: flex;
    flex-direction: column;
}

.img-wrapper {
    width: 90%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #1e1e1e;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.caption {
    text-align: left;
}

.caption h4 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: white;
    font-weight: 700;
}

.caption p {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.photo-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.photo-card:hover h4 {
    color: var(--accent-color);
}


/* === Footer === */
footer {
    background-color: #000000;
    padding: 60px 5% 40px;
    color: #888;
    font-size: 0.9rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-line {
    width: 50px;
    height: 2px;
    background-color: #333;
    margin: 0 auto 30px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.back-to-top {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid #333;
    padding: 8px 15px;
    border-radius: 20px;
    transition: 0.3s;
}

.back-to-top:hover {
    color: white;
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* === 回到頂部浮動按鈕 === */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- 相簿外框容器 --- */
.gallery-container {
    max-width: 1400px;      /* 限制最大寬度，避免在大螢幕太寬 */
    margin: 0 auto;         /* 居中 */
    display: flex;
    flex-direction: column; /* 垂直排列每一行 */
    gap: 10px;   /* 行與行之間的間距 */
}

/* --- 行 (Row) 的設定 --- */
.gallery-row {
    display: flex;          /* 使用 Flexbox 橫向排列 */
    gap: 10px;   /* 照片左右之間的間距 */
    height: var(--row-height); /* 設定固定高度 */
    width: 100%;
}

/* --- 照片區塊 (Item) 通用設定 --- */
.gallery-item {
    position: relative;
    overflow: hidden;       /* 隱藏超出的圖片部分 */
    border-radius: 2px;     /* 輕微圓角 */
    cursor: pointer;
}

/* --- 佈局比例控制 (關鍵部分) --- */

/* 寬版 (佔 2/3) */
.wide {
    flex: 2; 
}

/* 窄版 (佔 1/3) */
.narrow {
    flex: 1;
}

/* 均分版 (用於三張並排，各佔 1/3) */
.equal {
    flex: 1;
}

/* --- 圖片設定 --- */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* 保持比例填滿容器，裁切多餘部分 */
    transition: transform 0.5s ease, filter 0.5s ease;
    display: block;
    filter: brightness(0.9); /* 預設稍微壓暗一點點，更有質感 */
}

/* --- 滑鼠互動效果 --- */
.gallery-item:hover img {
    transform: scale(1.02);  /* 輕微放大 */
    filter: brightness(1.1); /* 變亮 */
}

/* (選用) 圖片上的文字遮罩效果 */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* --- 基礎導覽列設定 --- */
.navbar {
    display: flex;
    justify-content: space-between; /* LOGO在左，選單在右 */
    align-items: center;
    background-color: #333; /* 導覽列背景色 */
    color: white;
    padding: 1rem;
    position: relative; /* 為了讓手機選單定位 */
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    margin-left: 20px;
}

.nav-list a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

/* === 漢堡按鈕 === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 漢堡 → X 動畫 */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === 手機版 === */
/* === 手機版 (修改後：右上角下拉選單) === */
@media (max-width: 768px) {

    /* 顯示漢堡按鈕 */
    .hamburger {
        display: flex;
        z-index: 1051; /* 確保按鈕層級最高，可以隨時點擊關閉 */
    }

    /* 隱藏原本的導航連結，並改為下拉選單樣式 */
    .nav-links {
        position: absolute; /* 改為絕對定位，跟隨 Nav */
        top: 100%;          /* 位於 Nav 的正下方 */
        right: 5%;          /* 靠右對齊 (與網頁邊距一致) */
        left: auto;         /* 取消靠左 */
        bottom: auto;       /* 取消靠底 */
        
        width: 200px;       /* 設定選單寬度 (不要全寬) */
        height: auto;       /* 高度由內容決定 */
        
        background-color: rgba(30, 30, 30, 0.95); /* 深色背景 */
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px; /* 圓角 */
        box-shadow: 0 10px 25px rgba(0,0,0,0.5); /* 陰影讓它浮起來 */
        
        display: flex;
        flex-direction: column;
        padding: 10px 0;
        margin-top: 10px;   /* 與導航欄保持一點距離 */
        
        /* 隱藏狀態的設定 */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px); /* 稍微往上位移，為了動畫 */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        
        z-index: 1050;
    }

    /* 展開時的狀態 (.open 由 JS 控制) */
    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0); /* 下滑動畫 */
    }

    .nav-links li {
        width: 100%;
        text-align: center; /* 文字居中，也可改 left */
    }

    .nav-links a {
        display: block;
        padding: 12px 20px;     /* 縮小內距 */
        font-size: 1rem;        /* 字體縮小，不用那麼巨大 */
        font-weight: 500;
        letter-spacing: 1px;
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* 淡分隔線 */
        transition: background 0.2s;
    }

    /* 最後一個選項不要底線 */
    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.1); /* 手機版 Hover 效果 */
        color: var(--accent-color);
    }
    
    /* 移除 body.menu-open 的 overflow 限制 */
    /* 因為選單很小，不需要鎖住背後的網頁滾動 */
    body.menu-open {
        overflow: auto; 
    }
}

/* ============================================
   Desktop Dropdown - 調校版（滑鼠移過即出，且不閃爍）
   ============================================ */

/* 1. 父層容器 */
.dropdown-item {
    position: relative;
    display: flex;
    align-items: center;
}

/* 2. 資訊 (讓 Gallery 的文字看起來正常但不可點) */
.gallery-label {
    cursor: default;   /* 不要出現手指 */
    color: white;
    opacity: 0.7;
    transition: 0.3s;
}

/* 3. 滑鼠移過去主文字時的顏色變化 */
.dropdown-item:hover .gallery-label {
    opacity: 1;
    color: #3b82f6;
}

/* 4. 子選單本體 (預設隱藏) */
.sub-menu {
    position: absolute;
    top: 100%;            /* 緊接在 Gallery 文字下方 */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* 初始往下微移，避免突變 */
    
    min-width: 160px;
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    
    /* 隱藏設定 */
    opacity: 0;
    visibility: hidden;
    
    /* 加延遲與平滑過渡，避免快速進出造成閃爍 */
    transition: all 0.2s ease-in-out 0.05s; /* 0.05s 延遲 */
    
    z-index: 1000;
}

/* 5. 滑鼠移過父容器就顯示子選單 (加了延遲後不容易閃掉) */
.dropdown-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 6. 子選單連結樣式 */
.sub-menu li { width: 100%; }

.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #ccc;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    transition: 0.2s;
}

.sub-menu li a:hover {
    color: #3b82f6;
    background-color: rgba(255, 255, 255, 0.05);
}


        .gallery-section h2,
        .yt-section-title,
        .main-section-title, 
        .section-title { 
        
        /* 1. 統一字體大小 */
        font-size: 2.3rem !important;
        font-weight: 700; 
        
        /* 2. 統一文字行高 (避免標題太擠或太鬆) */
        line-height: 1.3 !important;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--text-color);
        border-left: 6px solid var(--accent-color);
        padding-left: 20px;
        
        /* 3. 統一邊距 (標題下方的留白) */
        margin-bottom: 40px !important;
        
        /* 5. 確保沒有奇怪的上邊距 */
        margin-top: 0 !important;
        text-align: left;
        text-shadow: none;
    }



/* 讓縮圖強制填滿 110% 的容器，且不變形 */
.poster-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 關鍵：這會讓它像照片一樣裁切填滿 */
    transition: transform 0.3s ease;
}


/* 預設隱藏兩者 */
.lightbox-image-wrapper,
.lightbox-video-wrapper {
    display: none;
    width: 90%;
    height: 80vh;
    justify-content: center;
    align-items: center;
}

.video-card-link {
    text-decoration: none; /* 移除超連結底線 */
    display: block;        /* 確保像塊級元素一樣排列 */
    color: inherit;        /* 繼承原本的文字顏色 */
}

.video-card-link:hover {
    transform: translateY(-5px); /* 保留原本的懸停動態 */
    transition: transform 0.3s ease;
}

.hero-transition {
    position: relative; /* 成為內部絕對定位元素的參考點 */
    height: 100vh;       /* 您可以按需調整此高度 */
    min-height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* --- 新增：輪播器樣式 --- */
.transition-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* 層級最低，在最底下 */
}

.transition-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.transition-slideshow .slide.active {
    opacity: 1;
}

.transition-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保圖片填滿容器 */
}

/* --- 遮罩層樣式 (保持不變) --- */
.transition-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 12, 0.83);
    z-index: 1;                /* 在圖片之上 */
}

/* --- 標題樣式 (保持不變) --- */
.transition-title {
    position: relative;
    z-index: 2;                /* 在遮罩之上，層級最高 */
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 12px;
    margin: 0;
    text-align: center;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.about-integrated {
    /* 1. SET THE HEIGHT & USE FLEXBOX FOR CENTERING */
    min-height: 90vh; /* Make the section almost a full screen height (90% of viewport) */
    padding: 30px 20px; /* Adjust padding to be smaller since height is controlled */
    background-color: var(--bg-color, #121212);
    
    /* These three lines will vertically center everything */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.integrated-container {
    max-width: 1100px;
    width: 100%; /* Ensure it takes up available space */
    margin: 0 auto;
}

/* --- The Main Grid --- */
.integrated-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center; /* This remains important for horizontal alignment */
    margin-left: 80px;
}

/* --- Left Column: Photo --- */
.integrated-photo img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4 / 5;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* --- Right Column: Details --- */
.integrated-name {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px 0;
}

.integrated-role {
    font-size: 1.2rem;
    color: #bbb;
    margin: 0 0 40px 0;
    font-weight: 300;
}

/* --- The Icon List --- */
.integrated-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Space between list items */
}

.integrated-list li {
    display: flex;
    align-items: flex-start; /* Align icon and text to the top */
    gap: 20px;
}

.integrated-list i {
    font-size: 1.5rem;
    color: var(--accent-color, #3b82f6);
    margin-top: 8px;
    flex-shrink: 0;
    width: 24px;       /* 1. Give the icon a fixed-width container */
    text-align: center; /* 2. Center the icon within that container */
}

.list-text span {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.list-text p {
    font-size: 1rem;
    color: #ddd;
    line-height: 1.6;
    margin: 0;
}

/* --- Contact Links (with circular white outline) --- */
.integrated-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.integrated-contact a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4); /* White outline with 40% transparency */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7); /* White icon with 70% transparency */
    text-decoration: none;
    transition: all 0.3s ease;
}

.integrated-contact a:hover {
    border-color: #fff;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}