/**
 * Photo Gallery Styles
 *
 * @package HaberPro
 */

/* Gallery Grid */
.haberpro-photo-gallery {
    margin: 30px 0;
    width: 100%;
}

.haberpro-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 0;
    padding: 0;
}

.haberpro-gallery-grid[data-columns="1"] {
    grid-template-columns: repeat(1, 1fr);
}

.haberpro-gallery-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.haberpro-gallery-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.haberpro-gallery-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.haberpro-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
    background-color: #f0f0f0;
}

.haberpro-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.haberpro-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.haberpro-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.haberpro-gallery-icon {
    font-size: 24px;
    color: #fff;
}

.haberpro-gallery-item:hover .haberpro-gallery-image {
    transform: scale(1.1);
}

.haberpro-gallery-item:hover .haberpro-gallery-overlay {
    opacity: 1;
}

/* Gallery Slider */
.haberpro-gallery-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.haberpro-gallery-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.haberpro-gallery-slide {
    display: none;
    position: relative;
    width: 100%;
}

.haberpro-gallery-slide.active {
    display: block;
}

.haberpro-gallery-slide-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: contain;
}

/* Slider Navigation */
.haberpro-gallery-prev,
.haberpro-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.haberpro-gallery-prev:hover,
.haberpro-gallery-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.haberpro-gallery-prev {
    left: 10px;
}

.haberpro-gallery-next {
    right: 10px;
}

/* Dots Navigation */
.haberpro-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.haberpro-gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.haberpro-gallery-dot.active,
.haberpro-gallery-dot:hover {
    background-color: #0073aa;
}

/* Lightbox */
.haberpro-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    cursor: pointer;
}

.haberpro-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.haberpro-lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.haberpro-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    padding: 10px;
}

.haberpro-lightbox-close:hover {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1024px) {
    .haberpro-gallery-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .haberpro-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .haberpro-gallery-grid[data-columns="3"],
    .haberpro-gallery-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .haberpro-gallery-prev,
    .haberpro-gallery-next {
        padding: 10px 15px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .haberpro-gallery-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .haberpro-gallery-item {
        aspect-ratio: 16/9;
    }
}

