/* ============================================================
   GALLERY PAGE — /galeri  ·  DEES premium tasarım
   (grid/masonry mantığı + lightbox yapısı korunur, sadece stil)
============================================================ */

.gl-page {
    padding: 58px 20px 84px;
    background: var(--bg-soft, #f6f7f9);
    min-height: calc(100vh - var(--header-height, 60px));
    position: relative;
    overflow: hidden;
}
/* Üstte yumuşak marka aksanı */
.gl-page::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 320px;
    background: radial-gradient(900px 300px at 50% -80px, rgba(237, 28, 36, .07), transparent 70%);
    pointer-events: none;
}

.gl-container {
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ─── Header ─── */
.gl-header {
    text-align: center;
    margin-bottom: 46px;
}
.gl-eyebrow {
    display: inline-block;
    font-family: var(--font-cond, 'Barlow Condensed', sans-serif);
    text-transform: uppercase;
    letter-spacing: .24em;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary, #ED1C24);
    margin-bottom: 10px;
}
.gl-title {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--accent, #1f2937);
    margin: 0;
    line-height: 1.05;
}
.gl-rule {
    display: block;
    width: 62px;
    height: 4px;
    border-radius: 2px;
    margin: 18px auto 14px;
    background: linear-gradient(90deg, var(--primary, #ED1C24), var(--primary-dk, #C41219));
}
.gl-subtitle {
    color: var(--text-muted, #6b7280);
    font-size: 14.5px;
    margin: 0;
    font-weight: 500;
}

/* ─── Empty state ─── */
.gl-empty {
    text-align: center;
    padding: 90px 20px;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    border: 1px solid var(--border, #e5e7eb);
    color: var(--text-muted, #6b7280);
}
.gl-empty svg { color: var(--border, #d1d5db); margin-bottom: 12px; }
.gl-empty h3 { font-size: 17px; font-weight: 700; color: var(--accent, #1f2937); margin: 0 0 6px; }
.gl-empty p { margin: 0; font-size: 14px; }

/* ─── Grid (masonry mantığı AYNI) ─── */
.gl-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 168px;
    grid-auto-flow: dense;
    gap: 10px;
}
@media (min-width: 640px) {
    .gl-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; gap: 12px; }
}
@media (min-width: 1024px) {
    .gl-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 226px; gap: 14px; }
}

.gl-item.gl-item-l { grid-column: span 2; grid-row: span 2; }
.gl-item.gl-item-w { grid-column: span 2; }
.gl-item.gl-item-t { grid-row: span 2; }
@media (max-width: 639px) {
    .gl-item.gl-item-l { grid-column: span 2; grid-row: span 1; }
}

.gl-item {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card, #fff);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .07);
    transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease;
}
.gl-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px -14px rgba(16, 24, 40, .34);
}
.gl-item:focus-within {
    box-shadow: 0 0 0 3px var(--primary, #ED1C24), 0 22px 44px -14px rgba(16, 24, 40, .34);
}

.gl-item-btn {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
    position: relative;
    display: block;
    overflow: hidden;
}
.gl-item-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}
.gl-item-btn:hover img,
.gl-item-btn:focus img { transform: scale(1.07); }
.gl-item-btn:focus { outline: none; }

/* Premium hover: koyu degrade + ortada büyüteç rozeti */
.gl-item-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 16, 22, .55) 0%, rgba(13, 16, 22, .08) 42%, transparent 70%);
    opacity: 0;
    transition: opacity .35s ease;
    z-index: 1;
}
.gl-item-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transform: translate(-50%, -42%) scale(.82);
    background: rgba(255, 255, 255, .14)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E")
        center / 22px no-repeat;
    border: 1.5px solid rgba(255, 255, 255, .55);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    opacity: 0;
    transition: opacity .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
    z-index: 2;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.gl-item-btn:hover::before,
.gl-item-btn:focus::before { opacity: 1; }
.gl-item-btn:hover::after,
.gl-item-btn:focus::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.gl-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    color: #fff;
    padding: 28px 16px 13px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .3s ease;
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    pointer-events: none;
}
.gl-item-btn:hover .gl-item-caption,
.gl-item-btn:focus .gl-item-caption { opacity: 1; transform: translateY(0); }

/* ─── Lightbox (yapı aynı, stil rafine) ─── */
.gl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 10, 14, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gl-lb-in .25s ease-out;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.gl-lightbox[hidden] { display: none; }
@keyframes gl-lb-in { from { opacity: 0; } to { opacity: 1; } }

.gl-lb-close,
.gl-lb-nav {
    position: absolute;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
    z-index: 10;
}
.gl-lb-close { top: 22px; right: 22px; width: 46px; height: 46px; }
.gl-lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.gl-lb-close:hover,
.gl-lb-nav:hover {
    background: var(--primary, #ED1C24);
    border-color: var(--primary, #ED1C24);
}
.gl-lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.gl-lb-prev { left: 24px; }
.gl-lb-next { right: 24px; }

@media (max-width: 640px) {
    .gl-lb-prev { left: 8px; }
    .gl-lb-next { right: 8px; }
    .gl-lb-nav { width: 42px; height: 42px; }
    .gl-lb-close { top: 14px; right: 14px; }
}

.gl-lb-figure {
    margin: 0;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#gl-lb-image {
    max-width: 92vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.gl-lb-caption {
    color: #fff;
    text-align: center;
    margin-top: 18px;
    max-width: 640px;
    padding: 0 20px;
}
.gl-lb-caption[hidden] { display: none; }
.gl-lb-caption strong {
    display: block;
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: 16px;
    margin-bottom: 4px;
}
.gl-lb-caption p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.5;
}
.gl-lb-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 7px 16px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
