/*==================================================
             GALLERY SHOWCASE - HOME
==================================================*/

.gallery-showcase{
    position:relative;
    padding:86px 0 112px;
    background:#080909;
    overflow:hidden;
}

.gallery-showcase::before{
    content:"";
    position:absolute;
    left:50%;
    top:80px;
    width:760px;
    height:360px;
    transform:translateX(-50%);
    background:radial-gradient(circle,rgba(255,63,115,.06),transparent 68%);
    pointer-events:none;
}

.gallery-showcase .container{
    position:relative;
    z-index:1;
    max-width:1320px;
}

.gallery-heading{
    max-width:930px;
    margin:0 auto 54px;
    text-align:center;
}

.gallery-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-bottom:15px;
    padding:6px 13px;
    border:1px solid rgba(255,77,109,.34);
    border-radius:999px;
    background:rgba(255,77,109,.07);
    color:#ff647f;
    font-size:11px;
    font-weight:800;
    line-height:1;
}

.gallery-kicker i{
    font-size:13px;
}

.gallery-heading h2{
    margin:0 0 12px;
    color:#fff;
    font-size:42px;
    font-weight:900;
    line-height:1.18;
    letter-spacing:-1.3px;
}

.gallery-heading p{
    max-width:720px;
    margin:0 auto;
    color:#a2a2a7;
    font-size:14px;
    line-height:1.75;
}

.demo-album-panel{
    width:100%;
    padding:34px 34px 30px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:22px;
    background:#0d0e0f;
    box-shadow:0 24px 80px rgba(0,0,0,.28);
}

.demo-album-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
}

.demo-label{
    display:block;
    margin-bottom:5px;
    color:#ff5d78;
    font-size:10px;
    font-weight:900;
    letter-spacing:.55px;
}

.demo-album-meta h3{
    margin:0 0 3px;
    color:#fff;
    font-size:17px;
    font-weight:800;
    line-height:1.3;
}

.demo-album-meta p{
    margin:0;
    color:#94969b;
    font-size:11px;
}

.demo-album-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:10px;
}

.gallery-slider-controls{
    display:flex;
    align-items:center;
    gap:7px;
}

.gallery-slide-btn{
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.14);
    border-radius:9px;
    background:#171819;
    color:#ddd;
    font-size:14px;
    transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}

.gallery-slide-btn:hover{
    color:#fff;
    background:#242527;
    border-color:rgba(255,77,109,.42);
    transform:translateY(-1px);
}

.gallery-register-btn{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:38px;
    padding:0 15px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:9px;
    background:#242526;
    color:#f5f5f5;
    font-size:11px;
    font-weight:700;
    transition:transform .2s ease,border-color .2s ease,background .2s ease;
}

.gallery-register-btn:hover{
    color:#fff;
    background:#2c2d2f;
    border-color:rgba(255,77,109,.48);
    transform:translateY(-1px);
}

.demo-divider{
    height:1px;
    margin:24px 0 26px;
    background:rgba(255,255,255,.10);
}

.demo-photo-viewport{
    position:relative;
    width:100%;
    overflow:hidden;
}

.demo-photo-track{
    display:flex;
    gap:22px;
    width:max-content;
    transform:translate3d(0,0,0);
    transition:transform .58s cubic-bezier(.22,.61,.36,1);
    will-change:transform;
}

.demo-photo-track.is-resetting{
    transition:none;
}

.demo-photo-card{
    flex:0 0 calc((min(1252px, calc(100vw - 68px)) - 66px) / 4);
    width:calc((min(1252px, calc(100vw - 68px)) - 66px) / 4);
    overflow:hidden;
    border:1px solid rgba(255,255,255,.10);
    border-radius:15px;
    background:#111214;
    transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;
}

.demo-photo-card:hover{
    transform:translateY(-4px);
    border-color:rgba(255,255,255,.20);
    box-shadow:0 18px 38px rgba(0,0,0,.25);
}

.demo-photo-media{
    position:relative;
    height:340px;
    overflow:hidden;
    background:#18191b;
}

.demo-photo-media::after{
    content:"";
    position:absolute;
    inset:auto 0 0;
    height:34%;
    background:linear-gradient(to top,rgba(7,7,7,.46),transparent);
    pointer-events:none;
}

.demo-photo-media img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .55s ease,filter .55s ease;
}

.demo-photo-card:hover .demo-photo-media img{
    transform:scale(1.035);
    filter:brightness(1.04);
}

.photo-code-badge{
    position:absolute;
    z-index:4;
    top:13px;
    left:13px;
    padding:6px 9px;
    border-radius:7px;
    background:rgba(20,20,20,.86);
    color:#fff;
    font-size:9px;
    font-weight:800;
    box-shadow:0 4px 12px rgba(0,0,0,.18);
}

.photo-card-actions{
    position:absolute;
    z-index:5;
    top:13px;
    right:13px;
    display:flex;
    align-items:center;
    gap:7px;
}

.photo-heart,
.photo-download{
    width:35px;
    height:35px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.25);
    border-radius:50%;
    background:rgba(38,39,40,.82);
    color:#fff;
    font-size:15px;
    line-height:1;
    text-decoration:none;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    transition:transform .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.photo-heart:hover,
.photo-download:hover{
    color:#fff;
    transform:scale(1.07);
    border-color:rgba(255,255,255,.55);
    background:rgba(52,53,55,.92);
}

.photo-download:hover{
    border-color:rgba(255,185,36,.68);
    box-shadow:0 7px 20px rgba(255,174,0,.12);
}

.photo-heart.is-liked{
    border-color:#ff4d72;
    background:#ff416d;
    box-shadow:0 0 0 5px rgba(255,65,109,.10),0 8px 22px rgba(255,65,109,.28);
}

.demo-photo-footer{
    min-height:60px;
    padding:11px 12px 10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.demo-photo-footer > div{
    min-width:0;
}

.demo-photo-footer strong{
    display:block;
    max-width:180px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#f5f5f5;
    font-size:10px;
    font-weight:700;
}

.demo-photo-footer small{
    display:block;
    margin-top:3px;
    color:#686b70;
    font-size:8px;
}

.copy-code-btn{
    flex:0 0 auto;
    padding:6px 9px;
    border-radius:7px;
    background:#242527;
    color:#dedede;
    font-size:8px;
    font-weight:700;
    transition:background .2s ease,color .2s ease;
}

.copy-code-btn:hover{
    background:#303236;
    color:#fff;
}

.copy-code-btn.is-copied{
    background:rgba(68,208,144,.14);
    color:#6be0a9;
}

@media (max-width:1390px){
    .demo-photo-card{
        flex-basis:calc((100vw - 136px - 66px) / 4);
        width:calc((100vw - 136px - 66px) / 4);
    }
}

@media (max-width:1100px){
    .gallery-showcase{
        padding:72px 0 90px;
    }

    .gallery-heading h2{
        font-size:36px;
    }

    .demo-photo-card{
        flex-basis:calc((100vw - 100px - 22px) / 2);
        width:calc((100vw - 100px - 22px) / 2);
    }

    .demo-photo-media{
        height:390px;
    }
}

@media (max-width:700px){
    .gallery-showcase{
        padding:58px 0 74px;
    }

    .gallery-heading{
        margin-bottom:34px;
    }

    .gallery-heading h2{
        font-size:29px;
        letter-spacing:-.6px;
    }

    .gallery-heading p{
        font-size:13px;
    }

    .demo-album-panel{
        padding:22px 16px 18px;
        border-radius:17px;
    }

    .demo-album-head{
        align-items:flex-start;
        flex-direction:column;
        gap:16px;
    }

    .demo-album-actions{
        width:100%;
        justify-content:space-between;
    }

    .gallery-register-btn{
        flex:1 1 auto;
    }

    .demo-divider{
        margin:20px 0;
    }

    .demo-photo-track{
        gap:14px;
    }

    .demo-photo-card{
        flex-basis:calc(100vw - 64px);
        width:calc(100vw - 64px);
    }

    .demo-photo-media{
        height:auto;
        aspect-ratio:4/5;
    }

    .demo-photo-footer strong{
        max-width:210px;
    }
}

@media (prefers-reduced-motion:reduce){
    .demo-photo-track,
    .demo-photo-card,
    .demo-photo-media img,
    .photo-heart,
    .photo-download{
        transition:none !important;
    }
}


/* Album mẫu đầy đủ - CTA từ trang chủ */
.gallery-full-demo-btn{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:38px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.20);
    border-radius:9px;
    background:#171819;
    color:#f3f3f3;
    font-size:11px;
    font-weight:800;
    transition:transform .2s ease,border-color .2s ease,background .2s ease;
}

.gallery-full-demo-btn:hover{
    color:#fff;
    background:#222326;
    border-color:rgba(255,255,255,.34);
    transform:translateY(-1px);
}

.gallery-full-demo-btn i{
    color:#ff7089;
}

@media (max-width:700px){
    .gallery-full-demo-btn{
        flex:1 1 auto;
    }
}


/* =========================================================
   Gallery homepage polish v2.1
   ========================================================= */

.demo-album-head{
    align-items:center !important;
}

.demo-album-actions{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
}

.gallery-full-demo-btn{
    min-height:44px !important;
    display:inline-flex !important;
    align-items:center !important;
    gap:10px !important;
    padding:0 13px !important;
    border:1px solid rgba(255,255,255,.15) !important;
    border-radius:10px !important;
    background:#151617 !important;
    color:#f3f3f3 !important;
    box-shadow:none !important;
    white-space:nowrap;
}

.gallery-full-demo-btn > span{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    line-height:1.05;
}

.gallery-full-demo-btn small{
    margin-bottom:3px;
    color:#7b7e84;
    font-size:6.5px;
    font-weight:800;
    letter-spacing:.75px;
}

.gallery-full-demo-btn strong{
    color:#f5f5f5;
    font-size:10.5px;
    font-weight:800;
}

.gallery-full-demo-btn > i{
    width:26px;
    height:26px;
    display:grid;
    place-items:center;
    border:1px solid rgba(255,255,255,.10);
    border-radius:7px;
    color:#ff738b !important;
    background:#1c1d1f;
}

.gallery-register-btn{
    min-height:44px !important;
    padding:0 14px !important;
    border:1px solid rgba(255,255,255,.15) !important;
    border-radius:10px !important;
    background:#1b1c1e !important;
    color:#f4f4f4 !important;
    white-space:nowrap;
}

.gallery-register-btn:hover,
.gallery-full-demo-btn:hover{
    border-color:rgba(255,255,255,.28) !important;
    background:#222326 !important;
}

/* Nút chuyển ảnh đưa xuống đúng khu vực ảnh, không phá header album */
.demo-photo-viewport{
    position:relative;
}

.gallery-slider-edge{
    width:42px !important;
    height:42px !important;
    position:absolute !important;
    top:50% !important;
    z-index:20 !important;
    display:grid !important;
    place-items:center !important;
    transform:translateY(-50%) !important;
    border:1px solid rgba(255,255,255,.20) !important;
    border-radius:50% !important;
    background:rgba(15,16,17,.86) !important;
    color:#f5f5f5 !important;
    box-shadow:0 10px 28px rgba(0,0,0,.28) !important;
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.gallery-slider-edge.is-prev{ left:10px !important; }
.gallery-slider-edge.is-next{ right:10px !important; }

.gallery-slider-edge:hover{
    border-color:rgba(255,112,137,.45) !important;
    background:#252629 !important;
    color:#fff !important;
}

.demo-photo-viewport::before,
.demo-photo-viewport::after{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    z-index:10;
    width:58px;
    pointer-events:none;
}

.demo-photo-viewport::before{
    left:0;
    background:linear-gradient(90deg,#0d0e0f 0%,rgba(13,14,15,.72) 34%,transparent 100%);
}

.demo-photo-viewport::after{
    right:0;
    background:linear-gradient(270deg,#0d0e0f 0%,rgba(13,14,15,.72) 34%,transparent 100%);
}

/* Ảnh demo trang chủ cũng không crop quá mạnh */
.demo-photo-media{
    background:#101112;
}

.demo-photo-media img{
    object-fit:contain !important;
    background:#101112;
}

@media (max-width:760px){
    .demo-album-head{
        align-items:stretch !important;
    }

    .demo-album-actions{
        width:100%;
        display:grid !important;
        grid-template-columns:1.25fr .75fr;
    }

    .gallery-full-demo-btn,
    .gallery-register-btn{
        width:100%;
        justify-content:center !important;
    }

    .gallery-slider-edge{
        width:36px !important;
        height:36px !important;
    }

    .gallery-slider-edge.is-prev{ left:6px !important; }
    .gallery-slider-edge.is-next{ right:6px !important; }

    .demo-photo-viewport::before,
    .demo-photo-viewport::after{
        width:34px;
    }
}


/* =========================================================
   Homepage Gallery v2.2 - demo image reliability / clean crop
   ========================================================= */
.demo-photo-track{
    gap:8px !important;
}

.demo-photo-card{
    overflow:hidden;
    background:#111214;
}

.demo-photo-media{
    background:#111214 !important;
}

.demo-photo-media img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover !important;
    object-position:center !important;
}

@media (max-width:760px){
    .demo-photo-track{
        gap:6px !important;
    }
}


/* =========================================================
   Homepage Gallery v2.3
   Auto slider only + two equal CTA buttons
   ========================================================= */

.gallery-slider-edge{
    display:none !important;
}

.demo-photo-viewport::before,
.demo-photo-viewport::after{
    width:28px !important;
    opacity:.52;
}

.demo-album-actions{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
}

.gallery-full-demo-btn,
.gallery-register-btn{
    min-height:44px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    padding:0 14px !important;
    border:1px solid rgba(255,255,255,.15) !important;
    border-radius:10px !important;
    background:#1b1c1e !important;
    color:#f4f4f4 !important;
    font-size:10.5px !important;
    font-weight:800 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    box-shadow:none !important;
}

.gallery-full-demo-btn > span,
.gallery-full-demo-btn small,
.gallery-full-demo-btn strong{
    display:contents !important;
}

.gallery-full-demo-btn > i,
.gallery-register-btn > i{
    width:auto !important;
    height:auto !important;
    display:inline-block !important;
    border:0 !important;
    background:transparent !important;
    color:#ff7189 !important;
}

.gallery-full-demo-btn:hover,
.gallery-register-btn:hover{
    border-color:rgba(255,255,255,.28) !important;
    background:#232426 !important;
    transform:translateY(-1px);
}

@media (max-width:760px){
    .demo-album-actions{
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
    }

    .gallery-full-demo-btn,
    .gallery-register-btn{
        width:100% !important;
        padding:0 9px !important;
    }
}


/* =========================================================
   Homepage Gallery v2.4 - exact CTA + source note
   ========================================================= */
.demo-photo-source-note{
    display:flex;
    justify-content:flex-end;
    margin:-2px 1px 8px;
    color:#676b72;
    font-size:7px;
    font-weight:600;
}

.gallery-full-demo-btn,
.gallery-register-btn{
    min-height:44px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    padding:0 14px !important;
    border:1px solid rgba(255,255,255,.15) !important;
    border-radius:10px !important;
    background:#1b1c1e !important;
    color:#f4f4f4 !important;
    font-size:10.5px !important;
    font-weight:800 !important;
    line-height:1 !important;
    white-space:nowrap !important;
}

.gallery-full-demo-btn > span,
.gallery-full-demo-btn small,
.gallery-full-demo-btn strong{
    display:none !important;
}

html[data-theme="light"] .demo-photo-source-note{
    color:#8d8780;
}

html[data-theme="light"] .gallery-full-demo-btn,
html[data-theme="light"] .gallery-register-btn{
    border-color:rgba(31,27,23,.14) !important;
    background:#fff !important;
    color:#292521 !important;
}


/* =========================================================
   Homepage Gallery v2.5
   Hai CTA đồng bộ + không hiển thị nguồn ảnh giữa nội dung
   ========================================================= */

.demo-photo-source-note{
    display:none !important;
}

.demo-album-actions{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    flex-wrap:wrap !important;
}

.gallery-action-btn{
    min-height:44px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    padding:0 15px !important;
    border:1px solid rgba(255,255,255,.16) !important;
    border-radius:10px !important;
    background:#1b1c1e !important;
    color:#f4f4f4 !important;
    font-size:10.5px !important;
    font-weight:800 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    text-decoration:none !important;
    box-shadow:none !important;
    transition:background .18s ease,border-color .18s ease,transform .18s ease !important;
}

.gallery-action-btn i{
    color:#ff7189 !important;
    font-size:11px !important;
}

.gallery-action-btn:hover{
    border-color:rgba(255,255,255,.30) !important;
    background:#242527 !important;
    color:#fff !important;
    transform:translateY(-1px);
}

html[data-theme="light"] .gallery-action-btn{
    border-color:rgba(31,27,23,.14) !important;
    background:#fff !important;
    color:#292521 !important;
    box-shadow:0 5px 16px rgba(45,37,31,.035) !important;
}

html[data-theme="light"] .gallery-action-btn:hover{
    border-color:rgba(31,27,23,.24) !important;
    background:#f7f3ed !important;
    color:#171411 !important;
}

@media(max-width:760px){
    .demo-album-actions{
        width:100% !important;
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
    }

    .gallery-action-btn{
        width:100% !important;
        padding:0 10px !important;
    }
}
