/* ===========================
   Gallery Styles
   =========================== */

.gallery-section {
    width: 100%;
    background-color: #f8f9fa;
    padding: 40px 0;
    margin: 20px 0;
}

.gallery-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-items {
    display: flex;
    gap: 0;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.gallery-item {
    flex: 0 0 20%;
    position: relative;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #e0e0e0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.zoom-icon,
.video-icon {
    color: white;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.video-icon {
    font-size: 42px;
}

/* Gallery Controls */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    transform: translateY(-50%);
    padding: 0 15px;
    pointer-events: none;
}

.gallery-btn {
    pointer-events: all;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gallery-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.gallery-btn:active {
    transform: scale(0.95);
}

.gallery-btn:disabled,
.gallery-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.7);
}

.gallery-btn:disabled:hover,
.gallery-btn.disabled:hover {
    background: rgba(200, 200, 200, 0.7);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gallery-btn span {
    display: block;
}

/* Gallery Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-dots::-webkit-scrollbar {
    display: none;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot.active {
    background-color: #333;
    width: 30px;
    border-radius: 5px;
}

.dot:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ===========================
   Lightbox Modal Styles
   =========================== */

.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: zoomIn 0.3s ease;
}

.lightbox-media-host {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
}

.lightbox-image,
.lightbox-video {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-video {
    display: block;
    width: 90vw;
    height: 90vh;
    aspect-ratio: 16 / 9;
    background: #000;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ff6b6b;
    transform: scale(1.2);
}

.lightbox-close:active {
    transform: scale(0.9);
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .gallery-item {
        flex: 0 0 25%;
    }
    
    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .zoom-icon,
    .video-icon {
        font-size: 28px;
    }
    
    .video-icon {
        font-size: 32px;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .gallery-section {
        padding: 30px 0;
        margin: 15px 0;
    }
    
    .gallery-container {
        padding: 0 10px;
    }
    
    .gallery-item {
        flex: 0 0 50%;
    }
    
    .gallery-controls {
        padding: 0 10px;
    }
    
    .gallery-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .zoom-icon,
    .video-icon {
        font-size: 24px;
    }
    
    .video-icon {
        font-size: 28px;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .lightbox-image {
        max-height: 85vh;
    }
    
    .lightbox-video {
        width: 95vw;
        height: 85vh;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 32px;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .gallery-section {
        padding: 20px 0;
        margin: 10px 0;
    }
    
    .gallery-container {
        padding: 0 5px;
    }
    
    .gallery-item {
        flex: 0 0 100%;
    }
    
    .gallery-wrapper {
        border-radius: 0;
    }
    
    .gallery-controls {
        padding: 0 5px;
    }
    
    .gallery-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .zoom-icon,
    .video-icon {
        font-size: 20px;
    }
    
    .video-icon {
        font-size: 24px;
    }
    
    .gallery-dots {
        justify-content: flex-start;
        gap: 6px;
        margin-top: 15px;
        padding: 10px 4px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        width: 24px;
    }
    
    .lightbox-content {
        max-width: 98vw;
        max-height: 80vh;
        padding: 12px;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
    
    .lightbox-video {
        width: 98vw;
        height: 80vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 28px;
    }
}

/* Extra small Mobile (max 360px) */
@media (max-width: 360px) {
    .gallery-item {
        flex: 0 0 100%;
    }
    
    .gallery-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .zoom-icon,
    .video-icon {
        font-size: 16px;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .dot.active {
        width: 18px;
    }
}
