/* ============================================================
   earoftheday.com — Stylesheet v3
   Colors taken directly from source HTML:
     Body bg:      #ff9933  (orange)
     Nav col bg:   #ffd9b3  (peach)
     Content bg:   #ffffcc  (pale yellow)
     Page title:   #cc3366  (pink/magenta)
     Text:         #000000
   Font: Helvetica, Arial (matching original FONT FACE)
   Nav: image-based thumbnails 100×100 + label, stacked
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ────────────────────────────────────────────────── */
body {
  background-color: #ff9933;
  color: #000000;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a            { color: #000080; text-decoration: underline; }
a:hover      { color: #cc3366; }
a:visited    { color: #551a8b; }

img { display: block; max-width: 100%; }

/* ── Page wrapper — mirrors the original 99.5% wide table ── */
.page-wrap {
  width: 99.5%;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

/* ── Left column — nav thumbnails ────────────────────────── */
/* Original: WIDTH="10%" BGCOLOR="#ffd9b3" VALIGN="TOP" ALIGN="CENTER" */
.col-nav {
  flex: 0 0 120px;
  background-color: #ffd9b3;
  padding: 10px 6px;
  text-align: center;
  align-self: stretch;
}

/* Each nav item: thumbnail image + label below */
.nav-item {
  display: block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #000000;
  font-size: 0.75rem;
  line-height: 1.3;
}

.nav-item:visited { color: #000000; }
.nav-item:hover   { color: #cc3366; }

.nav-item img {
  width: 100px;
  height: 100px;
  margin: 0 auto 4px;
  border: 1px solid #cc9966;
}

.nav-item span {
  display: block;
  font-size: 0.72rem;
}

/* ── Center column — main content ────────────────────────── */
/* Original: BGCOLOR="#ffffcc" VALIGN="TOP" ALIGN="CENTER" */
.col-main {
  flex: 1 1 auto;
  background-color: #ffffcc;
  padding: 20px 24px 40px;
  text-align: center;
  min-width: 0;
}

/* ── Page title ──────────────────────────────────────────── */
/* Original: FONT FACE="helvetica, arial" SIZE=6 COLOR="CC3366" */
.page-title {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: bold;
  color: #cc3366;
  margin: 20px 0 16px;
}

/* ── Hero image ──────────────────────────────────────────── */
/* Original: width="770" height="370" */
.hero-img {
  width: 100%;
  max-width: 770px;
  height: auto;
  aspect-ratio: 770 / 370;
  margin: 0 auto 20px;
  object-fit: cover;
}

/* ── Keyword / SEO names block ───────────────────────────── */
/* Original: FONT COLOR="ffffcc" — invisible on #ffffcc bg, intentional */
/* We keep it visually subtle but not invisible */
.names-block {
  font-size: 0.7rem;
  color: #ccc9a0;
  line-height: 1.8;
  margin: 0 auto 20px;
  max-width: 700px;
}

/* ── Ear buttons ─────────────────────────────────────────── */
/* Original: colored table cells at 60% width, centered */
.ear-buttons {
  margin: 10px auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ear-btn {
  display: block;
  width: 60%;
  padding: 8px 0;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  color: #000000;
  text-decoration: none;
  border: none;
}

.ear-btn:hover   { opacity: 0.85; color: #000000; }
.ear-btn:visited { color: #000000; }

.ear-btn.green  { background-color: #00cc00; }
.ear-btn.blue   { background-color: #03A9F4; }
.ear-btn.red    { background-color: #F44336; }
.ear-btn.yellow { background-color: #fcfc03; }

/* ── Main scripture / verse text ────────────────────────── */
/* Original: FONT SIZE=5 COLOR="BLACK" */
.verse-lead {
  font-size: 1.15rem;
  font-weight: normal;
  color: #000000;
  margin: 16px auto;
  max-width: 680px;
  line-height: 1.8;
}

/* ── Daily entry list ────────────────────────────────────── */
/* Original uses <LI> items, we keep list feel */
.entry-list {
  list-style: disc;
  text-align: left;
  max-width: 680px;
  margin: 20px auto;
  padding-left: 20px;
}

.entry-list li {
  margin-bottom: 20px;
  line-height: 1.9;
  font-size: 1rem;
}

.entry-date {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

.entry-comment {
  font-style: italic;
  margin-top: 6px;
  display: block;
}

/* ── Gospel / salvation block ────────────────────────────── */
/* Original: plain caps text, SIZE=5 for the call to action */
.gospel {
  max-width: 680px;
  margin: 30px auto;
  text-align: center;
  line-height: 2;
  font-size: 1rem;
}

.gospel p {
  margin-bottom: 14px;
}

.gospel-call {
  font-size: 1.15rem;
  font-weight: bold;
  color: #000000;
}

/* ── Previous month thumbnail (bottom of content) ────────── */
/* Original: TABLE WIDTH="60%" with 100×100 img */
.prev-month {
  margin: 20px auto;
  width: 60%;
  text-align: center;
}

.prev-month img {
  width: 100px;
  height: 100px;
  margin: 0 auto 4px;
  border: 1px solid #cc9966;
}

.prev-month a {
  display: block;
  font-weight: bold;
  font-size: 0.9rem;
  color: #000000;
  text-decoration: none;
}

.prev-month a:hover { color: #cc3366; }

/* ── Doxology ─────────────────────────────────────────────── */
/* Sits below the prev-month thumb in the center column */
.doxology {
  max-width: 540px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 2;
  color: #000000;
}

/* ── Ear page color banners ──────────────────────────────── */
/* For greenpage, bluepage, redpage top strip */
.page-banner-green { background: #00cc00; padding: 8px; font-size: 1.4rem; font-weight: bold; color: #000; text-align: center; }
.page-banner-blue  { background: #03A9F4; padding: 8px; font-size: 1.4rem; font-weight: bold; color: #000; text-align: center; }
.page-banner-red   { background: #F44336; padding: 8px; font-size: 1.4rem; font-weight: bold; color: #000; text-align: center; }

/* ── Aphorism list (Blue/Green/Red pages) ────────────────── */
.aphorism-list {
  text-align: left;
  max-width: 680px;
  margin: 20px auto;
  list-style: none;
}

.aphorism-list li {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted #cccc99;
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
}

.aphorism-list li:last-child { border-bottom: none; }

.aph-num {
  flex-shrink: 0;
  min-width: 3rem;
  text-align: right;
  font-style: normal;
  font-weight: bold;
  font-size: 0.8rem;
  color: #996600;
  padding-top: 2px;
}

/* ── Testimony ────────────────────────────────────────────── */
.testimony {
  text-align: left;
  max-width: 680px;
  margin: 24px auto;
  font-size: 0.97rem;
  line-height: 1.9;
}

.testimony p { margin-bottom: 12px; }

/* ── Horizontal rule ──────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid #cc9966;
  margin: 20px auto;
  max-width: 680px;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background-color: #ff9933;
  text-align: center;
  padding: 12px;
  font-size: 0.8rem;
  color: #000000;
  border-top: 2px solid #cc6600;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 660px) {
  .page-wrap {
    flex-direction: row;   /* keep nav on the left */
    width: 100%;
    align-items: flex-start;
  }

  /* Nav stays left, shrinks to 70px thumbnails */
  .col-nav {
    flex: 0 0 70px;
    width: 70px;
    display: flex;
    flex-direction: column;
    padding: 6px 4px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-item {
    width: 60px;
    margin-bottom: 10px;
  }

  .nav-item img {
    width: 60px;
    height: 60px;
  }

  .nav-item span {
    font-size: 0.6rem;
  }

  .col-main {
    flex: 1 1 auto;
    padding: 10px 8px 30px;
    min-width: 0;
  }

  .page-title {
    font-size: 1.1rem;
  }

  .hero-img {
    aspect-ratio: 770 / 370;
  }

  .ear-btn {
    width: 90%;
    font-size: 0.85rem;
  }

  .prev-month { width: 90%; }
}

/* ══════════════════════════════════════════════════════════
   LIGHTBOX
   Triggered by clicking any img.lightbox-img
   ══════════════════════════════════════════════════════════ */

/* Cursor hint on all zoomable images */
img.lightbox-img {
  cursor: zoom-in;
  transition: opacity 0.15s;
}
img.lightbox-img:hover { opacity: 0.88; }

/* Overlay — full screen dark backdrop */
#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);

  /* Centre the image container */
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#lightbox-overlay.active {
  display: flex;
}

/* The image itself inside the overlay */
#lightbox-overlay img {
  /* Start at natural size, user can zoom from here */
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  margin: auto;
  border: 3px solid #ff9933;   /* site orange — keeps it on-brand */
  box-shadow: 0 0 60px rgba(0,0,0,0.8);

  /* Zoom is driven by transform: scale() via JS */
  transform-origin: center center;
  transition: transform 0.2s ease;
  cursor: zoom-in;
  user-select: none;
}

#lightbox-overlay img.zoomed {
  cursor: zoom-out;
}

/* Toolbar — close + zoom buttons */
#lightbox-toolbar {
  position: fixed;
  top: 14px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 9100;
}

.lb-btn {
  background: #ff9933;         /* site orange */
  color: #000;
  border: none;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: bold;
  padding: 6px 14px;
  cursor: pointer;
  line-height: 1;
  border-radius: 2px;
  transition: background 0.15s;
}

.lb-btn:hover { background: #ffd9b3; }

/* Caption — shows alt text below the image */
#lightbox-caption {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffd9b3;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  pointer-events: none;
  padding: 0 20px;
}

/* Zoom hint strip */
#lightbox-hint {
  position: fixed;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,217,179,0.5);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  pointer-events: none;
}

/* Keyboard / touch: prev-next arrows (hidden when only one image) */
#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,153,51,0.7);
  color: #000;
  border: none;
  font-size: 1.8rem;
  font-weight: bold;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 9100;
  line-height: 1;
  border-radius: 2px;
  transition: background 0.15s;
}

#lightbox-prev { left: 10px; }
#lightbox-next { right: 10px; }
#lightbox-prev:hover,
#lightbox-next:hover { background: #ff9933; }

/* Active nav item highlight */
.nav-item.nav-active img {
  border: 2px solid #cc3366;
}
.nav-item.nav-active span {
  color: #cc3366;
  font-weight: bold;
}
