.cr-page-hero {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 200px 0 200px;
    color: #fff;
}

.cr-page-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.cr-page-hero__inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    margin-top: 117px;
}

.cr-page-hero__subtitle {
    font-size: 14px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.85;
}

.cr-page-hero__title {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 700;
    margin: 0;
}

.cr-page-hero__breadcrumb {
    margin-top: 15px;
    font-size: 13px;
    opacity: 0.9;
}

.cr-page-hero--noimage {
    background-color: #111;
}

/* Responsive */
@media (max-width: 767px) {
    .cr-page-hero {
        padding: 110px 0 80px;
    }

    .cr-page-hero__title {
        font-size: 36px;
    }
}

/* =========================
   CONTAINER 1: TOP LAYOUT
   ========================= */
.project-top-wrapper {
    padding: 60px 0 40px;
}

.project-top-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    gap: 60px;
    align-items: flex-start;
}

/* Khi chỉ có 1 cột (sidebar hoặc main), bỏ grid 2 cột → full-width */
.project-top-inner--single-col {
    grid-template-columns: 1fr;
    max-width: 860px;
}

/* Sidebar Overview */
.project-overview-sidebar {
    padding: 20px;
    background: #7E8E20;
}

.project-overview-sidebar .section-title {
    font-size: 26px;
    margin-bottom: 20px;
    color: #fff;
}



.overview-intro {
    color: #f2f2f2;
    font-size: 14px;
    margin-bottom: 20px;
}

.project-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-meta-list li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 16px;
    margin-bottom: 8px;
    color: #fff;
}

.project-meta-list li strong {
    margin: 0;
    display: block;
}

/* Rating stars */
.project-meta-list li.rating-row {
    grid-template-columns: 110px auto;
}

/* đảm bảo inline value + stars không bị xuống dòng */
.rating-value {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* style sao vàng */
.rating-stars .star {
    color: #f6c33b;
    font-size: 16px;
}

.rating-stars .star:not(.is-active) {
    opacity: 0.25;
}

/* Main content */
.project-main .section-title {
    font-size: 28px;
    margin-bottom: 20px;
}

.project-highlights {
    margin-top: 30px;
}

.project-highlights ul {
    margin: 0 0 20px;
    padding-left: 18px;
}

.project-highlights ul li {
    margin-bottom: 12px;
    font-size: 15px;
    color: #fff;
}

/* Testimonial */
.project-testimonial {
    margin: 40px 0;
}

.testimonial-box {
    background: #DCE5D2;
    border-left: 4px solid #7E8E20;
    padding: 28px 30px;
    font-size: 16px;
    line-height: 1.7;
}

.testimonial-text {
    margin: 0 0 10px;
}

.testimonial-client {
    display: block;
    margin-top: 4px;
    font-weight: 600;
    font-size: 14px;
}

/* Story */
.story-content p {
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.75;
}

/* Responsive container 1 */
@media (max-width: 991px) {
    .project-top-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =========================
   CONTAINER 2: BEFORE & AFTER
   ========================= */
.project-before-after-wrapper {
    padding: 40px 0 80px;
    background-color: #DCE5D2;
}

.project-before-after-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.project-before-after-inner .section-title {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
}

.ba-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.ba-item {
    margin-bottom: 0;
    /* vì grid đã có gap */
}

.ba-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.twentytwenty-container {
    margin-top: 8px;
    /* Ép cùng tỉ lệ 4:3 cho tất cả cặp before/after,
       dù ảnh gốc có tỉ lệ khác nhau — không bị méo nhờ object-fit: cover */
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

/* Force cả 2 ảnh trong slider lấp đầy container và crop center */
.twentytwenty-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    max-width: none !important;
}

/* Mobile: 1 cột */
@media (max-width: 767px) {
    .ba-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* =========================
   CONTAINER 2: PROJECT GALLERY
   ========================= */
.project-gallery-wrapper {
    padding: 60px 0 80px;
    background-color: #fff;
}

.project-gallery-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.project-gallery-inner .section-title {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
}

/* Grid 3 cột */
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* Mỗi ảnh trong gallery */
.project-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4 / 3;
    background: #eee;
    text-decoration: none;
    transform: translateZ(0);
    /* force GPU layer */
    -webkit-transform: translateZ(0);
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    will-change: transform;
    backface-visibility: hidden;
    /* chống ghosting khi transform */
    -webkit-backface-visibility: hidden;
}

/* Hover: zoom nhẹ + overlay tối */
.project-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.project-gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.35);
}

.project-gallery-item:hover img {
    transform: scale(1.06);
}

/* Zoom icon (kính lúp SVG) */
.gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    z-index: 2;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    /* KHÔNG dùng backdrop-filter — gây blur tất cả ảnh phía sau */
}


.gallery-zoom-icon svg {
    display: block;
    flex-shrink: 0;
}

.project-gallery-item:hover .gallery-zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive: 2 cột trên tablet */
@media (max-width: 991px) {
    .project-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Responsive: 1 cột trên mobile */
@media (max-width: 575px) {
    .project-gallery-grid {
        grid-template-columns: 1fr;
    }

    .project-gallery-inner .section-title {
        font-size: 32px;
    }
}

/* =========================
   GALLERY: figure item fix
   ========================= */
.project-gallery-item {
    cursor: pointer;
}

.project-gallery-item img {
    /* Override any theme filter/opacity */
    filter: none !important;
    opacity: 1 !important;
}

/* =========================
   CUSTOM LIGHTBOX
   ========================= */
#cr-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

#cr-lightbox.is-open {
    display: flex;
}

#cr-lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cr-lb-img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    opacity: 1;
    transition: opacity 0.2s ease;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* Close button */
#cr-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 2;
}

#cr-lb-close:hover {
    opacity: 1;
}

/* Prev / Next buttons */
#cr-lb-prev,
#cr-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 4px;
    opacity: 0.8;
    transition: background 0.2s, opacity 0.2s;
    z-index: 2;
}

#cr-lb-prev {
    left: 16px;
}

#cr-lb-next {
    right: 16px;
}

#cr-lb-prev:hover,
#cr-lb-next:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

@media (max-width: 575px) {
    #cr-lb-prev {
        left: 4px;
        font-size: 32px;
    }

    #cr-lb-next {
        right: 4px;
        font-size: 32px;
    }
}