/**
 * Verses Theme - Gallery System Stylesheet
 *
 * Covers:
 * 1. /social/ Feed Photo Slider & Dynamic Caption Card
 * 2. Prothom Alo Style Single Gallery Photo Story
 * 3. Modern Gallery Archive Cards
 * 4. Fullscreen Lightbox & Touch Navigation
 */

/* ==========================================================================
   1. /SOCIAL/ FEED GALLERY SLIDER & CAPTION CARD
   ========================================================================== */

.verses-gallery-card-content {
    margin: 12px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verses-gallery-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.verses-gallery-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.verses-gallery-title a:hover {
    color: #8b5e3c;
}

.verses-gallery-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 6px;
}

.verses-gallery-slider-wrap {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #0f0d0c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.verses-gallery-slides-track {
    position: relative;
    width: 100%;
    min-height: 280px;
    max-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.verses-gallery-slide-item {
    display: none;
    position: relative;
    width: 100%;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.verses-gallery-slide-item.active {
    display: block;
    animation: fbGalleryFadeIn 0.3s ease;
}

@keyframes fbGalleryFadeIn {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* Ambient Blurred Backdrop for Portrait & Pillarboxed Images */
.verses-gallery-slide-backdrop {
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(28px) brightness(0.65) saturate(1.25);
    transform: scale(1.18);
    z-index: 1;
    pointer-events: none;
}

.verses-gallery-slide-item img.verses-gallery-slide-main,
.verses-gallery-slide-item img {
    position: relative;
    z-index: 2;
    max-height: 500px;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    user-select: none;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.45);
}

/* Top Pill Counter (১/৫) */
.verses-gallery-counter-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 5;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Navigation Arrows */
.verses-gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    color: #222;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.verses-gallery-nav-btn:hover {
    background: #fff;
    color: #8b5e3c;
    transform: translateY(-50%) scale(1.08);
}

.verses-gallery-nav-btn.prev-btn {
    left: 12px;
}

.verses-gallery-nav-btn.next-btn {
    right: 12px;
}

/* Dots Bar */
.verses-gallery-dots-bar {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 5;
}

.verses-gallery-dots-bar .gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}

.verses-gallery-dots-bar .gallery-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 6px;
}

/* Dynamic Caption Under Slider */
.verses-gallery-caption-box {
    background: #faf8f5;
    border: 1px solid rgba(139, 94, 60, 0.15);
    border-left: 3.5px solid #8b5e3c;
    border-radius: 8px;
    padding: 12px 16px;
    box-sizing: border-box;
}

.verses-gallery-caption-text {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 15px;
    line-height: 1.65;
    color: #2c2521;
    margin: 0;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   2. SINGLE GALLERY PHOTO STORY (PROTHOM ALO STYLE)
   ========================================================================== */

.single-gallery-container {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 20px;
}

.gallery-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 32px;
    align-items: start !important;
}

@media (min-width: 1025px) {
    .gallery-post-layout .post-sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 90px !important;
        align-self: start !important;
        width: 100% !important;
    }
}

.gallery-single-content {
    background: #fff;
    padding: 35px 40px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.gallery-category-badge-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.gallery-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #8b5e3c;
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    text-transform: uppercase;
}

.gallery-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 94, 60, 0.1);
    color: #8b5e3c;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}

.gallery-main-title {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 20px;
}

.gallery-meta-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #f0eae4;
    border-bottom: 1px solid #f0eae4;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.gallery-author-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-author-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #8b5e3c;
}

.gallery-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gallery-author-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.gallery-author-name:hover {
    color: #8b5e3c;
}

.gallery-publish-time {
    font-size: 12.5px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.gallery-share-btn.share-fb { background: #1877f2; }
.gallery-share-btn.share-wa { background: #25d366; }
.gallery-share-btn.share-tw { background: #000; }
.gallery-share-btn.share-copy { background: #6a3b29; }

.gallery-intro-lead {
    font-size: 17px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 30px;
    font-style: italic;
    background: #faf8f5;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 3px solid #8b5e3c;
}

/* Vertical Photo Stream */
.gallery-photo-stream {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 35px;
}

.gallery-photo-card {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-photo-badge-bar {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.gallery-num-pill {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.gallery-photo-frame {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #0f0d0c;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.gallery-photo-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-photo-frame:hover .gallery-photo-img {
    transform: scale(1.015);
}

.gallery-zoom-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-photo-frame:hover .gallery-zoom-badge {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-photo-caption {
    margin-top: 4px;
}

.gallery-photo-caption p {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2b2623;
    margin: 0;
    padding: 0 2px;
}

/* Tags, Navigation, Related Stories */
.gallery-tags-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #f0eae4;
    border-bottom: 1px solid #f0eae4;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.gallery-tags-wrap .tags-label {
    font-weight: 700;
    font-size: 14px;
    color: #4a3427;
}

.gallery-tag-pill {
    display: inline-block;
    background: #f7f3ee;
    color: #6a4430;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gallery-tag-pill:hover {
    background: #8b5e3c;
    color: #fff;
}

.gallery-nav-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.gallery-nav-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #faf8f5;
    border: 1px solid #f0eae4;
    padding: 16px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.gallery-nav-card:hover {
    background: #f5efe8;
    border-color: #8b5e3c;
    transform: translateY(-2px);
}

.gallery-nav-card.next {
    justify-content: flex-end;
    text-align: right;
}

.gallery-nav-card span {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.gallery-nav-card h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Related Photo Stories */
.gallery-related-section {
    margin-top: 40px;
    margin-bottom: 35px;
}

.gallery-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #8b5e3c;
    padding-bottom: 10px;
}

.gallery-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.gallery-related-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #faf8f5;
    border-radius: 10px;
    overflow: hidden;
    padding-bottom: 14px;
    border: 1px solid #eee8e0;
    transition: all 0.2s ease;
}

.gallery-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-color: #8b5e3c;
}

.gallery-related-thumb {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #111;
}

.gallery-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-related-card:hover .gallery-related-thumb img {
    transform: scale(1.04);
}

.related-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.gallery-related-card h4 {
    margin: 0;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: #222;
}

/* ==========================================================================
   3. GALLERY ARCHIVE PHOTO-CARD GRID
   ========================================================================== */

.gallery-archive-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ebe5df;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.gallery-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #8b5e3c;
}

.archive-card-thumb-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #111;
    display: block;
}

.archive-card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-archive-card:hover .archive-card-thumb-wrap img {
    transform: scale(1.05);
}

.gallery-card-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

/* ==========================================================================
   4. FULLSCREEN LIGHTBOX STYLES
   ========================================================================== */

.verses-fullscreen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.94);
    z-index: 999999;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    padding: 20px;
    overflow: hidden;
}

.lightbox-stage-backdrop {
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(45px) brightness(0.4) saturate(1.25);
    transform: scale(1.15);
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
    transition: background-image 0.3s ease;
}

.lightbox-top-bar {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    z-index: 10;
}

.lightbox-counter-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.lightbox-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: transform 0.2s ease;
}

.lightbox-close-btn:hover {
    transform: scale(1.15);
    color: #e67e22;
}

.lightbox-stage {
    position: relative;
    width: 100%;
    max-width: 1100px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-active-img {
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    user-select: none;
}

.lightbox-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-arrow.prev { left: 10px; }
.lightbox-nav-arrow.next { right: 10px; }

.lightbox-bottom-caption {
    width: 100%;
    max-width: 900px;
    text-align: center;
    color: #f1f1f1;
    font-family: 'Noto Serif Bengali', serif;
    font-size: 15.5px;
    line-height: 1.6;
    padding: 10px 15px 5px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .gallery-post-layout {
        grid-template-columns: 1fr;
    }
    .gallery-main-title {
        font-size: 28px;
    }
    .gallery-single-content {
        padding: 25px 20px;
    }
}

@media (max-width: 767px) {
    .gallery-main-title {
        font-size: 24px;
    }
    .gallery-related-grid {
        grid-template-columns: 1fr;
    }
    .gallery-nav-row {
        grid-template-columns: 1fr;
    }
    .verses-gallery-title {
        font-size: 18px;
    }
    .verses-gallery-slides-track {
        min-height: 220px;
        max-height: 380px;
    }
}
