/* JK Inspirational Galleries - Frontend Styles */

.jk-ig-gallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.jk-ig-gallery-description {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.jk-ig-error {
    color: #d63638;
    padding: 20px;
    background: #fcf0f1;
    border-radius: 4px;
}

/* Featured Section */
.jk-ig-featured-section {
    margin-bottom: 50px;
}

.jk-ig-section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
}

.jk-ig-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.jk-ig-featured-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.jk-ig-featured-image-wrapper {
    position: relative;
    padding-top: 75%;
    background: #f5f5f5;
}

.jk-ig-featured-image-wrapper img {
    position: absolute;
    margin:0 !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.jk-ig-featured-item:hover img {
    transform: scale(1.05);
}

.jk-ig-featured-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 15px 4px;
    background: linear-gradient(transparent, rgba(77, 157, 224, 0.92));
    border-bottom: 4px solid #E53935;
    color: #1a1a1a;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    opacity: 0.65;
    transition: all 0.3s ease;
}

.jk-ig-featured-item:hover .jk-ig-featured-caption {
    opacity: 1;
}

/* Subcategories */
.jk-ig-subcategories {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.jk-ig-subcategory {
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

.jk-ig-subcategory:last-child {
    border-bottom: none;
}

.jk-ig-subcategory-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #333;
}

.jk-ig-subcategory-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Carousel */
.jk-ig-carousel-wrapper {
    position: relative;
}

.jk-ig-carousel-viewport {
    overflow: hidden;
}

.jk-ig-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.jk-ig-slide {
    flex: 0 0 auto;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.jk-ig-carousel-wrapper {
    touch-action: pan-y;
}

.jk-ig-dragging {
    cursor: grabbing !important;
}

.jk-ig-dragging .jk-ig-slide-inner {
    pointer-events: none;
}

.jk-ig-slide-inner {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: transparent;
   
    cursor: pointer;
    z-index: 1;
}

.jk-ig-slide-inner:hover {
    z-index: 2;
}

.jk-ig-slide-inner img {
    width: 100%;
    height: 100%;
    margin:0 !important;

    object-fit: contain;
    transition: transform 0.3s ease;
}

.jk-ig-slide:hover img {
    transform: scale(1.05);
}

.jk-ig-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 10px 3px;
    background: rgba(77, 157, 224, 0.92);
    border-bottom: 3px solid #E53935;
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
    opacity: 0.65;
    transition: all 0.3s ease;
}

.jk-ig-slide-inner:hover .jk-ig-slide-caption {
    opacity: 1;
}

/* Carousel Arrows - Base */
.jk-ig-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Triangle arrows via CSS borders (no HTML characters) */
.jk-ig-arrow-prev::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 10px solid currentColor;
}

.jk-ig-arrow-next::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid currentColor;
}

/* Style: Default (simple circles) */
.jk-ig-arrow-default .jk-ig-arrow {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s, opacity 0.25s;
}

.jk-ig-arrow-default .jk-ig-arrow:hover {
    background: rgba(0,0,0,0.8);
}

.jk-ig-arrow-default .jk-ig-arrow-prev { left: 8px; }
.jk-ig-arrow-default .jk-ig-arrow-next { right: 8px; }

/* Style: Modern (pill with white border and shadow) */
.jk-ig-arrow-modern .jk-ig-arrow {
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.25s ease, box-shadow 0.2s ease;
}

.jk-ig-arrow-modern .jk-ig-arrow:hover {
    background: rgba(0,0,0,0.85);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.jk-ig-arrow-modern .jk-ig-arrow-prev {
    left: 12px;
    border-radius: 50% 8px 8px 50%;
}

.jk-ig-arrow-modern .jk-ig-arrow-next {
    right: 12px;
    border-radius: 8px 50% 50% 8px;
}

.jk-ig-arrow-modern .jk-ig-arrow-prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.jk-ig-arrow-modern .jk-ig-arrow-next:hover {
    transform: translateY(-50%) translateX(3px);
}

/* Style: Minimal (thin arrows, no background) */
.jk-ig-arrow-minimal .jk-ig-arrow {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: rgba(0,0,0,0.5);
    font-size: 28px;
    line-height: 1;
    transition: color 0.2s, opacity 0.25s;
}

.jk-ig-arrow-minimal .jk-ig-arrow:hover {
    color: rgba(0,0,0,0.9);
}

.jk-ig-arrow-minimal .jk-ig-arrow-prev { left: 8px; }
.jk-ig-arrow-minimal .jk-ig-arrow-next { right: 8px; }

/* Arrows on hover only: hidden until the carousel is hovered */
.jk-ig-arrows-hover .jk-ig-arrow {
    opacity: 0;
    pointer-events: none;
}

.jk-ig-arrows-hover:hover .jk-ig-arrow,
.jk-ig-arrows-hover .jk-ig-arrow:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Carousel Dots */
.jk-ig-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.jk-ig-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: background 0.2s;
}

.jk-ig-dot.active,
.jk-ig-dot:hover {
    background: #333;
}

/* Galleries List */
.jk-ig-galleries-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.jk-ig-galleries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.jk-ig-gallery-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.jk-ig-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.jk-ig-card-image-wrapper {
    position: relative;
    padding-top: 65%;
    background: #f5f5f5;
    overflow: hidden;
}

.jk-ig-card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin: 0 !important;
}

.jk-ig-gallery-card:hover img {
    transform: scale(1.05);
}

.jk-ig-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.jk-ig-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jk-ig-gallery-card:hover .jk-ig-card-overlay {
    opacity: 1;
}

.jk-ig-card-overlay span {
    color: white;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 4px;
    font-weight: 500;
}

.jk-ig-card-content {
    padding: 5px 20px 20px;
}

.jk-ig-card-content h3 {
    margin: 10px 0 10px;
    font-size: 1.2em;
    color: #333;
    text-align:center;
}

.jk-ig-card-content p {
    margin: 0 0 10px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.jk-ig-card-count {
    font-size: 0.85em;
    color: #999;
}

/* Responsive */
@media (max-width: 1024px) {
    .jk-ig-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .jk-ig-gallery {
        padding: 15px;
    }
    
    .jk-ig-carousel-viewport {
        margin: 0 35px;
    }
    
    .jk-ig-featured-grid {
        grid-template-columns: 1fr;
    }
    
    .jk-ig-arrow {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .jk-ig-galleries-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .jk-ig-carousel-viewport {
        margin: 0 30px;
    }
    
    .jk-ig-subcategory-title {
        font-size: 1.1em;
    }
}

/* Lightbox - Original hidden, global shown */
.jk-ig-gallery > .jk-ig-lightbox {
    display: none !important;
}

#jk-ig-global-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#jk-ig-global-lightbox .jk-ig-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
}

#jk-ig-global-lightbox .jk-ig-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.5);
    border: 2px solid rgba(0,0,0,0.6);
    border-radius: 50%;
    color: rgba(0,0,0,0.85);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1000001;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#jk-ig-global-lightbox .jk-ig-lightbox-close:hover {
    background: rgba(0,0,0,0.15);
    transform: scale(1.1);
}

#jk-ig-global-lightbox .jk-ig-lightbox-prev,
#jk-ig-global-lightbox .jk-ig-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.08);
    border: 2px solid rgba(0,0,0,0.6);
    color: rgba(0,0,0,0.85);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    z-index: 1000001;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#jk-ig-global-lightbox .jk-ig-lightbox-prev:hover,
#jk-ig-global-lightbox .jk-ig-lightbox-next:hover {
    background: rgba(0,0,0,0.15);
    transform: translateY(-50%) scale(1.1);
}

#jk-ig-global-lightbox .jk-ig-lightbox-prev {
    left: 30px;
}

#jk-ig-global-lightbox .jk-ig-lightbox-next {
    right: 30px;
}

#jk-ig-global-lightbox .jk-ig-lightbox-content {
    position: relative;
    z-index: 1000000;
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#jk-ig-global-lightbox .jk-ig-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

#jk-ig-global-lightbox .jk-ig-lightbox-caption {
    color: rgba(0,0,0,0.85);
    margin-top: 20px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    max-width: 800px;
    padding: 14px 28px;
    letter-spacing: 0.3px;
}

/* Slide click cursor */
.jk-ig-slide[data-full-url] .jk-ig-slide-inner {
    cursor: pointer;
}

/* Featured item click cursor */
.jk-ig-featured-item[data-full-url] {
    cursor: pointer;
}

@media (max-width: 768px) {
    #jk-ig-global-lightbox .jk-ig-lightbox-prev,
    #jk-ig-global-lightbox .jk-ig-lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    #jk-ig-global-lightbox .jk-ig-lightbox-prev {
        left: 10px;
    }
    
    #jk-ig-global-lightbox .jk-ig-lightbox-next {
        right: 10px;
    }
    
    #jk-ig-global-lightbox .jk-ig-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    
    #jk-ig-global-lightbox .jk-ig-lightbox-caption {
        font-size: 14px;
        padding: 0 15px;
        margin-top: 15px;
    }
    
    #jk-ig-global-lightbox .jk-ig-lightbox-img {
        max-height: 75vh;
    }
}
