/* Saint — navbar.
   A compact bar fixed at the top. Hovering a menu item slides a highlight
   behind it and opens one shared panel that glides and resizes to fit each
   item's content. */

.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;            /* only the bar and panel take clicks */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- The bar ---------- */
.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: rgba(8, 8, 8, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  pointer-events: auto;
}

.site-nav .brand {
  position: relative;
  z-index: 1;
  padding: 0 14px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  color: #f2f2f2;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav .brand:focus-visible { outline: 1px solid #f2f2f2; outline-offset: 4px; border-radius: 6px; }

.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-trigger {
  position: relative;
  z-index: 1;                      /* above the sliding highlight */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #b5b5b5;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.25s ease;
}
.nav-trigger:hover,
.nav-trigger[aria-expanded="true"] { color: #fff; }
.nav-trigger:focus-visible { outline: 1px solid #f2f2f2; outline-offset: -1px; }

.nav-trigger .chev {
  width: 9px;
  height: 9px;
  transition: transform 0.4s var(--ease);
}
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* The soft pill that glides behind the hovered item. */
.nav-highlight {
  position: absolute;
  top: 6px;
  left: 0;
  height: 36px;
  width: 0;
  border-radius: 9px;
  background: #181818;
  border: 1px solid #262626;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.42s var(--ease),
    width 0.42s var(--ease),
    opacity 0.25s ease;
}
.nav-highlight.visible { opacity: 1; }

/* ---------- The shared panel ---------- */
.nav-panel {
  position: absolute;
  top: 58px;
  left: 0;
  width: 0;
  height: 0;
  background: rgba(8, 8, 8, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(var(--x, 0px)) translateY(-8px) scale(0.97);
  transform-origin: top center;
  pointer-events: none;
  transition:
    transform 0.45s var(--ease),
    width 0.45s var(--ease),
    height 0.45s var(--ease),
    opacity 0.25s ease;
}
.nav-panel.open {
  opacity: 1;
  transform: translateX(var(--x, 0px)) translateY(0) scale(1);
  pointer-events: auto;
}
.nav-panel.instant,
.nav-panel.instant .nav-section { transition: none; }

/* Each item's content. Only the active one is shown; the others wait
   off to one side, ready to slide in from the direction you moved. */
.nav-section {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition:
    opacity 0.28s ease,
    transform 0.45s var(--ease),
    visibility 0s linear 0.45s;
}
.nav-section.left { transform: translateX(-18px); }
.nav-section.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.35s ease 0.06s,
    transform 0.45s var(--ease),
    visibility 0s;
}

.nav-section h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: #f2f2f2;
}
.nav-section p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #8a8a8a;
}
.nav-section a { color: #d9d9d9; text-decoration: none; }
.nav-section a:focus-visible { outline: 1px solid #f2f2f2; outline-offset: 2px; border-radius: 8px; }

.ns-row {
  display: flex;
  gap: 20px;
}
.ns-intro {
  width: 180px;
  display: flex;
  flex-direction: column;
}
.ns-cta {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
}
.ns-cta:hover { color: #fff; }

/* Saint tiles: a still of each card's emblem. */
.ns-tiles { display: flex; gap: 10px; }
.ns-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #b5b5b5;
}
.ns-tile canvas,
.ns-tile .thumb {
  display: block;
  border-radius: 10px;
  background: #050505;
  border: 1px solid #1c1c1c;
  transition: border-color 0.3s ease;
}
.ns-tile:hover { color: #fff; }
.ns-tile:hover canvas,
.ns-tile:hover .thumb { border-color: #3a3a3a; }

/* Gallery thumbnail: a crop of the painting at the hands. */
.ns-tile .thumb {
  width: 220px;
  height: 104px;
  background-size: 360% auto;
  background-position: 37.5% 45%;
  background-repeat: no-repeat;
}

/* Feast days list. */
.ns-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  width: 250px;
}
.ns-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.2s ease;
}
.ns-list a:hover { background: #141414; color: #fff; }
.ns-list .date { color: #8a8a8a; font-size: 13px; }

/* Narrow screens: stack the saints panel. */
@media (max-width: 640px) {
  .ns-row { flex-direction: column; gap: 14px; }
  .ns-intro { width: auto; max-width: 260px; }
  .ns-cta { padding-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-highlight,
  .nav-panel,
  .nav-section,
  .nav-trigger .chev { transition: none !important; }
}
