/* Mục Album Sản Phẩm & Công Trình */

/* Gallery Section */
.gallery {
    padding: 80px 0;
    background: var(--light-gray);
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-tab {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: var(--dark-gray);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-tab.active {
    background: linear-gradient(135deg, #111827, #4b5563);
    color: white;
}

.gallery-tab:hover:not(.active) {
    background: #e5e7eb;
}

.gallery-content {
    display: none;
}

.gallery-content.active {
    display: block;
}

.album-intro {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    margin: 0 auto 30px;
    max-width: 620px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.album {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 280px;
    padding: 22px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #1f2937 center/cover no-repeat;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* display:flex ở trên sẽ đè thuộc tính hidden, nên phải ẩn lại tường minh */
.album[hidden] {
    display: none;
}

/* Lớp phủ tối để chữ luôn đọc được trên mọi ảnh bìa */
.album::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.1) 100%);
    transition: background 0.35s;
}

.album:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.album:hover::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.25) 100%);
}

.album-name,
.album-desc,
.album-count {
    position: relative;
    z-index: 1;
}

.album-name {
    color: white;
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.album-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.album-count {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 13px;
    font-weight: 600;
}

/* Danh sách ảnh của album: chỉ dùng làm dữ liệu cho trình xem */
.album-photos {
    display: none;
}


.video-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.video-badge::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Video grid for larger videos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.video-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    background: #000;
}

.video-item video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
    background: #000;
}

.video-caption {
    padding: 15px;
    background: white;
    text-align: center;
    font-weight: 500;
    color: var(--dark-gray);
}

@media (max-width: 768px) {
    .gallery-tabs {
        flex-wrap: wrap;
    }

    .gallery-tab {
        padding: 10px 20px;
        font-size: 14px;
    }

    .album-grid {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .album {
        height: 240px;
    }
