/* Modern Gallery Page Styles - Grid/Masonry Hybrid */
:root {
    --color-primary: #f3743f;
    --color-text-dark: #101010;
    --color-text-gray: #666666;
    --color-border: #e0e0e0;
    --color-light-bg: #f9fafb;
}

/* Enhanced Hero */
.page-hero {
    padding: 60px 0;
    background-color: var(--color-light-bg);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.page-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-hero .breadcrumb {
    margin: 8px 0 0;
    font-size: 0.9rem;
    padding: 0;
}

.page-hero .breadcrumb-item a {
    color: var(--color-text-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.page-hero .breadcrumb-item a:hover {
    color: var(--color-primary);
}

.page-hero .breadcrumb-item.active {
    color: var(--color-text-dark);
    font-weight: 500;
}

/* Video Section */
.gallery-video-wrapper {
    margin-bottom: 50px;
    border-radius: 0;
    /* Square per detailed user request */
    overflow: hidden;
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
}

.gallery-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modern Gallery Grid */
.gallery-grid {
    display: grid;
    /* Responsive grid with auto-fill min 300px columns */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
    align-items: start;
    /* Prevents stretching to match tallest item */
}

/* Item Card */
.gallery-item {
    position: relative;
    background: #fff;
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 0;
    /* Strictly 0 */
}

.gallery-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: auto;
    /* Allow natural height */
    display: flex;
    flex-direction: column;
}

/* Hover State */
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    /* Soft lift shadow */
    border-color: transparent;
}

/* Image Wrapper */
.gallery-img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    line-height: 0;
}

.gallery-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Zoom Effect */
.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.08);
    /* Might need overflow hidden on wrapper effectively */
}

/* Overlay Effect */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.zoom-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dark);
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    border-radius: 0;
}

.gallery-item:hover .zoom-icon {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Caption Section */
.gallery-caption {
    padding: 10px 15px;
    /* Reduced padding from 16px 20px */
    background: #fff;
    border-top: 1px solid var(--color-border);
    flex-grow: 0;
    display: flex;
    align-items: center;
}

.gallery-caption h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-dark);
    line-height: 1.4;
    transition: color 0.2s ease;
}

.gallery-item:hover .gallery-caption h5 {
    color: var(--color-primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-hero {
        padding: 40px 0;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .gallery-grid {
        gap: 16px;
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet */
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }

    .gallery-caption {
        padding: 12px 14px;
    }
}