/* ===== Simple Album Gallery - styles ===== */

.sag-gallery {
    --sag-accent: #e53935;
}

/* Lưới ảnh hiển thị ngoài trang */
.sag-gallery .sag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.sag-gallery .sag-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    transition: transform .4s ease, opacity .15s ease;
}
.sag-gallery .sag-grid-img:hover {
    opacity: 0.85;
}

/* ===== Lightbox ===== */
.sag-gallery .sag-lightbox {
    position: fixed;
    inset: 0;
    background: #000;
    display: none;
    flex-direction: column;
    z-index: 99999;
}
.sag-gallery .sag-lightbox.open {
    display: flex;
}

.sag-gallery .sag-lb-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    z-index: 20;
    pointer-events: none;
}
.sag-gallery .sag-lb-counter {
    font-size: 14px;
    color: #eee;
    background: rgba(0,0,0,0.35);
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.sag-gallery .sag-lb-tools {
    display: flex;
    gap: 18px;
    pointer-events: auto;
}
.sag-gallery .sag-lb-tools button {
    background: none;
    border: none;
    color: #eee;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity .15s;
}
.sag-gallery .sag-lb-tools button:hover { opacity: 1; }
.sag-gallery .sag-lb-tools svg { width: 20px; height: 20px; }

.sag-gallery .sag-lb-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sag-gallery .sag-lb-image {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform .15s ease;
}

.sag-gallery .sag-lb-nav {
    position: absolute;
    top: 0; bottom: 0;
    width: 15%;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #eee;
    opacity: 0.75;
    transition: opacity .15s;
    z-index: 15;
}
.sag-gallery .sag-lb-nav:hover { opacity: 1; }
.sag-gallery .sag-prev { left: 0; justify-content: flex-start; padding-left: 18px; }
.sag-gallery .sag-next { right: 0; justify-content: flex-end; padding-right: 18px; }
.sag-gallery .sag-lb-nav svg { width: 30px; height: 30px; }

.sag-lb-thumbs{
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
    margin-bottom: 15px;
}
.sag-gallery .sag-lb-thumbs{
    display:flex;
    flex-wrap:nowrap;
    gap:8px;

    overflow-x:auto;
    overflow-y:hidden;

    white-space:nowrap;

    padding:2px 18px;
    background:#000;

    scroll-behavior:smooth;
}
.sag-gallery .sag-lb-thumbs::-webkit-scrollbar { height: 6px; }
.sag-gallery .sag-lb-thumbs::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.sag-gallery .sag-thumb-item {
    flex: 0 0 auto;
    width: 90px;
    height: 60px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity .15s, border-color .15s;
}
.sag-gallery .sag-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sag-gallery .sag-thumb-item.active {
    border-color: var(--sag-accent);
    opacity: 1;
}
.sag-gallery .sag-thumb-item:hover { opacity: 1; }
.sag2-section {
    padding: 80px 0;
}

.sag2-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.sag2-left {
    width: 40%;
}

.sag2-subtitle {
    color: #c89b3c;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sag2-left h2 {
    font-size: 52px;
    margin: 20px 0;
}

.sag2-left p {
    color: #666;
    line-height: 1.8;
}

.sag2-btn {
    margin-top: 35px;
    padding: 15px 35px;
    border: none;
    /* background: #c89b3c; */
    color: #fff;
    cursor: pointer;
    border-radius: 40px;
    transition: .3s;
}

.sag2-btn:hover {
    background: #111;
}

.sag2-right {
    width: 60%;
    display: flex;
    justify-content: center;
}

.sag2-stack {
    position: relative;
    width: 520px;
    height: 360px;
}

.sag2-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    transition: .4s;
}

.sag2-card-back-2 {
    background: #d8d8d8;
    transform: translate(-40px, 25px) rotate(-7deg);
}

.sag2-card-back-1 {
    background: #efefef;
    transform: translate(-20px, 12px) rotate(-3deg);
}

.sag2-card-main {
    overflow: hidden;
    display: block;
    box-shadow: 0 30px 70px rgba(0,0,0,.25);
}
/* 
.sag2-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s;
} */

.sag2-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .45s ease;
}

.sag2-overlay span {
    font-size: 42px;
    font-weight: bold;
}

.sag2-overlay small {
    margin-top: 10px;
    font-size: 18px;
}

.sag2-stack:hover .sag2-card-back-2 {
    transform: translate(-60px, 40px) rotate(-9deg);
}

.sag2-stack:hover .sag2-card-back-1 {
    transform: translate(-30px, 18px) rotate(-5deg);
}

.sag2-stack:hover img {
    transform: scale(1.08);
}

.sag2-stack:hover .sag2-overlay {
    opacity: 1;
}

@media (max-width: 768px) {

    .sag2-content {
        flex-direction: column;
        text-align: center;
    }

    .sag2-left,
    .sag2-right {
        width: 100%;
    }

    .sag2-left h2 {
        font-size: 38px;
    }

    .sag2-stack {
        width: 100%;
        max-width: 340px;
        height: 240px;
    }

    .sag2-overlay span {
        font-size: 30px;
    }

}