.ag-636952f5-wrapper {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.ag-636952f5-category-section {
    display: flex;
    flex-direction: column;
}

.ag-636952f5-category-title {
    margin: 0 0 25px 0;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
}

.ag-636952f5-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.ag-636952f5-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    background: #111;
    aspect-ratio: 4/3;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ag-636952f5-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.ag-636952f5-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0.85;
}

.ag-636952f5-card:hover .ag-636952f5-cover {
    transform: scale(1.08);
    opacity: 0.6;
}

.ag-636952f5-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    box-sizing: border-box;
    text-align: left;
    color: #fff;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ag-636952f5-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.ag-636952f5-card:hover::before {
    opacity: 0.9;
}

.ag-636952f5-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ag-636952f5-count {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    width: fit-content;
}

/* Lightbox Styles */
body.admin-bar .ag-636952f5-lightbox {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .ag-636952f5-lightbox {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

.ag-636952f5-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-636952f5-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(5px);
}

.ag-636952f5-lightbox-content {
    position: relative;
    z-index: 10;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ag-636952f5-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border-radius: 4px;
    user-select: none;
}

.ag-636952f5-lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
}

.ag-636952f5-lightbox-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.ag-636952f5-lightbox-prev,
.ag-636952f5-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 11;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-636952f5-lightbox-prev:hover,
.ag-636952f5-lightbox-next:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-50%) scale(1.1);
}

.ag-636952f5-lightbox-prev {
    left: 30px;
}

.ag-636952f5-lightbox-next {
    right: 30px;
}

.ag-636952f5-lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    z-index: 11;
    font-family: sans-serif;
    font-size: 15px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 30px;
    letter-spacing: 2px;
    backdrop-filter: blur(5px);
}

/* Enhanced Mobile Styles */
@media (max-width: 767px) {
    .ag-636952f5-grid {
        /* Force single column layout on mobile */
        grid-template-columns: 1fr !important;
        gap: 25px;
    }
    
    .ag-636952f5-card {
        /* Ensure the card looks large and prominent */
        width: 100%;
        border-radius: 16px;
    }

    .ag-636952f5-category-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .ag-636952f5-title {
        font-size: 1.6rem;
    }

    .ag-636952f5-content {
        padding: 40px 20px 20px;
    }
    
    .ag-636952f5-lightbox-prev,
    .ag-636952f5-lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .ag-636952f5-lightbox-prev { left: 15px; }
    .ag-636952f5-lightbox-next { right: 15px; }
    
    .ag-636952f5-lightbox-close {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
}