/* =====================================================
   Azia Media Centre — Public Gallery  [azia_public_gallery]
   ===================================================== */
.ama-pg {
    --ama-pg-gold:   #c9a96e;
    --ama-pg-dark:   #1c2830;
    --ama-pg-muted:  #6b6b6b;
    --ama-pg-gap:    30px;
    --ama-pg-cols:   3;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}
.ama-pg *, .ama-pg *::before, .ama-pg *::after { box-sizing: border-box; }

/* ── Category tabs ───────────────────────────────── */
.ama-pg-tabs {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 4px;
}
.ama-pg-tabs li { margin: 0; padding: 0; list-style: none; }
.ama-pg-tab {
    appearance: none;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 4px 10px !important;
    margin: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px !important;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ama-pg-dark) !important;
    transition: color .2s ease;
}
.ama-pg-tab::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 12px;
    background: var(--ama-pg-gold);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.ama-pg-tab:hover { color: var(--ama-pg-gold) !important; }
.ama-pg-tab.is-active { font-weight: 700; }
.ama-pg-tab.is-active::after { transform: scaleX(1); }
.ama-pg-tab:focus-visible { outline: 1px dotted var(--ama-pg-gold); outline-offset: 2px; }

/* ── Grid ────────────────────────────────────────── */
.ama-pg-stage { position: relative; }
.ama-pg-grid {
    display: grid;
    grid-template-columns: repeat(var(--ama-pg-cols), minmax(0, 1fr));
    gap: var(--ama-pg-gap);
}
.ama-pg-item {
    position: relative;
    display: block;
    aspect-ratio: 500 / 387;
    overflow: hidden;
    background: #eee;
    text-decoration: none !important;
    cursor: pointer;
    animation: amaPgIn .35s ease both;
}
.ama-pg-item[hidden] { display: none !important; }
.ama-pg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}
.ama-pg-cap {
    position: absolute;
    inset: 0;
    padding: 10px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.ama-pg-item:hover .ama-pg-cap,
.ama-pg-item:focus-visible .ama-pg-cap { opacity: 1; }
.ama-pg-item:hover img { transform: scale(1.04); }

/* Touch devices: no hover, so keep the name visible on a soft gradient */
@media (hover: none) {
    .ama-pg-cap {
        opacity: 1;
        inset: auto 0 0 0;
        padding: 30px 12px 10px;
        background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0));
        font-size: 14px;
    }
}

@keyframes amaPgIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 992px) {
    .ama-pg { --ama-pg-gap: 20px; }
    .ama-pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .ama-pg { --ama-pg-gap: 15px; }
    .ama-pg-grid { grid-template-columns: 1fr; }
    .ama-pg-tabs { margin-bottom: 28px; }
}

/* ── Fancybox: same look as the login media centre ── */
:root {
    --f-button-bg:           rgba(28,40,48,0.85);
    --f-button-hover-bg:     #c9a96e;
    --f-button-color:        #ffffff;
    --f-button-hover-color:  #1c2830;
    --f-thumb-border-radius: 0;
}
