/* Gallery Container Styles */
.business-gallery-container {
    width: 100%;
    margin: 20px 0;
}

/* Featured Image Section */
.featured-image-section {
    margin-bottom: 30px;
}

.featured-image-section h4 {
    margin-bottom: 15px;
    font-weight: 600;
}

.featured-image-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.featured-image {
    border-radius: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

.featured-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.featured-image-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* Gallery Section */
.gallery-section {
    margin-top: 30px;
}

.gallery-section h4 {
    margin-bottom: 20px;
    font-weight: 600;
}

/* Gallery Grid with CSS Columns (Masonic Layout) */
.gallery-row {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
}

.gallery-column {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.gallery-image-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.gallery-image-wrapper:hover {
    transform: translateY(-2px);
}

.gallery-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: opacity 0.3s ease;
    display: block;
}

.gallery-thumbnail:hover {
    opacity: 0.9;
}

.gallery-image-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.featured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .gallery-row {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-row {
        column-count: 2;
        column-gap: 15px;
    }

    .gallery-column {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-row {
        column-count: 1;
        column-gap: 0;
    }

    .gallery-column {
        margin-bottom: 20px;
    }
}

/* Gallery Modal Specific Styles */
.gallery-modal .modal-content.gallery-modal-content {
    background-color: #000;
    border: none;
    border-radius: 10px;
}

.gallery-modal .modal-header {
    background-color: #000;
    border-bottom: none;
    padding: 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.gallery-modal .modal-body {
    background-color: #000;
    padding: 20px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Modal Styles */
.modal-body {
    position: relative;
    padding: 0;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    width: auto;
    border-radius: 10px;
    transition: opacity 0.25s ease;
    object-fit: contain;
}

.gallery-modal-image.changing {
    opacity: 0;
}

.gallery-modal .photo-caption {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    transition: opacity 0.25s ease;
}

.photo-caption {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0 20px;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    transition: opacity 0.25s ease;
}

.photo-caption.changing {
    opacity: 0;
}

/* Gallery Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 1050;
    font-size: 18px;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev-btn {
    left: 15px;
}

.gallery-next-btn {
    right: 15px;
}

/* Modal Header Close Button */
.modal-header {
    border-bottom: none;
    padding: 15px;
    position: relative;
}

.gallery-modal .close-color {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1051;
}

.gallery-modal .close-color:hover {
    color: #ccc;
}

.close-color {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1051;
}

.close-color:hover {
    color: #000;
}

/* No Gallery Message */
.no-gallery {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* Animation Classes for Smooth Transitions */
.gallery-thumbnail,
.featured-image,
.gallery-image-wrapper {
    transition: all 0.3s ease;
}

/* Loading States */
.gallery-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus States for Accessibility */
.gallery-thumbnail:focus,
.featured-image:focus,
.gallery-nav-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .gallery-image-label,
    .featured-image-label {
        background: #000;
        border: 1px solid #fff;
    }

    .featured-badge {
        background: #000;
        border: 1px solid #fff;
    }

    .gallery-nav-btn {
        background: #000;
        border: 2px solid #fff;
    }
}