:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #b9b9b9;
  --brand: #f5c451;
  --card: #141414;
  --accent: #dfa132;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial;
  background: var(--bg);
  color: var(--fg);
}

a {
  color: var(--brand);
  text-decoration: none;
}

/* ---------------- HEADER & FOOTER ---------------- */
.site-header,
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  padding-bottom: 8px;
  align-items: flex-start;
  position: relative;
}

.site-footer {
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}

.brand img { display: block; } /* removes baseline gap */

.brand .logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--brand);
  color: #000;
  font-weight: 800;
  margin-right: 8px;
}

.nav {
  align-self: flex-start;
  margin-top: 2px;
}

.nav a {
  margin-left: 14px;
  line-height: 1;
  padding: 6px 0;
  color: var(--fg);
  opacity: 0.9;
}

/* ---------------- CONTENT ---------------- */
.content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  overflow: visible; /* prevents clipping during PNG export */
}

/* ---------------- HERO ---------------- */
.hero { padding: 12px 0 48px; } /* tightened top padding */

.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 12px;
}

.hero p {
  color: var(--muted);
  max-width: 720px;
}

.cta-row {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

/* ---------------- BUTTONS ---------------- */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--brand);
  border-radius: 10px;
}

.btn.primary {
  background: var(--brand);
  color: #000;
  border-color: var(--brand);
}

/* ---------------- CARDS / GRIDS ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.card {
  background: var(--card);
  border: 1px solid #222;
  padding: 16px;
  border-radius: 14px;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.donate-card {
  background: var(--card);
  border: 1px solid #222;
  padding: 16px;
  border-radius: 14px;
}

.qr {
  height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #333;
  border-radius: 10px;
}

/* ---------------- MENU TOGGLE ---------------- */
.menu-toggle {
  display: none;
  border: 1px solid #333;
  background: transparent;
  color: var(--fg);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------------- RESPONSIVE (NAV/HEADER) ---------------- */
@media (max-width: 640px) {
  .nav { display: none; }

  .site-header {
    justify-content: center;
    padding-bottom: 4px;
    padding-right: 56px; /* room for menu button */
  }

  .hero { padding-top: 6px; }

  .menu-toggle {
    display: inline-block;
    position: absolute;
    right: 16px;
    top: 16px;
  }

  /* Turn nav into dropdown */
  .nav {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    background: var(--card);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 10px;
    margin-top: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,.4);
    z-index: 10;
  }

  .nav.open { display: block; }

  .nav a {
    display: block;
    color: var(--fg);
    opacity: .95;
    padding: 10px 8px;
    border-radius: 8px;
  }

  .nav a:hover { background: #1c1c1c; }
}

/* ============ CALENDAR (month view) ============ */
/* Wrapper ensures nothing is clipped during export */
#calendar-wrap{
  overflow: visible !important;
  display: grid;
  place-items: center;
  padding: 12px 0 24px;
}

/* Target this when exporting to PNG (html2canvas/html-to-image) */
#calendar.capture-target{
  width: 1024px;           /* lock export width for consistent PNGs */
  max-width: 100%;
  height: auto;
  background: var(--bg);
}

/* Card-style container (kept simple for renderers) */
#calendar{
  background: var(--card);
  border: 1px solid #222;
  border-radius: 12px;
  padding: 16px;
  overflow: visible;        /* important for PNG (prevents bottom cut-off) */
}

/* Month header: month name, nav arrows, options */
.calendar-header{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-title{
  font-size: clamp(18px, 2.8vw, 28px);
  font-weight: 700;
  letter-spacing: .2px;
}

.calendar-controls{
  display: inline-flex;
  gap: 8px;
}

.calendar-controls .btn{
  padding: 6px 10px;
  border-radius: 8px;
}

/* Weekday row */
.calendar-weekdays{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  user-select: none;
}

.calendar-weekdays div{
  text-align: center;
  padding: 8px 0;
  background: #171717;
  border: 1px solid #222;
  border-radius: 8px;
}

/* Grid of days */
.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

/* Day cell */
.day{
  position: relative;
  min-height: 110px;             /* adjust to taste */
  background: #151515;           /* solid bg for cleaner PNGs */
  border: 1px solid #222;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.day:hover{ outline: 1px solid #2a2a2a; } /* subtle hover (safe for PNG) */

/* Top-left biblical date (bigger, primary) */
.date-biblical{
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  opacity: .95;
}

/* Bottom-right mini Gregorian date (ghosted) */
.date-gregorian{
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  opacity: .7;
}

/* Optional toggle class if you hide/show Gregorian dates */
.hide-gregorian .date-gregorian{ display: none; }

/* Content area inside a day (events/notes/etc.) */
.day-content{
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--fg);
}

/* Today highlight (light border + subtle bg tone) */
.day.today{
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(245,196,81,.35);
  background: #181309; /* faint warm tone that still exports cleanly */
}

/* Days outside current month (muted) */
.day.outside{ opacity: .55; }

/* Utility: avoid layout surprises during export */
.calendar-grid, .day, .date-biblical, .date-gregorian, .day-content{
  transform: none !important;
  filter: none !important;
}

/* Optional: ensure long content wraps and doesn’t overflow */
.day *{
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Print/export niceties (no page breaks inside a month) */
#calendar, .calendar-grid, .day{
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ============ CALENDAR RESPONSIVE ============ */
@media (max-width: 860px){
  #calendar.capture-target{ width: 900px; } /* if you export from mobile, still get a decent width */
}

@media (max-width: 640px){
  .day{ min-height: 120px; }  /* keep mini date legible */
  .calendar-title{ font-size: 22px; }
}

/* ============ OPTIONAL: CAPTURE-ONLY MODE ============ */
/* Add .capture-mode to <body> before export if you want tweaks just for PNGs */
.capture-mode .day:hover{ outline: none; }
.capture-mode .btn{ pointer-events: none; }





