/* ── Reset & variables ─────────────────────────────────────────────────────── */

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

:root {
  --royal:     #2B4BA0;
  --royal-dk:  #1E3578;
  --royal-lt:  #C8D4F0;
  --royal-pl:  #EEF2FC;
  --royal-bg:  #F4F6FD;
  --sky:       #4A90D9;
  --sky-lt:    #BDE0F8;
  --sky-pl:    #EBF5FD;
  --sky-bg:    #F3F9FE;
  --sun:       #C88A08;
  --sun-lt:    #FAE09A;
  --sun-pl:    #FEFAED;
  --sun-bg:    #FEFDF5;
  --text:      #1E1E2E;
  --muted:     #4A4A6A;
  --subtle:    #8888AA;
  --border:    #D0CEE8;
  --red:       #922;
  --green:     #1A6A3A;
}

body {
  font-family: 'Lato', system-ui, sans-serif;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  min-height: 100vh;
}

/* ── Page wrapper ─────────────────────────────────────────────────────────── */

.page-wrap {
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--royal);
  border-bottom: 2px solid var(--royal-dk);
}
.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
header img.logo {
  height: 70px;
  width: auto;
  border-radius: 4px;
}
.tagline {
  font-size: 13px;
  color: #E07040;
  font-style: italic;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}
nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
nav a {
  font-size: 15px;
  color: rgba(240,247,255,.7);
  text-decoration: none;
  transition: color .15s;
}
nav a:hover, nav a.active {
  color: #F0F7FF;
}
nav a.active {
  border-bottom: 1.5px solid rgba(240,247,255,.6);
  padding-bottom: 2px;
}

/* Admin subnav */
.admin-subnav {
  background: var(--royal-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.admin-subnav a {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.admin-subnav a:hover  { color: var(--royal); }
.admin-subnav a.active { color: var(--royal); border-bottom-color: var(--royal); }
.admin-subnav .subnav-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 58fr 42fr;
  height: 35vh;
  overflow: hidden;
}
.hero-img {
  overflow: hidden;
  position: relative;
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}
.hero-text {
  background: var(--royal);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero-text h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 10px;
}
.hero-text p {
  font-size: 14px;
  color: rgba(220,230,255,.85);
  line-height: 1.65;
  margin-bottom: 8px;
}
.hero-meta {
  font-size: 12px;
  color: rgba(220,230,255,.55);
  margin-bottom: 14px;
}
.hero-cta {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Lato', system-ui, sans-serif;
  background: var(--sun);
  color: #fff;
  padding: 9px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  width: fit-content;
  text-decoration: none;
  transition: background .15s;
}
.hero-cta:hover { background: #A87006; }

/* ── Body layout ──────────────────────────────────────────────────────────── */

.body-grid {
  display: grid;
  grid-template-columns: 60fr 40fr;
  background: #fff;
  min-height: 400px;
}

/* ── Schedule side ────────────────────────────────────────────────────────── */

.schedule-side {
  border-right: 1px solid var(--border);
}

/* Filter bar */
.filter-bar {
  background: var(--sky-bg);
  border-bottom: 2px solid var(--sky-lt);
  padding: 14px 20px;
}
.filter-label-top {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: .09em;
  margin-bottom: 11px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.filter-group-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.filter-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.pill {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
  font-family: 'Lato', system-ui, sans-serif;
}
.pill:hover:not(.on) { border-color: var(--sky); color: var(--royal); }
.pill.on             { background: var(--royal); border-color: var(--royal); color: #fff; }
.open-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.open-check input { accent-color: var(--royal); width: 14px; height: 14px; cursor: pointer; }

/* Table area */
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}
.table-title  { font-size: 15px; font-weight: 700; color: var(--text); }
.table-count  { font-size: 12px; color: var(--subtle); }
.table-wrap   { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--royal-pl); border-bottom: 1px solid var(--border); }
th {
  text-align: left;
  padding: 9px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--royal);
  letter-spacing: .07em;
  white-space: nowrap;
}
th:first-child { padding-left: 20px; }
th:last-child  { padding-right: 20px; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:hover { background: var(--royal-pl); }
tbody tr.dimmed { opacity: .62; }
td { padding: 12px 8px; vertical-align: middle; }
td:first-child { padding-left: 20px; }
td:last-child  { padding-right: 20px; }

.td-date  { font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--text); }
.td-name  { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.td-venue { font-size: 12px; color: var(--subtle); margin-top: 2px; }
.td-type  { font-size: 13px; color: var(--muted); }
.td-price { font-size: 14px; font-weight: 700; text-align: right; color: var(--text); }
.sp-full  { font-size: 12px; font-weight: 700; color: var(--red); }
.sp-low   { font-size: 12px; font-weight: 700; color: var(--sun); }
.sp-ok    { font-size: 12px; font-weight: 700; color: var(--green); }

.badge         { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.badge-muskoka { background: var(--sky-lt); color: var(--royal); }
.badge-whitby  { background: var(--sun-lt); color: #8A5E00; }
.badge-draft   { background: #eee; color: var(--muted); }
.badge-pub     { background: #d4edda; color: #155724; }

.btn-book { font-size: 12px; padding: 5px 14px; background: var(--royal); color: #fff; border: none; border-radius: 7px; cursor: pointer; white-space: nowrap; font-family: 'Lato', system-ui, sans-serif; transition: background .15s; }
.btn-book:hover { background: var(--royal-dk); }
.btn-wait { font-size: 12px; padding: 5px 12px; border: 1px solid var(--border); color: var(--subtle); background: transparent; border-radius: 7px; cursor: pointer; font-family: 'Lato', system-ui, sans-serif; }

.no-results { text-align: center; padding: 40px; font-size: 14px; color: var(--subtle); display: none; }

/* ── Blog sidebar ─────────────────────────────────────────────────────────── */

.blog-sidebar {
  background: var(--sun-bg);
  border-left: 3px solid var(--sun-lt);
}
.sidebar-head {
  padding: 15px 20px 12px;
  border-bottom: 2px solid var(--sun-lt);
}
.sidebar-head-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--sun);
  letter-spacing: .09em;
}
.blog-post-card {
  padding: 18px 20px;
  border-bottom: 1px solid var(--sun-lt);
}
.post-date    { font-size: 11px; color: var(--sun); margin-bottom: 5px; }
.post-title   { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 7px; }
.post-excerpt { font-size: 16px; color: var(--muted); line-height: 1.7; }
.blog-sidebar .post-excerpt { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.post-full-body { display: none; font-size: 16px; color: var(--muted); line-height: 1.7; margin-bottom: 8px; }
.post-full-body.open { display: block; }
.post-read-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--sun);
  text-decoration: none;
  margin-top: 8px;
  display: inline-block;
}
.post-read-more:hover { text-decoration: underline; }
.sidebar-footer { padding: 16px 20px; }
.sidebar-footer a { font-size: 13px; font-weight: 700; color: var(--sun); text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 28px 20px;
  background: var(--royal);
  font-size: 13px;
  color: rgba(220,230,255,.65);
  border-top: 2px solid var(--royal-dk);
}
footer a { color: var(--sky-lt); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Content pages (about, muskoka, whitby, faq, blog) ───────────────────── */

.content-area {
  background: #fff;
  padding: 36px 40px;
  min-height: 400px;
}
.content-area h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--royal);
  margin-bottom: 16px;
}
.content-area h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}
.content-area p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.content-area ul, .content-area ol {
  padding-left: 24px;
  margin-bottom: 14px;
}
.content-area li {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 6px;
}

/* Blog archive */
.blog-archive-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.blog-archive-item:last-child { border-bottom: none; }
.blog-archive-item .post-date  { font-size: 12px; color: var(--sun); margin-bottom: 6px; }
.blog-archive-item .post-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.blog-archive-item .post-title a { color: inherit; text-decoration: none; }
.blog-archive-item .post-title a:hover { color: var(--royal); }
.blog-archive-item .post-excerpt { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 12px; }
.blog-archive-item .read-more { font-size: 13px; font-weight: 700; color: var(--sun); text-decoration: none; }
.blog-archive-item .read-more:hover { text-decoration: underline; }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 28px 0 8px; }
.pagination a, .pagination span {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
  background: #fff;
}
.pagination a:hover  { border-color: var(--royal); color: var(--royal); }
.pagination span.cur { background: var(--royal); color: #fff; border-color: var(--royal); }

/* Blog post body */
.post-body { font-size: 15px; color: var(--muted); line-height: 1.9; }
.post-body p         { margin-bottom: 16px; }
.post-body h2, .post-body h3 { color: var(--text); margin: 24px 0 10px; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 16px; }
.post-body li        { margin-bottom: 6px; }
.post-body blockquote {
  border-left: 3px solid var(--sun-lt);
  padding: 4px 16px;
  margin: 16px 0;
  color: var(--subtle);
  font-style: italic;
}
.post-body a { color: var(--royal); }
.post-body a:hover { text-decoration: underline; }

/* Back link */
.back-link { font-size: 13px; font-weight: 700; color: var(--sun); text-decoration: none; display: inline-block; margin-bottom: 24px; }
.back-link:hover { text-decoration: underline; }

/* ── Auth forms ───────────────────────────────────────────────────────────── */

.auth-wrap {
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
  min-height: 400px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
}
.auth-box h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--royal);
  margin-bottom: 8px;
}
.auth-box .auth-sub {
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 28px;
  line-height: 1.6;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Lato', system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(43,75,160,.10);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group .field-hint { font-size: 12px; color: var(--subtle); margin-top: 4px; }

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Lato', system-ui, sans-serif;
  padding: 10px 24px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-primary  { background: var(--royal); color: #fff; }
.btn-primary:hover  { background: var(--royal-dk); }
.btn-secondary { background: #fff; color: var(--muted); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--royal); color: var(--royal); }
.btn-danger   { background: #c0392b; color: #fff; }
.btn-danger:hover   { background: #a93226; }
.btn-sm { font-size: 12px; padding: 5px 12px; }
.btn-full { width: 100%; text-align: center; }

.auth-alt { margin-top: 20px; font-size: 13px; color: var(--subtle); text-align: center; }
.auth-alt a { color: var(--royal); text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

.msg-box {
  padding: 28px;
  text-align: center;
}
.msg-box .msg-icon { font-size: 36px; margin-bottom: 12px; }
.msg-box h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.msg-box p  { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.alert-error   { background: #fdf0ef; color: #a93226; border: 1px solid #f5c6c2; }
.alert-success { background: #eaf7ee; color: #155724; border: 1px solid #b8dfc5; }

/* ── Admin layout ─────────────────────────────────────────────────────────── */

.admin-content {
  background: #fff;
  padding: 28px 32px;
  min-height: 500px;
}
.admin-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.admin-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Dashboard stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--royal-bg);
  border: 1px solid var(--royal-lt);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-card .stat-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--royal);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
}

/* Admin tables */
.admin-table-wrap { overflow-x: auto; margin-bottom: 24px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table thead tr { background: var(--royal-pl); }
.admin-table th {
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--royal);
  letter-spacing: .07em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.admin-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
.admin-table tbody tr:hover { background: var(--royal-bg); }
.admin-table td { padding: 10px 12px; vertical-align: middle; }
.admin-table .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Admin forms */
.admin-form { max-width: 680px; }
.admin-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-form .form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 24px; flex-wrap: wrap; }

/* Toggleable form panel */
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 28px;
  overflow: hidden;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--royal-bg);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.panel-header h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.panel-header .toggle-icon { font-size: 18px; color: var(--subtle); transition: transform .2s; }
.panel-header.open .toggle-icon { transform: rotate(45deg); }
.panel-body { padding: 24px; display: none; }
.panel-body.open { display: block; }

/* Quill editor */
.quill-wrap { margin-bottom: 18px; }
.quill-wrap #editor { min-height: 200px; font-size: 15px; font-family: 'Lato', system-ui, sans-serif; }

/* Post list */
.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.post-list-item:last-child { border-bottom: none; }
.post-list-meta { font-size: 12px; color: var(--subtle); margin-top: 4px; }
.post-list-title { font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer; }
.post-list-title:hover { color: var(--royal); }
.post-list-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* Attendees */
.attendees-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.spots-label { font-size: 15px; font-weight: 700; color: var(--text); }
.spots-label .spots-num { color: var(--royal); }

.attendee-row td { cursor: pointer; }
.attendee-expand { display: none; }
.attendee-expand.open { display: table-row; }
.attendee-expand td { background: var(--sky-bg); padding: 16px 20px; cursor: default; }
.attendee-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.attendee-form-grid .full-width { grid-column: 1 / -1; }

/* ── Error pages ──────────────────────────────────────────────────────────── */

.error-page {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 60px 20px;
  text-align: center;
}
.error-page .error-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--royal-lt);
  line-height: 1;
  margin-bottom: 16px;
}
.error-page h2 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.error-page p  { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img { min-height: 200px; }
  .body-grid { grid-template-columns: 1fr; }
  .blog-sidebar { border-left: none; border-top: 3px solid var(--sun-lt); }
  .schedule-side { border-right: none; }
  header { flex-direction: column; gap: 12px; }
  nav { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .content-area { padding: 24px 20px; }
  .admin-content { padding: 20px; }
  .admin-form .form-row, .admin-form .form-row-3 { grid-template-columns: 1fr; }
  .attendee-form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
