/* ============================================
   style.css
   Public Archive Site - Base Stylesheet
   ============================================ */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000;
  color: #fff;
  font-family: 'Arial', sans-serif;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Georgia', serif;
  color: #c9a84c;
}

p, a, nav, li {
  font-family: 'Arial', sans-serif;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #c9a84c;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

a:visited {
  color: #c9a84c;
}

/* ============================================
   HEADER & NAV
   ============================================ */

header {
  background-color: #000;
  border-bottom: 2px solid #c9a84c;
  padding: 2rem 2rem 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-family: 'Cinzel', serif;
  color: #c9a84c;
  text-transform: uppercase;
}

header h1 a {
  font-family: 'Cinzel', serif;
  color: #c9a84c;
  text-decoration: none;
  text-transform: uppercase;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
  padding-right: 1rem;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: #c9a84c;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  background-color: #111;
  border: 1px solid #c9a84c;
  min-width: 180px;
  flex-direction: column;
  gap: 0;
  padding-top: 0.75rem;
}

nav ul li:hover ul {
  display: flex;
}

nav ul li ul li a {
  padding: 0.6rem 0.3rem;
  display: block;
  font-size: 0.85rem;
  text-align: left;
}

nav ul li ul li a:hover {
  background-color: #c9a84c;
  color: #000;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
  width: 75%;
  margin: 0 auto;
  padding: 2rem 0 0 0;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  font-family: 'Arial', sans-serif;
  font-size: 0.85rem !important;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0 1.5rem 0;
  color: #666;
}

.breadcrumb-current {
  color: #666;
  font-family: 'Arial', sans-serif;
  font-size: 0.85rem !important;
  font-weight: bold;
}

.breadcrumb a {
  color: #666;
  font-family: 'Arial', sans-serif;
}

.breadcrumb a:hover {
  color: #c9a84c;
}

.breadcrumb-sep {
  color: #666;
  margin: 0 0.5rem;
}

/* ============================================
   CURATOR NOTE
   ============================================ */

.curator-note {
  width: 85%;
  max-width: 1100px;
  margin: 2rem auto 3rem;
  position: relative;
  z-index: 1;
  border: 1px solid #333;
  background: #0a0a0a;
  padding: 2.5rem 2.5rem 1.25rem;
  transition: opacity 0.25s ease;
}

.curator-note.is-hidden {
  display: none;
}

.curator-note-inner {
  border-left: 1px solid #c9a84c;
  padding-left: 2rem;
}

.curator-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a84c;
  margin: 0 0 1rem;
}

.curator-lead {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.45;
  margin: 0 0 1.5rem;
  color: #fff;
}

.curator-lead em {
  font-style: normal;
  color: #c9a84c;
}

.curator-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #999;
  margin: 0 0 2rem;
}

.curator-signoff {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-top: 1px solid #333;
  padding-top: 1.2rem;
  max-width: 300px;
}

.curator-signoff-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.curator-signoff-name {
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  color: #c9a84c;
}

.curator-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 32px;
  height: 32px;
  border: 1px solid #333;
  background: transparent;
  border-radius: 50%;
  color: #666;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Arial', sans-serif;
}

.curator-close:hover {
  border-color: #c9a84c;
  color: #c9a84c;
}

.curator-reopen {
  width: 85%;
  max-width: 1100px;
  margin: 2rem auto 2rem;
  display: none;
  text-align: center;
  position: relative;
  z-index: 1;
}

.curator-reopen.is-visible {
  display: block;
}

.curator-reopen button {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9a84c;
  background: transparent;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
}

.curator-reopen button:hover {
  border-color: #c9a84c;
}

/* ============================================
   HOMEPAGE
   ============================================ */

.splash {
  width: 80%;
  display: block;
  margin: 0 auto;
  filter: grayscale(100%);
  clip-path: inset(15% 0 20% 0);
  margin-top: -15%;
  margin-bottom: -20%;
}

.tiles-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 85%;
  margin: 0 auto 4rem;
}

.tile {
  display: block;
  text-decoration: none;
  border: 1px solid #333;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.tile:hover {
  border-color: #c9a84c;
}

.tile-img {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.tile:hover .tile-img {
  filter: grayscale(0%);
}

.tile-img-empty {
  background-color: #111;
}

.tile-label {
  padding: 1rem;
  background: #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #333;
  gap: 0.5rem;
}

.tile-name {
  font-family: 'Cinzel', serif;
  color: #c9a84c;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  flex: 1;
}

.tile-count {
  color: #555;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================
   COLLECTION PAGE
   ============================================ */

.collection-wrap {
  padding: 2rem;
}

.collection-table {
  width: 75%;
  margin: 0 auto;
  border-collapse: collapse;
}

.collection-table tr {
  border-bottom: 1px solid #333;
}

.collection-table td {
  padding: 1.5rem 1rem;
  vertical-align: top;
}

.col-text a {
  color: #c9a84c;
  text-decoration: none;
  font-size: 1.1rem;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
}

.col-text a:hover {
  color: #fff;
}

.col-image {
  width: 270px;
  text-align: right;
}

.col-image img {
  display: block;
  margin-left: auto;
}

.item-date-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.3rem 0 0.75rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
}

.pagination a {
  color: #c9a84c;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pagination a:hover {
  color: #fff;
}

/* ============================================
   ITEM PAGE
   ============================================ */

.item-wrap {
  width: 75%;
  margin: 2rem auto;
}

.item-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 3rem;
}

.item-table tr {
  border-bottom: 1px solid #333;
}

.item-label {
  color: #c9a84c;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.75rem 1rem 0.75rem 0;
  width: 180px;
  vertical-align: top;
}

.item-value {
  color: #ccc;
  font-size: 0.9rem;
  padding: 0.75rem 0;
  line-height: 1.5;
}

.item-value br {
  display: block;
  margin-bottom: 0.75rem;
  content: "";
}

.image-viewer {
  position: relative;
  text-align: center;
}

.image-viewer img {
  display: block;
  margin: 0 auto;
}

.img-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

.img-arrow {
  color: #c9a84c;
  font-size: 2.5rem;
  text-decoration: none;
}

.img-arrow:hover {
  color: #fff;
}

.img-arrow-placeholder {
  display: inline-block;
  width: 2.5rem;
}

.img-count {
  color: #666;
  font-size: 0.8rem;
}

.related-wrap {
  margin-top: 3rem;
  border-top: 1px solid #333;
  padding-top: 2rem;
}

.related-heading {
  font-family: 'Cinzel', serif;
  color: #c9a84c;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.related-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  width: 150px;
}

.related-item img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  filter: grayscale(100%);
  border: 1px solid #333;
  transition: filter 0.3s ease, border-color 0.3s ease;
}

.related-item:hover img {
  filter: grayscale(0%);
  border-color: #c9a84c;
}

.related-title {
  color: #ccc;
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.related-item:hover .related-title {
  color: #c9a84c;
}

/* ============================================
   TIMELINE (FLOW-BASED, LAYERED)
   ============================================ */

.kb-bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.kb-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  opacity: 0;
  transition: opacity 1.5s ease;
  animation: kbpan 24s ease-in-out infinite alternate;
}

.kb-bg-img.active {
  opacity: 0.12;
}

@keyframes kbpan {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(-2%, -1%); }
}

.layer-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 3rem;
  flex-wrap: wrap;
  width: 90%;
}

.layer-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  border: 1px solid #c9a84c;
  background: transparent;
  color: #c9a84c;
  cursor: pointer;
  transition: all 0.25s ease;
}

.layer-btn.active {
  background: #c9a84c;
  color: #000;
}

.layer-btn .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.splash-timeline-wrap {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.splash-timeline {
  position: relative;
  padding: 1rem 0;
}

.splash-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #c9a84c;
  transform: translateX(-50%);
}

.timeline-row {
  position: relative;
  display: flex;
  width: 100%;
  margin-bottom: 1.5rem;
}

.timeline-row.tl-left-row {
  justify-content: flex-end;
  padding-right: 50%;
}
.timeline-row.tl-right-row {
  justify-content: flex-start;
  padding-left: 50%;
}

.splash-entry {
  position: relative;
  width: 100%;
  max-width: calc(500px - 3rem);
  box-sizing: border-box;
}

.tl-left {
  text-align: right;
  margin-right: 2rem;
}
.tl-right {
  text-align: left;
  margin-left: 2rem;
}

.splash-dot {
  position: absolute;
  top: 0.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  z-index: 2;
}
.tl-left .splash-dot { right: -2.6rem; }
.tl-right .splash-dot { left: -2.6rem; }

.splash-entry.collection .splash-dot { background: #c9a84c; }
.splash-entry.culture .splash-dot { background: #7a8ca8; }
.splash-entry.milestone .splash-dot { background: #a87a8c; }
.splash-entry.session .splash-dot { background: #5a8a6e; }

.splash-entry.collection .splash-entry-date { color: #c9a84c; }
.splash-entry.culture .splash-entry-date { color: #7a8ca8; }
.splash-entry.milestone .splash-entry-date { color: #a87a8c; }
.splash-entry.session .splash-entry-date { color: #5a8a6e; }

.splash-box {
  display: inline-block;
  max-width: 100%;
  background: #111;
  border: 1px solid #222;
  padding: 0.75rem 1rem;
}

.splash-entry-date {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.entry-layer-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
  display: block;
  margin-bottom: 0.3rem;
}

.tl-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Applies to ALL timeline entry text (collection, culture, milestone, session)
   so linked and non-linked items render identically */
.tl-item-list li {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: #ccc;
  padding: 0.2rem 0;
  border-top: 1px solid #1e1e1e;
}

.tl-item-list li a {
  display: block;
  color: inherit;
  text-decoration: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.tl-item-list li a:hover {
  color: #c9a84c;
}

/* Sessions-layer specific elements */
.tl-session-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tl-session-link:hover .splash-entry-date {
  color: #fff;
}

.tl-session-city {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #777;
  margin-bottom: 0.6rem;
}

/* ============================================
   SESSION DETAIL PAGE (session.php)
   ============================================ */

.session-date-block {
  width: 75%;
  margin: 0 auto 3rem;
}

.session-date-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9a84c;
  border-bottom: 1px solid #333;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.session-back-link {
  text-align: center;
  margin-top: 2rem;
}

.session-back-link a {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   SESSIONS TABLE (sessions.php)
   ============================================ */

.sessions-controls {
  margin-bottom: 32px;
  text-align: center;
}

.sessions-controls input[type="text"] {
  width: 100%;
  max-width: 600px;
  padding: 12px 16px;
  font-family: 'Arial', sans-serif;
  font-size: 1.1rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #111;
  color: #fff;
}

.sessions-controls input[type="text"]:focus {
  outline: none;
  border-color: #c9a84c;
}

/* ============================================
   DATA TABLE (sessions.php / session.php)
   ============================================ */

.data-table {
  width: 75%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
}

.data-table thead {
  background: #161616;
}

.data-table th {
  font-family: 'Cinzel', serif;
  color: #c9a84c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: 2px solid #c9a84c;
  user-select: none;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.data-table th:hover {
  color: #fff;
}

.data-table th.sort-asc::after {
  content: " \25B2";
  font-size: 0.7em;
  color: #c9a84c;
}

.data-table th.sort-desc::after {
  content: " \25BC";
  font-size: 0.7em;
  color: #c9a84c;
}

.data-table tbody tr {
  border-bottom: 1px solid #1e1e1e;
  transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
  background: #0a0a0a;
}

.data-table tbody tr:nth-child(odd) {
  background: #0d0d0d;
}

.data-table tbody tr:hover {
  background: #1a1610;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table td {
  color: #ccc;
  font-size: 0.85rem;
  padding: 0.75rem 1.1rem;
  vertical-align: middle;
}

.data-table td.col-title {
  color: #e6d2a3;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sessions-table {
  margin-top: 8px;
}

.sessions-count {
  margin-top: 10px;
  font-family: 'Arial', sans-serif;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-wrap {
  width: 60%;
  margin: 2rem auto;
  max-width: 700px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-input {
  background: #000;
  color: #fff;
  border: 1px solid #333;
  padding: 0.85rem 1rem;
  font-family: 'Arial', sans-serif;
  font-size: 0.9rem;
  width: 100%;
}

.contact-input:focus {
  outline: none;
  border-color: #c9a84c;
}

.contact-textarea {
  background: #000;
  color: #fff;
  border: 1px solid #333;
  padding: 0.85rem 1rem;
  font-family: 'Arial', sans-serif;
  font-size: 0.9rem;
  width: 100%;
  height: 180px;
  resize: vertical;
}

.contact-textarea:focus {
  outline: none;
  border-color: #c9a84c;
}

.contact-btn {
  background: #c9a84c;
  color: #000;
  border: none;
  padding: 0.75rem 2.5rem;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  align-self: center;
  font-size: 0.9rem;
}

.contact-btn:hover {
  background: #fff;
}

.contact-success {
  text-align: center;
  padding: 4rem 0;
  color: #c9a84c;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  border-top: 1px solid #c9a84c;
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
  .collection-table {
    width: 100%;
  }

  .collection-table tr {
    display: flex;
    flex-direction: column;
  }

  .col-image {
    width: 100%;
    text-align: center;
  }

  .col-image img {
    margin: 0 auto;
    max-width: 100%;
    width: 250px;
  }

  .collection-wrap {
    padding: 1rem;
  }

  .item-wrap {
    width: 95%;
  }

  .image-viewer img {
    max-width: 100%;
  }

  .tiles-wrap {
    grid-template-columns: repeat(2, 1fr);
    width: 95%;
  }

  .tile-label {
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-wrap {
    width: 90%;
  }

  .curator-note {
    width: 95%;
    padding: 1.5rem;
  }

  .curator-note-inner {
    padding-left: 1.25rem;
  }

  .curator-lead {
    font-size: 1.15rem;
  }

  .curator-reopen {
    width: 95%;
  }

  .splash-line {
    left: 0;
    transform: none;
  }

  .timeline-row {
    justify-content: flex-start !important;
    padding-left: 1.5rem !important;
    padding-right: 0 !important;
  }

  .splash-entry {
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .tl-left, .tl-right {
    text-align: left !important;
  }

  .tl-left .splash-dot,
  .tl-right .splash-dot {
    left: -1.95rem !important;
    right: auto !important;
  }

  .session-date-block {
    width: 100%;
  }

  .data-table {
    width: 100%;
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.6rem 0.6rem;
  }
}