/* Özbil Makine – Proje Galerisi (data/gallery.json ile çalışır) */
[data-project-gallery-section][hidden] { display: none !important; }
.pg-section {
    padding: 56px 0 64px;
    border-top: 1px solid #f4f4f5;
}
@media (min-width: 1024px) { .pg-section { padding: 80px 0 88px; } }
.pg-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}
.pg-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 768px) { .pg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .pg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.pg-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #e4e4e7;
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
}
.pg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    color: transparent;
    transition: transform .5s ease;
}
.pg-item:hover img, .pg-item:focus-visible img { transform: scale(1.08); }
.pg-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.45), transparent 55%);
    opacity: 0;
    transition: opacity .3s ease;
}
.pg-item:hover::after { opacity: 1; }
.pg-item:focus-visible { outline: 3px solid #c8370b; outline-offset: 2px; }

.pg-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(24, 24, 27, .82);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Galeri sayfası filtreleri */
.pg-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}
.pg-filters[hidden] { display: none; }
.pg-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #d4d4d8;
    border-radius: 999px;
    background: #fff;
    color: #27272a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}
.pg-filter:hover { border-color: #c8370b; color: #c8370b; }
.pg-filter.is-active { background: #18181b; border-color: #18181b; color: #fff; }
.pg-filter-count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0,0,0,.07);
    font-size: 12px;
    text-align: center;
}
.pg-filter.is-active .pg-filter-count { background: #c8370b; color: #fff; }

.pg-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #c8370b;
}
.pg-more:hover { text-decoration: underline; }

/* Lightbox */
.pg-lb {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 9, 11, .94);
    padding: 56px 16px 24px;
}
.pg-lb[hidden] { display: none; }
.pg-lb-figure {
    margin: 0;
    max-width: min(1400px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.pg-lb-img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.pg-lb-caption { color: #e4e4e7; font-size: 15px; text-align: center; }
.pg-lb-counter { position: absolute; top: 18px; left: 20px; color: #a1a1aa; font-size: 14px; }
.pg-lb-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}
.pg-lb-btn:hover { background: #c8370b; }
.pg-lb-close { top: 10px; right: 14px; font-size: 30px; }
.pg-lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.pg-lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .pg-lb-prev, .pg-lb-next { top: auto; bottom: 14px; transform: none; }
    .pg-lb-img { max-height: calc(100vh - 170px); }
}

.pg-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pg-figcaption {
    font-size: 13px;
    line-height: 1.4;
    color: #3f3f46;
    font-weight: 500;
    padding-inline: 2px;
}

.pg-subfilters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: -18px 0 28px;
}
.pg-subfilters[hidden] { display: none; }
.pg-section .pg-subfilters {
    justify-content: flex-start;
    margin: 0 0 20px;
}
.pg-subfilter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 6px 13px;
    border: 1px solid #d4d4d8;
    border-radius: 999px;
    background: #fafafa;
    color: #3f3f46;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
}
.pg-subfilter:hover { border-color: #c8370b; color: #c8370b; }
.pg-subfilter.is-active { background: #c8370b; border-color: #c8370b; color: #fff; }
.pg-subfilter.is-active .pg-filter-count { background: rgba(255, 255, 255, .24); color: #fff; }
