/* Children's Art Gallery (shortcode: [hfch_art_gallery]) */

.hfch-art-gallery-wrap {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Nunito Sans', -apple-system, sans-serif;
}

/* Safeguarding notice */
.hfch-art-gallery-safeguarding {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 28px;
    background: #fef6e0;
    border: 1px solid #fbe4ac;
    border-radius: 10px;
    color: #8a5a00;
    font-size: 0.875rem;
    line-height: 1.5;
}

.hfch-art-gallery-safeguarding svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #b07c00;
}

.hfch-art-gallery-safeguarding strong {
    display: block;
    margin-bottom: 2px;
}

.hfch-art-gallery-safeguarding p {
    margin: 0;
}

.hfch-art-gallery-safeguarding a {
    color: #1a4fa0;
    text-decoration: underline;
}

/* Filter pills */
.hfch-art-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}

.hfch-art-gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    font-family: 'Nunito Sans', -apple-system, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hfch-art-gallery-filter:hover {
    border-color: #1a4fa0;
    color: #1a4fa0;
}

.hfch-art-gallery-filter.is-active {
    background: #1a4fa0;
    border-color: #1a4fa0;
    color: #ffffff;
}

.hfch-art-gallery-filter-count {
    font-weight: 400;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Masonry grid */
.hfch-art-gallery-grid {
    column-count: 3;
    column-gap: 18px;
}

.hfch-art-gallery-empty {
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
    padding: 48px 16px;
}

/* Cards */
.hfch-art-gallery-card {
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #f3f4f6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hfch-art-gallery-card:hover,
.hfch-art-gallery-card:focus-visible {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
}

.hfch-art-gallery-card:focus-visible {
    outline: 3px solid #1a4fa0;
    outline-offset: 2px;
}

.hfch-art-gallery-card-image {
    position: relative;
}

.hfch-art-gallery-card-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Category badge */
.hfch-art-gallery-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: #1a4fa0;
    color: #ffffff;
    z-index: 1;
}

.hfch-art-gallery-badge-nature {
    background: #2e9e5b;
    color: #ffffff;
}

.hfch-art-gallery-badge-family {
    background: #e8341c;
    color: #ffffff;
}

.hfch-art-gallery-badge-feelings {
    background: #6b3fa0;
    color: #ffffff;
}

.hfch-art-gallery-badge-colour-pattern {
    background: #f7a600;
    color: #111111;
}

/* Frosted info panel */
.hfch-art-gallery-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hfch-art-gallery-card-desc {
    font-size: 0.875rem;
    color: #374151;
    margin: 0 0 4px;
    line-height: 1.4;
}

.hfch-art-gallery-card-meta {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0;
}

/* Load More */
.hfch-art-gallery-load-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.hfch-art-gallery-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid #1a4fa0;
    border-radius: 999px;
    background: transparent;
    font-family: 'Nunito Sans', -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a4fa0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hfch-art-gallery-load-more svg {
    transition: transform 0.15s ease;
}

.hfch-art-gallery-load-more:hover {
    background: #1a4fa0;
    color: #ffffff;
}

.hfch-art-gallery-load-more.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Lightbox */
.hfch-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hfch-lightbox.is-open {
    display: flex;
}

.hfch-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    padding: 4px 12px;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.hfch-lightbox-close:hover {
    opacity: 1;
}

.hfch-lightbox-prev,
.hfch-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    padding: 8px 14px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.hfch-lightbox-prev:hover,
.hfch-lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.22);
}

.hfch-lightbox-prev {
    left: 16px;
}

.hfch-lightbox-next {
    right: 16px;
}

.hfch-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 85vh;
}

.hfch-lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.hfch-lightbox-caption {
    text-align: center;
    margin-top: 16px;
    max-width: 600px;
}

.hfch-lightbox-desc {
    font-family: 'Nunito Sans', -apple-system, sans-serif;
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.4;
}

.hfch-lightbox-meta {
    font-family: 'Nunito Sans', -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hfch-art-gallery-grid {
        column-count: 2;
    }

    .hfch-lightbox-prev {
        left: 8px;
    }

    .hfch-lightbox-next {
        right: 8px;
    }

    .hfch-lightbox-prev,
    .hfch-lightbox-next {
        font-size: 2rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .hfch-art-gallery-grid {
        column-count: 1;
    }

    .hfch-art-gallery-filters {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hfch-art-gallery-card {
        transition: none;
    }

    .hfch-art-gallery-load-more svg {
        transition: none;
    }
}
