/* Gallery Wala Styles */

.gw-gallery-wrapper {
    width: 100%;
    position: relative;
}

.gw-gallery-container {
    margin: 0 auto;
    padding: 20px;
}

.gw-gallery-grid {
    display: grid;
    width: 100%;
}

.gw-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gw-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.4s ease;
}

.gw-gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gw-gallery-item:hover::before {
    opacity: 0.7;
}

/* Caption Overlay Styles */
.gw-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.gw-caption-overlay.active {
    transform: translateY(0);
}

.gw-caption-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.gw-caption-enabled .gw-gallery-item {
    cursor: pointer;
}

.gw-columns-1 { grid-template-columns: repeat(1, 1fr); }
.gw-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gw-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gw-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gw-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gw-columns-6 { grid-template-columns: repeat(6, 1fr); }

.gw-layout-basic .gw-gallery-grid {
    grid-auto-rows: 300px;
}

.gw-layout-classical .gw-gallery-grid {
    grid-auto-rows: 350px;
}

.gw-layout-classical .gw-gallery-item {
    background: #f5f5f5;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gw-layout-masonry .gw-gallery-grid {
    display: block;
    column-count: 3;
    column-gap: 15px;
}

.gw-layout-masonry .gw-gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    break-inside: avoid;
}

.gw-layout-masonry .gw-gallery-item img {
    height: auto;
}

.gw-layout-justified .gw-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.gw-layout-justified .gw-gallery-item {
    flex-grow: 1;
    margin: 5px;
    height: 250px;
}

.gw-layout-justified .gw-gallery-item img {
    min-width: 100%;
    max-width: 100%;
    object-fit: cover;
}

.gw-layout-mosaic .gw-gallery-grid {
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
}

.gw-layout-mosaic .gw-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gw-layout-mosaic .gw-item-wide {
    grid-column: span 2;
}

.gw-layout-mosaic .gw-item-tall {
    grid-row: span 2;
}

.gw-carousel-container {
    position: relative;
}

.gw-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.gw-layout-carousel .gw-gallery-item {
    flex: 0 0 auto;
    width: 400px;
    height: 300px;
    scroll-snap-align: start;
}

.gw-carousel-track::-webkit-scrollbar {
    height: 8px;
}

.gw-carousel-track::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gw-carousel-track::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.gw-carousel-prev,
.gw-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.gw-carousel-prev {
    left: 10px;
}

.gw-carousel-next {
    right: 10px;
}

.gw-carousel-prev:hover,
.gw-carousel-next:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.gw-slider-container {
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
}

.gw-slider-track {
    position: relative;
    width: 100%;
    height: 400px;
}

.gw-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.gw-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.gw-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.gw-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gw-slider-dot.active {
    background: rgba(255,255,255,1);
    transform: scale(1.3);
}

.gw-slider-prev,
.gw-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.gw-slider-prev {
    left: 10px;
}

.gw-slider-next {
    right: 10px;
}

.gw-slider-prev:hover,
.gw-slider-next:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.gw-layout-metro .gw-gallery-grid {
    grid-auto-rows: 200px;
}

.gw-layout-metro .gw-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gw-layout-pinterest .gw-gallery-grid {
    display: block;
    column-count: 4;
    column-gap: 15px;
}

.gw-layout-pinterest .gw-gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    break-inside: avoid;
    border-radius: 8px;
}

.gw-layout-pinterest .gw-gallery-item img {
    height: auto;
    border-radius: 8px;
}

.gw-layout-scattered .gw-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.gw-layout-scattered .gw-gallery-item {
    width: 250px;
    height: 250px;
    margin: 10px;
    transform: rotate(0deg);
    transition: all 0.3s ease;
}

.gw-layout-scattered .gw-gallery-item:nth-child(3n+1) {
    transform: rotate(-3deg);
}

.gw-layout-scattered .gw-gallery-item:nth-child(3n+2) {
    transform: rotate(3deg);
}

.gw-layout-scattered .gw-gallery-item:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.gw-layout-polaroid .gw-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.gw-layout-polaroid .gw-gallery-item {
    width: 280px;
    background: white;
    padding: 10px 10px 40px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transform: rotate(0deg);
}

.gw-layout-polaroid .gw-gallery-item:nth-child(odd) {
    transform: rotate(-2deg);
}

.gw-layout-polaroid .gw-gallery-item:nth-child(even) {
    transform: rotate(2deg);
}

.gw-layout-polaroid .gw-gallery-item:hover {
    transform: rotate(0deg) translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.gw-layout-polaroid .gw-gallery-item img {
    height: 250px;
}

.gw-layout-horizontal {
    overflow-x: auto;
    overflow-y: hidden;
}

.gw-layout-horizontal .gw-gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding-bottom: 10px;
}

.gw-layout-horizontal .gw-gallery-item {
    flex: 0 0 auto;
    width: 350px;
    height: 400px;
}

.gw-layout-horizontal .gw-gallery-grid {
    scrollbar-width: thin;
}

.gw-layout-horizontal .gw-gallery-grid::-webkit-scrollbar {
    height: 8px;
}

.gw-layout-horizontal .gw-gallery-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gw-layout-horizontal .gw-gallery-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.gw-hover-zoom .gw-gallery-item:hover img {
    transform: scale(1.15);
}

.gw-hover-zoom-out .gw-gallery-item img {
    transform: scale(1.15);
}

.gw-hover-zoom-out .gw-gallery-item:hover img {
    transform: scale(1);
}

.gw-hover-slide .gw-gallery-item:hover img {
    transform: translateX(10px);
}

.gw-hover-rotate .gw-gallery-item:hover img {
    transform: rotate(5deg) scale(1.05);
}

.gw-hover-blur .gw-gallery-item:hover img {
    filter: blur(3px);
}

.gw-hover-grayscale .gw-gallery-item img {
    filter: grayscale(0);
}

.gw-hover-grayscale .gw-gallery-item:hover img {
    filter: grayscale(100%);
}

@media (max-width: 1024px) {
    .gw-layout-masonry .gw-gallery-grid,
    .gw-layout-pinterest .gw-gallery-grid {
        column-count: 3;
    }
    
    .gw-columns-4 { grid-template-columns: repeat(3, 1fr); }
    .gw-columns-5 { grid-template-columns: repeat(3, 1fr); }
    .gw-columns-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .gw-layout-masonry .gw-gallery-grid,
    .gw-layout-pinterest .gw-gallery-grid {
        column-count: 2;
    }
    
    .gw-columns-3 { grid-template-columns: repeat(2, 1fr); }
    .gw-columns-4 { grid-template-columns: repeat(2, 1fr); }
    .gw-columns-5 { grid-template-columns: repeat(2, 1fr); }
    .gw-columns-6 { grid-template-columns: repeat(2, 1fr); }
    
    .gw-layout-carousel .gw-gallery-item {
        width: 300px;
        height: 250px;
    }
    
    .gw-layout-horizontal .gw-gallery-item {
        width: 280px;
        height: 350px;
    }
}

@media (max-width: 480px) {
    .gw-layout-masonry .gw-gallery-grid,
    .gw-layout-pinterest .gw-gallery-grid {
        column-count: 1;
    }
    
    .gw-columns-2 { grid-template-columns: repeat(1, 1fr); }
    .gw-columns-3 { grid-template-columns: repeat(1, 1fr); }
    .gw-columns-4 { grid-template-columns: repeat(1, 1fr); }
    .gw-columns-5 { grid-template-columns: repeat(1, 1fr); }
    .gw-columns-6 { grid-template-columns: repeat(1, 1fr); }
    
    .gw-gallery-container {
        padding: 10px;
    }
}
