/* =========================
   OUR GALLERY - PRO VERSION
========================= */

.section-our-gallery {
    padding: 80px 0;
    background: linear-gradient(180deg,#fbfbfd 0%, #ffffff 100%);
    overflow: hidden;
}

/* ===== HEADER ===== */
.gallery-header {
    text-align: center;
    margin-bottom: 42px;
}

.subtitle {
    color: #7b849a;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
}

.title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 10px 0;
    color: #08103b;
}

.lead {
    color: #5f687a;
    max-width: 640px;
    margin: auto;
}
/* ===== TITLE UNDERLINE PRO ===== */
.gallery-header .title{
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.gallery-header .title::after{
    content: "";
    position: absolute;

    left: 50%;
    bottom: 0;
    transform: translateX(-50%);

    width: 70px;     /* chiều dài gạch */
    height: 3px;     /* độ dày */

    background: linear-gradient(90deg, #6c8cff, #8fd3ff);
    border-radius: 10px;
}

/* =========================
   GRID FIX CHIỀU CAO ẢNH
========================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* item */
.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;

    /* animation start */
    opacity: 0;
    transform: translateY(40px);
    transition: all .7s cubic-bezier(.2,.9,.3,1);

    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* khi hiện */
.gallery-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* delay stagger */
.gallery-item:nth-child(2){transition-delay:.08s}
.gallery-item:nth-child(3){transition-delay:.16s}
.gallery-item:nth-child(4){transition-delay:.24s}
.gallery-item:nth-child(5){transition-delay:.32s}
.gallery-item:nth-child(6){transition-delay:.40s}

/* ===== ẢNH ĐỀU NHAU ===== */
.gallery-item img {
    width: 100%;
    height: 260px;      /* 👈 chiều cao cố định -> không còn cao thấp */
    object-fit: cover;  /* không méo */
    display: block;
    transition: transform .8s ease, filter .4s ease;
}

/* hover effect */
.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0,0,0,.12);
}

/* ===== caption ===== */
.caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 8px 12px;
    background: rgba(0,0,0,.45);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    backdrop-filter: blur(4px);
}

/* =========================
   LIGHTBOX ANIMATION
========================= */

.og-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: .35s;
    z-index: 2000;
}

.og-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.og-image {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    transform: scale(.92);
    transition: .3s;
}

.og-lightbox.active .og-image {
    transform: scale(1);
}

/* controls */
.og-close,
.og-prev,
.og-next {
    position: absolute;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
}

.og-close { top: 20px; right: 24px; }
.og-prev { left: 30px; }
.og-next { right: 30px; }

/* =========================
   RESPONSIVE
========================= */

@media(max-width: 991px){
    .gallery-grid { grid-template-columns: repeat(2,1fr); }
}

@media(max-width: 600px){
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item img { height: 220px; }
}

/* =========================
   GALLERY SIDE ARROWS FIX CENTER
========================= */

/* ⭐ quan trọng: anchor theo GRID chứ không phải inner */

.gallery-grid{
    position:relative;
}


.gallery-nav{
    position:absolute;
    top:50%;
    left:0;

    transform:translateY(-50%);

    width:100%;
    height:0;

    display:flex;
    justify-content:space-between;
    align-items:center;

    pointer-events:none;

}


/* arrow */
.gallery-arrow{
    width:56px;
    height:56px;

    border-radius:50%;
    border:none;

    background: #fff;
    color: #050505;

    font-size:30px;
    font-weight:700;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

    box-shadow:0 12px 30px rgba(0,0,0,.18);

    transition:.25s;

    pointer-events:auto;
}

.gallery-arrow:hover{
    transform:scale(1.1);
}

.gallery-arrow:disabled{
    opacity:.25;
    cursor:not-allowed;
    transform:none;
}


