/* ==========================================================================
   Wise Agent — Single Event Page
   Shared base styles + Layout 1 (Classic) + Layout 2 (Card Split)
   Scoped entirely to .wa-single-event so theme styles are never affected.
   ========================================================================== */

/* ── Wrapper & CSS custom properties ───────────────────────────────────── */
.wa-single-event {
  --wa-se-primary: #0073aa;
  --wa-se-primary-dark: #005d8c;
  --wa-se-text: #1e293b;
  --wa-se-muted: #64748b;
  --wa-se-border: #e2e8f0;
  --wa-se-surface: #f8fafc;
  --wa-se-radius: 8px;
  --wa-se-max-width: 1100px;

  max-width: var(--wa-se-max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
  color: var(--wa-se-text);
  font-size: 1rem;
  line-height: 1.6;
  box-sizing: border-box;
}

.wa-single-event *,
.wa-single-event *::before,
.wa-single-event *::after {
  box-sizing: inherit;
}

/* ── Shared: Title ──────────────────────────────────────────────────────── */
.wa-single-event__title {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
}

/* ── Shared: CTA Button ─────────────────────────────────────────────────── */
.wa-single-event__btn {
  margin-right: auto;
  display: inline-block;
  padding: 12px 28px;
  background: var(--wa-se-primary);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: var(--wa-se-radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    background 150ms ease,
    transform 150ms ease;
  border: none;
  cursor: pointer;
}

.wa-single-event__btn:hover,
.wa-single-event__btn:focus {
  background: var(--wa-se-primary-dark);
  transform: translateY(-1px);
  color: #fff !important;
}

/* ── Shared: Content area ───────────────────────────────────────────────── */
.wa-single-event__content {
  font-size: 1rem;
  line-height: 1.75;
}

.wa-single-event__content > * + * {
  margin-top: 1em;
}

/* ==========================================================================
   Layout 1 — Classic
   Hero image (full-width, title/meta overlay) → content column + detail sidebar
   ========================================================================== */

/* ── Hero ── */
.wa-single-event--layout-1 .wa-single-event__hero {
  position: relative;
  width: 100%;
  border-radius: var(--wa-se-radius);
  overflow: hidden;
  margin-bottom: 36px;
  max-height: 420px;
}

.wa-single-event--layout-1 .wa-single-event__hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.wa-single-event--layout-1 .wa-single-event__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 40%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
}

.wa-single-event--layout-1 .wa-single-event__hero-content {
  padding: 28px 32px;
  color: #fff;
}

.wa-single-event--layout-1
  .wa-single-event__hero-content
  .wa-single-event__title {
  color: #fff;
  margin-bottom: 10px;
}

/* Hero meta pills */
.wa-single-event--layout-1 .wa-single-event__hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wa-single-event--layout-1 .wa-single-event__hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #fff;
}

/* No-image fallback header */
.wa-single-event--layout-1 .wa-single-event__header {
  padding: 36px 0 20px;
  border-bottom: 1px solid var(--wa-se-border);
  margin-bottom: 36px;
}

/* ── Body: two-column grid ── */
.wa-single-event--layout-1 .wa-single-event__body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

/* ── Sidebar column (sticky wrapper) ── */
.wa-single-event--layout-1 .wa-single-event__sidebar {
  position: sticky;
  top: 25vh;
}

/* ── Sidebar detail card ── */
.wa-single-event--layout-1 .wa-single-event__detail-card {
  background: var(--wa-se-surface);
  border: 1px solid var(--wa-se-border);
  border-radius: var(--wa-se-radius);
  padding: 24px;
}

.wa-single-event--layout-1
  .wa-single-event__detail-card
  .wa-single-event__detail-heading {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wa-se-muted);
}

.wa-single-event--layout-1 .wa-single-event__detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--wa-se-border);
}

.wa-single-event--layout-1 .wa-single-event__detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wa-single-event--layout-1 .wa-single-event__detail-icon {
  flex-shrink: 0;
  color: var(--wa-se-primary);
  margin-top: 2px;
  line-height: 0;
}

.wa-single-event--layout-1 .wa-single-event__detail-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wa-se-muted);
  margin-bottom: 2px;
}

.wa-single-event--layout-1 .wa-single-event__detail-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--wa-se-text);
}

.wa-single-event--layout-1 .wa-single-event__cta {
  border-bottom: none !important;
  margin-top: 8px;
  display: block;
  padding: 0 !important;
}

.wa-single-event--layout-1 .wa-single-event__cta .wa-single-event__btn {
  width: 100%;
  text-align: center;
  display: block;
}

/* ── Responsive: Layout 1 ── */
@media (max-width: 768px) {
  .wa-single-event--layout-1 .wa-single-event__body {
    grid-template-columns: 1fr;
  }

  .wa-single-event--layout-1 .wa-single-event__sidebar {
    order: -1;
  }

  .wa-single-event--layout-1 .wa-single-event__sidebar {
    position: static;
  }

  .wa-single-event--layout-1 .wa-single-event__hero-content {
    padding: 20px;
  }
}

/* ==========================================================================
   Layout 2 — Card Split
   Image fills left half of a hero card; info panel is on the right.
   Full post content renders below the card.
   ========================================================================== */

.wa-single-event--layout-2 {
  padding-top: 40px;
}

/* ── Hero card ── */
.wa-single-event--layout-2 .wa-single-event__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--wa-se-border);
  border-radius: var(--wa-se-radius);
  overflow: hidden;
  margin-bottom: 44px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

/* ── Image panel ── */
.wa-single-event--layout-2 .wa-single-event__image-panel {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}

.wa-single-event--layout-2 .wa-single-event__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Info panel ── */
.wa-single-event--layout-2 .wa-single-event__info-panel {
  padding: 40px 36px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.wa-single-event--layout-2 .wa-single-event__info-panel--full {
  grid-column: 1 / -1;
}

/* ── Meta list ── */
.wa-single-event--layout-2 .wa-single-event__meta-list {
  list-style: none;
  margin-bottom: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wa-single-event--layout-2 .wa-single-event__meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.wa-single-event--layout-2 .wa-single-event__meta-icon {
  flex-shrink: 0;
  color: var(--wa-se-primary);
  margin-top: 2px;
  line-height: 0;
}

.wa-single-event--layout-2 .wa-single-event__meta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wa-se-muted);
  margin-bottom: 1px;
}

.wa-single-event--layout-2 .wa-single-event__meta-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--wa-se-text);
}

/* ── Excerpt ── */
.wa-single-event--layout-2 .wa-single-event__excerpt {
  font-size: 0.9rem;
  color: var(--wa-se-muted);
  line-height: 1.65;
  margin: 0 0 24px;
}

/* ── Responsive: Layout 2 ── */
@media (max-width: 768px) {
  .wa-single-event--layout-2 .wa-single-event__card {
    grid-template-columns: 1fr;
  }

  .wa-single-event--layout-2 .wa-single-event__image-panel {
    height: 240px;
    min-height: unset;
    position: relative;
  }

  .wa-single-event--layout-2 .wa-single-event__info-panel {
    padding: 28px 24px;
  }
}

/* ==========================================================================
   Latest Events Section
   Responsive 3-column grid with cards
   ========================================================================== */

.wa-latest-events {
  margin-top: 60px;
  padding-top: 60px;
  border-top: 1px solid var(--wa-se-border);
}

.wa-latest-events__heading {
  margin: 0 0 36px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--wa-se-text);
}

.wa-latest-events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.wa-latest-events__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--wa-se-border);
  border-radius: var(--wa-se-radius);
  overflow: hidden;
  text-decoration: none;
  transition:
    box-shadow 150ms ease,
    transform 150ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wa-latest-events__card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.wa-latest-events__card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.wa-latest-events__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wa-latest-events__card-body {
  padding: 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wa-latest-events__card-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wa-se-text);
  line-height: 1.3;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wa-latest-events__card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 0.8rem;
  color: var(--wa-se-muted);
  line-height: 1.4;
}

.wa-latest-events__card-meta svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--wa-se-primary);
}

/* ── Responsive: Latest Events grid ── */
@media (max-width: 1024px) {
  .wa-latest-events__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .wa-latest-events {
    margin-top: 48px;
    padding-top: 48px;
  }

  .wa-latest-events__heading {
    margin-bottom: 28px;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  }

  .wa-latest-events__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wa-latest-events__card-image {
    height: 180px;
  }
}
