/* lightbox.css - 作品集頁面專用樣式 */

/* 作品集專用內容區 */
.portfolio-content {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* 作品集網格 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.portfolio-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.portfolio-img {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.portfolio-img::before {
    content: attr(data-category);
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 2;
}

/* 作品集頁面響應式設計 */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-filter {
        justify-content: center;
    }
}




        /* 基礎樣式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft JhengHei', Arial, sans-serif;
            background-color: #f5f5f5;
            padding: 20px;
        }


        h1 {
            color: #2c3e50;
            margin-bottom: 20px;
            text-align: center;
            font-size: 2.5rem;
        }

        .demo-description {
            text-align: center;
            color: #7f8c8d;
            margin-bottom: 40px;
            font-size: 1.1rem;
            line-height: 1.6;
        }

        /* 相簿預覽區 */
        .album-preview {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 50px;
        }

        .album-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        }

        .album-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.15);
        }

        .album-cover {
            height: 180px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2rem;
        }

        .album-info {
            padding: 20px;
        }

        .album-info h3 {
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .album-info p {
            color: #7f8c8d;
            font-size: 0.9rem;
            line-height: 1.5;
            margin-bottom: 15px;
        }

        .album-meta {
            display: flex;
            justify-content: space-between;
            color: #95a5a6;
            font-size: 0.8rem;
        }

        /* 示範按鈕區 */
        .demo-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .demo-btn {
            padding: 12px 30px;
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .demo-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
        }

        .demo-btn.secondary {
            background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        }

        .demo-btn.secondary:hover {
            box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
        }

        /* 功能展示區 */
        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-bottom: 50px;
        }

        .feature-card {
            background: #f8f9fa;
            padding: 25px;
            border-radius: 12px;
            text-align: center;
            transition: transform 0.3s ease;
        }

        .feature-card:hover {
            transform: translateY(-5px);
        }

        .feature-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }

        .feature-card h3 {
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .feature-card p {
            color: #7f8c8d;
            line-height: 1.5;
        }

        /* 使用說明 */
        .instructions {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 40px;
        }

        .instructions h2 {
            margin-bottom: 20px;
            text-align: center;
        }

        .instructions ol {
            padding-left: 20px;
            line-height: 1.8;
        }

        .instructions li {
            margin-bottom: 10px;
        }

        /* 燈箱樣式 */
        .lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 10000;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .lightbox.active {
            display: block;
            opacity: 1;
        }

        .lightbox-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            height: 90%;
            max-width: 1400px;
            background: #1a1a1a;
            border-radius: 15px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .lightbox-header {
            padding: 20px 30px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .lightbox-title {
            font-size: 1.5rem;
            font-weight: 500;
        }

        .lightbox-controls {
            display: flex;
            gap: 10px;
        }

        .lightbox-btn {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: background 0.3s ease;
        }

        .lightbox-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .lightbox-body {
            flex: 1;
            display: flex;
            overflow: hidden;
            position: relative;
        }

        .lightbox-sidebar {
            width: 300px;
            background: rgba(0, 0, 0, 0.7);
            padding: 20px;
            overflow-y: auto;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
        }

        .lightbox-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .lightbox-image-container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 30px;
            position: relative;
        }

        .lightbox-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            transition: transform 0.3s ease;
    /* 新增：控制圖片顯示尺寸 */
    width: auto;      /* 或固定寬度：width: 800px; */
    height: 300px;     /* 或固定高度：height: 600px; */
    
    /* 控制圖片在容器內的行為 */
    object-fit: contain; /* contain: 完整顯示, cover: 填滿容器 */
        }

        .lightbox-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.6);
            border: none;
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            opacity: 0;
        }

        .lightbox-image-container:hover .lightbox-nav {
            opacity: 1;
        }

        .lightbox-nav:hover {
            background: rgba(0, 0, 0, 0.8);
            transform: translateY(-50%) scale(1.1);
        }

        .lightbox-nav.prev {
            left: 30px;
        }

        .lightbox-nav.next {
            right: 30px;
        }

        .lightbox-thumbnails {
            height: 120px;
            background: rgba(0, 0, 0, 0.8);
            padding: 15px;
            overflow-x: auto;
            display: flex;
            gap: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .thumbnail {
            flex: 0 0 auto;
            width: 120px;
            height: 90px;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            opacity: 0.6;
            transition: all 0.3s ease;
        }

        .thumbnail:hover {
            opacity: 0.8;
            transform: scale(1.05);
        }

        .thumbnail.active {
            opacity: 1;
            border: 3px solid #3498db;
            transform: scale(1.1);
        }

        .thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .lightbox-footer {
            padding: 20px 30px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .image-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .image-counter {
            font-size: 1.1rem;
            font-weight: 500;
        }

        .image-description {
            flex: 1;
            text-align: center;
            color: #ccc;
        }

        .image-actions {
            display: flex;
            gap: 10px;
        }

        /* 相簿資訊 */
        .album-details {
            color: white;
        }

        .album-details h3 {
            margin-bottom: 15px;
            color: #fff;
        }

        .album-meta-item {
            display: flex;
            margin-bottom: 10px;
            align-items: center;
        }

        .meta-icon {
            margin-right: 10px;
            font-size: 1.2rem;
        }

        /* 功能面板 */
        .tool-panel {
            background: rgba(0, 0, 0, 0.6);
            padding: 20px;
            border-radius: 10px;
            margin-top: 20px;
        }

        .tool-panel h4 {
            margin-bottom: 15px;
            color: #fff;
        }

        .tool-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .tool-btn {
            background: rgba(52, 152, 219, 0.3);
            border: 1px solid rgba(52, 152, 219, 0.5);
            color: white;
            padding: 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .tool-btn:hover {
            background: rgba(52, 152, 219, 0.5);
            transform: translateY(-2px);
        }

        /* 放大鏡效果 */
        .magnifier {
            position: absolute;
            width: 200px;
            height: 200px;
            border: 3px solid #3498db;
            border-radius: 50%;
            overflow: hidden;
            pointer-events: none;
            display: none;
            z-index: 100;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        }

        .magnifier img {
            position: absolute;
            transform: scale(2);
            transform-origin: 0 0;
        }

        /* 幻燈片模式 */
        .lightbox.slideshow .lightbox-sidebar,
        .lightbox.slideshow .lightbox-thumbnails,
        .lightbox.slideshow .lightbox-footer {
            display: none;
        }

        .lightbox.slideshow .lightbox-main {
            width: 100%;
        }

        .slideshow-controls {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 15px;
            z-index: 10;
        }

        /* 全螢幕模式 */
        .lightbox.fullscreen .lightbox-content {
            width: 100%;
            height: 100%;
            max-width: none;
            border-radius: 0;
        }

        /* 響應式設計 */
        @media (max-width: 1024px) {
            .lightbox-content {
                flex-direction: column;
            }

            .lightbox-sidebar {
                width: 100%;
                height: 200px;
                border-right: none;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

            .lightbox-body {
                flex-direction: column;
            }
        }

        @media (max-width: 768px) {
            .demo-buttons {
                flex-direction: column;
                align-items: center;
            }

            .demo-btn {
                width: 100%;
                max-width: 300px;
                justify-content: center;
            }

            .features-grid {
                grid-template-columns: 1fr;
            }

            .lightbox-header {
                padding: 15px;
            }

            .lightbox-title {
                font-size: 1.2rem;
            }

            .lightbox-nav {
                width: 50px;
                height: 50px;
                font-size: 1.2rem;
            }

            .lightbox-nav.prev {
                left: 15px;
            }

            .lightbox-nav.next {
                right: 15px;
            }
        }
