/* ==========================================================================
   ovn-engine.css — Unified Ogden Valley News Feed, Reader, Flipbook & Events
   Host via GitHub Pages: https://apollux57.github.io/ovn-content/ovn-engine.css
   ========================================================================== */

.ovn-feed {
  max-width: 1280px;
  margin: 0 auto;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #222;
  line-height: 1.25 !important;
}
.ovn-feed.ovn-kind-events {
  line-height: 1.3 !important;
}
.ovn-feed .ovn-status {
  text-align: center;
  padding: 30px 16px;
  color: #666;
  font-size: 15px;
}
.ovn-feed.ovn-mode-home .ovn-status {
  padding: 24px 16px;
}
.ovn-feed.ovn-kind-events.ovn-mode-home .ovn-status {
  padding: 20px 16px;
}

/* Search Bar */
.ovn-feed .ovn-search-wrap { margin-bottom: 10px; }
.ovn-feed.ovn-kind-events .ovn-search-wrap { margin-bottom: 14px; }
.ovn-feed .ovn-search-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ovn-feed .ovn-search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  color: #222;
  box-sizing: border-box;
}
.ovn-feed .ovn-search-input:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.15);
}
.ovn-feed .ovn-search-clear {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  display: none;
}
.ovn-feed .ovn-search-clear:hover { background: #e0e0e0; }
.ovn-feed .ovn-search-count { font-size: 12px; color: #666; margin-top: 4px; }

/* Index View Cards (Articles, City, Opinion, History, Obituaries) */
.ovn-feed .ovn-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid #000;
  padding: 10px 0 !important;
  cursor: pointer;
}
.ovn-feed .ovn-card:hover .ovn-title { color: #0056b3; text-decoration: underline; }
.ovn-feed .ovn-thumb {
  width: 150px;
  height: 112px;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
  border: none;
  flex-shrink: 0;
  background: #fff;
}
.ovn-feed .ovn-summary { flex: 1; min-width: 0; }
.ovn-feed .ovn-title {
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 700;
  color: #111;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-fb-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  background: #111;
  color: #fff;
  border-radius: 3px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ovn-feed .ovn-lifespan {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin: 0 0 2px 0 !important;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-meta {
  font-size: 13px;
  color: #666;
  margin: 0 0 4px 0 !important;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-excerpt {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  color: #333;
}

/* Load More */
.ovn-feed .ovn-load-more-wrap { text-align: center; padding: 14px 0 6px 0; }
.ovn-feed .ovn-load-more-btn {
  padding: 8px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: #f4f4f4;
  color: #111;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
.ovn-feed .ovn-load-more-btn:hover { background: #e6e6e6; }

/* Full-Screen Reader Overlay */
.ovn-feed .ovn-reader-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #fff;
  z-index: 99990;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px 48px 16px;
  box-sizing: border-box;
  text-align: left;
}
.ovn-feed .ovn-reader-inner { max-width: 1280px; margin: 0 auto; }
.ovn-feed .ovn-article-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ovn-feed .ovn-back {
  display: inline-block;
  padding: 7px 13px;
  background: #111;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ovn-feed .ovn-back:hover { background: #333; }
.ovn-feed .ovn-share-btn {
  display: inline-block;
  padding: 7px 15px;
  background: #0056b3;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ovn-feed .ovn-share-btn:hover { background: #004494; }
.ovn-feed .ovn-article-title {
  margin: 0 0 3px 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 700;
  color: #111;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-article-lifespan {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin: 0 0 2px 0 !important;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-article-meta {
  font-size: 13px;
  color: #666;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-portrait-wrap {
  float: right;
  width: 240px;
  margin: 2px 0 10px 20px;
}
.ovn-feed .ovn-portrait-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: none;
  cursor: zoom-in;
}

/* Article Body, Lists & Sub-Bullets */
.ovn-feed .ovn-body p {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
}
.ovn-feed .ovn-body ul {
  margin: 0 0 10px 0 !important;
  padding-left: 24px !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
}
.ovn-feed .ovn-body ul ul {
  margin: 3px 0 4px 0 !important;
  padding-left: 24px !important;
  list-style-type: circle;
}
.ovn-feed .ovn-body ol {
  margin: 0 0 10px 0 !important;
  padding-left: 34px !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  list-style-type: upper-roman;
}
.ovn-feed .ovn-body ol ol {
  margin: 3px 0 4px 0 !important;
  padding-left: 26px !important;
  list-style-type: lower-alpha;
}
.ovn-feed .ovn-body li {
  margin: 0 0 3px 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

/* Shrink-to-Fit Markdown Tables */
.ovn-feed .ovn-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  clear: both;
}
.ovn-feed.ovn-kind-events .ovn-table-wrap {
  margin: 10px 0 4px 0;
}
.ovn-feed .ovn-table {
  width: auto !important;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.3;
}
.ovn-feed .ovn-table th,
.ovn-feed .ovn-table td {
  border: 1px solid #ccc;
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}
.ovn-feed .ovn-table th {
  background: #f2f2f2;
  font-weight: 700;
  color: #111;
  border-bottom: 2px solid #999;
}
.ovn-feed .ovn-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.ovn-feed .ovn-signoff {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-style: italic;
  font-size: 16px;
  line-height: 1.25 !important;
  color: #333;
}
.ovn-feed .ovn-clearfix::after { content: ""; display: table; clear: both; }

/* Inline Floating & Centered Images */
.ovn-feed .ovn-inline-fig { margin: 4px 0 12px 0; max-width: 100%; box-sizing: border-box; }
.ovn-feed .ovn-inline-fig.ovn-align-left { float: left; width: 320px; max-width: 45%; margin: 4px 20px 12px 0; }
.ovn-feed .ovn-inline-fig.ovn-align-right { float: right; width: 320px; max-width: 45%; margin: 4px 0 12px 20px; }
.ovn-feed .ovn-inline-fig.ovn-align-center { clear: both; margin: 14px auto; max-width: 760px; text-align: center; }
.ovn-feed .ovn-inline-fig img { width: 100%; height: auto; display: block; border-radius: 4px; border: none; cursor: zoom-in; }
.ovn-feed .ovn-caption { font-size: 13px; color: #555; font-style: italic; margin-top: 4px; line-height: 1.25 !important; text-align: center; }

/* Inline Slideshow */
.ovn-feed .ovn-slideshow { clear: both; position: relative; max-width: 760px; margin: 16px auto; border: 1px solid #ddd; border-radius: 6px; background: #111; overflow: hidden; }
.ovn-feed .ovn-slide-stage { position: relative; width: 100%; background: #111; text-align: center; }
.ovn-feed .ovn-slide-img { width: 100%; max-height: 480px; object-fit: contain; display: block; margin: 0 auto; cursor: zoom-in; }
.ovn-feed .ovn-slide-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.55); color: #fff; border: none; font-size: 22px; padding: 10px 14px; cursor: pointer; z-index: 2; }
.ovn-feed .ovn-slide-nav:hover { background: rgba(0,0,0,0.85); }
.ovn-feed .ovn-slide-prev { left: 0; border-radius: 0 4px 4px 0; }
.ovn-feed .ovn-slide-next { right: 0; border-radius: 4px 0 0 4px; }
.ovn-feed .ovn-slide-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f8f8f8; padding: 8px 12px; font-size: 13px; color: #333; border-top: 1px solid #ddd; }
.ovn-feed .ovn-slide-cap { font-style: italic; flex: 1; }
.ovn-feed .ovn-slide-count { font-weight: 600; color: #555; white-space: nowrap; }

/* Photo Lightbox */
.ovn-feed .ovn-lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.ovn-feed .ovn-lb-close { position: absolute; top: 14px; right: 20px; background: none; border: none; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.ovn-feed .ovn-lb-img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.ovn-feed .ovn-lb-cap { color: #eee; font-size: 15px; margin-top: 10px; text-align: center; max-width: 820px; }
.ovn-feed .ovn-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); color: #fff; border: none; font-size: 28px; padding: 12px 16px; cursor: pointer; border-radius: 4px; }
.ovn-feed .ovn-lb-nav:hover { background: rgba(255,255,255,0.3); }
.ovn-feed .ovn-lb-prev { left: 16px; }
.ovn-feed .ovn-lb-next { right: 16px; }

/* History Flipbook Lightbox */
.ovn-feed .ovn-fb-lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99995;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ovn-feed .ovn-fb-topbar {
  position: absolute;
  top: 14px; left: 16px; right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 100001;
  pointer-events: none;
}
.ovn-feed .ovn-fb-topbar > * { pointer-events: auto; }
.ovn-feed .ovn-fb-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: rgba(0,0,0,0.6);
  padding: 6px 12px;
  border-radius: 4px;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ovn-feed .ovn-fb-top-actions { display: flex; align-items: center; gap: 10px; }
.ovn-feed .ovn-fb-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ovn-feed .ovn-fb-close:hover { background: rgba(255,255,255,0.3); }
.ovn-feed .ovn-fb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.ovn-feed .ovn-fb-stage:active { cursor: grabbing; }
.ovn-feed .ovn-fb-scaler {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center center;
}
.ovn-feed .ovn-fb-book {
  position: relative;
  width: 528px;
  height: 686px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  background-color: #fdf5e6;
}
.ovn-feed .ovn-fb-page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.35s ease-in-out;
  pointer-events: none;
  background-color: #fdf5e6;
  border: 1px solid #d2b48c;
}
.ovn-feed .ovn-fb-page.active { opacity: 1; z-index: 2; pointer-events: auto; }
.ovn-feed .ovn-fb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  font-size: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
}
.ovn-feed .ovn-fb-arrow:hover { background: rgba(0,0,0,0.85); }
.ovn-feed .ovn-fb-prev { left: 15px; }
.ovn-feed .ovn-fb-next { right: 15px; }
.ovn-feed .ovn-fb-toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.92);
  padding: 8px 10px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  z-index: 100000;
  transition: bottom 0.3s ease;
}
.ovn-feed .ovn-fb-tbtn {
  min-width: 36px;
  height: 36px;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: 0 10px;
}
.ovn-feed .ovn-fb-tbtn:hover { background: #666; }
.ovn-feed .ovn-fb-pagebox {
  background: #222;
  border-radius: 20px;
  padding: 0 10px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.ovn-feed .ovn-fb-pageinput {
  width: 34px;
  background: transparent;
  border: none;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
}
.ovn-feed .ovn-fb-pageinput::-webkit-outer-spin-button,
.ovn-feed .ovn-fb-pageinput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 992px) {
  .ovn-feed .ovn-fb-toolbar.keyboard-up { bottom: 60% !important; }
}

/* Share Modal */
.ovn-feed .ovn-modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 100005; padding: 16px; }
.ovn-feed .ovn-modal-box { background: #fff; width: 100%; max-width: 440px; border-radius: 6px; padding: 20px 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); box-sizing: border-box; text-align: left; }
.ovn-feed .ovn-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.ovn-feed .ovn-modal-title { margin: 0; font-size: 18px; font-weight: 700; color: #111; }
.ovn-feed .ovn-modal-close { background: none; border: none; font-size: 24px; line-height: 1; color: #666; cursor: pointer; padding: 0 4px; }
.ovn-feed .ovn-form-group { margin-bottom: 12px; }
.ovn-feed .ovn-form-label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px; }
.ovn-feed .ovn-form-control { width: 100%; padding: 8px 10px; font-size: 14px; font-family: inherit; color: #222; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.ovn-feed .ovn-share-status { font-size: 13px; margin-top: 6px; min-height: 18px; }
.ovn-feed .ovn-modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.ovn-feed .ovn-btn-copy { padding: 8px 14px; font-size: 13px; font-weight: 600; background: #f4f4f4; color: #333; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; }
.ovn-feed .ovn-btn-send { padding: 8px 18px; font-size: 14px; font-weight: 600; background: #0056b3; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.ovn-feed .ovn-btn-send:disabled { background: #99b8db; cursor: not-allowed; }

/* Events Section */
.ovn-feed .ovn-section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px 0 !important;
  padding: 6px 0 !important;
  border-bottom: 2px solid #000;
}
.ovn-feed .ovn-section-bar:first-of-type { margin-top: 4px !important; }
.ovn-feed .ovn-section-heading {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 20px !important;
  font-weight: 700;
  color: #111;
  line-height: 1.2 !important;
}
.ovn-feed .ovn-nav-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  background: #111;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ovn-feed .ovn-nav-btn:hover { background: #333; }
.ovn-feed .ovn-event-item {
  padding: 8px 0 !important;
  border-bottom: 1px solid #ddd;
  font-size: 18px !important;
  line-height: 1.3 !important;
  color: #222;
}
.ovn-feed.ovn-mode-home .ovn-event-item {
  border-bottom: 1px solid #000;
}
.ovn-feed .ovn-event-label {
  font-weight: 700;
  color: #111;
}
.ovn-feed .ovn-empty-sec {
  padding: 10px 0;
  color: #666;
  font-size: 15px;
  font-style: italic;
}
.ovn-feed .ovn-event-item ul {
  margin: 6px 0 8px 0 !important;
  padding-left: 24px !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
}
.ovn-feed .ovn-event-item ul ul {
  margin: 3px 0 4px 0 !important;
  padding-left: 24px !important;
  list-style-type: circle;
}
.ovn-feed .ovn-event-item ol {
  margin: 6px 0 8px 0 !important;
  padding-left: 34px !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  list-style-type: upper-roman;
}
.ovn-feed .ovn-event-item ol ol {
  margin: 3px 0 4px 0 !important;
  padding-left: 26px !important;
  list-style-type: lower-alpha;
}
.ovn-feed .ovn-event-item li {
  margin: 0 0 3px 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .ovn-feed .ovn-card { flex-direction: column; gap: 8px; }
  .ovn-feed .ovn-thumb { width: 150px; height: 112px; }
  .ovn-feed .ovn-portrait-wrap { float: none; width: 100%; max-width: 260px; margin: 0 auto 12px auto; }
  .ovn-feed .ovn-inline-fig.ovn-align-left,
  .ovn-feed .ovn-inline-fig.ovn-align-right { float: none; width: 100% !important; max-width: 100% !important; margin: 10px 0; }
}
