/* Hedko Bunny Image Gallery v2.0.0 */

.hedko-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.hedko-gallery-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.hedko-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #1a5276;
}

.hedko-gallery-card a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.hedko-gallery-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hedko-gallery-card:hover .hedko-gallery-img-wrap img {
    transform: scale(1.05);
}

.hedko-gallery-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hedko-gallery-category {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #1a5276;
    letter-spacing: 0.6px;
    margin-bottom: 5px;
    display: inline-block;
}

.hedko-gallery-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #222;
    line-height: 1.4;
}

.hedko-gallery-notice {
    padding: 20px;
    background: #f0f4ff;
    border-left: 4px solid #1a5276;
    border-radius: 6px;
    color: #333;
    font-size: 15px;
}

/* Lightbox */
.hedko-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.admin-bar .hedko-lightbox-overlay {
    top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .hedko-lightbox-overlay {
        top: 46px;
    }
}

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

.hedko-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    object-fit: contain;
}

.hedko-lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hedko-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
    z-index: 2;
    padding: 0;
}

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

@media (max-width: 640px) {
    .hedko-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
