:root {
  --event-red: #8d2424;
  --event-gold: #c09853;
  --event-cream: #fff8eb;
  --event-line: #ead8b7;
  --event-ink: #2f2d2b;
}

.home-event-card[hidden],
.event-modal[hidden] {
  display: none !important;
}

.home-event-card {
  margin-top: 22px;
  border: 1px solid rgba(192, 152, 83, 0.34);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.94), rgba(255, 255, 255, 0.82));
  box-shadow: 0 20px 46px rgba(99, 38, 28, 0.11);
  overflow: hidden;
}

.home-event-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 18px;
  padding: 18px;
  align-items: stretch;
}

.home-event-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--event-red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.home-event-title {
  margin-top: 8px;
  color: var(--event-red);
  font-family: Merriweather, serif;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.22;
}

.home-event-summary {
  margin-top: 8px;
  color: #5a4b43;
  font-size: 0.95rem;
  line-height: 1.65;
}

.home-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.home-event-meta span,
.home-event-countdown span {
  border: 1px solid rgba(192, 152, 83, 0.36);
  border-radius: 999px;
  background: #fffaf2;
  color: #6f342d;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 10px;
}

.home-event-countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.home-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.home-event-cover {
  min-height: 180px;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #fffaf2, #ead8b7);
}

.home-event-cover img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.home-event-image-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #8d2424;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
  background:
    radial-gradient(circle at 24% 22%, rgba(192, 152, 83, 0.18), transparent 34%),
    linear-gradient(135deg, #fffaf2, #f4ead9);
}

.event-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(47, 45, 43, 0.56);
}

.event-modal-panel {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--event-line);
  border-radius: 20px;
  background: #fffaf2;
  box-shadow: 0 24px 70px rgba(47, 45, 43, 0.24);
}

.event-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--event-line);
}

.event-modal-head h3 {
  color: var(--event-red);
  font-family: Merriweather, serif;
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0;
}

.event-modal-body {
  padding: 20px 22px 22px;
}

.event-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.event-form-grid .full {
  grid-column: 1 / -1;
}

.event-admin-preview img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--event-line);
}

.event-registration-row {
  border: 1px solid var(--event-line);
  border-radius: 12px;
  background: white;
  padding: 12px;
}

@media (max-width: 760px) {
  .home-event-inner {
    grid-template-columns: 1fr;
  }

  .home-event-cover {
    min-height: 150px;
  }

  .home-event-actions .museum-button {
    width: 100%;
    justify-content: center;
  }

  .event-form-grid {
    grid-template-columns: 1fr;
  }

  .event-modal {
    align-items: flex-end;
    padding: 10px;
  }

  .event-modal-panel {
    border-radius: 18px 18px 10px 10px;
  }
}
