﻿/* ===============================
   Theme tokens
   =============================== */
:root{
  --bg: #000;
  --fg: #fff;
  --muted: #ccc;
  --panel: #222;
  --panel-2: #444;
  --accent: #2c4a6f;
  --link: #9ec2ff;
  --shadow: #000;
  --gap: 1rem;
  --arrow-pad: 60px; /* space reserved for arrows */
}

/* Box-sizing + base */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

/* was: body { display:flex; ... } */
body {
  display: flex;
  flex-direction: column;   /* stack children, not side-by-side */
  min-height: 100vh;
  background-color: black;
  color: white;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-y: scroll;
}


/* ===============================
   Basics
   =============================== */
/* keep things aligned on narrow screens */
header,
.main-content{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* keep things aligned on narrow screens */
header,
.main-content{
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 clamp(12px, 4vw, 24px);
}

@media screen and (min-width: 769px) {
  header,
.main-content{
    padding-left: clamp(24px, 5vw, 48px);
    padding-right: clamp(24px, 5vw, 48px);
  }
}

h1 { text-align: center; }

.tagline{
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin: -1rem 0 2rem;
}

.filters{
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

select{
  padding: .5rem;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--panel-2);
}


/* ===============================
   Gallery
   =============================== */
.gallery-wrapper { text-align: center; }

.gallery{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 100%;
}

.grid-item{
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.grid-item img{
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  cursor: pointer;
}

/* ===============================
   Lightbox
   =============================== */
.lightbox{
  position: fixed;
  inset: 0; /* full-viewport hit area for closing */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  /* soft vignette */
  background: radial-gradient(circle, rgba(0,0,0,0) 0px, rgba(0,0,0,.9) 25px);
  padding: 0 var(--arrow-pad); /* leave space for arrows */
}

/* inner content column (image + meta + actions) */
.lightbox-content{
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* image sizing (centers via flex parent) */
.lightbox img{
  max-width: calc(80vw - (2 * var(--arrow-pad)));
  max-height: 80vh;
  box-shadow: 0 0 10px 10px var(--shadow);
  display: block;
  margin: 0 auto;
}

/* links inside description */
.lightbox-content a{
  color: var(--link);
  text-decoration: underline;
}
.lightbox-content a:hover{ text-decoration: none; }

.lightbox-content code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .95em;
  background: #1a1a1a;
  padding: 0 4px;
  border-radius: 3px;
}

/* arrows */
.lightbox-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 60px;
  border: none;
  background: var(--panel);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  transition: background-color .2s ease, transform .1s ease;
}
.lightbox-arrow:hover { background: #333; }
.lightbox-arrow:active{ transform: translateY(-50%) scale(.96); }
.lightbox-arrow:focus-visible{
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.lightbox-arrow.left  { left: 10px; }
.lightbox-arrow.right { right: 10px; }

/* ===============================
   Lightbox meta
   =============================== */
#lightboxMeta1,
#lightboxMeta2,
#lightboxMeta3{
  margin-top: .5rem;
  text-align: center;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#lightboxMeta1{ font-weight: 700; } /* Year / Country */
#lightboxMeta2{ font-weight: 400; } /* Description   */
#lightboxMeta3{ font-weight: 400; font-size: .875rem; } /* Themes line   */

.theme-sep{ opacity: .7; padding: 0 .35em; }

#lightboxActions{
  margin-top:.5rem;
}

/* ===============================
   Actions row (copy link)
   =============================== */
/* Lightbox actions: vertical stacks with labels */
/* ===============================
   Unified menu
   =============================== */
.menu-rows{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 1.5rem 0;
}

.menu-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}

.menu-item{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0px 5px;
  min-height: 30px;
  min-width: 30px;
  background: var(--panel);
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, transform .1s ease;
  border: none;
  font: inherit;
}

.menu-item:link,
.menu-item:visited{
  color: var(--fg);
  text-decoration: none;
}

.menu-item:hover,
.menu-item:focus{
  background: #333;
  text-decoration: none;
  outline: none;
}

.menu-item:active{
  transform: scale(.98);
}

.menu-item.active{
  background: var(--accent);
  font-weight: 700;
}

.menu-item:focus-visible{
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

button.menu-item::-moz-focus-inner{
  border: 0;
  padding: 0;
}
\r\n.lightbox-actions{
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.action-button{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0px 12px;
  position: relative;
  min-height: 30px;
}

.action-button svg{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.action-button .action-text{
  line-height: 1.2;
  font-size: .85rem;
}

.copy-toast{
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(0,0,0,.85);
  color: var(--link);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.copy-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
button.menu-item:focus-visible{
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
button.menu-item::-moz-focus-inner{
  border: 0;
  padding: 0;
}

.about{
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px);
  background: rgba(34,34,34,.65);
  border-radius: 12px;
  line-height: 1.7;
  color: var(--fg);
}
.about p{ margin-bottom: 1.25rem;
  text-align: justify;
}
.about h3{
  margin: 2rem 0 1rem;
  font-size: 1.4rem;
  color: var(--fg);
}
.about ul{
  margin: 0 0 1.5rem 1.5rem;
  padding: 0;
  list-style: disc;
}
.about li{ margin-bottom: .75rem;
  text-align: left;
}
.about li::marker{ color: var(--accent); }


/* ===============================
   Scrollbar (WebKit)
   =============================== */
body::-webkit-scrollbar{ width: 12px; }
body::-webkit-scrollbar-thumb{
  background: #888;
  border-radius: 10px;
}
body::-webkit-scrollbar-track{ background: var(--panel); }

/* ===============================
   Responsive tweaks
   =============================== */


/* ===============================
   Accessibility helpers
   =============================== */
.sr-only{
  position: absolute;
  clip: rect(1px,1px,1px,1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.more-placeholder{
  padding: var(--gap);
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
}
