/* =============================================
   WP Gallery — Gallery grid & cards
   ============================================= */

.wp-gallery-shortcode {
    width: 100%;
}

.wp-gallery-archive,
.wp-gallery-tax {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.wp-gallery-archive h1,
.wp-gallery-tax h1 {
    margin-bottom: 20px;
}

.wp-gallery-tax__desc {
    margin-bottom: 20px;
    color: var(--wpg-color-text-muted);
}

.wp-gallery-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( var(--wpg-min-col-width, 240px), 1fr ) );
    gap: var(--wpg-gap-lg);
    margin-bottom: 24px;
}

/* =============================================
   Card
   ============================================= */

.wp-gallery-card {
    border: 1px solid var(--wpg-color-border);
    border-radius: var(--wpg-radius-md);
    overflow: hidden;
    background: var(--wpg-color-bg);
    transition: box-shadow 0.15s ease;
}

.wp-gallery-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Image */
.wp-gallery-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--wpg-color-bg-soft);
    margin: 0;
}

.wp-gallery-card__figcaption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wp-gallery-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.wp-gallery-card__img:hover img {
    transform: scale(1.04);
}

/* Zoom icon */
.wp-gallery-card__zoom {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.wp-gallery-card__img:hover .wp-gallery-card__zoom {
    opacity: 1;
}

/* Body */
.wp-gallery-card__body {
    padding: 10px 12px;
    display: grid;
    gap: var(--wpg-gap-sm);
}

.wp-gallery-card__title {
    font-size: var(--wpg-font-base);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.wp-gallery-card__title a {
    text-decoration: none;
    color: inherit;
}

.wp-gallery-card__title a:hover {
    text-decoration: underline;
}

.wp-gallery-card__cats {
    font-size: var(--wpg-font-sm);
    color: var(--wpg-color-text-faint);
}

.wp-gallery-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.wp-gallery-card__votes {
    font-size: var(--wpg-font-md);
    color: #e74c3c;
}

/* =============================================
   Author page
   ============================================= */

.wp-gallery-author {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.wp-gallery-author__header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--wpg-color-border);
}

.wp-gallery-author__avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: block;
}

.wp-gallery-author__name {
    margin: 0 0 8px;
    font-size: 1.6rem;
}

.wp-gallery-author__bio {
    margin: 0 0 12px;
    color: var(--wpg-color-text-muted);
    font-size: var(--wpg-font-md);
    max-width: 560px;
}

.wp-gallery-author__counts {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--wpg-font-sm);
    color: var(--wpg-color-text-muted);
}

.wp-gallery-author__count-sep {
    color: var(--wpg-color-border-dark);
}

.wp-gallery-author__section {
    margin-bottom: 56px;
}

.wp-gallery-author__section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wpg-color-primary);
    display: inline-block;
}

/* Blog post list */
.wp-gallery-author__posts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.wp-gallery-author__post {
    display: grid;
    gap: 4px;
}

.wp-gallery-author__post-title {
    font-size: var(--wpg-font-base);
    font-weight: 600;
    color: var(--wpg-color-text);
    text-decoration: none;
}

.wp-gallery-author__post-title:hover {
    text-decoration: underline;
}

.wp-gallery-author__post-date {
    font-size: var(--wpg-font-sm);
    color: var(--wpg-color-text-muted);
}

.wp-gallery-author__post-excerpt {
    margin: 4px 0 0;
    font-size: var(--wpg-font-md);
    color: var(--wpg-color-text-muted);
}

.wp-gallery-author__empty {
    color: var(--wpg-color-text-muted);
    font-size: var(--wpg-font-md);
}

@media ( max-width: 600px ) {
    .wp-gallery-author__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .wp-gallery-author__bio {
        max-width: 100%;
    }

    .wp-gallery-author__counts {
        justify-content: center;
    }
}

/* =============================================
   Pagination
   ============================================= */

.wp-gallery-pagination {
    margin-top: var(--wpg-gap-lg);
    text-align: center;
}

/* =============================================
   Single post
   ============================================= */

.wp-gallery-single {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.wp-gallery-single__title {
    margin-bottom: 12px;
}

.wp-gallery-single__meta {
    margin-bottom: 15px;
    color: var(--wpg-color-text-muted);
    font-size: var(--wpg-font-md);
    display: flex;
    gap: 10px;
    align-items: center;
}

.wp-gallery-single__meta-sep {
    color: var(--wpg-color-separator);
}

.wp-gallery-single__image {
    margin-bottom: 20px;
}

.wp-gallery-single__image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--wpg-radius-sm);
}

.wp-gallery-single__content {
    margin-bottom: 20px;
}

.wp-gallery-single__tax {
    margin-bottom: 20px;
    font-size: var(--wpg-font-md);
}

.wp-gallery-single__categories {
    margin-bottom: var(--wpg-gap-sm);
}

.wp-gallery-single__vote {
    margin-top: 10px;
}

/* =============================================
   GLightbox — description overrides
   ============================================= */

.glightbox-clean .gslide-description {
    background: #1a1a1a;
}

.glightbox-clean .gslide-title {
    color: #f0f0f0;
}

.glightbox-clean .gslide-desc {
    color: #b0b0b0;
}
