/* ==============================================
   Reusable API Cards — Events, Programs, Donations
   Plugin: reusable-api-cards
   ============================================== */

/* ── Shared Wrapper & Grid ─────────────────── */
.events-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 270px);
  gap: 40px;
  justify-content: center;
}

/* ── Loading & Error States ────────────────── */
.rac-loading,
.rac-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  font-size: 15px;
  border-radius: 12px;
}

.rac-loading {
  color: #1c4c8c;
  background: #eaf6ff;
}

.rac-error {
  color: #c0392b;
  background: #fdf3f3;
}

/* ==============================================
   EVENTS card
   ============================================== */
.event-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 440px;
  width: 270px;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.event-image {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f6f7f9;
  display: block;
}

.event-content {
  padding: 18px;
}

.event-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1c4c8c;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.event-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.6;
}

.event-button {
  display: inline-block;
  padding: 10px 18px;
  background: #1c4c8c;
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.3s;
}

.event-button:hover {
  background: #145191;
}

.event-ended {
  background: #ccc !important;
  cursor: default;
  pointer-events: none;
  color: #6b6565 !important;
}

.no-registration {
  background: #374151 !important;
  cursor: default;
  pointer-events: none;
  color: #fff !important;
}

/* ==============================================
   PROGRAMS card  (matches home_programs.html)
   ============================================== */
.program-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 440px;
  width: 270px;
  display: flex;
  flex-direction: column;
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.program-card-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f6f7f9;
}

.program-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.program-card-content {
  padding: 18px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.program-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1C4C8C;
  margin-bottom: 10px;
  min-height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.program-card-good-to-know {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.program-card-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #1C4C8C;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.program-card-btn:hover {
  background: #145191;
}

.program-card-btn.disabled {
  background: #9ca3af;
  cursor: default;
  pointer-events: none;
}

/* ==============================================
   DONATIONS card  (matches home_donation.html)
   ============================================== */
.donation-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 440px;
  width: 270px;
  display: flex;
  flex-direction: column;
}

.donation-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.donation-card-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f6f7f9;
}

.donation-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.donation-card-content {
  padding: 18px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.donation-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1C4C8C;
  margin-bottom: 15px;
  min-height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.donation-card-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #1C4C8C;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.donation-card-btn:hover {
  background: #145191;
}

/* ==============================================
   EVENTS CALENDAR  (type="events_calendar")
   ============================================== */
.pi-events-calendar .calendar-card {
  background: #eaf6ff;
  border-radius: 18px;
  padding: 25px;
  max-width: 1200px;
  margin: auto;
  font-family: Arial, sans-serif;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.pi-events-calendar .title {
  text-align: center;
  margin-bottom: 20px;
  color: #1c4c8c;
  font-size: 24px;
  font-weight: bold;
}

.pi-events-calendar .calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pi-events-calendar .calendar-nav button {
  background: #c9f7e5;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #1c4c8c;
  transition: 0.2s ease;
  font-size: 14px;
}

.pi-events-calendar .calendar-nav button:hover {
  background: #b5f0da;
}

.pi-events-calendar .nav-mobile-wrapper {
  display: none;
}

.pi-events-calendar .nav-btn-top,
.pi-events-calendar .nav-btn-bottom {
  display: none;
}

.pi-events-calendar .calendar-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c9f7e5 #eaf6ff;
}

.pi-events-calendar .calendar-wrapper::-webkit-scrollbar {
  height: 8px;
}

.pi-events-calendar .calendar-wrapper::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 4px;
}

.pi-events-calendar .calendar-wrapper::-webkit-scrollbar-thumb {
  background: #c9f7e5;
  border-radius: 4px;
}

.pi-events-calendar .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  min-width: 700px;
}

.pi-events-calendar .day-header {
  background: #c9f7e5;
  padding: 12px;
  font-weight: bold;
  color: #1c4c8c;
  text-align: center;
  font-size: 14px;
}

.pi-events-calendar .calendar-day {
  background: #fff;
  min-height: 120px;
  padding: 8px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  min-width: 100px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pi-events-calendar .calendar-day:hover {
  background: #f5fbff;
}

.pi-events-calendar .calendar-day.selected {
  background: #d6ecff !important;
  border: 2px solid #1c4c8c;
}

.pi-events-calendar .calendar-day.today {
  background: #d6ecff !important;
}

.pi-events-calendar .calendar-day.today .day-number {
  background: #1c4c8c;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.pi-events-calendar .day-number {
  font-weight: bold;
  color: #1c4c8c;
  font-size: 16px;
  margin-bottom: 4px;
}

.pi-events-calendar .events-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.pi-events-calendar .event-block {
  background: #c9f7e5;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #1c4c8c;
  cursor: pointer;
  transition: 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid #1c4c8c;
}

.pi-events-calendar .event-block:hover {
  background: #b5f0da;
  transform: translateX(2px);
}

.pi-events-calendar .event-block.event-color-1 {
  background: #c9f7e5;
}

.pi-events-calendar .event-block.event-color-2 {
  background: #dfffea;
}

.pi-events-calendar .event-block.event-color-3 {
  background: #eaf6ff;
}

.pi-events-calendar .event-block.event-color-4 {
  background: #f5fbff;
}

.pi-events-calendar .event-title {
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pi-events-calendar .event-time {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

.pi-events-calendar .more-events {
  font-size: 10px;
  color: #1c4c8c;
  font-weight: bold;
  margin-top: 4px;
  padding: 2px 6px;
  background: #d6ecff;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
}

.pi-events-calendar .more-events:hover {
  background: #c9f7e5;
}

/* Events Display Section (below calendar) */
.pi-events-calendar .events-display-section {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid #c9f7e5;
}

.pi-events-calendar .selected-date-title {
  color: #1c4c8c;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.pi-events-calendar .event-cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 20px;
}

/* Horizontal event card in calendar detail */
.pi-events-calendar .event-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  min-height: 180px;
  width: auto;
  height: auto;
}

.pi-events-calendar .event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pi-events-calendar .event-card-image-wrapper {
  flex: 0 0 180px;
  width: 180px;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pi-events-calendar .event-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-events-calendar .event-card-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.pi-events-calendar .event-card-name {
  color: #1a1a1a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px 0;
}

.pi-events-calendar .event-card-date-time-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pi-events-calendar .date-time-chip {
  background: #2c3e50;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  font-size: 12px;
}

.pi-events-calendar .date-time-chip-label {
  font-size: 11px;
  text-transform: capitalize;
  font-weight: 600;
  margin-bottom: 3px;
}

.pi-events-calendar .date-time-chip-value {
  font-size: 16px;
  font-weight: 700;
}

.pi-events-calendar .time-chip {
  padding: 10px 16px;
  min-width: auto;
}

.pi-events-calendar .time-chip .date-time-chip-value {
  font-size: 15px;
  font-weight: 600;
}

.pi-events-calendar .event-card-address {
  color: #555;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  margin-top: auto;
}

.pi-events-calendar .event-card-address svg {
  width: 16px;
  height: 16px;
  fill: #1a1a1a;
  margin-top: 2px;
  flex-shrink: 0;
}

.pi-events-calendar .no-events-message {
  text-align: center;
  color: #666;
  font-size: 16px;
  padding: 40px 20px;
  background: #f5fbff;
  border-radius: 12px;
  grid-column: 1 / -1;
}

/* ==============================================
   PROGRAMS CALENDAR  (type="programs_calendar")
   EXACT CSS copied from d:\Wordpress\Program Screen\programs_calendar.html
   ============================================== */
.programs-calendar-ui {
  max-width: 100%;
  overflow-x: hidden;
}

.programs-calendar-ui .pc-card {
  background: #eaf6ff;
  border-radius: 18px;
  padding: 25px;
  max-width: 1200px;
  width: 100%;
  margin: auto;
  font-family: Arial, sans-serif;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.programs-calendar-ui .pc-title {
  text-align: center;
  margin: 0 0 20px 0;
  padding-bottom: 16px;
  border-bottom: 3px solid #1c4c8c;
  color: #1c4c8c;
  font-size: 24px;
  font-weight: bold;
}

.programs-calendar-ui .pc-main-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.programs-calendar-ui .pc-nav-center {
  text-align: center;
  flex: 1;
}

.programs-calendar-ui .pc-month-label {
  color: #1c4c8c;
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
}

.programs-calendar-ui .pc-month-label-mobile {
  display: none;
}

.programs-calendar-ui .pc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.programs-calendar-ui .pc-nav button {
  background: #c9f7e5;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #1c4c8c;
  transition: 0.2s ease;
  font-size: 14px;
}

.programs-calendar-ui .pc-nav button:hover {
  background: #b5f0da;
}

.programs-calendar-ui .pc-nav button:focus-visible {
  outline: 2px solid #1c4c8c;
  outline-offset: 2px;
}

.programs-calendar-ui .pc-nav-mobile-wrapper {
  display: none;
}

.programs-calendar-ui .pc-nav-btn-top,
.programs-calendar-ui .pc-nav-btn-bottom {
  display: none;
}

.programs-calendar-ui .pc-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c9f7e5 #eaf6ff;
}

.programs-calendar-ui .pc-wrapper::-webkit-scrollbar {
  height: 8px;
}

.programs-calendar-ui .pc-wrapper::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 4px;
}

.programs-calendar-ui .pc-wrapper::-webkit-scrollbar-thumb {
  background: #c9f7e5;
  border-radius: 4px;
}

.programs-calendar-ui .pc-wrapper::-webkit-scrollbar-thumb:hover {
  background: #b5f0da;
}

.programs-calendar-ui .pc-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(80px, 1fr));
  gap: 1px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.programs-calendar-ui .pc-day-header {
  background: #c9f7e5;
  padding: 12px;
  font-weight: bold;
  color: #1c4c8c;
  text-align: center;
  font-size: 14px;
}

.programs-calendar-ui .pc-day {
  background: #ffffff;
  min-height: 120px;
  padding: 8px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  min-width: 100px;
}

.programs-calendar-ui .pc-day.today {
  background: #d6ecff !important;
}

.programs-calendar-ui .pc-day.today .pc-day-number {
  background: #1c4c8c;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.programs-calendar-ui .pc-day-number {
  font-weight: bold;
  color: #1c4c8c;
  font-size: 16px;
  margin-bottom: 4px;
}

.programs-calendar-ui .pc-events-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.programs-calendar-ui .pc-event-block {
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #1c4c8c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid #1c4c8c;
}

.programs-calendar-ui .pc-event-block.color-1 {
  background: #c9f7e5;
  border-left-color: #1c4c8c;
}

.programs-calendar-ui .pc-event-block.color-2 {
  background: #dfffea;
  border-left-color: #1c4c8c;
}

.programs-calendar-ui .pc-event-block.color-3 {
  background: #eaf6ff;
  border-left-color: #1c4c8c;
}

.programs-calendar-ui .pc-event-block.color-4 {
  background: #f5fbff;
  border-left-color: #1c4c8c;
}

.programs-calendar-ui .pc-event-title {
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.programs-calendar-ui .pc-more {
  font-size: 10px;
  color: #1c4c8c;
  font-weight: bold;
  margin-top: 4px;
  padding: 2px 6px;
  background: #d6ecff;
  border-radius: 12px;
  text-align: center;
}

/* ── Category legend (left column, scrollable) ─────── */
.programs-calendar-ui .pc-legend-wrapper {
  flex-shrink: 0;
  min-width: 160px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c9f7e5 #eaf6ff;
}

.programs-calendar-ui .pc-legend-wrapper::-webkit-scrollbar {
  width: 8px;
}

.programs-calendar-ui .pc-legend-wrapper::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 4px;
}

.programs-calendar-ui .pc-legend-wrapper::-webkit-scrollbar-thumb {
  background: #c9f7e5;
  border-radius: 4px;
}

 .programs-calendar-ui .pc-legend-wrapper::-webkit-scrollbar-thumb:hover {
  background: #b5f0da;
}

.programs-calendar-ui .pc-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.programs-calendar-ui .pc-calendar-side {
  flex: 1;
  min-width: 0;
}

.programs-calendar-ui .pc-legend-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.programs-calendar-ui .pc-legend-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.programs-calendar-ui .pc-legend-item.active {
  border-color: #1c4c8c;
  box-shadow: 0 3px 10px rgba(28, 76, 140, 0.22);
}

.programs-calendar-ui .pc-legend-item:focus-visible {
  outline: 2px solid #1c4c8c;
  outline-offset: 2px;
}

.programs-calendar-ui .pc-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.programs-calendar-ui .pc-legend-all .pc-legend-color {
  background: linear-gradient(135deg, #c9f7e5 50%, #1c4c8c 50%);
}

/* ==============================================
   EVENTS + PROGRAMS CALENDAR  (type="events_programs_calendar")
   Scoped under .epc-ui — copied verbatim from events_and_programs_calendar.html
   ============================================== */
.epc-ui .epc-card {
  background: #eaf6ff;
  border-radius: 18px;
  padding: 25px;
  max-width: 1200px;
  margin: auto;
  font-family: Arial, sans-serif;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.epc-ui .epc-title {
  text-align: center;
  margin: 0 0 20px 0;
  padding-bottom: 16px;
  border-bottom: 3px solid #1c4c8c;
  color: #1c4c8c;
  font-size: 24px;
  font-weight: bold;
}

.epc-ui .epc-filter-bar {
  margin-bottom: 20px;
}

.epc-ui .epc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.epc-ui .epc-filter-btn {
  padding: 10px 20px;
  border-radius: 24px;
  border: 2px solid #c9f7e5;
  background: #fff;
  color: #1c4c8c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.epc-ui .epc-filter-btn:hover {
  background: #eaf6ff;
  border-color: #1c4c8c;
}

.epc-ui .epc-filter-btn.active {
  background: #1c4c8c;
  color: #fff;
  border-color: #1c4c8c;
}

.epc-ui .epc-main-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.epc-ui .epc-legend-wrapper {
  flex-shrink: 0;
  min-width: 160px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c9f7e5 #eaf6ff;
}

.epc-ui .epc-legend-wrapper::-webkit-scrollbar {
  width: 8px;
}

.epc-ui .epc-legend-wrapper::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 4px;
}

.epc-ui .epc-legend-wrapper::-webkit-scrollbar-thumb {
  background: #c9f7e5;
  border-radius: 4px;
}

.epc-ui .epc-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.epc-ui .epc-calendar-side {
  flex: 1;
  min-width: 0;
}

.epc-ui .epc-legend-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.epc-ui .epc-legend-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.epc-ui .epc-legend-item.active {
  border-color: #1c4c8c;
  box-shadow: 0 3px 10px rgba(28, 76, 140, 0.22);
}

.epc-ui .epc-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.epc-ui .epc-legend-all .epc-legend-color {
  background: linear-gradient(135deg, #c9f7e5 50%, #1c4c8c 50%);
}

.epc-ui .epc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.epc-ui .epc-nav button {
  background: #c9f7e5;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #1c4c8c;
  transition: 0.2s ease;
  font-size: 14px;
}

.epc-ui .epc-nav button:hover {
  background: #b5f0da;
}

.epc-ui .epc-nav-center {
  flex: 1;
  text-align: center;
}

.epc-ui .epc-month-label {
  color: #1c4c8c;
  font-size: 16px;
  font-weight: 600;
}

.epc-ui .epc-nav-mobile-wrapper {
  display: none;
  align-items: center;
  gap: 12px;
}

.epc-ui .epc-month-label-mobile {
  display: none;
}

.epc-ui .epc-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c9f7e5 #eaf6ff;
}

.epc-ui .epc-wrapper::-webkit-scrollbar {
  height: 8px;
}

.epc-ui .epc-wrapper::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 4px;
}

.epc-ui .epc-wrapper::-webkit-scrollbar-thumb {
  background: #c9f7e5;
  border-radius: 4px;
}

.epc-ui .epc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  min-width: 700px;
}

.epc-ui .epc-day-header {
  background: #c9f7e5;
  padding: 12px;
  font-weight: bold;
  color: #1c4c8c;
  text-align: center;
  font-size: 14px;
}

.epc-ui .epc-day {
  background: #fff;
  min-height: 120px;
  padding: 8px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  min-width: 100px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.epc-ui .epc-day:hover {
  background: #f5fbff;
}

.epc-ui .epc-day.selected {
  background: #d6ecff !important;
  border: 2px solid #1c4c8c;
}

.epc-ui .epc-day.today {
  background: #d6ecff !important;
}

.epc-ui .epc-day.today .epc-day-number {
  background: #1c4c8c;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.epc-ui .epc-day-number {
  font-weight: bold;
  color: #1c4c8c;
  font-size: 16px;
  margin-bottom: 4px;
}

.epc-ui .epc-items-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.epc-ui .epc-item-block {
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid;
}

.epc-ui .epc-item-block.event-item {
  background: #c9f7e5;
  border-left-color: #1c4c8c;
  color: #1c4c8c;
}

.epc-ui .epc-item-block.program-item {
  background: #eaf6ff;
  border-left-color: #1c4c8c;
  color: #1c4c8c;
}

.epc-ui .epc-item-title {
  font-weight: bold;
}

.epc-ui .epc-item-time {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

.epc-ui .epc-more {
  font-size: 10px;
  color: #1c4c8c;
  font-weight: bold;
  margin-top: 4px;
  padding: 2px 6px;
  background: #d6ecff;
  border-radius: 12px;
  text-align: center;
}

.epc-ui .epc-cards-section {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid #c9f7e5;
}

.epc-ui .epc-selected-date-title {
  color: #1c4c8c;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.epc-ui .epc-cards-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.epc-ui .epc-cards-subsection {
  margin-bottom: 8px;
}

.epc-ui .epc-cards-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #1c4c8c;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #c9f7e5;
}

.epc-ui .epc-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.epc-ui .epc-event-card,
.epc-ui .epc-program-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  min-height: 180px;
}

.epc-ui .epc-event-card:hover,
.epc-ui .epc-program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.epc-ui .epc-card-image-wrapper {
  flex: 0 0 180px;
  width: 180px;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.epc-ui .epc-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.epc-ui .epc-card-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.epc-ui .epc-card-name {
  color: #1a1a1a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px 0;
}

.epc-ui .epc-card-date-time {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.epc-ui .epc-date-time-chip {
  background: #2c3e50;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  font-size: 12px;
}

.epc-ui .epc-date-time-chip-label {
  font-size: 11px;
  text-transform: capitalize;
  font-weight: 600;
  margin-bottom: 3px;
}

.epc-ui .epc-date-time-chip-value {
  font-size: 16px;
  font-weight: 700;
}

.epc-ui .epc-time-chip {
  padding: 10px 16px;
  min-width: auto;
}

.epc-ui .epc-time-chip .epc-date-time-chip-value {
  font-size: 15px;
  font-weight: 600;
}

.epc-ui .epc-card-address {
  color: #555;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  margin-top: auto;
}

.epc-ui .epc-card-address svg {
  width: 16px;
  height: 16px;
  fill: #1a1a1a;
  margin-top: 2px;
  flex-shrink: 0;
}

.epc-ui .epc-no-items {
  text-align: center;
  color: #666;
  font-size: 16px;
  padding: 40px 20px;
  background: #f5fbff;
  border-radius: 12px;
}

/* ==============================================
   PRAYER TIMES WIDGET  (type="prayer_times")
   Scoped under .prayer-widget — from prayer_times.html
   ============================================== */
.prayer-widget .prayer-card {
  font-family: Arial, sans-serif;
  background-color: #fff;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  margin: 0 auto;
}

.prayer-widget .prayer-card h2 {
  color: #1C4C8C;
  font-size: 28px;
  margin-bottom: 10px;
}

.prayer-widget .date-location {
  color: #1C4C8C;
  font-size: 14px;
  margin-bottom: 20px;
}

.prayer-widget .prayer-times {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}

.prayer-widget .jumuah-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}

.prayer-widget .jumuah-item {
  text-align: center;
  color: #1C4C8C;
  min-width: 120px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 10px 20px rgba(18, 52, 86, 0.12), 0 2px 6px rgba(18, 52, 86, 0.06);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
  border: 1px solid rgba(28, 76, 140, 0.06);
}

.prayer-widget .jumuah-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(18, 52, 86, 0.14), 0 6px 12px rgba(18, 52, 86, 0.08);
}

.prayer-widget .jumuah-item h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1C4C8C;
}

.prayer-widget .jumuah-time {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 800;
  color: #1C4C8C;
}

.prayer-widget .prayer-time {
  border-radius: 12px;
  padding: 18px 12px;
  flex: 1 1 calc(14% - 10px);
  min-width: 110px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #66c853 0%, #3fa047 50%, #2f8a38 100%);
  box-shadow: 0 12px 22px rgba(33, 60, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.prayer-widget .prayer-time:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(33, 60, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.prayer-widget .prayer-time::after {
  content: '';
  position: absolute;
  left: -30%;
  top: -60%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02) 30%, transparent 45%);
  transform: rotate(-25deg);
  pointer-events: none;
  opacity: 0.45;
}

.prayer-widget .prayer-time .icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prayer-widget .prayer-time .icon i {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "Font Awesome" !important;
  font-weight: 900 !important;
  line-height: 1;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.prayer-widget .main-line,
.prayer-widget .iqama-line {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

.prayer-widget .main-line .prayer-name {
  letter-spacing: 0.6px;
  margin-right: 6px;
  font-weight: 800;
}

.prayer-widget .iqama-line {
  margin-top: 6px;
  font-weight: 700;
  opacity: 0.95;
}

.prayer-widget .view-button {
  background-color: #1C4C8C;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.prayer-widget .view-button:hover {
  background-color: #145191;
}

/* ==============================================
   PRAYER CALENDAR  (type="prayer_calendar")
   Scoped under .pi-prayer-calendar — from prayer_calendar.html
   ============================================== */
.pi-prayer-calendar .pi-pcal-card {
  background: #eaf6ff;
  border-radius: 18px;
  padding: 25px;
  max-width: 1200px;
  margin: auto;
  font-family: Arial, sans-serif;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.pi-prayer-calendar .pi-pcal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #eaf6ff;
  padding: 10px 0;
  margin-top: -10px;
  margin-left: -25px;
  margin-right: -25px;
  padding-left: 25px;
  padding-right: 25px;
}

.pi-prayer-calendar .pi-pcal-nav button {
  background: #c9f7e5;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #1c4c8c;
  transition: 0.2s ease;
  font-size: 14px;
}

.pi-prayer-calendar .pi-pcal-nav button:hover {
  background: #b5f0da;
}

.pi-prayer-calendar .pi-pcal-nav-mobile-wrapper {
  display: none;
}

.pi-prayer-calendar .pi-pcal-nav-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pi-prayer-calendar .pi-pcal-heading {
  margin: 0;
  color: #1c4c8c;
  font-size: 16px;
  font-weight: 700;
}

.pi-prayer-calendar .pi-pcal-month {
  color: #145191;
  font-size: 14px;
  font-weight: 600;
}

.pi-prayer-calendar .pi-pcal-nav-btn-top,
.pi-prayer-calendar .pi-pcal-nav-btn-bottom {
  display: none;
}

.pi-prayer-calendar .pi-pcal-title-mobile {
  text-align: center;
  color: #1c4c8c;
  font-size: 24px;
  font-weight: bold;
}

.pi-prayer-calendar .pi-pcal-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 250px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c9f7e5 #eaf6ff;
  position: relative;
}

.pi-prayer-calendar .pi-pcal-table-wrapper::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.pi-prayer-calendar .pi-pcal-table-wrapper::-webkit-scrollbar-track {
  background: #eaf6ff;
  border-radius: 4px;
}

.pi-prayer-calendar .pi-pcal-table-wrapper::-webkit-scrollbar-thumb {
  background: #c9f7e5;
  border-radius: 4px;
}

.pi-prayer-calendar .pi-pcal-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #b5f0da;
}

.pi-prayer-calendar .pi-pcal-timetable {
  display: grid;
  grid-template-columns: 1fr 1fr repeat(6, 1.2fr);
  text-align: center;
  border-radius: 12px;
  overflow: visible;
  min-width: 700px;
}

.pi-prayer-calendar .pi-pcal-header-row {
  display: contents;
}

.pi-prayer-calendar .pi-pcal-header {
  background: #c9f7e5;
  padding: 12px;
  font-weight: bold;
  color: #1c4c8c;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.pi-prayer-calendar .pi-pcal-timetable>div:not(.pi-pcal-header) {
  z-index: 1;
}

.pi-prayer-calendar .pi-pcal-timetable div {
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.pi-prayer-calendar .pi-pcal-date-cell {
  font-weight: bold;
  background: #f5fbff;
  min-width: 100px;
}

.pi-prayer-calendar .pi-pcal-day-cell {
  font-weight: bold;
  color: #1c4c8c;
  min-width: 100px;
}

.pi-prayer-calendar .pi-pcal-mobile-day {
  display: none;
  font-size: 10px;
  color: #1c4c8c;
  font-weight: 600;
  margin-top: 2px;
}

.pi-prayer-calendar .pi-pcal-mobile-text {
  display: none;
}

.pi-prayer-calendar .pi-pcal-desktop-text {
  display: inline;
}

.pi-prayer-calendar .pi-pcal-friday {
  background: #dfffea !important;
}

.pi-prayer-calendar .pi-pcal-timetable small {
  font-size: 11px;
  color: #666;
}

.pi-prayer-calendar .pi-pcal-today-row {
  background: #d6ecff !important;
  font-weight: bold;
}
