#gallery-detail-page {
    min-height: 100%;
    overflow-x: hidden;
}

#gallery-detail-page #weird-container-for-footer {
    min-height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

#gallery-detail-page #root-view-post-generic {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    overflow-x: hidden;
}

#gallery-detail-page footer {
    margin-top: auto;
    padding-top: 100px;
}

#gallery-detail-page #image-entries-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    margin-right: -8px;
    overflow-x: hidden;
}

#gallery-detail-page .localize-hebrew #image-entries-container {
    flex-direction: row-reverse;
}

#gallery-detail-page .image-entry-inner-container {
    position: relative;
    height: 100%;
    /*display: flex;*/
    flex-direction: column;
    justify-content: space-between;
    margin-right: 8px;
}

#gallery-detail-page .image-entry-inner-container > a {
    display: none;
}

#gallery-detail-page .image-loaded .image-entry-inner-container > a {
    display: inline;
}

#gallery-detail-page .image-entry-container {
    width: 380px;
    padding: 0;
    margin-bottom: 8px;
}

#gallery-detail-page .image-entry-img {
    position: relative;
    max-width: 100%;
    object-fit: contain;
    max-height: 92vh;
    width: 100%;
}

#gallery-detail-page .image-entry-img-container {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#gallery-detail-page .image-loaded .image-entry-img-container {
    position: relative;
}

#gallery-detail-page .image-entry-caption-container {
    text-align: center;
    color: #ccc;
    padding: 0 4px;
    white-space: pre-wrap;
    font-size: 18px;
}

#gallery-detail-page .margin-bottom-5 {
    margin-bottom: 5px;
}

#gallery-detail-page .margin-bottom-0 {
    margin-bottom: 0;
}

#gallery-detail-page .localize-english .image-entry-caption-container {
    font-family: Raleway, serif;
}

#gallery-detail-page .localize-hebrew .image-entry-caption-container {
    font-family: Alef, serif;
    direction: rtl;
}

#gallery-detail-page .localize-hebrew .post-header-description {
    font-family: Alef, serif;
    direction: rtl;
    text-align: right;
}

#gallery-detail-page .localize-hebrew .back-button {
    font-family: Alef, serif;
    direction: rtl;
    text-align: right;
}

#gallery-detail-page #post-header-container {
    text-align: center;
    margin-bottom: 50px;
}

#gallery-detail-page .post-header-title {
    font-family: Montserrat, serif;
    padding: 0 13px;
}

#gallery-detail-page .post-header-description {
    font-family: Raleway, serif;
    color: #bbbbbb;
    text-align: left;
    padding: 0 33px;
    white-space: break-spaces;
}

#gallery-detail-page .featured-entry {
    max-width: unset;
    width: 100%;
    flex: 0 0 100%;
}

/*sm*/
@media (max-width: 575px) {
    #gallery-detail-page .featured-entry-mobile {
        max-width: unset;
        width: 100%;
        flex: 0 0 100%;
    }
}

/*sm*/
@media (min-width: 576px) {
    #gallery-detail-page .image-entry-inner-container {
        margin-right: 8px;
    }

    #gallery-detail-page .image-entry-container {
        margin-bottom: 8px;
    }

    #gallery-detail-page #image-entries-container {
        margin-right: -8px;
    }

    #gallery-detail-page .featured-entry-mobile {}

    #gallery-detail-page .featured-entry-pc {
        max-width: unset;
        width: 100%;
        flex: 0 0 100%;
    }
}

/*md*/
@media (min-width: 768px) {

    #gallery-detail-page .image-entry-caption-container {
        font-size: 21px;
    }
}

/*lg*/
@media (min-width: 992px) {

}

/*xl*/
@media (min-width: 1200px) {
}

/* ─────────────────────────────────────────────────────────────────────────────
   YouTube Video Support
   ───────────────────────────────────────────────────────────────────────────── */

#gallery-detail-page .youtube-entry .image-entry-img-container {
    position: relative;
}

#gallery-detail-page .youtube-thumbnail-container {
    position: relative;
    width: 100%;
}

#gallery-detail-page .youtube-thumbnail {
    width: 100%;
    height: auto;
    display: block;
}

#gallery-detail-page .youtube-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#gallery-detail-page .youtube-play-icon {
    width: 68px;
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

#gallery-detail-page .youtube-entry:hover .youtube-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

#gallery-detail-page .youtube-entry .youtube-thumbnail-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

/* YouTube inline embed (when playing in grid) */
#gallery-detail-page .youtube-embed-inline {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

#gallery-detail-page .youtube-embed-inline iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#gallery-detail-page .youtube-thumbnail-container {
    cursor: pointer;
}
