:root {
  --jci-navy: #122436;
  --jci-navy-mid: #1e3a56;
  --jci-navy-soft: #eef3f8;
  --jci-accent: #a67c22;
  --jci-accent-soft: #fbf7ee;
  --jci-bg: #f8f9fb;
  --jci-surface: #ffffff;
  --jci-border: #e2e8f0;
  --jci-text: #1e293b;
  --jci-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 28px rgba(18, 36, 54, 0.08);
}

body {
  font-family: "Bahnschrift", sans-serif;
  color: var(--jci-text);
  background-color: var(--jci-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h2, h3, h4, .serif-heading {
  font-family: 'Bahnschrift', sans-serif;
  color: var(--jci-navy);
  letter-spacing: -0.01em;
    font-weight: 450;
}

h5, h6 {
  font-family: 'Bahnschrift', sans-serif;
  font-weight: 450;
  color: var(--jci-navy);
  letter-spacing: -0.01em;
}

a {
  color: var(--jci-navy-mid);
  transition: color 0.15s ease;
}
a:hover {
  color: var(--jci-accent);
}

/* Modern Glassmorphic Header */
.site-header {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--jci-border);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--jci-navy), var(--jci-navy-mid));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bahnschrift', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-xs);
}

.brand-title {
  font-family: 'Bahnschrift', serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--jci-navy);
  line-height: 1.6;
  display: block;
}

.brand-subtitle {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--jci-muted);
  letter-spacing: 0.03em;
}

/* Primary Tab Navigation */
.primary-nav .nav-link {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  transition: all 0.18s ease;
}

.primary-nav .nav-link:hover,
.primary-nav .nav-link:focus {
  color: var(--jci-navy);
  background-color: var(--jci-navy-soft);
}

.primary-nav .nav-link.active {
  color: #ffffff;
  background-color: var(--jci-navy);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

/* Collections Dropdown Styling */
.collections-dropdown-menu {
  border: 1px solid var(--jci-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0.65rem;
  min-width: 300px;
  margin-top: 0.5rem !important;
}

.collections-dropdown-menu .dropdown-header {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--jci-accent);
  padding: 0.4rem 0.75rem 0.35rem;
}

.collections-dropdown-menu .dropdown-item {
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--jci-navy);
  white-space: normal;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.collections-dropdown-menu .dropdown-item:hover,
.collections-dropdown-menu .dropdown-item:focus {
  background-color: var(--jci-navy-soft);
  color: var(--jci-navy);
}

/* Editorial Page Banner */
.page-intro {
  background: linear-gradient(135deg, #122436 0%, #1d3954 100%);
  color: #ffffff;
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.page-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}
.page-intro h2 {
  color: #ffffff;
  font-size: clamp(1rem, 2vw, 2rem);
  font-weight: 500;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* Modern Cards & Surfaces */
.soft-card {
  background: var(--jci-surface);
  border: 1px solid var(--jci-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.soft-card.hoverable:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

/* Collection Epigraph / Quote Block */
.epigraph-box {
  background-color: var(--jci-accent-soft);
  border-left: 3px solid var(--jci-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.5rem;
}
.epigraph-box cite {
  font-family: 'Bahnschrift', serif;
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--jci-navy);
  line-height: 1.50;
  display: block;
}

/* Icon Chip */
.icon-chip {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--jci-navy-soft);
  color: var(--jci-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Catalog Specific Styles */
.catalog-entry-card {
  background: var(--jci-surface);
  border: 1px solid var(--jci-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.catalog-entry-card:hover {
  border-color: var(--jci-navy-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.filter-sidebar {
  background: var(--jci-surface);
  border: 1px solid var(--jci-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: 88px;
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-size: 0.86rem;
  color: #334155;
  transition: all 0.15s ease;
}
.filter-btn:hover {
  background-color: #f1f5f9;
  color: var(--jci-navy);
}
.filter-btn.active {
  background-color: var(--jci-navy-soft);
  color: var(--jci-navy);
  font-weight: 600;
  border-color: #cbd5e1;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--jci-accent);
  display: block;
  margin-bottom: 0.4rem;
}

.pill-badge {
  display: inline-flex;
  align-items: top;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background-color: var(--jci-navy-soft);
  color: var(--jci-navy);
}

/* Banner Display */
.banner-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
 
}

/* Buttons */
.btn-jci-primary {
  background-color: var(--jci-navy);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  transition: all 0.15s ease;
}
.btn-jci-primary:hover {
  background-color: var(--jci-navy-mid);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-jci-outline {
  background-color: var(--jci-surface);
  color: var(--jci-navy);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  transition: all 0.15s ease;
}
.btn-jci-outline:hover {
  background-color: var(--jci-navy-soft);
  border-color: var(--jci-navy);
  color: var(--jci-navy);
}

.text-action {
  color: var(--jci-navy);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.text-action:hover {
  color: var(--jci-accent);
}

/* Breadcrumb Trail */
.jci-breadcrumb {
  font-size: 0.84rem;
  color: var(--jci-muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

/* Modal PDF Viewer */
.pdf-preview-frame {
  width: 100%;
  height: clamp(380px, 68vh, 720px);
  border: 1px solid var(--jci-border);
  border-radius: var(--radius-md);
  background-color: #f1f5f9;
}

/* Clean Modern Footer */
.site-footer {
  background-color: var(--jci-navy);
  color: rgba(255, 255, 255, 0.82);
  margin-top: auto;
  padding: 2.5rem 0;
  font-size: 0.92rem;
}
.site-footer strong {
  color: #ffffff;
  font-family: 'Bahnschrift', serif;
  font-size: 1.2rem;
  font-weight: 500;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
}
.site-footer a:hover {
  color: #ffffff;
}

.jci-read-more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--jci-navy);
  user-select: none;
}
.jci-read-more summary:hover {
  color: var(--jci-accent);
}
.jci-read-more summary::-webkit-details-marker {
  display: none;
}
.jci-read-more .less-text {
  display: none;
}
.jci-read-more[open] .more-text {
  display: none;
}
.jci-read-more[open] .less-text {
  display: inline;
}

/* Photo Gallery - 6 columns on desktop, responsive below */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1399.98px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 479.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gallery-tile {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--jci-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #e2e8f0;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gallery-tile:hover,
.gallery-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--jci-navy);
  box-shadow: var(--shadow-md);
  outline: none;
}
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-tile .tile-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.75rem 0.75rem 0.6rem;
  background: linear-gradient(to top, rgba(18, 36, 54, 0.92), rgba(18, 36, 54, 0));
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.3;
  text-align: left;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.gallery-tile:hover .tile-caption,
.gallery-tile:focus-visible .tile-caption { opacity: 1; }
.gallery-tile .tile-year {
  position: absolute;
  top: 0.55rem; right: 0.55rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--jci-navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}
@media (hover: none) {
  .gallery-tile .tile-caption { opacity: 1; }
}
.lightbox-img-wrap {
  background: #0f172a;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: min(70vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox-nav-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--jci-navy);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
}
.lightbox-nav-btn:hover { background: var(--jci-navy-soft); }

/* Pagination */
.jci-pagination .page-link {
  color: var(--jci-navy);
  border-color: var(--jci-border);
  min-width: 2.4rem;
  text-align: center;
  font-size: 0.9rem;
}
.jci-pagination .page-link:hover { background-color: var(--jci-navy-soft); color: var(--jci-navy); }
.jci-pagination .page-link:focus { box-shadow: 0 0 0 0.2rem rgba(18, 36, 54, 0.15); }
.jci-pagination .page-item.active .page-link {
  background-color: var(--jci-navy);
  border-color: var(--jci-navy);
  color: #fff;
  font-weight: 600;
}
.jci-pagination .page-item.disabled .page-link { color: #94a3b8; background: #fff; }

/* Catalog Compact View */
#typeFilterList, #creatorFilterList { scrollbar-width: thin; }
#typeFilterList { max-height: 220px; overflow-y: auto; }
.density-toggle .btn { font-size: 0.8rem; padding: 0.25rem 0.65rem; }
.density-toggle .btn.active { background: var(--jci-navy); color: #fff; border-color: var(--jci-navy); }

#catalogEntriesContainer.is-compact { gap: 0.5rem !important; }
.is-compact .catalog-entry-card {
  padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 0.92rem; line-height: 1.35;
}
.is-compact .catalog-entry-card:hover { transform: none; }
.is-compact .catalog-entry-card :is(h1,h2,h3,h4,h5,h6) { font-family: 'Bahnschrift', sans-serif; font-size: 1.2rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.2rem !important; }
.is-compact .catalog-entry-card p {
  margin-bottom: 0.25rem !important; font-size: 0.88rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.is-compact .catalog-entry-card [class*="mb-"] { margin-bottom: 0.2rem !important; }
.is-compact .catalog-entry-card [class*="mt-"] { margin-top: 0.2rem !important; }
.is-compact .catalog-entry-card [class*="pt-"], .is-compact .catalog-entry-card [class*="py-"] { padding-top: 0.2rem !important; }
.is-compact .catalog-entry-card .pill-badge { font-size: 0.72rem; padding: 0.1rem 0.55rem; }
.is-compact .catalog-entry-card .small, .is-compact .catalog-entry-card small { font-size: 0.8rem; }

/* Catalog Modal Image Viewer */
.image-viewer { border: 1px solid var(--jci-border); border-radius: var(--radius-md); overflow: hidden; background: #0f172a; }
.image-viewer-toolbar {
  display: flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.6rem;
  background: #f1f5f9; border-bottom: 1px solid var(--jci-border); font-size: 0.84rem; color: var(--jci-muted);
}
.image-viewer-toolbar .iv-btn {
  border: 1px solid #cbd5e1; background: #fff; color: var(--jci-navy); border-radius: 6px;
  min-width: 2rem; padding: 0.1rem 0.5rem; line-height: 1.4;
}
.image-viewer-toolbar .iv-btn:hover { background: #e2e8f0; }
.image-viewer-toolbar .iv-zoom { margin-left: auto; font-variant-numeric: tabular-nums; }
.image-viewer-stage {
  height: clamp(340px, 62vh, 660px); overflow: auto; display: flex; align-items: center; justify-content: center;
  cursor: zoom-in;
}
.image-viewer-stage.is-zoomed { display: block; cursor: zoom-out; }
.image-viewer-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; margin: auto; }
.image-viewer-stage.is-zoomed img { max-width: none; max-height: none; }
.image-viewer-error { color: #cbd5e1; padding: 2rem; text-align: center; }

/* Series Cards in Collection Guides */
.series-item {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: #f8fafc;
  border: 1px solid var(--jci-border);
}

/* Form Controls */
.form-control, .form-select {
  border-color: #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--jci-navy);
  box-shadow: 0 0 0 0.2rem rgba(18, 36, 54, 0.12);
}

/* Home Right Sidebar: Library News & Highlights */
.news-sidebar-card {
  position: sticky;
  top: 88px;
}

.news-item .news-title-link {
  color: var(--jci-navy);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
  display: inline-block;
}

.news-item .news-title-link:hover {
  color: var(--jci-accent);
}