/* ============================================================
   info-shared.css — 黄历  ·  Shared across ALL /info/* pages
   Includes: body override, topbar, layout, sidenav, nav links,
             section/item content, tables, mobile hamburger,
             kn-* classes (SidebarNav component)
   ============================================================ */

/* ============================================================
   BODY OVERRIDE  (info pages use flat paper background)
   ============================================================ */
.info-body {
  background: var(--paper);
  padding: 0;
  min-height: 100vh;
}

/* ============================================================
   INFO TOPBAR  (sticky red bar at top)
   ============================================================ */
.info-topbar {
  background: var(--red);
  border-bottom: 3px solid var(--gold);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.info-back-link {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-family: var(--font);
  font-size: 13px;
  padding: 5px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 18px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.info-back-link:hover { background: rgba(255,255,255,0.15); color: #fff; }

.info-topbar-home {
  color: var(--gold);
  text-decoration: none;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.info-topbar-home:hover { color: #fff; }

/* Hamburger toggle — only visible on mobile */
.info-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: rgba(255,255,255,0.85);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}

/* ============================================================
   INFO LAYOUT  (sidenav + main two-column)
   ============================================================ */
.info-layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}

/* ============================================================
   INFO SIDENAV
   ============================================================ */
.info-sidenav {
  width: 200px;
  flex-shrink: 0;
  padding: 24px 0 40px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--paper-dark);
  scrollbar-width: thin;
  scrollbar-color: var(--paper-mid) transparent;
}
.info-sidenav::-webkit-scrollbar { width: 4px; }
.info-sidenav::-webkit-scrollbar-thumb { background: var(--paper-mid); border-radius: 2px; }

/* Overlay backdrop for mobile sidebar */
.info-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 140;
}
.info-nav-overlay.active { display: block; }

/* These classes exist but are currently unused; kept for future use */
.info-nav-section         { margin-bottom: 6px; }
.info-nav-section-title   { font-size: 10px; font-weight: 700; color: #aaa; letter-spacing: 1.5px; padding: 10px 16px 5px; text-transform: uppercase; }
.info-nav-link            { display: block; font-family: var(--font); font-size: 12.5px; color: var(--ink-soft); text-decoration: none; padding: 5px 16px 5px 24px; line-height: 1.4; border-left: 2px solid transparent; transition: color 0.15s, background 0.15s, border-color 0.15s; position: relative; }
.info-nav-link::before    { content: '›'; position: absolute; left: 13px; color: var(--border); transition: color 0.15s; }
.info-nav-link:hover,
.info-nav-link.active     { color: var(--red); background: rgba(192,57,43,0.07); border-left-color: var(--red); }
.info-nav-link:hover::before,
.info-nav-link.active::before { color: var(--red); }
.info-nav-divider         { height: 1px; background: var(--border); margin: 10px 16px; opacity: 0.6; }
.info-nav-sub             { font-size: 11.5px; padding-left: 32px; color: #999; }
.info-nav-sub:hover       { color: var(--red); }

/* ============================================================
   INFO MAIN CONTENT
   ============================================================ */
.info-main {
  flex: 1;
  min-width: 0;
  padding: 0 0 80px;
}

/* ── Section ── */
.info-section {
  padding: 48px 40px 40px;
  border-bottom: 1px solid var(--paper-mid);
  scroll-margin-top: 72px;
}
.info-section:last-child { border-bottom: none; }

.info-section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-section-subtitle {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
  line-height: 1.7;
}

.info-section-intro,
.info-section > .info-section-subtitle + p {
  font-size: 15px;
  color: var(--ink);
  line-height: 2;
  margin-bottom: 28px;
}

/* ── Item section (individual term / festival) ── */
.info-item-section {
  padding: 36px 40px 32px;
  border-bottom: 1px solid var(--paper-mid);
  scroll-margin-top: 72px;
}

.info-item-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.info-item-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  margin: 0;
}

.info-item-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}
.badge-term     { background: rgba(30,132,73,0.12);  color: var(--green); }
.badge-festival { background: rgba(192,57,43,0.11);  color: var(--red); }
.badge-solar    { background: rgba(212,172,13,0.15); color: #8a6d00; }

.info-item-date {
  font-size: 15px;
  color: #858585;
  letter-spacing: 0.3px;
}

.info-item-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 18px;
}

.info-item-next {
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.3px;
  width: 100%;
}

.info-term-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(30,132,73,0.3);
}
.info-term-link:hover {
  color: var(--red);
  text-decoration-color: var(--red);
}

/* ── Overview grid ── */
.info-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.info-overview-card {
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--paper-mid);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.info-overview-card:hover {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(192,57,43,0.1);
  background: var(--paper);
}
.info-oc-name   { font-size: 16px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 4px; }
.info-oc-sub    { font-size: 11px; color: #999; line-height: 1.4; }
.info-oc-season { font-size: 11px; color: var(--green); font-weight: 600; margin-bottom: 2px; }

/* ── Topic block ── */
.info-topic-block {
  background: #fff;
  border: 1px solid var(--paper-mid);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.info-topic-block h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  border-left: 3px solid var(--red);
  padding-left: 10px;
}
.info-topic-block p { font-size: 13px; color: var(--ink-soft); line-height: 2; margin: 0 0 8px; }

/* ── Placeholder ── */
.info-placeholder {
  background: var(--paper-dark);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  color: #aaa;
  font-size: 13px;
  line-height: 1.8;
  font-style: italic;
}

/* ── Info table ── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 16px;
}
.info-table th {
  background: var(--red);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.info-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--paper-mid);
  color: var(--ink-soft);
  vertical-align: top;
  line-height: 1.6;
}
.info-table tr:nth-child(even) td { background: var(--paper); }
.info-table tr:hover td { background: rgba(192,57,43,0.04); }

/* ── Back button (used in some topbars) ── */
.info-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: var(--font);
  font-size: 13px;
  padding: 5px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 18px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.info-back-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 800px) {
  /* Sidenav becomes a slide-in drawer on mobile */
  .info-sidenav {
    display: block !important;
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    height: 100dvh;
    z-index: 150;
    padding: 56px 0 32px;
    transition: left 0.22s ease;
    box-shadow: none;
    border-right: 1px solid var(--border);
  }
  .info-sidenav.info-nav-open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  }
  .info-nav-toggle    { display: flex; }
  .info-section       { padding: 28px 20px 24px; }
  .info-item-section  { padding: 24px 20px 20px; }
  .info-section-title { font-size: 20px; }
  .info-item-title    { font-size: 18px; }
  .info-overview-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 480px) {
  .info-topbar       { padding: 0 14px; }
  .info-section      { padding: 20px 14px 18px; }
  .info-item-section { padding: 18px 14px 16px; }
}
