body {
    margin: 0;
    background: #000;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
}

body.no-scroll {
    overflow: hidden;
}

#site-header {
    background: #000;
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-banner img {
    height: 64px;          /* adjust as needed */
    width: auto;
    filter: brightness(1.2); /* makes white pop slightly */
}
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #000;
    padding: 10px 0;
}

#gallery {
    margin: 20px;
    position:relative;
}

#gallery img {
    cursor: pointer;
}

.photo-wrapper {
    position: relative;
    display: inline-block;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-wrapper:hover .photo-overlay {
    opacity: 1;
}

#lightbox {
    position: fixed;
    inset: 0;
    background: rgb(0,0,0);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;

    opacity: 0;
    transition: opacity 0.4s ease;
}


/* when showing a portrait, align children to top */
#lightbox.portrait {
    align-items: flex-start;
}

#lightbox.hidden {
    display: none;
}

#lightbox-inner {
    max-width: 90%;
    width: 100%;
    height: 100dvh;          /* full viewport height */
    display: flex;          /* allow vertical control */
    flex-direction: column; /* stack image + meta */
    align-items: center;    /* center landscape horizontally */
    justify-content: center;/* center landscape vertically */
    text-align: center;
}

#lightbox.portrait #lightbox-inner {
    justify-content: flex-start;   /* portrait: top */
}

#lightbox:not(.portrait) #lightbox-inner {
    justify-content: center;       /* landscape: centered */
}


#lightbox-img {
    max-width: 100%;
    max-height: 100dvh;   /* allow full screen height */
    margin-bottom: 0px;
    object-fit: contain;
}

#lightbox-meta {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    flex: none;
}

.photo-large-wrapper {
    max-width: 900px;
    margin: 24px auto;
    display: block;
    text-align: center;
}

.photo-caption {
    margin-top: 8px;
    color: #444;
    font-size: 14px;
}

/* --- SCROLLER LAYOUT --- */

.photo-row {
    display: flex;
    max-width: 1200px;
    margin: 120px auto;
    gap: 28px;
    align-items: flex-start;
    justify-content: right;   /* FIX: centers EXIF beside portrait */
}


/* Floating frame that auto-resizes to image */
.photo-frame {
    display: flex;
    justify-content: center;
    align-items: center;

    flex: 0 0 auto;     /* frame wraps image */
    padding: 6px;

    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.photo-frame:hover {
    border-color: rgba(255,255,255,0.45);
    box-shadow: 0 6px 18px rgba(255,255,255,0.15),
                0 8px 24px rgba(0,0,0,0.35);
}

/* IMAGE — stable sizing */
.photo-large {
    max-width: 640px;   /* landscape size cap */
    width: 100%;
    height: auto;

    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    cursor: zoom-in;

    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.photo-large.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Portrait images smaller + centered */
.photo-large.portrait {
    max-width: 450px;   /* portrait size cap */
}

/* EXIF PANEL — fixed width */
.photo-meta {
    width: 300px;       /* fixed, stable */
    flex: 0 0 300px;    /* prevents resizing */

    padding: 16px 20px;
    background: #1f1f1f;
    border-radius: 6px;
    color: #e5e5e5;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    height: fit-content;
}

.photo-meta-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

.photo-meta-item {
    margin-bottom: 10px;
}

.photo-meta-label {
    color: #4ea3ff;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
}

.photo-meta-value {
    color: #ddd;
    font-size: 14px;
}


#lightbox.visible {
    opacity: 1;
}

#lightbox-img.portrait {
    max-height: 100dvh;   /* use full screen height */
    margin: 0;           /* remove bottom gap */
}

.folder-filter {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #000;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.folder-btn {
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 6px;
}

.folder-btn input {
    cursor: pointer;
}

.folder-btn.active {
    background: #fff;
    color: #000;
}

.search-bar {
    padding: 12px;
    background: #000;
    position: sticky;
    top: 48px;
    z-index: 20;
}

#search-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
}

.fade {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fade.show {
    opacity: 1;
}

#folder-filter {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    flex-wrap: wrap;
}
/* Top bar container */
#topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    padding: 10px 20px;
    border-bottom: 1px solid #222;
}

/* Left side (filters) */
#topbar-left {
    display: flex;
    align-items: center;
}

/* Right side (logo) */
#topbar-right {
    display: flex;
    align-items: center;
}

/* Filter buttons */
#folder-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.folder-btn {
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
}

.folder-btn input {
    margin-right: 6px;
}

/* Logo */
#banner {
    font-size: 22px;
    font-weight: bold;
    color: white;
    padding-left: 20px;
}
/* ============================================================
   HEADER FIX — folder filter left, logo right, no dropping
   ============================================================ */

#site-header {
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0; /* remove vertical padding so header height is stable */
}

#site-header #header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;      /* keeps logo vertically aligned */
    padding: 10px 20px;
    height: 72px;             /* fixed height so filter cannot push logo down */
}

/* Left side (filters) */
#header-left {
    display: flex;
    align-items: center;
    overflow-x: auto;         /* prevents wrapping */
    white-space: nowrap;      /* keeps filters on one line */
}

/* Right side (logo) */
#header-right {
    display: flex;
    align-items: center;
}

/* Folder filter inside header */
#folder-filter {
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap;        /* DO NOT wrap — prevents header height changes */
}

/* Folder buttons */
.folder-btn {
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #444;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;      /* prevents wrapping inside the button */
}

/* Logo */
.logo-banner img {
    height: 64px;
    width: auto;
    display: block;
    filter: brightness(1.2);
}

/* Remove old sticky filter bar behaviour */
.folder-filter {
    position: static;
    background: none;
    padding: 0;
}
/* ============================================================
   SWAP POSITIONS — LOGO LEFT, FILTER RIGHT
   ============================================================ */

/* Reverse the flex direction */
#site-header #header-inner {
    display: flex;
    flex-direction: row-reverse;   /* <— swap positions */
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 72px;                  /* fixed height */
}

/* Left side now holds the logo */
#header-left {
    display: flex;
    align-items: center;
}

/* Right side now holds the filter */
#header-right {
    display: flex;
    align-items: center;
    overflow-x: auto;              /* prevent wrapping */
    white-space: nowrap;           /* keep filters on one line */
}

/* Filter bar inside header */
#folder-filter {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;             /* prevent vertical expansion */
    padding: 0;
    margin: 0;
}

/* Folder buttons */
.folder-btn {
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #444;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Logo stays stable */
.logo-banner img {
    height: 64px;
    width: auto;
    display: block;
    filter: brightness(1.2);
}

/* Fade-out animation for lightbox */
#lightbox.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
/* Hide header when lightbox is open */
#site-header.hidden-header {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}