.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px;
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
	font-family: 'Inter', sans-serif;
	
  position: relative;
}

.event-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.event-card:hover {
  transform: translateY(-4px);
}

.event-card-body {
  padding: 24px;
}

.event-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
}

.event-badge.upcoming {
  background: #eef2ff;
  color: #4f46e5;
}

.event-badge.passed {
  background: #f1f5f9;
  color: #64748b;
}

.event-title {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #1e293b;
}

.event-datetime {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
}

.event-text {
  font-size: 15px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* --- Card Image / Fallback Styles --- */
.event-card-image-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.event-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #163E99 0%, #1A73E9 100%);
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  box-sizing: border-box;
}

/* --- Footer --- */
.event-card-footer {
  padding: 0 24px 24px 24px;
}

.event-footer-buttons {
  display: flex;
  align-items: center;
	justify-content: space-between;
  gap: 16px;
	flex-direction: row-reverse;
}

/* --- Registration Status Label --- */
.event-registration-status {
  font-size: 14px;
  font-weight: 700;
}

.event-registration-status.open {
  color: #16a34a;
}

.event-registration-status.closed {
  color: #dc2626;
}

/* --- Buttons --- */
.event-btn {
  display: block;
  text-align: center;
  background: #163E99;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 9999px;
  transition: background 0.2s ease;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.event-btn:not(.disabled):hover {
  background: #1A73E9;
}

.event-btn.disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.info-trigger-btn {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.info-trigger-btn:hover {
  background: #e2e8f0;
}

/* --- Floating Overlay Panel --- */
.event-row-fullwidth-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 90vw;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-sizing: border-box;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.event-row-fullwidth-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.event-row-panel-inner {
  padding: 32px;
}

/* --- Panel Interior --- */
.panel-close-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.panel-close-btn {
  background: #f1f5f9;
  border: none;
  color: #1e293b;
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.panel-close-btn:hover {
  background: #e2e8f0;
}

.panel-two-column {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.panel-main-info {
  flex: 2;
  min-width: 300px;
}

.panel-main-info h2 {
  margin: 0 0 8px 0;
  font-size: 26px;
  color: #1e293b;
}

.panel-time-banner {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 24px;
}

.panel-section {
  margin-bottom: 20px;
}

.panel-section h5 {
  margin: 0 0 6px 0;
  color: #163E99;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-section p {
  margin: 0;
  font-size: 15px;
  color: #334155;
  line-height: 1.6;
}

.panel-aside-media {
  flex: 1;
  min-width: 260px;
}

.panel-aside-media img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Register Button inside Panel --- */
.panel-register-row {
  margin-top: 28px;
	display: flex;
  justify-content: center;//flex-end;
}

.panel-register-row .event-btn {
  display: inline-block;
  width: auto;
}