/* Modern Gallery Styles */
:root {
    --gallery-gap: 10px;
    --gallery-radius: 8px;
    --gallery-transition: 0.3s;
    --gallery-bg-mobile: #ffffff;
    --gallery-text-mobile: #333333;
}

.section-padding.gallery-section {
    padding: 60px 0;
    background-color: #fff;
}

/* Only apply special background for mobile */
@media (max-width: 767px) {
    .section-padding.gallery-section {
        padding: 0;
        background-color: var(--gallery-bg-mobile);
    }
}

.gallery-header {
    padding: 15px 15px 10px;
    position: relative;
}

.gallery-breadcrumb {
    font-size: 14px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.gallery-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.gallery-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

@media (max-width: 767px) {
    .gallery-title {
        color: var(--gallery-text-mobile);
    }
}

.gallery-container {
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Regular grid layout for desktop */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 2px;
    padding: 0;
}

/* Masonry layout only for mobile */
@media (max-width: 767px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: var(--gallery-gap);
        padding: 0 var(--gallery-gap);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    break-inside: avoid;
    margin-bottom: 2px;
    border-radius: 4px;
    transition: transform var(--gallery-transition);
    /* Fixed height for desktop view */
    height: 200px;
}

.gallery-box {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: var(--gallery-radius);
    background-color: #000;
}

.gallery-img {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s;
}

/* Special layout for featured images */
.gallery-item.featured-tall {
    margin-bottom: var(--gallery-gap);
}

.gallery-item.featured-wide {
    margin-bottom: var(--gallery-gap);
}

/* Header with background image */
.gallery-hero {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    margin-bottom: var(--gallery-gap);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
    z-index: 1;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
}

/* Floating action button - only for mobile */
.floating-action {
    display: none;
}

/* Bottom navigation - only for mobile */
.bottom-nav {
    display: none;
}

/* Show floating action button and bottom nav only on mobile */
@media (max-width: 767px) {
    .floating-action {
        position: fixed;
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #25D366;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
        z-index: 1000;
    }
    
    .floating-action img {
        width: 30px;
        height: 30px;
    }
    
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: white;
        display: flex;
        padding: 10px 15px;
        border-top: 1px solid #eee;
        z-index: 100;
    }
}

/* Media queries for different screen sizes */
@media (min-width: 576px) and (max-width: 767px) {
    .gallery-masonry {
        column-count: 3;
    }
}

/* Desktop layout - use regular grid, not masonry */
@media (min-width: 768px) {
    .gallery-masonry {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 2px;
        padding: 0;
    }
    
    .gallery-item {
        break-inside: auto;
    }
    
    .gallery-hero {
        display: none;
    }
    
    /* Show the regular header for desktop */
    .banner-header {
        display: block !important;
    }
}

/* Gallery trust text styling */
.gallery-trust-text {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-top: 10px;
    font-weight: 300;
    font-style: italic;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .gallery-img img {
        height: 100%;
    }
}
