/* =========================================================
   PROJE TURAN
   GALERİ — Samsung (One UI) galeri mantığı
   ========================================================= */

.gx {
    --gx-text: #302d55;
    --gx-muted: rgba(48, 45, 85, .56);
    --gx-faint: rgba(48, 45, 85, .08);
    --gx-surface: rgba(255, 255, 255, .55);
    --gx-surface-strong: rgba(255, 255, 255, .86);
    --gx-border: rgba(48, 45, 85, .10);
    --gx-accent: #5b5fd6;
    --gx-heart: #ff5a6e;
    --gx-cols: 4;
    --gx-gap: 3px;
    --gx-radius: 6px;

    width: min(1320px, calc(100% - 28px));
    margin: 0 auto;
    padding: 26px 0 90px;
    color: var(--gx-text);
}

[data-theme="dark"] .gx {
    --gx-text: #e8e6f5;
    --gx-muted: rgba(232, 230, 245, .56);
    --gx-faint: rgba(255, 255, 255, .07);
    --gx-surface: rgba(255, 255, 255, .05);
    --gx-surface-strong: rgba(38, 36, 58, .92);
    --gx-border: rgba(255, 255, 255, .10);
    --gx-accent: #9fb0ff;
}

@media (min-width: 700px) {
    .gx {
        --gx-gap: 5px;
        --gx-radius: 9px;
        width: min(1320px, calc(100% - 44px));
    }
}


/* =========================================================
   BAŞLIK (One UI: büyük başlık, bol boşluk)
   ========================================================= */

.gx-hero {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 34px 2px 22px;
}

.gx-hero__text {
    flex: 1;
    min-width: 0;
}

.gx-title {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(40px, 7vw, 68px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}

.gx-sub {
    margin: 10px 0 0;
    color: var(--gx-muted);
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.gx-back {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    align-self: flex-start;
    width: 42px;
    height: 42px;
    margin-top: 4px;
    border: 1px solid var(--gx-border);
    border-radius: 50%;
    background: var(--gx-surface);
    color: var(--gx-text);
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.gx-back:hover {
    background: var(--gx-surface-strong);
    transform: translateX(-2px);
}

.gx-hero--album {
    flex-wrap: wrap;
}

.gx-hero--album .gx-hero__text {
    flex-basis: calc(100% - 140px);
}

.gx-desc {
    max-width: 720px;
    margin: -8px 2px 24px;
    color: var(--gx-muted);
    font-family: Manrope, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

/* Yakınlaştır / uzaklaştır */
.gx-zoom {
    display: flex;
    gap: 6px;
}

.gx-zoom[hidden] {
    display: none;
}

.gx-zoom__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gx-border);
    border-radius: 50%;
    background: var(--gx-surface);
    color: var(--gx-text);
    font-size: 15px;
    cursor: pointer;
    transition: background .18s ease, opacity .18s ease;
}

.gx-zoom__btn:hover {
    background: var(--gx-surface-strong);
}

.gx-zoom__btn:disabled {
    opacity: .35;
    cursor: default;
}


/* =========================================================
   SEKMELER
   ========================================================= */

.gx-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 22px;
    padding: 4px;
    border: 1px solid var(--gx-border);
    border-radius: 999px;
    background: var(--gx-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gx-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    color: var(--gx-muted);
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.gx-tab:hover {
    color: var(--gx-text);
}

.gx-tab.is-active {
    background: var(--gx-surface-strong);
    color: var(--gx-text);
    box-shadow: 0 4px 14px rgba(48, 45, 85, .10);
}

.gx-panel {
    display: none;
}

.gx-panel.is-active {
    display: block;
    animation: gx-fade .25s ease;
}

@keyframes gx-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}


/* =========================================================
   FOTOĞRAF GRID
   ========================================================= */

/* İki parmakla sıkıştırma bizde; tarayıcı sayfayı yakınlaştırmasın. */
[data-gx-list] {
    touch-action: pan-y;
}

.gx-month + .gx-month {
    margin-top: 6px;
}

/* Gün görünümünde ay başlığı gizli, ay görünümünde gün başlıkları gizli. */
.gx-month__head {
    display: none;
    margin: 22px 2px 10px;
    font-family: Manrope, sans-serif;
    font-size: 17px;
    font-weight: 800;
}

.gx.is-month-mode .gx-month__head {
    display: block;
}

.gx.is-month-mode .gx-day {
    display: none;
}

.gx-grid {
    display: grid;
    grid-template-columns: repeat(var(--gx-cols), minmax(0, 1fr));
    gap: var(--gx-gap);
}

/* Gün başlığı tam satır kaplar; böylece her gün yeni satırdan başlar. */
.gx-day {
    grid-column: 1 / -1;
    margin: 18px 2px 6px;
    font-family: Manrope, sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.gx-grid > .gx-day:first-child {
    margin-top: 4px;
}

.gx-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--gx-radius);
    background: var(--gx-faint);
    -webkit-tap-highlight-color: transparent;
}

.gx-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, opacity .25s ease;
}

.gx-item:hover img {
    transform: scale(1.04);
}

.gx-item:active img {
    opacity: .82;
}

.gx-item:focus-visible {
    outline: 3px solid var(--gx-accent);
    outline-offset: 2px;
}

.gx-item__fav {
    position: absolute;
    right: 6px;
    bottom: 5px;
    color: #fff;
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
    pointer-events: none;
}

/* Çok sık gridde kalp ikonu kalabalık etmesin */
.gx.is-month-mode .gx-item__fav {
    display: none;
}


/* =========================================================
   ALBÜMLER
   ========================================================= */

.gx-albums {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
}

@media (min-width: 560px) {
    .gx-albums {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .gx-albums {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 30px 20px;
    }
}

.gx-album {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--gx-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.gx-album__cover {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    background: var(--gx-faint);
    box-shadow: 0 10px 26px -14px rgba(48, 45, 85, .35);
}

.gx-album__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.gx-album:hover .gx-album__cover img {
    transform: scale(1.05);
}

.gx-album__badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--gx-heart);
    font-size: 13px;
}

.gx-album__title {
    margin-top: 10px;
    overflow: hidden;
    font-family: Manrope, sans-serif;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gx-album__count {
    margin-top: 2px;
    color: var(--gx-muted);
    font-family: Manrope, sans-serif;
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   BOŞ DURUM
   ========================================================= */

.gx-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 80px 20px;
    color: var(--gx-muted);
    font-family: Manrope, sans-serif;
    text-align: center;
}

.gx-empty i {
    font-size: 42px;
    opacity: .5;
}


/* =========================================================
   TAM EKRAN GÖRÜNTÜLEYİCİ
   ========================================================= */

html.gxv-open,
html.gxv-open body {
    overflow: hidden;
}

.gxv {
    position: fixed;
    inset: 0;
    z-index: 20000; /* footer maskotunun (10050) üstünde */
    display: none;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: Manrope, sans-serif;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.gxv.is-open {
    display: block;
    animation: gxv-in .22s ease;
}

@keyframes gxv-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gxv__track {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.gxv__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gxv__slide img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: 0 0;
    will-change: transform;
    -webkit-user-drag: none;
}

.gxv__spinner {
    position: absolute;
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gxv-spin .8s linear infinite;
}

.gxv__slide.is-loaded .gxv__spinner {
    display: none;
}

@keyframes gxv-spin {
    to { transform: rotate(360deg); }
}

/* Üst ve alt çubuklar */
.gxv__bar {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    transition: opacity .22s ease, transform .22s ease;
}

.gxv__bar--top {
    top: 0;
    padding-top: max(12px, env(safe-area-inset-top));
    background: linear-gradient(180deg, rgba(0, 0, 0, .62), transparent);
}

.gxv__bar--bottom {
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent);
}

.gxv.is-chrome-hidden .gxv__bar--top {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.gxv.is-chrome-hidden .gxv__bar--bottom,
.gxv.is-chrome-hidden .gxv__nav {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.gxv.is-chrome-hidden .gxv__nav {
    transform: translateY(-50%);
}

.gxv__btn {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 19px;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease;
}

.gxv__btn:hover {
    background: rgba(255, 255, 255, .12);
}

.gxv__btn.is-on {
    color: var(--gx-heart, #ff5a6e);
}

.gxv__heading {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.gxv__date {
    display: block;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gxv__time {
    display: block;
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
    font-weight: 600;
}

.gxv__counter {
    color: rgba(255, 255, 255, .66);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gxv__caption {
    max-width: 760px;
    margin: 0 auto 6px;
    padding: 0 8px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

.gxv__caption:empty {
    display: none;
}

.gxv__actions {
    display: flex;
    justify-content: space-around;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* Alt şerit: küçük resimler */
.gxv__strip {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    margin: 0 auto 8px;
    padding: 2px 50%;
    scrollbar-width: none;
    max-width: 100%;
}

.gxv__strip::-webkit-scrollbar {
    display: none;
}

.gxv__strip button {
    flex: 0 0 auto;
    width: 38px;
    height: 50px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 5px;
    background: #222;
    opacity: .5;
    cursor: pointer;
    transition: opacity .15s ease, width .2s ease;
}

.gxv__strip button.is-current {
    width: 56px;
    opacity: 1;
    box-shadow: 0 0 0 2px #fff;
}

.gxv__strip img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Masaüstü ileri / geri */
.gxv__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: none;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s ease, opacity .22s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gxv__nav:hover {
    background: rgba(255, 255, 255, .22);
}

.gxv__nav--prev { left: 18px; }
.gxv__nav--next { right: 18px; }

.gxv__nav[disabled] {
    opacity: 0 !important;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .gxv__nav {
        display: grid;
        place-items: center;
    }
}

/* Ayrıntılar paneli */
.gxv__sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 3;
    width: min(520px, 100%);
    padding: 10px 22px max(22px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: rgba(28, 27, 38, .96);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, .45);
    transform: translate(-50%, 105%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.gxv.is-sheet-open .gxv__sheet {
    transform: translate(-50%, 0);
}

.gxv__sheet-handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
}

.gxv__sheet h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
}

.gxv__sheet dl {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 14px 10px;
    margin: 0;
}

.gxv__sheet dt {
    color: rgba(255, 255, 255, .55);
    font-size: 15px;
    text-align: center;
}

.gxv__sheet dd {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.gxv__sheet dd small {
    display: block;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
}

.gxv__sheet a {
    color: #b9c4ff;
}

.gxv__toast {
    position: absolute;
    left: 50%;
    bottom: 140px;
    z-index: 4;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #111;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.gxv__toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* =========================================================
   MOBİL
   ========================================================= */

@media (max-width: 699px) {
    .gx {
        padding-top: 6px;
    }

    .gx-hero {
        padding: 18px 2px 16px;
    }

    /* Albüm sayfasında zoom butonları başlık metniyle aynı hizada */
    .gx-hero--album .gx-zoom {
        margin-left: 56px;
    }

    .gx-tabs {
        display: flex;
        width: 100%;
    }

    .gx-tab {
        flex: 1;
        justify-content: center;
    }

    .gx-day {
        margin-top: 14px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gx-panel.is-active,
    .gxv.is-open {
        animation: none;
    }

    .gx-item img,
    .gx-album__cover img {
        transition: none;
    }
}

/* Grid sıklığı değişince kısa geçiş */
.gx.is-resizing .gx-grid {
    animation: gx-resize .28s ease;
}

@keyframes gx-resize {
    from { opacity: .4; transform: scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* Yazı albümünde yazıya bağlantı */
.gx-post-link {
    color: var(--gx-accent);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.gx-post-link:hover {
    text-decoration: underline;
}

.gx-post-link i {
    font-size: .85em;
}

/* Gizli albüm işareti (sadece admin görür) */
.gx-hidden-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(176, 52, 52, .12);
    color: #b03434;
    font-family: Manrope, sans-serif;
    font-size: 12px;
    font-weight: 800;
}

[data-theme="dark"] .gx-hidden-badge {
    background: rgba(240, 120, 120, .16);
    color: #f3a0a0;
}

.gx-hero__text .gx-hidden-badge {
    margin-top: 12px;
}
