/* ===========================================================================
   Flyer canvas — a fixed 1600x900 "page" that the host page scales to fit.
   All colors/sizes come from CSS custom properties set by render.js.
   =========================================================================== */

.flyer {
  position: relative;
  width: 1600px;
  height: 900px;
  box-sizing: border-box;
  background-color: var(--page-bg, #fff);
  background-size: cover;
  background-position: center;
  font-family: var(--font);
  color: var(--body-color, #1a1a1a);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.flyer * { box-sizing: border-box; }

/* ---- Header --------------------------------------------------------------- */
.flyer-head {
  position: relative;
  flex: 0 0 auto;
  text-align: center;
  padding: 16px 32px 0;
}
.flyer-head .logo {
  height: var(--logo-h, 78px);
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
.flyer-head .title {
  margin: 4px 0 0;
  font-size: var(--title-size, 78px);
  font-weight: var(--title-weight, 800);
  letter-spacing: var(--title-spacing, 1px);
  color: var(--title-color, #ec1c24);
  line-height: 1;
  text-transform: uppercase;
}
.flyer-head .month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}
.flyer-head .month .ln {
  width: 110px;
  border-top: 3px solid var(--divider, #000);
}
.flyer-head .month-txt {
  font-size: var(--month-size, 30px);
  color: var(--month-color, #333);
  line-height: 1.1;
}
.flyer-head .qr {
  position: absolute;
  top: 8px;
  right: 10px;
  height: auto;
}

/* ---- Body: two columns ---------------------------------------------------- */
.flyer-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 3%;
  padding: 16px 32px 0;
}
.col-left {
  flex: 0 0 var(--left-w, 48%);
  display: flex;
  min-width: 0;
}
.col-right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---- Section shell -------------------------------------------------------- */
.sec {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}
.sec-head {
  flex: 0 0 auto;
  text-align: center;
  font-weight: var(--sec-head-weight, 800);
  letter-spacing: 0.5px;
  padding: 9px 8px;
  color: #fff;
  line-height: 1.05;
}
.sec-box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-style: solid;
  border-width: 3px;
  border-top-width: 0;
  overflow: hidden;
}

/* ---- Upcoming Events ------------------------------------------------------ */
.ev-head { background: var(--ev-head-bg); color: var(--ev-head-color); font-size: var(--ev-head-size); }
.ev-box { border-color: var(--ev-border); }
.ev-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  font-size: var(--row-size, 21px);
  line-height: 1.15;
  border-bottom: 2px dashed var(--divider, #000);
}
.ev-row:last-child { border-bottom: 0; }
.ev-date { flex: 0 0 var(--ev-date-w, 22%); white-space: nowrap; }
.ev-time { flex: 0 0 var(--ev-time-w, 28%); white-space: nowrap; }
.ev-desc { flex: 1 1 auto; min-width: 0; text-align: left; white-space: normal; overflow-wrap: break-word; }
.ev-row .b { font-weight: 700; }

/* ---- Sponsorship grid ----------------------------------------------------- */
.sp-head-bar { background: var(--sp-head-bg); color: var(--sp-head-color); font-size: var(--sp-head-size); }
.sp-box { border-color: var(--sp-border); }
.sp-row {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  padding: 1px 6px;
  font-size: var(--sp-body-size, 18px);
  line-height: 1.12;
  border-bottom: 2px dashed var(--divider, #000);
}
.sp-row:last-child { border-bottom: 0; }
.sp-cell { text-align: center; padding: 1px 4px; line-height: 1.12; white-space: nowrap; overflow: hidden; }
.sp-head-row { flex: 1 1 0; }
.sp-h {
  display: inline-block;
  font-weight: 700;
  color: var(--sp-sub-color, #2e5984);
  font-size: var(--sp-sub-size, 20px);
  border-bottom: 2px solid var(--sp-sub-color, #2e5984);
  padding-bottom: 1px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---- Saturday activities -------------------------------------------------- */
.sat-head-bar { background: var(--sat-head-bg); color: var(--sat-head-color); font-size: var(--sat-head-size); }
.sat-box { border-color: var(--sat-border); }
.sat-row {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-size: var(--sat-size, 20px);
  line-height: 1.15;
  border-bottom: 2px dashed var(--divider, #000);
}
.sat-row:last-child { border-bottom: 0; }
.sat-time { flex: 0 0 var(--sat-time-w, 34%); white-space: nowrap; }
.sat-act { flex: 1 1 auto; min-width: 0; }

/* ---- Footer --------------------------------------------------------------- */
.flyer-foot {
  flex: 0 0 auto;
  min-height: var(--footer-h, 46px);
  margin-top: 14px;
  background: var(--footer-bg, #7a1420);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.flyer-foot .footer-img {
  width: 100%;
  height: auto;
  display: block;
}
