/*
Theme Name: Galerie
Theme URI: 
Author: 
Description: Minimal photography portfolio theme. Add photos as Posts with a Featured Image and assign them to categories (Art, Fashion, etc.). Use Menus to manage the top-right navigation.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: galerie
*/

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ───────────────────────────────── */
html { font-size: 16px; }

body {
    background: #fefefe;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    color: #c9a0a0;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* Override WordPress inline width/height attributes */
img {
    display: block;
    max-width: 100%;
    width: auto !important;
    height: auto !important;
}

/* ── Top Navigation ─────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: #fefefe;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 28px 0;
}

.site-brand {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #c9a0a0;
    line-height: 1;
}

/* WordPress nav menu — top right */
.menu-primary {
    display: flex;
    gap: 28px;
    list-style: none;
}

.menu-primary a {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9a0a0;
    transition: color 0.25s;
}

.menu-primary a:hover { color: #a07070; }

/* ── Category Filter ────────────────────── */
.nav-categories {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 10px 0 8px;
}

.nav-categories a {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9a0a0;
    transition: color 0.25s;
    padding-bottom: 2px;
    border-bottom: 0.5px solid transparent;
}

.nav-categories a:hover,
.nav-categories a.active {
    color: #a07070;
    border-bottom-color: #c9a0a0;
}

/* ── Viewer ─────────────────────────────── */
.viewer-wrap {
    padding-top: 90px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 60px;
}

.viewer-stage { display: flex; justify-content: center; width: 100%; }

.viewer-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 48px;
}
.viewer-slide.active { display: flex; animation: fadeUp 0.5s ease forwards; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.viewer-slide a { display: block; }

.viewer-slide img {
    max-width: 520px;
    max-height: 78vh;
    object-fit: contain;
    filter: saturate(0.88) contrast(0.97);
    transition: filter 0.4s;
}
.viewer-slide a:hover img { filter: saturate(1.02) contrast(1.0); }

/* Arrows — absolute, vertically centered on the image */
.viewer-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    font-family: 'Jost', sans-serif; font-weight: 200;
    font-size: 22px; line-height: 1; color: #c9a0a0;
    padding: 10px 8px;
    transition: color 0.25s, opacity 0.25s;
    user-select: none;
}
.viewer-arrow:hover { color: #a07070; }
.viewer-arrow:disabled { opacity: 0.2; cursor: default; }
.viewer-arrow.prev { left: 0; }
.viewer-arrow.next { right: 0; }
.viewer-arrow.hidden { visibility: hidden; }

/* Counter */
.viewer-counter {
    margin-top: 14px;
    font-family: 'Jost', sans-serif; font-weight: 200;
    font-size: 10px; letter-spacing: 0.22em;
    color: #d4b0b0;
}
.viewer-counter:empty { display: none; }

.photo-caption {
    margin-top: 7px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: #d4b0b0;
    text-transform: uppercase;
}

/* ── No Posts ───────────────────────────── */
.no-posts {
    margin-top: 80px;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #d4b0b0;
}

/* ── Single Post ────────────────────────── */
.single-photo {
    padding-top: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 80px;
}

.single-photo img {
    max-width: 680px;
    filter: saturate(0.9) contrast(0.97);
}

/* Arrows */
.single-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #c9a0a0;
    transition: color 0.25s;
    padding: 20px 28px;
    line-height: 1;
}
.single-nav:hover { color: #a07070; }
.single-nav.prev { left: 0; }
.single-nav.next { right: 0; }

/* Counter */
.photo-counter {
    margin-top: 10px;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: #d4b0b0;
}

.single-photo .photo-caption {
    margin-top: 12px;
}

.back-link {
    margin-top: 40px;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9a0a0;
    transition: color 0.25s;
}

.back-link:hover { color: #a07070; }

/* ── Admin Bar Offset ───────────────────── */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

/* ── Hamburger (mobile only) ────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 4px; width: 24px; height: 24px;
    flex-shrink: 0;
}
.hamburger span {
    display: block; width: 100%; height: 0.5px;
    background: #c9a0a0;
    transition: transform 0.25s, opacity 0.25s;
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile dropdown — hidden by default */
.mobile-menu {
    display: none;
    padding: 10px 18px 14px;
    border-bottom: 0.5px solid rgba(201,160,160,0.15);
}
.mobile-menu.open { display: block; }

.menu-mobile {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.menu-mobile a {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9a0a0;
    transition: color 0.25s;
}
.menu-mobile a:hover { color: #a07070; }

/* ── Mobile ─────────────────────────────── */
@media (max-width: 640px) {
    .nav-top { padding: 16px 18px 0; }
    .menu-primary { display: none; }       /* hide desktop menu */
    .hamburger { display: flex; }          /* show hamburger */
    .nav-categories { gap: 14px; flex-wrap: wrap; padding: 8px 12px; }

    .viewer-wrap { padding-top: 80px; }
    .viewer-slide { padding: 0 36px; }
    .viewer-slide img { max-width: 100%; max-height: 65vh; }
    .viewer-arrow { font-size: 18px; padding: 8px 4px; }

    .single-photo img { max-width: 100%; }
    .single-nav { padding: 14px 16px; }
}

@media (min-width: 641px) {
    .hamburger { display: none; }         /* always hidden on desktop */
    .mobile-menu { display: none !important; } /* always hidden on desktop */
}
