/* ============================================================
   Turner-McCrary Photo Gallery — Public Styles
   Matches theme: Deep Navy / Gold / Cream
============================================================ */

/* Tabs */
.tmg-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(201,168,76,.18);
    padding-bottom: 0;
}
.tmg-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(245,237,214,.45);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 10px 16px;
    cursor: pointer;
    transition: color .2s, border-color .2s;
    margin-bottom: -1px;
}
.tmg-tab:hover { color: rgba(245,237,214,.8); }
.tmg-tab--active { color: #C9A84C; border-bottom-color: #C9A84C; }
.tmg-tab-count {
    display: inline-block;
    background: rgba(201,168,76,.15);
    color: rgba(201,168,76,.7);
    font-size: .65rem;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Grid */
.tmg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-auto-rows: 220px;
    gap: 12px;
}
.tmg-cell {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    background: #0a1520;
}
.tmg-cell--wide  { grid-column: span 2; }
.tmg-cell--tall  { grid-row:    span 2; }
.tmg-cell img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease, opacity .3s;
}
.tmg-cell:hover img { transform: scale(1.06); }
.tmg-cell-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(13,27,42,.85) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 14px 12px;
}
.tmg-cell:hover .tmg-cell-overlay { opacity: 1; }
.tmg-cell-caption {
    font-size: .8rem;
    color: rgba(245,237,214,.9);
    line-height: 1.4;
    margin-bottom: 3px;
}
.tmg-cell-album {
    font-size: .6rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #C9A84C;
    font-weight: 600;
}
.tmg-zoom-icon {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 1.1rem;
    opacity: .7;
}

/* Hidden cells (album filter) */
.tmg-cell--hidden {
    display: none !important;
}

/* Empty state */
.tmg-empty {
    text-align: center;
    padding: 80px 40px;
    color: rgba(245,237,214,.4);
}
.tmg-empty h3 {
    font-family: 'Playfair Display', serif;
    color: rgba(245,237,214,.6);
    margin-bottom: 10px;
}
.tmg-empty p { font-size: .9rem; line-height: 1.7; }

/* ── Lightbox ──────────────────────────────────────────── */
.tmg-lb-overlay {
    position: fixed; inset: 0;
    background: rgba(7,14,24,.96);
    z-index: 99998;
    backdrop-filter: blur(3px);
}
.tmg-lightbox {
    position: fixed; inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
}
.tmg-lb-stage {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
#tmg-lb-img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 12px 60px rgba(0,0,0,.7);
    transition: opacity .2s;
}
#tmg-lb-img.tmg-fade { opacity: 0; }
.tmg-lb-caption {
    color: rgba(245,237,214,.8);
    font-size: .85rem;
    line-height: 1.5;
    min-height: 1.2em;
}
.tmg-lb-counter {
    font-size: .68rem;
    color: rgba(245,237,214,.35);
    letter-spacing: .1em;
}
.tmg-lb-close {
    position: fixed; top: 20px; right: 24px;
    background: none; border: none;
    color: rgba(245,237,214,.6);
    font-size: 2.2rem; line-height: 1;
    cursor: pointer;
    transition: color .2s, transform .2s;
    z-index: 100000;
    padding: 0;
}
.tmg-lb-close:hover { color: #fff; transform: scale(1.15); }
.tmg-lb-prev, .tmg-lb-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(245,237,214,.7);
    font-size: 1.4rem; line-height: 1;
    width: 52px; height: 52px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, color .2s;
    z-index: 100000;
}
.tmg-lb-prev { left: 16px; }
.tmg-lb-next { right: 16px; }
.tmg-lb-prev:hover, .tmg-lb-next:hover {
    background: rgba(201,168,76,.25);
    color: #C9A84C;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
    .tmg-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
        gap: 6px;
    }
    .tmg-cell--wide  { grid-column: span 2; }
    .tmg-cell--tall  { grid-row: span 1; }
    .tmg-lightbox    { padding: 50px 16px; }
    .tmg-lb-prev { left: 6px; }
    .tmg-lb-next { right: 6px; }
}
@media (max-width: 420px) {
    .tmg-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    .tmg-cell--wide { grid-column: span 1; }
}
