@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700&family=Parisienne&display=swap');

/* ==========================================================
   MASK OPTICA — Galeri Sayfası
   Token sistemi kurumsal / hizmetlerimiz / genel-icerik ailesiyle aynı:
     --ink-900 / 800   : lacivert zemin katmanları
     --brass-500 / 400 : sıcak pirinç vurgu rengi
     --paper-100        : açık nötr (metin)
     --sky-300           : ortak yumuşak mavi
   Tipografi: Fraunces (başlık) / Manrope (gövde) / Parisienne (vurgu)
   Bağımsız sayfa; sınıflar "gl-" ön ekiyle izole edilmiştir.
   Görseller PHP tarafında uploads/galeri/ klasöründen otomatik
   çekilir; bu dosya yalnızca grid + lightbox görünümünü tanımlar.
   ========================================================== */

.galeri {
    --ink-900: #06111f;
    --ink-800: #0d1f38;
    --brass-500: #c6a15b;
    --brass-400: #d9bd80;
    --paper-100: #f5f7fa;
    --sky-300: #b8d4f5;

    background: var(--ink-900);
    color: var(--paper-100);
    overflow: hidden;
}

.galeri * {
    box-sizing: border-box;
}

.gl-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

.gl-section {
    padding: 90px 0;
    position: relative;
}

/* ---------- Ortak tipografi ---------- */

.gl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brass-400);
    margin-bottom: 22px;
}

.gl-mark {
    color: var(--brass-500);
    width: 34px;
    height: 13px;
    display: inline-flex;
}

.gl-mark svg {
    width: 100%;
    height: 100%;
}

.gl-heading {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 3rem;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 22px;
}

.gl-script {
    font-family: 'Parisienne', cursive;
    font-weight: 400;
    font-size: 1.05em;
    color: var(--sky-300);
    letter-spacing: 0.5px;
}

.gl-lead {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--paper-100);
    line-height: 1.7;
    margin: 0;
    max-width: 52ch;
}

.gl-empty {
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    color: rgba(245, 247, 250, 0.6);
    padding: 40px 0;
}

/* ---------- HERO ---------- */

.gl-hero {
    padding: 170px 0 120px;
    text-align: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.gl-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.gl-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.gl-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(198, 161, 91, 0.16) 0%, transparent 55%),
        linear-gradient(180deg, rgba(6, 17, 31, 0.78) 0%, rgba(6, 17, 31, 0.72) 45%, rgba(6, 17, 31, 0.92) 100%);
}

.gl-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- GALERİ GRID ---------- */

.gl-grid-section {
    padding-top: 40px;
}

.gl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.gl-item {
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(23, 44, 77, 0.3);
    padding: 0;
    cursor: pointer;
    display: block;
    width: 100%;
}

.gl-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl-item:hover img {
    transform: scale(1.06);
}

/* Pinterest hissi için her 5. ve 7. kareyi hafif uzatıyoruz */
.gl-grid .gl-item:nth-child(5n) {
    aspect-ratio: 4 / 6;
}

/* ---------- LIGHTBOX ---------- */

.gl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(6, 17, 31, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gl-lightbox.gl-lb-open {
    opacity: 1;
    visibility: visible;
}

.gl-lb-img {
    max-width: min(88vw, 1100px);
    max-height: 84vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}

.gl-lb-close,
.gl-lb-nav {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(13, 31, 56, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--paper-100);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.gl-lb-close:hover,
.gl-lb-nav:hover {
    background: var(--brass-400);
    color: var(--ink-900);
}

.gl-lb-close svg,
.gl-lb-nav svg {
    width: 20px;
    height: 20px;
}

.gl-lb-close {
    top: 28px;
    right: 28px;
}

.gl-lb-prev {
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
}

.gl-lb-next {
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
}

.gl-lb-prev:hover,
.gl-lb-next:hover {
    transform: translateY(-50%) scale(1.05);
}

/* ---------- Scroll-Reveal (azaltılmış hareket tercihine saygılı) ----------
   .gl-js sınıfı yalnızca JS çalıştığında eklenir; JS devre dışıysa
   .gl-reveal öğeleri varsayılan (görünür) halde kalır. */

@media (prefers-reduced-motion: no-preference) {
    .gl-js .gl-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .gl-js .gl-reveal.gl-in-view {
        opacity: 1;
        transform: translateY(0);
    }

    .gl-js .gl-grid .gl-item:nth-child(4n+1).gl-in-view { transition-delay: 0.02s; }
    .gl-js .gl-grid .gl-item:nth-child(4n+2).gl-in-view { transition-delay: 0.08s; }
    .gl-js .gl-grid .gl-item:nth-child(4n+3).gl-in-view { transition-delay: 0.14s; }
    .gl-js .gl-grid .gl-item:nth-child(4n+4).gl-in-view { transition-delay: 0.20s; }
}

/* ==========================================================
   Mobil Uyumluluk
   ========================================================== */

@media (max-width: 900px) {
    .gl-section {
        padding: 64px 0;
    }

    .gl-container {
        padding: 0 22px;
    }

    .gl-hero {
        padding: 110px 0 64px;
    }

    .gl-heading {
        font-size: 2.2rem;
    }

    .gl-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .gl-lb-prev {
        left: 12px;
    }

    .gl-lb-next {
        right: 12px;
    }

    .gl-lb-close {
        top: 16px;
        right: 16px;
    }
}

@media (max-width: 560px) {
    .gl-heading {
        font-size: 1.8rem;
    }

    .gl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gl-grid .gl-item:nth-child(5n) {
        aspect-ratio: 4 / 5;
    }

    .gl-lb-nav {
        width: 40px;
        height: 40px;
    }
}