.higallery-hide {
    display: none;
}

.mfp-close {
    top: 0;
}

@media(max-width: 600px) {
    .higallery-masonry.column-3 .higallery-masonry-item{
        width: 100%;
    }
}
/*Controller page*/
#galleries .higallery-masonry-item{
    padding: 5px;
}
#galleries .higallery-masonry-item > a {
    /* border: 1px solid #ccc; */
    display: block;
    position: relative; 
    overflow: hidden;
    border-radius: 3px;
}
#galleries .higallery-masonry-item img{
    max-width: 100%;
}
#galleries .higallery-masonry-item h4{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 11px 20px;
    margin: 0;
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    filter: alpha(opacity=90);
    font-family: "Noto Sans", sans-serif;
    transform: translateY(0%);
    -webkit-transition: transform 0.3s;
    -moz-transition: transform 0.3s;
    -ms-transition: transform 0.3s;
    -o-transition: transform 0.3s;
    transition: transform 0.3s;

    display: none;
}
/*End*/

.gallerys-container{
    clear: both;
}
.hig-gallery__block {
    margin-bottom: 30px;
}
.hig-gallery__block .image-content{
    padding: 5px;
    border-radius: 3px;
}
.hig-gallery__block .image-content > a{
    display: block;
    text-decoration: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.hig-gallery__block .image-content img{
    max-width: 100%;
    height: auto;
}
.higallery-image-container .caption{
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% - 10px);
    padding: 11px 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    filter: alpha(opacity=90);
    font-family: "Noto Sans", sans-serif;
    transform: translateY(100%);
    -webkit-transition: transform 0.3s;
    -moz-transition: transform 0.3s;
    -ms-transition: transform 0.3s;
    -o-transition: transform 0.3s;
    transition: transform 0.3s;
    margin-left: 4px;
    z-index: 991;
}
.higallery-image-container .caption span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.higallery-image-container:hover .caption {
    transform: translateY(0%);
}

/* .higallery-loader,
.hi-gallery-ajax-loader {
    width: 60px;
    height: 60px;
    background: url(../img/loader.gif) no-repeat;
    margin: 0 auto;
}

@media ( -webkit-min-device-pixel-ratio : 1.5) {
   .higallery-loader,
   .hi-gallery-ajax-loader {
        background: url(../img/loader@2x.gif) no-repeat;
        background-size: 60px 60px;
    }
} */

.hig-gallery__block {
    margin: 15px 0;
}
.hig-gallery__block-title{
    margin-bottom: 20px;
}

.higallery-image-container {
    position: relative;
    overflow: hidden;
}
.higallery-image-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
}
.higallery-image-actions i {
    margin: 0 5px;
    color: #fff;
    font-size: 30px;
}
.hi-gallery-link-icon {
    color: #fff;
}
.higallery-image-bg {
    position: absolute;
    margin: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    z-index: 99;
    transition: opacity 0.3s ease;
    border-radius: 3px;
}
.higallery-image-container:hover .higallery-image-actions,
.higallery-image-container:hover .higallery-image-bg {
    opacity: 1;
}

.hi-gallery-image-skeleton {
    width: 100%;
    padding: 16px;
    border-radius: 4px;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
  
/* Base styles for skeleton elements */
.hi-gallery-image-skeleton-header,
.hi-gallery-image-skeleton-line {
    background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
  
  /* Header skeleton */
  .hi-gallery-image-skeleton-header {
    width: 100%;
    height: 100px;
    border-radius: 8px;
  }
  
  /* Line skeletons */
  .hi-gallery-image-skeleton-line {
    width: 100%;
    height: 16px;
  }
  
  .hi-gallery-image-skeleton-line.short {
    width: 60%;
  }
  
  /* Animation */
  @keyframes shimmer {
    0% {
      background-position: -200% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }

.hi-gallery-img {
    display: none; /* Initially hide the image */
    width: 100%;
    height: auto;
}

.higallery-actions {
    text-align: center;
    margin: 20px 10px;
}

.higallery-dot-pulse-loader {
    position: relative;
    left: -9999px;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #9880ff;
    color: #9880ff;
    box-shadow: 9999px 0 0 -5px;
    animation: dot-pulse 1.5s infinite linear;
    animation-delay: 0.25s;

    margin: 0 auto;
  }
.higallery-dot-pulse-loader::before, .higallery-dot-pulse-loader::after {
    content: "";
    display: inline-block;
    position: absolute;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #9880ff;
    color: #9880ff;
}
.higallery-dot-pulse-loader::before {
    box-shadow: 9984px 0 0 -5px;
    animation: dot-pulse-before 1.5s infinite linear;
    animation-delay: 0s;
}
.higallery-dot-pulse-loader::after {
    box-shadow: 10014px 0 0 -5px;
    animation: dot-pulse-after 1.5s infinite linear;
    animation-delay: 0.5s;
}
  
@keyframes dot-pulse-before {
    0% {
      box-shadow: 9984px 0 0 -5px;
    }
    30% {
      box-shadow: 9984px 0 0 2px;
    }
    60%, 100% {
      box-shadow: 9984px 0 0 -5px;
    }
}
@keyframes dot-pulse {
    0% {
      box-shadow: 9999px 0 0 -5px;
    }
    30% {
      box-shadow: 9999px 0 0 2px;
    }
    60%, 100% {
      box-shadow: 9999px 0 0 -5px;
    }
}
@keyframes dot-pulse-after {
    0% {
      box-shadow: 10014px 0 0 -5px;
    }
    30% {
      box-shadow: 10014px 0 0 2px;
    }
    60%, 100% {
      box-shadow: 10014px 0 0 -5px;
    }
}

.gallery-image-block {
    display: flex;
    flex-wrap: wrap;
}


.higallery-mobile-column-1 .higallery-masonry-item {
    width: 100%;
}
.higallery-mobile-column-2 .higallery-masonry-item {
    width: 50%;
}
.higallery-mobile-column-3 .higallery-masonry-item {
    width: 33%;
}
.higallery-mobile-column-4 .higallery-masonry-item {
    width: 25%;
}
.higallery-mobile-column-5 .higallery-masonry-item {
    width: 20%;
}
.higallery-mobile-column-6 .higallery-masonry-item {
    width: 16.6%;
}

@media (min-width: 576px) {
    .higallery-tablet-column-1 .higallery-masonry-item {
        width: 100%;
    }
    .higallery-tablet-column-2 .higallery-masonry-item {
        width: 50%;
    }
    .higallery-tablet-column-3 .higallery-masonry-item {
        width: 33%;
    }
    .higallery-tablet-column-4 .higallery-masonry-item {
        width: 25%;
    }
    .higallery-tablet-column-5 .higallery-masonry-item {
        width: 20%;
    }
    .higallery-tablet-column-6 .higallery-masonry-item {
        width: 16.6%;
    }
}

@media (min-width: 992px) {
    .higallery-column-1 .higallery-masonry-item {
        width: 100%;
    }
    .higallery-column-2 .higallery-masonry-item {
        width: 50%;
    }
    .higallery-column-3 .higallery-masonry-item {
        width: 33%;
    }
    .higallery-column-4 .higallery-masonry-item {
        width: 25%;
    }
    .higallery-column-5 .higallery-masonry-item {
        width: 20%;
    }
    .higallery-column-6 .higallery-masonry-item {
        width: 16.6%;
    }
}

/* Social Share */
.higallery-share-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}
.higallery-share-btn .hi-gallery-share-icon {
    color: #fff;
    font-size: 30px;
    margin: 0 5px;
}
.higallery-share-popover {
    position: absolute;
    z-index: 10050;
    background: rgba(0, 0, 0, 0.92);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    gap: 6px;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    opacity: 1;
    transition: opacity 0.2s ease;
}
.higallery-share-popover.higallery-hide {
    opacity: 0;
    pointer-events: none;
}
.higallery-share-popover--fixed {
    position: fixed;
}
.higallery-share-popover::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid rgba(0, 0, 0, 0.92);
}

.higallery-share-popover__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    padding: 0;
    outline: none;
}
.higallery-share-popover__btn:hover {
    transform: scale(1.1);
}
.higallery-share-popover__btn[data-platform="facebook"]:hover {
    background: #1877F2;
}
.higallery-share-popover__btn[data-platform="x"]:hover {
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.higallery-share-popover__btn[data-platform="pinterest"]:hover {
    background: #E60023;
}
.higallery-share-popover__btn[data-platform="whatsapp"]:hover {
    background: #25D366;
}
.higallery-share-popover__btn[data-platform="telegram"]:hover {
    background: #0088cc;
}
.higallery-share-popover__btn[data-platform="email"]:hover {
    background: #6c757d;
}
.higallery-share-popover__btn[data-platform="copylink"]:hover {
    background: #6c757d;
}

/* Lightbox Overlay Actions */
.mfp-figure {
    position: relative;
}
.higallery-lightbox-actions {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.mfp-figure:hover .higallery-lightbox-actions,
.higallery-lightbox-actions:focus-within {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.higallery-lightbox-actions__caption {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    cursor: default;
    max-height: 1.4em;
    transition: max-height 0.35s ease, white-space 0s 0.35s;
}
.higallery-lightbox-actions:hover .higallery-lightbox-actions__caption {
    white-space: normal;
    max-height: 40em;
    transition: max-height 0.35s ease, white-space 0s;
}
.higallery-lightbox-actions__buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}
.higallery-lightbox-actions__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    padding: 0;
    outline: none;
    text-decoration: none;
    line-height: 1;
}
.higallery-lightbox-actions__btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}
.higallery-lightbox-actions__btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}
@media (hover: none) {
    .higallery-lightbox-actions {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
    .mfp-img-mobile .higallery-lightbox-actions {
        bottom: 0;
    }
}
@media (max-width: 576px) {
    .higallery-lightbox-actions {
        padding: 10px 12px;
    }
    .higallery-lightbox-actions__btn {
        width: 44px;
        height: 44px;
    }
    .higallery-lightbox-actions__caption {
        font-size: 13px;
    }
}

.higallery-copied-tooltip {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 10051;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.higallery-copied-tooltip--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 576px) {
    .higallery-share-popover {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: 14px 14px 0 0;
        justify-content: center;
        padding: 16px 10px 20px;
        gap: 12px;
        transform: translateY(0);
    }
    .higallery-share-popover.higallery-hide {
        transform: translateY(100%);
        opacity: 0;
    }
    .higallery-share-popover::after {
        display: none;
    }
    .higallery-share-popover__btn {
        width: 44px;
        height: 44px;
    }
}
/* Video items */
.hi-gallery-video {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    background: #000;
}

/* Audio items */
.hi-gallery-audio-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
    min-height: 160px;
    gap: 10px;
}
.hi-gallery-audio-icon {
    color: #007da5;
}
.hi-gallery-audio-title {
    font-size: 13px;
    color: #333;
    text-align: center;
    margin: 0;
}
.hi-gallery-audio {
    width: 100%;
    max-width: 320px;
}

/* PDF items */
.hi-gallery-pdf-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff5f5;
    border-radius: 4px;
    min-height: 160px;
    text-decoration: none;
    gap: 8px;
    transition: background 0.2s ease;
}
.hi-gallery-pdf-wrapper:hover {
    background: #ffe8e8;
}
.hi-gallery-pdf-icon {
    position: relative;
    color: #e53935;
}
.hi-gallery-pdf-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #e53935;
    padding: 1px 4px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}
.hi-gallery-pdf-filename {
    font-size: 12px;
    color: #555;
    text-align: center;
    margin: 0;
    word-break: break-word;
}
