/* --- AIDE Events: scoped styles --- */
.aide-events-wrap {
  --aide-purple: #5236b8;
  --aide-purple-light: #e6e8ff;
  --aide-text: #222;
  --aide-muted: #6b7280;
  --aide-red: #f04b3a;
  --aide-border: #e5e7eb;

  font-family: inherit;
  color: var(--aide-text);

  /* FIX: prevent ultra-wide layouts like your screenshot */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.aide-events-wrap * {
  box-sizing: border-box;
}

/* FIX: make page content media responsive inside templates */
.aide-events-wrap main img,
.aide-events-wrap main iframe,
.aide-events-wrap main video,
.aide-events-wrap main embed,
.aide-events-wrap main object {
  max-width: 100%;
  height: auto;
}

/* Ensure grid children can shrink */
.aide-events-wrap main,
.aide-single-sidebar {
  min-width: 0;
}

.aide-events-hero {
  background: var(--aide-purple);
  color: #fff;
  border-radius: 4px;
  padding: 22px 24px;
  margin-bottom: 18px;
}

.aide-events-hero h1,
.aide-events-hero h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
}

.aide-events-library {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}

@media (max-width: 980px) {
  .aide-events-library {
    grid-template-columns: 1fr;
  }
}

.aide-events-filters {
  border: 1px solid var(--aide-border);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.aide-events-filters .field {
  margin-bottom: 12px;
}

.aide-events-filters label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--aide-purple);
}

.aide-events-filters input[type="text"],
.aide-events-filters select {
  width: 100%;
  border: 1px solid #c7cbe3;
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
}

.aide-events-status {
  border: 1px solid #c7cbe3;
  border-radius: 4px;
  padding: 10px 12px;
}

.aide-events-status .row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.aide-events-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.aide-events-actions button,
.aide-events-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 10px 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--aide-purple);
  cursor: pointer;
}

.aide-events-actions button.primary {
  background: var(--aide-purple);
  color: #fff;
}

.aide-events-actions a.secondary {
  background: #fff;
  color: var(--aide-purple);
}

.aide-events-results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--aide-border);
  background: #f3f4f6;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 18px;
  gap: 12px;
}

.aide-events-results-top .count {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.aide-events-results-top .sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aide-events-results-top select {
  border: 1px solid #c7cbe3;
  border-radius: 4px;
  padding: 6px 8px;
}

.aide-events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

@media (max-width: 1100px) {
  .aide-events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .aide-events-grid {
    grid-template-columns: 1fr;
  }
}

.aide-event-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.aide-event-card .logo {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;

  /* Nice, consistent framing */
  border: 1px solid var(--aide-border);
  background: #fff;
}

.aide-event-card .logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.aide-event-card .meta-date {
  margin-top: 10px;
  color: var(--aide-red);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.aide-event-card .meta-type {
  margin-top: 4px;
  font-weight: 900;
  text-transform: uppercase;
  color: #111;
  font-size: 12px;
}

.aide-event-card .title {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--aide-purple);
}

.aide-event-card .excerpt {
  margin-top: 8px;
  color: var(--aide-muted);
  font-size: 13px;
  line-height: 1.55;
}

.aide-events-pagination {
  margin-top: 22px;
}

.aide-events-pagination .page-numbers {
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid var(--aide-border);
  margin-right: 6px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--aide-purple);
  font-weight: 700;
}

.aide-events-pagination .page-numbers.current {
  background: var(--aide-purple);
  color: #fff;
  border-color: var(--aide-purple);
}

/* --- Single Event --- */
.aide-single-header {
  background: var(--aide-purple);
  color: #fff;
  padding: 22px 24px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.aide-single-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.aide-single-header .sub {
  margin-top: 8px;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--aide-purple-light);
}

.aide-single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

@media (max-width: 980px) {
  .aide-single-layout {
    grid-template-columns: 1fr;
  }
}

.aide-single-back a {
  color: var(--aide-purple);
  font-weight: 900;
  text-decoration: none;
}

.aide-single-lead {
  margin: 18px 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--aide-purple);
  font-weight: 700;
}

.aide-single-sidebar {
  border-left: 1px solid var(--aide-border);
  padding-left: 16px;
}

@media (max-width: 980px) {
  .aide-single-sidebar {
    border-left: none;
    padding-left: 0;
  }
}

.aide-meta-block {
  margin-bottom: 14px;
}

.aide-meta-block .k {
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 4px;
}

.aide-meta-block .v {
  color: var(--aide-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.5;
}

.aide-single-logo img {
  max-width: 250px;
  height: auto;
  display: block;
}

.aide-single-address {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--aide-border);
}
