/* ==========================================================================
   3. Details Page & Exhibition Cards
   ========================================================================== */

.details-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.details-hero-card {
  padding: 16px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9f6 100%);
  border: 1px solid rgba(22, 66, 52, 0.16);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(22, 66, 52, 0.04);
}

.details-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.details-hero-center {
  text-align: center;
  flex: 1;
}

.details-hero-kicker {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1e5645;
  margin-bottom: 2px;
}

.details-year-heading {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 700;
  color: #164234;
  letter-spacing: -0.01em;
}

.details-year-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(22, 66, 52, 0.22);
  color: #1e5645;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(22, 66, 52, 0.05);
  transition: all 0.15s ease;
}

.details-year-nav-link:hover {
  background: #1e5645;
  color: #ffffff !important;
  border-color: #1e5645;
}

.details-year-nav-link.disabled {
  visibility: hidden;
  pointer-events: none;
}

/* Series Intro Box from details.txt */
.series-intro-card {
  margin: 12px 0 14px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid rgba(22, 66, 52, 0.18);
  border-left: 4px solid #1e5645;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(22, 66, 52, 0.04);
}

.series-intro-body p {
  margin: 6px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #2c3e35;
}

.series-intro-body p:first-child {
  margin-top: 0;
  font-weight: 600;
  color: #164234;
}

.series-intro-body p:last-child {
  margin-bottom: 0;
}

.details-hero-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 66, 52, 0.08);
}

.details-stats-count {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1e5645;
  background: rgba(30, 86, 69, 0.10);
  border: 1px solid rgba(30, 86, 69, 0.22);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Catalog Card Grid */
.catalog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding: 4px 2px 18px;
}

.catalog-card {
  margin: 0;
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
  border: 1px solid rgba(22, 66, 52, 0.14);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(22, 66, 52, 0.05), 0 1px 3px rgba(22, 66, 52, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.catalog-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #1e5645, #3a8a70, #1e5645);
  opacity: 0.9;
  z-index: 2;
}

.catalog-card:hover,
.catalog-card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 28px rgba(22, 66, 52, 0.14), 0 4px 10px rgba(22, 66, 52, 0.06);
  border-color: #1e5645;
}

/* Card Header */
.catalog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(22, 66, 52, 0.08);
  background: rgba(255, 255, 255, 0.85);
}

.card-badge-id {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #164234;
  letter-spacing: 0.02em;
}

.card-badge-perf {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(30, 86, 69, 0.10);
  border: 1px solid rgba(30, 86, 69, 0.25);
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #1e5645;
}

.card-badge-var {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(184, 134, 11, 0.14);
  border: 1px solid rgba(184, 134, 11, 0.35);
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #8c6b12;
}

/* Card Image Stage */
.catalog-card-image {
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  background: radial-gradient(circle at center, #ffffff 40%, #f2f8f5 100%);
  position: relative;
  overflow: hidden;
}

.catalog-card-image img {
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}

.catalog-card:hover .catalog-card-image img {
  transform: scale(1.04);
}

/* Hover hint overlay */
.catalog-card-hover-hint {
  position: absolute;
  inset: auto 12px 10px auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(22, 66, 52, 0.88);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.catalog-card:hover .catalog-card-hover-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Card Body */
.catalog-card-body {
  padding: 10px 12px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #ffffff;
  border-top: 1px solid rgba(22, 66, 52, 0.06);
}

.catalog-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-meta-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  line-height: 1.35;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(22, 66, 52, 0.08);
}

.card-meta-line:last-child {
  border-bottom: none;
}

.card-meta-k {
  font-family: 'Inter', -apple-system, sans-serif;
  color: #4b665a;
  font-weight: 600;
  flex-shrink: 0;
}

.card-meta-v {
  font-weight: 700;
  color: #164234;
  text-align: right;
  word-break: break-word;
}

.card-meta-empty {
  color: #8fa69c;
  font-size: 11px;
}

/* Card Footer */
.catalog-card-footer {
  padding: 8px 12px;
  background: #f7fbf9;
  border-top: 1px solid rgba(22, 66, 52, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-open-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e5645;
  transition: color 0.15s ease;
}

.catalog-card:hover .card-open-hint {
  color: #164234;
}

/* ==========================================================================
   4. Centered Exhibition Card Modal (#miskolcCardModal)
   ========================================================================== */

body.miskolc-modal-open {
  overflow: hidden !important;
}

.miskolc-card-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.miskolc-card-modal.is-active {
  opacity: 1;
  visibility: visible;
}

/* Dark Backdrop */
.miskolc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 30, 24, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.miskolc-card-modal.is-active .miskolc-modal-backdrop {
  opacity: 1;
}

/* Floating Navigation Arrows */
.miskolc-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(22, 66, 52, 0.22);
  color: #164234;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.18s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.miskolc-modal-nav.prev {
  left: max(12px, calc((100vw - 940px) / 2 - 58px));
}

.miskolc-modal-nav.next {
  right: max(12px, calc((100vw - 940px) / 2 - 58px));
}

.miskolc-modal-nav:hover {
  background: #1e5645;
  border-color: #164234;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
}

/* Center Magnified Card */
.miskolc-modal-card {
  position: relative;
  z-index: 5;
  width: 920px;
  height: 580px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(12px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
  box-sizing: border-box;
}

.miskolc-card-modal.is-active .miskolc-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal Topbar */
.miskolc-modal-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  flex: 0 0 48px;
  padding: 0 16px;
  background: linear-gradient(180deg, #f7fbf9 0%, #edf6f2 100%);
  border-bottom: 1px solid rgba(22, 66, 52, 0.14);
  box-sizing: border-box;
}

.miskolc-modal-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.miskolc-modal-badge {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1e5645;
  background: rgba(30, 86, 69, 0.12);
  border: 1px solid rgba(30, 86, 69, 0.28);
  border-radius: 9999px;
  padding: 2px 8px;
}

.miskolc-modal-id {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #164234;
}

.miskolc-modal-counter {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #164234;
  background: rgba(22, 66, 52, 0.08);
  border-radius: 999px;
  padding: 3px 10px;
}

.miskolc-modal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.miskolc-modal-action-btn,
.miskolc-modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(22, 66, 52, 0.18);
  background: #ffffff;
  color: #164234;
  cursor: pointer;
  transition: all 0.15s ease;
}

.miskolc-modal-action-btn:hover,
.miskolc-modal-close-btn:hover {
  background: #1e5645;
  border-color: #1e5645;
  color: #ffffff;
}

.miskolc-modal-action-btn.is-active {
  background: #1e5645;
  color: #ffffff;
  border-color: #1e5645;
}

/* Modal Body: 2 Columns */
.miskolc-modal-card-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

/* Snappy slide transitions */
.miskolc-modal-card-body.slide-out-left {
  transform: translateX(-35px);
  opacity: 0;
}

.miskolc-modal-card-body.slide-out-right {
  transform: translateX(35px);
  opacity: 0;
}

.miskolc-modal-card-body.slide-in-left {
  transform: translateX(-35px);
  opacity: 0;
}

.miskolc-modal-card-body.slide-in-right {
  transform: translateX(35px);
  opacity: 0;
}

/* Left Image Column */
.miskolc-modal-image-col {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #ffffff 40%, #edf6f2 100%);
  padding: 16px;
  box-sizing: border-box;
  position: relative;
  border-right: 1px solid rgba(22, 66, 52, 0.12);
  min-width: 0;
  overflow: hidden;
}

.miskolc-modal-image-viewport {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 8px;
}

.miskolc-modal-image-viewport.is-zoomed {
  cursor: zoom-out;
}

.miskolc-modal-img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
}

.miskolc-modal-image-caption {
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #4b665a;
  text-align: center;
}

.miskolc-modal-zoom-hint {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: #7a9488;
  margin-top: 2px;
}

/* Right Details Column */
.miskolc-modal-details-col {
  flex: 1 1 42%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 18px 20px;
  box-sizing: border-box;
  overflow-y: auto;
  min-width: 0;
}

.miskolc-modal-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.miskolc-modal-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(22, 66, 52, 0.08);
}

.miskolc-modal-meta-row:last-child {
  border-bottom: none;
}

.miskolc-modal-meta-row .meta-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #4b665a;
  flex-shrink: 0;
}

.miskolc-modal-meta-row .meta-value {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #164234;
  text-align: right;
  word-break: break-word;
}

.miskolc-modal-meta-empty {
  color: #7a9488;
  font-size: 12px;
  padding: 12px 0;
}
