/* .trip-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.trip-item {
    width: calc(33.33% - 15px);
    position: relative;
    margin-right: 15px;
}

a.gallery-box {
    display: inline-flex;
    height: 100%;
    width: 100%;
}

a.gallery-box img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
} */
body.gallery-no-scroll {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ─── Open / close keyframes ────────────────────────────── */
@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes overlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@keyframes modalOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.88) translateY(30px);
    }
}

/* Image / video swap fade when navigating prev ↔ next */
@keyframes mediaIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* ─── Overlay wrapper ────────────────────────────────────── */
.gallery-box-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 100vw;
    z-index: 5555;
    background: rgba(522, 522, 522, .3);
    backdrop-filter: blur(20px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    /* open animation */
    animation: overlayIn 0.25s ease forwards;
}

/* closing state — triggered by JS adding .closing class */
.gallery-box-wrapper.closing {
    animation: overlayOut 0.22s ease forwards;
    pointer-events: none; /* block accidental clicks during exit */
}

/* ─── Inner card ─────────────────────────────────────────── */
.gallery-box-inner {
    background: #fff;
    max-height: 95vh;
    width: 1440px;
    max-width: 100%;
    display: flex;
    position: relative;
    /* open animation — spring curve gives a subtle bounce */
    animation: modalIn 0.35s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

.gallery-box-wrapper.closing .gallery-box-inner {
    animation: modalOut 0.22s ease forwards;
}

/* Each newly injected image / iframe fades in */
#gallery-image-url,
#gallery-video-url {
    animation: mediaIn 0.3s ease forwards;
}

span.gallery-box-close {
    position: absolute;
    background: rgba(522, 522, 522, .6);
    height: 40px;
    width: 40px;
    z-index: 5;
    left: 15px;
    top: 15px;
    cursor: pointer;
    border-radius: 50%;
    backdrop-filter: blur(20px);
}

span.gallery-box-close:before {
    content: '';
    display: inline-block;
    height: calc(100% - 10px);
    width: 2px;
    background: #f52f6e;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 50%;
}

span.gallery-box-close:after {
    content: '';
    display: inline-block;
    height: calc(100% - 10px);
    width: 2px;
    background: #f52f6e;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 50%;
}

.gallery-box-inner .gallery-image {
    position: relative;
    width: 65%;
    height: 60dvh;
    min-height: 60dvh;
}

.gallery-box-inner .gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Compact circular nav buttons — appear on parent hover so they never
   block pointer events to the image/video when not hovered */
.gallery-box-inner .gallery-image span.prev-img,
.gallery-box-inner .gallery-image span.next-img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 48px;
    width: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none; /* transparent to clicks when invisible — lets video controls through */
    transition: opacity 0.2s linear, transform 0.15s ease, background 0.15s ease;
    z-index: 2;
    font-size: 14px;
}

.gallery-box-inner .gallery-image span.prev-img { left: 14px; }
.gallery-box-inner .gallery-image span.next-img { right: 14px; }

/* Show on parent hover — both arrows become clickable */
.gallery-box-inner .gallery-image:hover span.prev-img,
.gallery-box-inner .gallery-image:hover span.next-img {
    opacity: 1;
    pointer-events: auto;
}

/* Scale + pink tint on direct hover */
.gallery-box-inner .gallery-image:hover span.prev-img:hover,
.gallery-box-inner .gallery-image:hover span.next-img:hover {
    background: rgba(245, 47, 110, 0.85);
    transform: translateY(-50%) scale(1.12);
}

/* Expand-to-full-size button — top-right, same hover-reveal treatment as the nav arrows */
.gallery-box-inner .gallery-image span.zoom-img {
    position: absolute;
    top: 14px;
    right: 14px;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s linear, transform 0.15s ease, background 0.15s ease;
    z-index: 2;
    font-size: 14px;
}

.gallery-box-inner .gallery-image:hover span.zoom-img {
    opacity: 1;
    pointer-events: auto;
}

.gallery-box-inner .gallery-image:hover span.zoom-img:hover {
    background: rgba(245, 47, 110, 0.85);
    transform: scale(1.12);
}

/* ─── Full-size image zoom overlay ──────────────────────────── */
.image-zoom-wrapper {
    position: fixed;
    inset: 0;
    z-index: 6666;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: overlayIn 0.2s ease forwards;
}

.image-zoom-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    animation: mediaIn 0.25s ease forwards;
}

.image-zoom-close {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    height: 44px;
    width: 44px;
    top: 20px;
    right: 20px;
    cursor: pointer;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.image-zoom-close:before,
.image-zoom-close:after {
    content: '';
    display: inline-block;
    height: calc(100% - 14px);
    width: 2px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
}

.image-zoom-close:before { transform: translate(-50%, -50%) rotate(45deg); }
.image-zoom-close:after  { transform: translate(-50%, -50%) rotate(-45deg); }

.gallery-comment {
    /* overflow-y: auto; */
    padding: 25px;
    width: 35%;
    position: relative;
}

/* Video thumbnail placeholder — dark tile behind the play icon */
span.video-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    position: absolute;
    inset: 0;
}

span.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 56px;
    width: 56px;
    background: rgba(215, 0, 0, 0.85);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 20px rgba(215, 0, 0, 0.5);
}

.trip-item.trip-gallery:hover span.video-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(215, 0, 0, 1);
}

span.video-icon i {
    color: #fff;
    font-size: 22px;
    margin-left: 3px; /* optical centre for play triangle */
}

.gallery-image iframe,
.gallery-image .yt-poster,
.gallery-image video {
    height: 100%;
    width: 100%;
}

/* YouTube thumbnail poster */
.yt-poster {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    cursor: default;
}
.yt-poster-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.88;
    display: block;
    z-index: 0;
}
.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(245, 47, 110, 0.92);
    border: none;
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);
    padding-left: 4px;
}
.yt-poster:hover .yt-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: #f52f6e;
}
.yt-watch-link {
    position: absolute;
    bottom: 14px;
    right: 16px;
    z-index: 2;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease;
}
.yt-watch-link:hover { background: rgba(0,0,0,0.88); color: #fff; }

.gallery-comment h2.primary-heading.blog {
    word-wrap: break-word;
}

.comment-item.reply {
    width: 100%;
}

@media screen and (max-width: 1024px) {
    .gallery-box-inner .gallery-image {
        width: 60%;
    }

    .gallery-comment {
        width: 40%;
    }
}

@media screen and (max-width: 900px) {
    .gallery-box-inner {
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-wrap: wrap;
        overflow-y: auto;
    }

    .gallery-box-inner .gallery-image {
        height: 40dvh;
        position: relative;
        width: 100%;
    }

    .gallery-comment {
        padding: 5px 25px;
        width: 100%;
        height: 60dvh;
        overflow-y: unset;
    }

    #comment {
        height: 40px;
        padding: 10px;
    }

    .gallery-comment h2.primary-heading {
        margin-bottom: 5px;
        font-size: 22px;
    }

    /* On mobile, always show compact nav arrows (no hover available) */
    .gallery-box-inner .gallery-image span.prev-img,
    .gallery-box-inner .gallery-image span.next-img {
        opacity: 1;
        pointer-events: auto;
        width: 38px;
        height: 38px;
    }

    section {
        margin-top: 15px;
    }

    .comment-area {
        width: calc(100% - 55px);
    }

    .comment-area {
        width: calc(100% - 65px);
    }

    .reply-heading {
        padding: 5px 0 0 10px;
    }

    span.gallery-box-close {
        position: unset;
        position: fixed;
    }
}

@media screen and (max-width: 991px) {
    div#trip-wrapper {
        display: flex;
        flex-wrap: wrap;
    }

    #trip-wrapper .trip-item {
        width: calc(50% - 15px);
    }

    #gallery-comment .form-group {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    #trip-wrapper .trip-item {
        width: calc(100%);
    }
}
