/* =====================================================
   PBMIT Gallery Cards Widget
   File: assets/css/pbmit-gallery-cards.css
   ===================================================== */

/* ── Grid wrapper ── */
.pbmit-gallery-cards-wrap {
    display: grid;
    gap: var(--pbmit-gc-gap, 24px);
}

.pbmit-gallery-cards-wrap.pbmit-gc-cols-1 { grid-template-columns: repeat(1, 1fr); }
.pbmit-gallery-cards-wrap.pbmit-gc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pbmit-gallery-cards-wrap.pbmit-gc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pbmit-gallery-cards-wrap.pbmit-gc-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ── */
.pbmit-gc-item {
    min-width: 0; /* prevent grid blowout */
}

.pbmit-gc-box {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pbmit-gc-box:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* ── Image box ── */
.pbmit-gc-img-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--pbmit-gc-ratio, 16/10);
    flex-shrink: 0;
}

.pbmit-gc-img-box a {
    display: block;
    width: 100%;
    height: 100%;
}

.pbmit-gc-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.pbmit-gc-box:hover .pbmit-gc-img-box img {
    transform: scale(1.06);
}

/* ── Overlay ── */
.pbmit-gc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pbmit-gc-box:hover .pbmit-gc-overlay {
    opacity: 1;
}

/* ── Category badge ── */
.pbmit-gc-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    white-space: nowrap;
}

/* ── Content ── */
.pbmit-gc-content {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Title ── */
.pbmit-gc-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 14px;
    color: #111;
}

.pbmit-gc-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pbmit-gc-title a:hover {
    color: var(--pbmit-global-color, #c8a96e);
}

/* ── Meta row ── */
.pbmit-gc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 13px;
    margin-top: auto;
}

.pbmit-gc-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #666;
    white-space: nowrap;
}

.pbmit-gc-meta-icon {
    font-size: 16px;
    color: #999;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.pbmit-gc-meta-value {
    font-weight: 500;
    color: #444;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .pbmit-gallery-cards-wrap.pbmit-gc-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .pbmit-gallery-cards-wrap.pbmit-gc-cols-3,
    .pbmit-gallery-cards-wrap.pbmit-gc-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pbmit-gc-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pbmit-gallery-cards-wrap.pbmit-gc-cols-2,
    .pbmit-gallery-cards-wrap.pbmit-gc-cols-3,
    .pbmit-gallery-cards-wrap.pbmit-gc-cols-4 {
        grid-template-columns: repeat(1, 1fr);
    }
}