/* ===========================
   SHARED PAGE CHROME (reuse volunteer.css for hero/navbar styles)
   =========================== */
.navbar.scrolled { background: var(--navy-dark) !important; box-shadow: 0 2px 16px rgba(0,0,0,0.25); }
.active-page { color: var(--gold-light) !important; }

.page-hero {
  position: relative;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, #2a4080 60%, #1b2d5a 100%);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 60%, rgba(201,162,39,0.1) 0%, transparent 55%);
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.022'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
}
.page-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* ===========================
   FILTER BAR
   =========================== */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 72px;
  z-index: 100;
}
.filter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
  height: 56px;
}
.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tab:hover { background: var(--gray-100); color: var(--navy); }
.filter-tab.active { background: var(--navy); color: var(--white); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-campaign { background: var(--gold); }
.dot-canvas   { background: var(--red); }

.filter-view-toggle { display: flex; gap: 4px; }
.view-btn {
  width: 36px; height: 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  background: none;
  color: var(--gray-500);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.view-btn svg { width: 16px; height: 16px; }
.view-btn.active, .view-btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ===========================
   EVENTS MAIN LAYOUT
   =========================== */
.events-main { padding: 48px 0 96px; background: var(--gray-100); min-height: 60vh; }
.events-layout { max-width: 900px; }

/* ===========================
   CALENDAR
   =========================== */
.calendar-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--navy);
}
.cal-month-label {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}
.cal-nav {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  background: none;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.cal-nav:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); }

.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--navy-dark);
}
.cal-grid-header span {
  text-align: center;
  padding: 10px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--gray-200);
  border-top: 1px solid var(--gray-200);
}

.cal-cell {
  min-height: 90px;
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 6px;
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.cal-cell:hover { background: var(--gray-100); }
.cal-cell.other-month { background: #fafafa; }
.cal-cell.other-month .cal-day-num { color: var(--gray-200); }
.cal-cell.today { background: rgba(27,45,90,0.04); }
.cal-cell.today .cal-day-num {
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.cal-cell.has-events { background: rgba(201,162,39,0.04); }
.cal-cell.selected { background: rgba(27,45,90,0.08) !important; }

.cal-day-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}

.cal-event-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  cursor: pointer;
}
.cal-event-pill.campaign { background: rgba(201,162,39,0.2); color: #6b5200; }
.cal-event-pill.canvas   { background: rgba(176,36,42,0.12); color: var(--red); }
.cal-more {
  font-size: 0.68rem;
  color: var(--gray-500);
  font-weight: 600;
  padding: 2px 4px;
}

/* Day detail panel */
.day-detail {
  border-top: 1px solid var(--gray-200);
  padding: 20px 24px;
  background: var(--off-white);
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.day-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.day-detail-header h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.day-detail-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.day-detail-close:hover { color: var(--red); }

/* ===========================
   LIST VIEW
   =========================== */
.list-section { display: flex; flex-direction: column; gap: 16px; }

.event-list { display: flex; flex-direction: column; gap: 16px; }

.event-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
  transition: box-shadow var(--transition), transform var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.event-date-block {
  background: var(--navy);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 56px;
  flex-shrink: 0;
}
.event-date-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  display: block;
}
.event-date-day {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  display: block;
}

.event-info {}
.event-type-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.event-type-badge.campaign { background: rgba(201,162,39,0.15); color: #6b5200; }
.event-type-badge.canvas   { background: rgba(176,36,42,0.1);  color: var(--red); }

.event-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.event-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.event-meta svg { width: 13px; height: 13px; }
.event-desc {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.event-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.ev-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  transition: all var(--transition);
  background: none;
  font-family: var(--font-sans);
}
.ev-btn-edit  { border-color: var(--navy); color: var(--navy); }
.ev-btn-edit:hover  { background: var(--navy); color: var(--white); }
.ev-btn-del   { border-color: var(--red); color: var(--red); }
.ev-btn-del:hover   { background: var(--red); color: var(--white); }

/* Day detail event rows */
.detail-event-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}
.detail-event-row:last-child { border-bottom: none; }
.detail-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.detail-dot.campaign { background: var(--gold); }
.detail-dot.canvas   { background: var(--red); }
.detail-event-row strong { font-size: 0.9rem; color: var(--navy); display: block; }
.detail-event-row span   { font-size: 0.8rem; color: var(--gray-500); }

/* ===========================
   MODAL
   =========================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s ease;
}
.modal--sm { max-width: 380px; padding: 28px; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 0;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--red); }
.modal-form {
  padding: 0 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 4px;
}

.btn-outline-dark {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.btn-outline-dark:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-danger {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.btn-danger:hover { background: var(--red-light); border-color: var(--red-light); }

.form-error {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.no-events {
  text-align: center;
  padding: 64px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
}
.no-events p { margin-bottom: 20px; font-size: 1rem; }

.hidden { display: none !important; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .filter-inner { flex-direction: column; height: auto; padding: 12px 16px; gap: 10px; }
  .filter-tabs { flex-wrap: wrap; gap: 4px; }
  .cal-cell { min-height: 60px; }
  .event-card { grid-template-columns: auto 1fr; }
  .event-actions { flex-direction: row; grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .cal-grid-header span { font-size: 0.6rem; padding: 8px 2px; }
  .cal-cell { min-height: 48px; padding: 4px; }
  .cal-event-pill { display: none; }
  .cal-more { display: block; }
}
