.img-gallery-page {
    background: #0f1219;
    color: #e8ecf4;
    min-height: 60vh;
}
.img-gallery-page .section-title h2 span { color: #6eb5ff; }
.img-gallery-hero {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
    gap: 28px; margin-bottom: 36px; padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.img-gallery-eyebrow {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; color: #6eb5ff; margin-bottom: 10px;
}
.img-gallery-hero h2 {
    font-size: clamp(28px, 4vw, 42px); color: #fff; margin: 0 0 10px; line-height: 1.2;
}
.img-gallery-hero h2 span { color: #6eb5ff; }
.img-gallery-hero p { color: #9aa8be; max-width: 560px; margin: 0; line-height: 1.7; font-size: 15px; }
.img-gallery-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.img-gallery-stat {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px; padding: 16px 22px; min-width: 110px; text-align: center;
}
.img-gallery-stat strong {
    display: block; font-size: 28px; font-weight: 800; color: #fff; line-height: 1;
}
.img-gallery-stat span { font-size: 12px; color: #8a96ad; margin-top: 6px; display: block; }

.img-gallery-toolbar {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: 16px; margin-bottom: 28px;
}
.img-gallery-filters {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.img-gallery-filter {
    border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
    color: #c5d0e0; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .25s ease;
}
.img-gallery-filter em {
    font-style: normal; opacity: .65; margin-left: 4px; font-size: 12px;
}
.img-gallery-filter:hover {
    border-color: rgba(110,181,255,.5); color: #fff;
}
.img-gallery-filter.active {
    background: linear-gradient(135deg, #307ad5, #1e5fad);
    border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(48,122,213,.35);
}
.img-gallery-view-hint { font-size: 13px; color: #7d8aa0; }
.img-gallery-view-hint i { margin-right: 6px; color: #6eb5ff; }

.img-gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
}
.img-gallery-item {
    opacity: 1; transform: scale(1);
    transition: opacity .35s ease, transform .35s ease;
    animation: galleryFadeIn .5s ease backwards;
    animation-delay: var(--delay, 0s);
}
.img-gallery-item.is-hidden {
    display: none;
}
.img-gallery-item.is-leaving {
    opacity: 0; transform: scale(.96);
}
.img-gallery-item.is-featured {
    grid-column: span 2;
    grid-row: span 2;
}
@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.img-gallery-link { display: block; height: 100%; text-decoration: none; color: inherit; }
.img-gallery-frame {
    position: relative; height: 100%; border-radius: 16px; overflow: hidden;
    background: #1a2030; border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.img-gallery-frame img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}
.img-gallery-item:hover .img-gallery-frame img { transform: scale(1.08); }
.img-gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(8,12,22,.92) 0%, rgba(8,12,22,.2) 45%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 22px; opacity: 0; transition: opacity .35s ease;
}
.img-gallery-item:hover .img-gallery-overlay { opacity: 1; }
.img-gallery-cat {
    display: inline-block; align-self: flex-start;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    background: rgba(110,181,255,.25); color: #b8d9ff; padding: 4px 10px; border-radius: 999px;
    margin-bottom: 8px;
}
.img-gallery-overlay h3 {
    font-size: 17px; color: #fff; margin: 0 0 6px; line-height: 1.35;
}
.img-gallery-overlay p { font-size: 13px; color: #b8c4d8; margin: 0 0 10px; line-height: 1.5; }
.img-gallery-zoom {
    position: absolute; top: 16px; right: 16px;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px;
    transform: scale(.8); opacity: 0; transition: all .3s ease;
}
.img-gallery-item:hover .img-gallery-zoom { transform: scale(1); opacity: 1; }

.img-gallery-empty {
    grid-column: 1 / -1; text-align: center; padding: 70px 20px;
    background: rgba(255,255,255,.03); border-radius: 16px;
    border: 1px dashed rgba(255,255,255,.1); color: #8a96ad;
}
.img-gallery-empty i { font-size: 48px; color: #4a5f80; margin-bottom: 16px; }
.img-gallery-empty h4 { color: #c5d0e0; margin-bottom: 8px; }

/* Lightbox caption enhancement */
.mfp-title { font-size: 15px; line-height: 1.5; padding-top: 8px; }

@media (max-width: 1199px) {
    .img-gallery-masonry { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
    .img-gallery-item.is-featured { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 767px) {
    .img-gallery-masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 10px; }
    .img-gallery-item.is-featured { grid-column: span 2; grid-row: span 1; }
    .img-gallery-hero { flex-direction: column; align-items: flex-start; }
    .img-gallery-stats { width: 100%; }
    .img-gallery-stat { flex: 1; min-width: 0; }
    .img-gallery-toolbar { flex-direction: column; align-items: stretch; }
    .img-gallery-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .img-gallery-filter { white-space: nowrap; flex-shrink: 0; }
}
@media (max-width: 479px) {
    .img-gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 220px; }
    .img-gallery-item.is-featured { grid-column: span 1; }
}
