/* Custom Fullscreen Lightbox Styles */
.trail-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 26, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    animation: lightboxFadeIn 0.2s ease-out;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.trail-lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000001;
}

.trail-lightbox-close:hover {
    background: #d9381e;
    border-color: #d9381e;
    transform: scale(1.08);
}

.trail-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000001;
}

.trail-lightbox-nav.prev {
    left: 28px;
}

.trail-lightbox-nav.next {
    right: 28px;
}

.trail-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.trail-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.trail-lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.trail-lightbox-counter {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lightbox-trigger-img {
    cursor: zoom-in;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.lightbox-trigger-img:hover {
    transform: scale(1.015);
    filter: brightness(1.05);
}

/* Share Action Card Styles */
.share-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.share-social-btn.whatsapp { background: #25D366; color: #ffffff; }
.share-social-btn.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); color: #ffffff; }
.share-social-btn.twitter { background: #000000; color: #ffffff; }
.share-social-btn.facebook { background: #1877F2; color: #ffffff; }
.share-social-btn.copy { background: #ffffff; border: 1px solid #cbd5e1; color: #0f172a; cursor: pointer; }

.share-social-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.share-social-btn:active {
    transform: translateY(-1px) scale(0.96);
}

/* Custom Share Main Button */
.th-share-btn {
    background: #0a0a0a;
    color: #ffffff;
    border: none;
    border-radius: 40px;
    padding: 10px 22px 10px 14px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(10, 10, 10, 0.15);
    font-family: inherit;
    user-select: none;
}

.th-share-btn .th-share-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.th-share-btn:hover {
    background: #008060;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 128, 96, 0.32);
}

.th-share-btn:hover .th-share-icon-wrap {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(15deg);
}

.th-share-btn:active {
    transform: translateY(0) scale(0.97);
}

/* Activities & Highlights Pill Tags */
.trail-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #0f172a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.trail-tag-pill:hover {
    background: #008060;
    color: #ffffff;
    border-color: #008060;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.25);
}

.trail-tag-pill:hover .trail-tag-hash {
    color: #ffffff !important;
}

/* Responsive Layout Enhancements for Trail Detail Page */

/* Fix Gallery Grid minmax overflow on screens smaller than 380px */
.work-cl-multiimage {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
}

/* Metadata Item Block Responsiveness */
.single-work-item-block {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.single-work-item {
    flex: 1 1 130px !important;
    min-width: 110px !important;
}

/* Featured Cover Image Responsiveness */
.single-work-image-wrap img,
.single-work-image {
    width: 100% !important;
    max-height: 520px;
    object-fit: cover;
    border-radius: 12px;
}

/* Counter Milestone Block Responsiveness */
.work-counter-block {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.work-counter {
    flex: 1 1 140px !important;
    min-width: 120px !important;
}

/* Engagement & Share Action Card Responsiveness */
.trail-action-card {
    margin-top: 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.share-row-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.views-row-wrapper {
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Tablet & Mobile Media Queries */
@media (max-width: 768px) {
    .single-work-title {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }
    
    .single-work-image-wrap img,
    .single-work-image {
        max-height: 360px !important;
        border-radius: 10px !important;
    }

    .trail-action-card {
        padding: 16px 18px !important;
        border-radius: 14px !important;
    }

    .share-row-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .share-social-pills {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .work-cl-multiimage {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 12px !important;
    }

    .work-multiimage {
        height: 220px !important;
    }
}

@media (max-width: 576px) {
    .single-work-title {
        font-size: 24px !important;
    }

    .single-work-image-wrap img,
    .single-work-image {
        max-height: 260px !important;
    }

    .work-counter-block {
        gap: 12px !important;
    }

    .work-counter {
        flex: 1 1 100% !important;
        text-align: center;
        padding: 12px !important;
    }

    .trail-lightbox-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .trail-lightbox-nav {
        width: 42px;
        height: 42px;
    }

    .trail-lightbox-nav.prev {
        left: 12px;
    }

    .trail-lightbox-nav.next {
        right: 12px;
    }

    .share-social-btn {
        width: 38px;
        height: 38px;
    }

    .views-row-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .work-cl-multiimage {
        grid-template-columns: 1fr !important;
    }

    .share-social-pills {
        gap: 6px !important;
    }

    .share-social-btn {
        width: 36px;
        height: 36px;
    }
}
