/* ============================================================
   Nalais Archive — RETRO (early-2000s) public stylesheet
   Silver panels, beveled borders, navy title bars, Verdana.
   All existing page classes are preserved.
   ============================================================ */

/* ---------- Palette ---------- */
:root {
  --navy: #003366;
  --navy-2: #26456b;
  --silver: #c0c0c0;
  --silver-lt: #d9d9d9;
  --panel: #ececec;
  --ink: #1a1a1a;
  --link: #0033cc;
  --visited: #663399;
  --red: #a11;
  --gold: #c9a227;
}

* { box-sizing: border-box; }
html { background: #33475f; }
body {
  margin: 0;
  padding: 16px 10px 30px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 2px, transparent 2px 4px),
    #4a6079;
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--visited); }
a:hover { color: var(--red); }
img { border: 0; max-width: 100%; }
p { margin: 0 0 10px; }
.muted { color: #666; }

/* ---------- Outer page frame ---------- */
.page {
  max-width: 820px;
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid var(--navy);
  border-top-width: 3px;
}

/* ---------- Banner ---------- */
.banner {
  background: var(--navy);
  background-image: linear-gradient(180deg, #0a4a86 0%, var(--navy) 55%, #01203f 100%);
  border-bottom: 3px solid var(--gold);
  padding: 14px 18px;
  text-align: center;
}
.banner-link, .banner-link:visited { text-decoration: none; color: #fff; display: block; }
.banner-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px; font-weight: bold; letter-spacing: 1px;
  color: #ffffff; text-shadow: 1px 1px 0 #000;
}
.banner-sub { color: #cde3ff; font-size: 11px; letter-spacing: .5px; margin-top: 3px; text-transform: uppercase; }

/* ---------- Top nav bar ---------- */
.navbar {
  background: var(--silver);
  border-bottom: 2px solid #808080;
  border-top: 1px solid #fff;
  padding: 5px 10px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.navbar a {
  display: inline-block;
  background: var(--silver-lt);
  border: 2px outset #f4f4f4;
  padding: 3px 12px;
  color: #000; text-decoration: none; font-weight: bold; font-size: 11px;
}
.navbar a:visited { color: #000; }
.navbar a:hover { background: #eef4ff; color: var(--navy); border-style: inset; }
.navbar-note { margin-left: auto; color: #555; font-size: 10px; font-style: italic; }

/* ---------- Two-column layout ---------- */
.columns { display: flex; align-items: stretch; }
.sidebar { width: 180px; flex: 0 0 180px; background: var(--panel); border-right: 2px solid #999; padding: 12px 10px; }
.content { flex: 1; min-width: 0; padding: 16px 20px 24px; background: #fff; }

/* ---------- Sidebar boxes ---------- */
.side-box { margin-bottom: 16px; border: 1px solid #aaa; background: #fff; }
.side-title {
  background: var(--navy-2); color: #fff; font-weight: bold; font-size: 11px;
  padding: 4px 8px; text-transform: uppercase; letter-spacing: .5px;
}
.side-menu { list-style: none; margin: 0; padding: 6px 8px; }
.side-menu li { margin: 0 0 4px; }
.side-menu a { text-decoration: none; font-size: 11px; }
.side-menu a:hover { text-decoration: underline; }
.side-about p { padding: 8px; margin: 0; font-size: 11px; color: #333; }

/* ---------- Headings / section title bars ---------- */
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); }
.hero { text-align: center; border-bottom: 1px dashed #99a; padding-bottom: 12px; margin-bottom: 16px; }
.hero h1 { font-size: 24px; margin: 4px 0; }
.hero p { color: #555; font-style: italic; margin: 0; }

.section { margin: 20px 0; }
.section h2, .section-head h2, .page-head h1 {
  background: var(--navy); color: #fff; font-size: 14px; font-family: Verdana, sans-serif;
  padding: 5px 10px; margin: 0 0 12px; border-left: 5px solid var(--gold);
}
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-head h2 { flex: 1; margin: 0; }
.more-link { margin-left: 10px; font-size: 11px; white-space: nowrap; }

.page-head { margin-bottom: 16px; }
.page-head h1 { display: block; }
.page-head p { color: #555; font-style: italic; margin: 8px 2px 0; }

.breadcrumb { font-size: 11px; color: #555; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid #ddd; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 14px 0; }
.cat-card {
  display: block; background: var(--silver-lt); border: 2px outset #f0f0f0;
  padding: 10px 12px; color: #000; text-decoration: none;
}
.cat-card:visited { color: #000; }
.cat-card:hover { background: #eef4ff; border-style: inset; }
.cat-card h3 { margin: 4px 0 4px; font-size: 15px; }
.cat-card p { margin: 0; color: #444; font-size: 11px; }
.cat-type { font-size: 10px; font-weight: bold; text-transform: uppercase; color: #fff; background: #667; padding: 1px 6px; letter-spacing: .5px; }
.type-law_enforcement .cat-type, .type-law_enforcement.page-head h1 { }
.type-law_enforcement { border-left: 5px solid #003f7f; }
.type-fire { border-left: 5px solid #b32020; }
.type-ems { border-left: 5px solid #1f8a4c; }
.type-history { border-left: 5px solid #8a6d3b; }
.cat-card.type-law_enforcement .cat-type { background: #003f7f; }
.cat-card.type-fire .cat-type { background: #b32020; }
.cat-card.type-ems .cat-type { background: #1f8a4c; }
.cat-card.type-history .cat-type { background: #8a6d3b; }

/* page-head colored strip for a category */
.page-head.type-law_enforcement h1 { border-left-color: #6ab0ff; }
.page-head.type-fire h1 { border-left-color: #ff8a7a; }
.page-head.type-ems h1 { border-left-color: #7fe0a8; }
.page-head.type-history h1 { border-left-color: #d8b878; }
.page-head .cat-type { display: inline-block; margin-bottom: 6px; }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.post-card { background: #fbfbfb; border: 2px groove #d6d6d6; }
.post-thumb { display: block; }
.post-thumb img { width: 100%; height: 150px; object-fit: cover; border-bottom: 1px solid #ccc; }
.post-body { padding: 10px 12px; }
.post-body h3 { margin: 4px 0 4px; font-size: 15px; }
.post-body h3 a { text-decoration: none; }
.post-body h3 a:hover { text-decoration: underline; }
.post-meta { color: #777; font-size: 10px; margin: 0 0 6px; }
.post-body p { font-size: 11.5px; color: #333; margin: 0; }
.pill {
  display: inline-block; background: var(--silver-lt); border: 2px outset #f0f0f0;
  color: #003; font-size: 10px; font-weight: bold; padding: 1px 8px; text-decoration: none; text-transform: uppercase;
}
.pill:visited { color: #003; }
.pill:hover { background: #eef4ff; border-style: inset; color: var(--navy); }

/* ---------- Photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-grid.large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.photo-item { margin: 0; background: #fff; border: 2px inset #ddd; padding: 4px; }
.photo-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.photo-grid.large .photo-item img { height: 180px; }
.photo-item figcaption { padding: 5px 3px 2px; font-size: 11px; }
.photo-item figcaption strong { display: block; }
.photo-item figcaption .muted { font-size: 10px; display: block; }
.photo-item figcaption .photo-credit { font-style: italic; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.video-card { display: block; background: #fbfbfb; border: 2px groove #d6d6d6; color: #000; text-decoration: none; }
.video-card:visited { color: #000; }
.video-card:hover { text-decoration: none; border-color: var(--navy); }
.video-thumb {
  display: flex; align-items: center; justify-content: center;
  height: 130px; background: #10141b center/cover no-repeat; position: relative;
  border-bottom: 1px solid #ccc;
}
.video-play {
  color: #fff; font-size: 22px; width: 46px; height: 46px; line-height: 44px; text-align: center;
  background: rgba(0, 0, 0, .55); border: 2px solid #fff; border-radius: 50%; padding-left: 4px;
}
.video-card:hover .video-play { background: var(--navy); }
.video-info { display: block; padding: 9px 11px; }
.video-info strong { display: block; font-size: 14px; }
.video-info .muted { font-size: 11px; }

/* Responsive 16:9 embed for YouTube/Vimeo */
.video-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 12px 0; background: #000; border: 3px solid #99a; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Uploaded / direct-file player */
.video-player { display: block; width: 100%; max-height: 70vh; margin: 12px 0; background: #000; border: 3px solid #99a; }

/* ---------- Link lists ---------- */
.link-list { list-style: square; margin: 0; padding: 0 0 0 22px; }
.link-list li { padding: 4px 0; border-bottom: 1px dotted #ccc; }

/* ---------- Entry (single post / wiki) ---------- */
.entry { max-width: 100%; }
.entry-head h1 {
  background: var(--navy); color: #fff; font-family: Georgia, serif; font-size: 20px;
  padding: 8px 12px; margin: 6px 0 10px; border-left: 5px solid var(--gold);
}
.entry-image { display: block; margin: 12px 0; border: 3px double #99a; padding: 4px; background: #fff; }
.entry-body { font-size: 12.5px; line-height: 1.7; }
.entry-body p { margin: 0 0 12px; }
.entry-body h2 { font-size: 17px; margin: 20px 0 8px; border-bottom: 1px solid #ccd; padding-bottom: 3px; }
.entry-body h3 { font-size: 15px; margin: 16px 0 6px; }
.entry-body h4 { font-size: 13px; margin: 14px 0 6px; }
.entry-body ul, .entry-body ol { margin: 0 0 12px; padding-left: 26px; }
.entry-body li { margin: 3px 0; }
.entry-body a { text-decoration: underline; }
.entry-body img { display: block; margin: 12px 0; border: 3px double #99a; padding: 4px; background: #fff; max-width: 100%; }
.entry-body code { background: #eef; border: 1px solid #ccd; padding: 1px 4px; font-family: "Courier New", monospace; font-size: 12px; }
.entry-body blockquote {
  margin: 0 0 12px; padding: 6px 12px; background: #f4f4fb;
  border-left: 4px solid var(--navy); color: #333; font-style: italic;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--silver); border-top: 2px solid #808080;
  padding: 12px 14px; text-align: center; color: #333; font-size: 11px;
}
.footer-nav { margin-bottom: 6px; font-weight: bold; }
.footer p { margin: 3px 0; }
.footer-note { font-size: 10px; color: #555; font-style: italic; }

/* ---------- Buttons (public) ---------- */
.btn {
  display: inline-block; background: var(--silver-lt); color: #000;
  border: 2px outset #f0f0f0; border-radius: 2px; padding: 8px 18px;
  font-weight: bold; font-size: 12px; text-decoration: none; cursor: pointer;
  font-family: Verdana, sans-serif;
}
.btn:visited { color: #000; }
.btn:hover { text-decoration: none; background: #eef4ff; border-style: inset; color: var(--navy); }
.btn-primary { background: var(--navy); border: 2px outset #4a82c0; color: #fff; }
.btn-primary:visited { color: #fff; }
.btn-primary:hover { background: #0a4a86; border-style: inset; color: #fff; }
.btn-discord { background: #5865F2; border: 2px outset #7a86ff; color: #fff; }
.btn-discord:visited { color: #fff; }
.btn-discord:hover { background: #4752c4; border-style: inset; color: #fff; }

/* ---------- Contact page ---------- */
.contact-wrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.contact-form { flex: 1 1 320px; }
.contact-side { flex: 0 0 240px; }
.contact-form .field { margin-bottom: 14px; }
.contact-form label { display: block; font-weight: bold; font-size: 12px; margin-bottom: 4px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 8px 9px; border: 2px inset #d4d4d4; background: #fff;
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.contact-form textarea { resize: vertical; line-height: 1.6; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--navy);
}
.contact-form .btn.is-disabled { opacity: .5; cursor: not-allowed; filter: grayscale(1); }
.contact-fallback { font-size: 11.5px; margin-top: 6px; }
.contact-discord p { font-size: 12px; color: #333; margin: 8px; }
.contact-discord .btn-discord { display: block; text-align: center; margin: 8px; }

/* ---------- Alerts (public) ---------- */
.alert { padding: 10px 14px; border: 2px solid transparent; border-radius: 2px; margin-bottom: 16px; font-size: 12.5px; }
.alert-success { background: #e4f6ec; border-color: #1f8a4c; color: #14612f; }
.alert-error { background: #fbe6e4; border-color: #a11; color: #7a1010; }
.alert-info { background: #eaf1fb; border-color: var(--navy); color: #14315e; }
.alert-info a { color: var(--navy); font-weight: bold; }

/* ---------- Pride mode ---------- */
.navbar-pride {
  border: none; cursor: pointer; color: #fff; font-weight: bold; font-size: 11px;
  padding: 4px 14px; border-radius: 2px; text-transform: uppercase; letter-spacing: .5px;
  font-family: Verdana, sans-serif;
  background: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #004dff, #750787);
  background-size: 300% 100%;
  animation: pride-shift 5s linear infinite;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.navbar-pride:hover { filter: brightness(1.12) saturate(1.1); }
.navbar-pride.on { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 0 10px rgba(255, 255, 255, .6); }
@keyframes pride-shift { to { background-position: 300% 0; } }

/* Pride flag background (shows behind the page frame) */
body.pride {
  background:
    linear-gradient(180deg,
      #e40303 0 16.666%,
      #ff8c00 16.666% 33.333%,
      #ffed00 33.333% 50%,
      #008026 50% 66.666%,
      #004dff 66.666% 83.333%,
      #750787 83.333% 100%) fixed;
}
body.pride .page { box-shadow: 0 0 40px rgba(0, 0, 0, .35); }

/* Rainbow sparkles trailing the cursor */
.pride-sparkle {
  position: fixed; pointer-events: none; z-index: 2147482000;
  margin: -0.5em 0 0 -0.5em; line-height: 1;
  text-shadow: 0 0 6px currentColor;
  animation: pride-spark .85s ease-out forwards;
}
@keyframes pride-spark {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.25) rotate(var(--rot)); opacity: 0; }
}
/* Confetti burst (fired when Pride mode is switched on) */
.pride-confetti {
  position: fixed; width: 8px; height: 14px; pointer-events: none;
  z-index: 2147482500; border-radius: 1px; opacity: 0;
  will-change: transform, opacity;
  animation: pride-confetti 1.2s cubic-bezier(.2, .6, .3, 1) forwards;
}
@keyframes pride-confetti {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .navbar-pride { animation: none; }
  .pride-sparkle { animation-duration: .5s; }
  .pride-confetti { animation-duration: .7s; }
}

/* ---------- Lightbox ---------- */
.photo-item img { cursor: zoom-in; }
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .9);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0; max-width: 94vw; max-height: 94vh;
  display: flex; flex-direction: column; align-items: center;
}
.lb-img {
  max-width: 94vw; max-height: 84vh; object-fit: contain;
  border: 3px solid #fff; background: #111; box-shadow: 0 8px 40px rgba(0, 0, 0, .7);
}
.lb-cap { color: #eaeaea; font-size: 13px; margin-top: 12px; text-align: center; max-width: 80vw; font-family: Verdana, sans-serif; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: rgba(0, 0, 0, .55); color: #fff;
  border: 2px solid #fff; cursor: pointer; font-size: 24px; line-height: 1;
  width: 46px; height: 46px; padding: 0; font-family: Georgia, serif;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--navy); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lb-close, .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 20px; }
  .lb-close { top: 10px; right: 10px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ---------- Responsive fallback ---------- */
@media (max-width: 640px) {
  .columns { flex-direction: column; }
  .sidebar { width: 100%; flex: none; border-right: 0; border-bottom: 2px solid #999; }
  .banner-title { font-size: 24px; }
  .navbar-note { display: none; }
}
