/*album mode old*/
.gallery {
margin-left: -6px !important;
margin-left: -0.42857rem !important; }
.gallery .gallery-item {
  margin: 0 0 12px 0;
  margin: 0 0 0.85714rem 0;
  padding-left: 10px;
  padding-left: 0.71429rem;
  margin-bottom: 0;
  }
  .gallery  .gallery-item div{
    font-size: 18px !important;
  }
  .gallery .gallery-item img {
    display: block; }
.gallery .gallery-icon img {
  width: 100%;
  border: 0 !important; }
.gallery .gallery-caption {
  padding: 0;
  margin: 0;
  line-height: 1.5; }
.post-article .gallery {
    margin: 0;
    padding: 0;
}
.post-article .gallery:after {
    display: block;
    content: "";
    clear: both;
}
.post-article .gallery .gallery-item {
    position: relative;
    float: left;
    margin: 0;
    padding: 2px;
}
.gallery-caption {
    display: none;
}
body.mfp-zoom-out-cur .mfp-bg, body.mfp-zoom-out-cur .mfp-wrap {
    z-index: 9999999999;
}
.mfp-title {
    font-size: 16px !important;
}
.mfp-counter {
    width: auto;
    left: auto;
    font-size: 12px !important;
}

/*album mode 2021*/
/* .top-sticky-mfp-ad {
    background-color: rgba(0,0,0,0.8)!important;
} */
._page_ .gallery{text-align: center;}
body.mfp-zoom-out-cur .mfp-bg{
    opacity: 0.9 !important;
}
body.mfp-zoom-out-cur .mfp-gallery .mfp-image-holder .mfp-figure {
    /* height: calc(var(--vh, 1vh) * 100 - 100px); */
    height: 100%;
    display: grid;
    place-content: center;
}
body.mfp-zoom-out-cur .mfp-container .mfp-figure figure{
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    display: block;
    align-items: center;
    justify-content: center;
}
.mfp-figure:after,body.mfp-zoom-out-cur .mfp-figure:after{
    background: transparent;
    box-shadow:unset;
}
body.mfp-zoom-out-cur .mfp-container {
    /* height: calc(100vh - 100px); */
    /* height:calc(var(--vh) * 100 - 100px); */
    top: 100px;
    position: fixed;
    width: 100%;
    height: calc(100% - 100px);
    left: 0;
    /*top: 0;*/
    /*background: rgba(0,0,0,.6);*/
    display: block;
    padding-left: 0;
    padding-right: 0;
}
body.mfp-zoom-out-cur .mfp-container:before{
    content: unset;
}
.mfp-wrap.mfp-gallery.mfp-ready .mfp-content{
    height:100%;
    top:unset;
    bottom: unset;
    display: block;
}
body.mfp-zoom-out-cur .mfp-counter {
    top: 0;
    left: 0;
    display: inline-block;
    position: relative;
    float: unset;
}

body.mfp-zoom-out-cur .mfp-image-holder .mfp-close,
body.mfp-zoom-out-cur .mfp-iframe-holder .mfp-close {
    top: 10px;
}

body.mfp-zoom-out-cur .mfp-title {
    padding-right: 0;
    overflow: hidden;
    max-height: 36px;
    display: -webkit-box;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.noscroll {
    overflow: hidden;
    touch-action: none;
}

body.mfp-zoom-out-cur .mfp-close-btn-in .mfp-close {
    color: #fff;
    top: -33px;
}

body.mfp-zoom-out-cur .mfp-close-btn-in .mfp-figure .mfp-close {
    top: 0;
    position: relative;
    float: right;
    right: 0;
    display: inline-block;
    margin: 0;
    padding: 0;
    line-height: 0;
    height: 20px;
    width: auto;
}
body.mfp-zoom-out-cur img.mfp-img{
    padding: 0;
    margin-top: -16px;
}
@media (min-width: 900px) {
body.mfp-zoom-out-cur img.mfp-img{
    padding: 0;
    margin-top: unset!important;
    max-height: 100%!important;
    max-width: 100%!important;
}
body.mfp-zoom-out-cur .mfp-container .mfp-figure figure{
    display: flex;
    align-items: center;
}
}
.mfp-topbar {
    background-color: rgba(0,0,0,1);
    width: 100vw;
    display: block;    
    padding: 10px;
    margin: 0 -6px;
    position: fixed;
    left: calc((100vw - 100% - 12px) /2 *-1);
    /* bottom: calc(100% + (100vh - 100% - 180px) / 2);
    bottom: calc((100% + var(--vh, 1vh) * 100 - 100% -180px) / 2) */
    bottom: unset;
    top: 0px;
    /*padding-top: calc((100vh - 100%) /2 + 140px);
    padding-top: calc((var(--vh, 1vh) * 100 - 100%) /2 + 140px);*/
    padding-top: 110px; 
}
body.mfp-zoom-out-cur .mfp-bottom-bar{
    background-color: rgba(0,0,0,1);
    width: 100vw;
    display: block;
    padding: 10px;
    margin: 0 -6px;
    position: absolute;
    left: calc((100vw - 100% - 12px) /2 *-1);
    height: 56px;
    overflow: unset;
    /* top: calc(100% + (100vh - 100% - 196px) / 2);
    top: calc(100% + (var(--vh, 1vh) * 100 - 100% - 196px) / 2); */
    top: unset;
    bottom: 0;
    color: #fff;
}
body.mfp-zoom-out-cur .mfp-arrow{
    transform: unset;
    opacity: unset;
}
@media (max-width: 899px) {
    body.mfp-zoom-out-cur img.mfp-img{
        /*margin-top: -16px;*/
        width: 100%;
        height: unset;
        position: absolute;
        padding: 0;
        margin: 0;    
        top: 50%;
        max-height: unset !important;
        max-width: unset !important;
        visibility:hidden;
        
    }
    body.mfp-zoom-out-cur .mfp-arrow{
        transform: unset;
        opacity: unset;
    }
    .mfp-topbar {
         /* bottom: calc(100% + (100vh - 100% - 216px) / 2);
         bottom: calc(100% + (var(--vh, 1vh) * 100 - 100% - 216px) / 2); */
         bottom: unset;
         top: 0px;
         /*padding-top: 142px; */
         padding-top: 110px;
    }
    /* body.mfp-zoom-out-cur .mfp-bottom-bar{ */
    body.mfp-zoom-out-cur .mfp-gallery .mfp-image-holder .mfp-figure figcaption{
        /* background-color: rgba(0,0,0,0.5); */
        width: 100vw;
        display: block;
        padding: 10px;
        margin: 0 -6px;
        position: absolute;
        left: calc((100vw - 100% - 12px) /2 *-1);
        height: 56px;
        /* top: calc(100% + (100vh - 100% - 196px) / 2);
        top: calc(100% + (var(--vh, 1vh) * 100 - 100%) /2 - 100px); */
        top: unset;
        bottom: 0;
    }
}
.post-article .gallery::before { 
    display: block; 
    content: '\25BC 點擊圖片放大\25BC';
    text-align: center;
}
.en-template .gallery::before { 
    content: '\25BC Click on the image to enlarge\25BC';
}

.mfp-ad-container {
    height: 100%;
    display: grid;
    place-content: center;
}
/*.mfp-bottom-bar:after {
    display: block;
    content: '';
    background-color: rgba(0,0,0,0.8);
    height: 100px;
    width: 100vw;
    top: 56px;
    margin-left: -10px;
    position: absolute;
}*/
.mfp-bottom-bar .mfp-title-arrow {
    position: absolute;
    bottom: 34px;
    line-height: 1;
    font-size: 12px;
    right: 0;
    width: 22px;
    height: 22px;
    padding: 5px;
    margin: 20px 0 20px 20px;
    fill: rgb(255, 255, 255);
    background-color: #000;
    text-align: center;
    vertical-align: middle;
    box-sizing: content-box;
    font-weight: bold;
}
.mfp-title-arrow.up,.mfp-title-arrow.down{ display: unset; }
.mfp-bottom-bar .no-arrow {display: none;}
.mfp-title-arrow.down {
    transform: rotate(180deg);
}
.mfp-ad-container .mfp-close {
    display: block !important;
    top: unset!important;
}
/* .top-sticky-mfp-ad{
    background-color: rgba(0,0,0,0.5);
} */
.top-sticky-mfp-ad>div>iframe{
    overflow: hidden !important;
    height: 100px !important;
}

/* CSS for jQuery More plugin v2.0.0. */
.more-hidden {
    display: none;
}
.more-link {
    margin-left: 1em;
    padding: 0.125em;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 0.25em;
    -moz-border-radius: 0.25em;
    -webkit-border-radius: 0.25em;
    text-decoration: none;
}
.more-link img {
    border: none;
}


body.mfp-zoom-out-cur .mfp-container .mfp-figure .mfp-topbar,
body.mfp-zoom-out-cur .mfp-container .mfp-figure figcaption{
    z-index: 2;
}
body.mfp-zoom-out-cur .mfp-container .mfp-figure figure{
    z-index: 1;
}

.hide{
    display: none;
}
@media (min-width: 900px){
    body.mfp-zoom-out-cur .mfp-container .mfp-figure figure {
    height: calc(100% - 96px)!important;
        margin-top: 40px;
    }
    }