:root {
  --card-bg: #ffffff;
  --border: #d1d5db;
  --radius: 8px;
  --shadow: 0 4px 10px rgba(0,0,0,0.04);
  --title-bar: #113d7c;
  --title-color: white;
  --gap: 16px;
  --max-width: 1200px;
  --ui-font: 'Open Sans', system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--ui-font);
  background: #f0f2f7;
  color: #1f2d3a;
  line-height: 1.35;
}

.topbar {
  background: #0a3d62;
  color: #fff;
  padding: 14px 20px;
}
.topbar nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar .site-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}
.topbar .site-title:hover {
  color: #ffd83d;
}
.topbar ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.topbar ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.topbar ul li a:hover {
  text-decoration: underline;
}

.page-heading {
  background: var(--title-bar);
  color: var(--title-color);
  padding: 12px 16px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-heading h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f5cf2e;
}
.page-heading p {
  width: 80%;
  margin: 0 auto;
  font-size: 1rem;
  font-weight: 400;
  text-align: left;
  white-space: pre-line;
}

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #eee;
}
.card picture { display:block; }
.card picture img { display:block; width:100%; height:auto; object-fit:contain; background:#eee; }
.card-content {
  padding: 14px 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}
.parallels {
  padding-left: 1em;
  list-style: none;
  margin: 6px 0 0;
  font-size: 0.9rem;
}
.parallels li {
  display: list-item;
  margin-bottom: 6px;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  font-family: inherit;
}
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px);
}
.lb-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.lb-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.lb-caption {
  font-size: 0.9rem;
  color: #333;
}

/* Buttons in parallel list */
.variant-btn:hover {
  opacity: 0.85;
}
.variant-btn:focus {
  outline: 2px solid #0b52d4;
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  body { background: #1f2430; color: #e1e6f0; }
  .card { background: #2a2f45; border-color: #3f4a7a; }
  .parallels { color: #d0d9f5; }
  .lb-content { background: #1f2430; }
  .lb-caption { color: #e1e6f0; }
  #lightbox-img { background: #222; }
  .lb-close { color: #e1e6f0; }
}

@media (max-width: 600px) {
  .topbar nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar ul {
    width: 100%;
    padding-left: 0;
  }
}
