.section-project-gallery {
    padding: var(--section-pad-y) 0;
    background-color: var(--midori-primary);
    overflow: hidden;
}

/* ==========================================================================
   TIÊU ĐỀ & ĐƯỜNG LINE BO GÓC TRÊN
   ========================================================================== */
.gallery-layout-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-title-box {
    min-width: 320px;
    flex-shrink: 0;
}

.gallery-sub {
    color: var(--text-dark);
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.gallery-main-title {
    color: var(--midori-accent);
    margin-top: 5px;
    font-weight: 400;
}

.decor-line-top {
    flex-grow: 1;
    height: 100px;
    border-top: 1px solid var(--midori-neutral-green);
    border-right: 1px solid var(--midori-neutral-green);
    border-top-right-radius: 24px;
    position: relative;
    margin-top: 15px;
}

.decor-line-top::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--midori-accent-dark);
}

/* Fix hiển thị đường line góc trên cho Mobile không bị dồn mất diện tích */
@media (max-width: 768px) {
    .gallery-layout-header {
        display: flex;
        flex-direction: row; /* Giữ cấu trúc hàng ngang */
        align-items: flex-start;
        gap: 15px;
        width: 100%;
        margin-bottom: 25px;
    }
    .gallery-title-box {
        min-width: auto;
        max-width: 70%; /* Dành 30% diện tích còn lại cho đường line */
        flex: 1;
    }
    .decor-line-top {
        display: block !important;
        height: 65px;
    }
}

/* ==========================================================================
   LƯỚI 5 ẢNH NÂNG CAO (13 CỘT)
   ========================================================================== */
.gallery-asymmetric-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: var(--card-gap);
    margin-bottom: 60px;
}

.gal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Layout Desktop */
@media (min-width: 769px) {
    .gallery-asymmetric-grid {
        grid-template-rows: 400px 230px;
    }
    .gal-item-1 { grid-column: 1 / 5; grid-row: 1 / 3; }
    .gal-item-2 { grid-column: 5 / 14; grid-row: 1 / 2; }
    .gal-item-3 { grid-column: 5 / 8; grid-row: 2 / 3; }
    .gal-item-4 { grid-column: 8 / 11; grid-row: 2 / 3; }
    .gal-item-5 { grid-column: 11 / 14; grid-row: 2 / 3; }
}

/* Layout Mobile */
@media (max-width: 768px) {
    .gallery-asymmetric-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(6, 1fr);
        gap: 15px;
        height: 520px;
        margin-bottom: var(--section-pad-y);
    }
    
    .gal-item-1 { grid-column: 1 / 2; grid-row: 1 / 4; }
    .gal-item-2 { grid-column: 1 / 2; grid-row: 4 / 7; }
    
    .gal-item-3 { grid-column: 2 / 3; grid-row: 1 / 3; }
    .gal-item-4 { grid-column: 2 / 3; grid-row: 3 / 5; }
    .gal-item-5 { grid-column: 2 / 3; grid-row: 5 / 7; }
}

/* ==========================================================================
   MÔ TẢ NGẮN & ĐƯỜNG LINE DƯỚI (FIX CHỒNG ĐÈ MOBILE)
   ========================================================================== */
.intro-content-block {
    margin-top: 20px;
}

.intro-decor-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.decor-line-bottom {
    width: 45%;
    height: 100px;
    border-left: 1px solid var(--midori-neutral-green);
    border-bottom: 1px solid var(--midori-neutral-green);
    border-bottom-left-radius: 24px;
    position: relative;
    flex-shrink: 0;
    margin-top: 15px;
}

.decor-line-bottom::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--midori-accent-dark);
}

.intro-text-box {
    flex-grow: 1;
}

.intro-main-title {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
    margin-bottom: 20px !important;
}

.intro-desc-wrapper {
    color: var(--text-dark);
    max-width: 650px;
    margin-left: auto;
    text-align: right;
    line-height: 1.8;
}

/* ==========================================================================
   CẤU TRÚC DI ĐỘNG (MOBILE) - ĐƯA CHỮ LÊN TRÊN, HOẠ TIẾT XUỐNG DƯỚI CÙNG
   ========================================================================== */
@media (max-width: 768px) {
    .gallery-layout-header {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
        margin-bottom: 25px;
    }
    .gallery-title-box {
        min-width: auto;
        max-width: 70%;
        flex: 1;
    }
    .decor-line-top {
        display: block !important;
        height: 65px;
    }

    .gallery-asymmetric-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(6, 1fr);
        gap: 15px;
        height: 520px;
        margin-bottom: var(--section-pad-y);
    }
    
    .gal-item-1 { grid-column: 1 / 2; grid-row: 1 / 4; }
    .gal-item-2 { grid-column: 1 / 2; grid-row: 4 / 7; }
    
    .gal-item-3 { grid-column: 2 / 3; grid-row: 1 / 3; }
    .gal-item-4 { grid-column: 2 / 3; grid-row: 3 / 5; }
    .gal-item-5 { grid-column: 2 / 3; grid-row: 5 / 7; }

    /* Đổi thuộc tính thành column-reverse để ép chữ lên trên, đẩy đường họa tiết xuống dưới cùng */
    .intro-decor-container {
        display: flex;
        flex-direction: column-reverse; /* Đảo ngược trật tự: Chữ trước -> Line sau */
        gap: 30px; /* Khoảng cách an toàn 30px từ đáy chữ đến đầu đường họa tiết */
    }
    
    .intro-text-box {
        width: 100%;
    }
    
    .intro-main-title {
        display: block !important;
        text-align: right;
        font-weight: 500;
        margin-bottom: 15px !important;
    }
    
    .intro-desc-wrapper {
        text-align: right;
        max-width: 100%;
        margin-left: 0;
    }
    
    .decor-line-bottom {
        width: 45%; /* Rộng 45% */
        height: 60px;
        margin-top: 0; /* Do đã có gap giữa hai khối */
        align-self: flex-start; /* Giữ chặt hoạ tiết nằm ở bên trái */
    }
}