/* --- Styles for Project Detail Page --- */

a {
    text-decoration: none;
}

.project-detail {
    padding-top: 80px; /* Bù cho header */
}

.project-hero {
    position: relative; /* Thêm để đặt overlay */
    width: 100%;
    height: 60vh; /* Chiều cao 60% màn hình */
    overflow: hidden;
    display: flex; /* Dùng flexbox để căn giữa nội dung */
    align-items: center; /* Căn giữa theo chiều dọc */
    justify-content: center; /* Căn giữa theo chiều ngang */
    text-align: center;
}

.project-hero img {
    position: absolute; /* Đặt ảnh làm nền */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Đảm bảo ảnh nằm dưới overlay */
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Lớp phủ đen mờ */
    z-index: 2; /* Đảm bảo overlay nằm trên ảnh */
    display: flex; /* Dùng flexbox để căn giữa nội dung */
    align-items: center;
    justify-content: center;
}

.project-hero-content {
    position: relative; /* Để nội dung nằm trên overlay */
    z-index: 3;
    color: var(--primary-color);
    max-width: 800px; /* Giới hạn chiều rộng nội dung */
    padding: 20px;
}

.project-hero-content h1 {
    font-size: 3.5rem; /* Kích thước lớn hơn cho tiêu đề */
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.project-hero-content .hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--light-text-color);
    margin-top: 15px;
}


.project-content {
    padding: 80px 25px;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    color: var(--light-text-color);
    text-align: center;
}

.project-meta p {
    font-size: 1rem;
}

.project-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--light-text-color);
}

.project-description p {
    margin-bottom: 20px;
}

/* (ĐÃ THÊM) Styles cho mục thông số kỹ thuật */
.project-tech-specs {
    max-width: 800px;
    margin: 40px auto 0 auto;
    padding: 30px;
    background-color: var(--dark-gray-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 5px 5px 0;
}

.project-tech-specs h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.project-tech-specs ul {
    list-style: none;
    padding-left: 0;
    color: var(--light-text-color);
}
.project-tech-specs li {
    margin-bottom: 10px;
    font-size: 1rem;
}
.project-gallery {
    padding: 80px 25px;
}

.project-gallery h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--dark-gray-bg); /* Giữ chỗ khi ảnh chưa tải (lazy loading) */
}

/* (ĐÃ THÊM) Styles cho mục video dự án */
.project-video {
    padding: 0 25px 80px 25px;
}

.project-video h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

.video-responsive {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* Tỷ lệ 16:9 (9 / 16 * 100) */
    max-width: 960px; /* Giới hạn chiều rộng tối đa của video */
    margin: 0 auto;
    border-radius: 5px;
    background-color: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.back-to-projects {
    text-align: center;
    padding-bottom: 80px;
}

/* --- LIGHTBOX STYLES --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 90vh;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0)} 
    to {transform: scale(1)}
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 85vh;
    }
    .close-btn {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }
    .project-hero-content h1 {
        font-size: 2.5rem; /* Nhỏ hơn trên di động */
    }
    .project-hero-content .hero-description {
        font-size: 1rem;
    }

    /* (ĐÃ SỬA) Tối ưu hiển thị project-meta trên mobile */
    .project-meta {
        flex-direction: column; /* Xếp các item theo cột */
        gap: 15px; /* Giảm khoảng cách */
        align-items: center; /* Căn giữa các item */
    }
}