﻿/* ============================================================
   GALLERY PAGE
   ============================================================ */

/* PAGE HEADER */
.gallery-page-header {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    background-color: var(--bank-maroon);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.gallery-page-header::before { display: none; }
.gallery-page-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.gallery-page-header .container {
    position: relative;
    z-index: 2;
}
.gallery-page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.3px;
}
.gallery-page-header p {
    font-size: 1.05rem;
    color: rgba(0,0,0,0.75);
    margin: 0;
}
.gallery-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(0,0,0,0.65);
    margin-top: 10px;
    flex-wrap: wrap;
}
.gallery-breadcrumb a { color: var(--bank-maroon); text-decoration: none; }
.gallery-breadcrumb a:hover { color: #111; }
.gallery-breadcrumb .sep { color: rgba(0,0,0,0.35); font-size: 0.7rem; }

/* SECTION NAV */
.gallery-section-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--page-bg);
    border-bottom: 2px solid #f0ebe4;
    box-shadow: 0 4px 16px rgba(61,7,16,0.06);
}
.gallery-section-nav .container {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 0;
    padding-bottom: 0;
}
.gallery-section-nav .container::-webkit-scrollbar { display: none; }
.gallery-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.gallery-nav-btn:hover { color: var(--bank-maroon); }
.gallery-nav-btn.active {
    color: var(--bank-maroon);
    border-bottom-color: var(--gold);
}
.gallery-nav-btn i { font-size: 1rem; }

/* GALLERY SECTIONS */
.gallery-content-section {
    padding: 72px 0;
    scroll-margin-top: 130px;
}
.gallery-content-section + .gallery-content-section {
    border-top: 1px solid #f0ebe4;
}
.gallery-section-header {
    margin-bottom: 40px;
}
.gallery-section-header .eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
}
.gallery-section-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 800;
    color: var(--bank-maroon);
    margin-bottom: 0;
}

/* GALLERY GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.gallery-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

/* GALLERY THUMB */
.gallery-thumb {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: #f0ebe4;
}
.gallery-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}
.gallery-grid.two-col .gallery-thumb img {
    height: 300px;
}
.gallery-thumb:hover img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61,7,16,0.43) 0%, rgba(61,7,16,0.15) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.35s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}
.gallery-thumb:hover .gallery-overlay {
    opacity: 1;
}
.gallery-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.3s, background 0.3s;
}
.gallery-thumb:hover .gallery-overlay-icon {
    transform: translate(-50%, -50%);
    background: rgba(180,140,60,0.7);
    border-color: var(--gold-light);
}
.gallery-caption-text {
    font-size: 0.78rem;
    color: #fff;
    line-height: 1.4;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* CUSTOM LIGHTBOX */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    cursor: default;
}
.gallery-lightbox.show { display: flex; }
.gallery-lightbox img {
    max-width: min(92vw, 1000px);
    max-height: 80vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 0 80px rgba(0,0,0,0.8);
}
.gallery-lightbox-caption {
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    margin-top: 16px;
    text-align: center;
    max-width: 700px;
    line-height: 1.5;
}
.lb-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 2rem;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}
.lb-close:hover { color: var(--gold-light); transform: scale(1.15); }
.lb-prev, .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: rgba(180,140,60,0.5); }
.lb-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}

/* SCROLL REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid.two-col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-grid.two-col { grid-template-columns: 1fr; }
    .gallery-thumb img,
    .gallery-grid.two-col .gallery-thumb img { height: 220px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

