/* Homepage "On the road with Spire" trade show section. Loaded by index.html only. */

.events {
  padding: 96px 20px;
  background: linear-gradient(180deg, #f3f6fb 0%, #ffffff 100%);
}

.events-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.events-intro {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}

.events-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.events-copy h2 {
  margin: 0 0 16px;
  color: #111827;
}

.events-copy p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.7;
}

.events-copy .events-source {
  font-size: .9rem;
  color: #6b7280;
}

.events-copy .events-source a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.events-copy .events-source a:hover { text-decoration: underline; }

.events-photo {
  margin: 0;
}

.events-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
  background: #e5e7eb;
}

.events-photo figcaption {
  margin-top: 10px;
  color: #6b7280;
  font-size: .85rem;
  text-align: center;
}

/* Event tiles */
.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.event-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(31, 41, 55, 0.06), 0 1.5px 4px rgba(31, 41, 55, 0.04);
  text-align: left;
}

.event-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.event-date {
  flex: none;
  width: 56px;
  padding: 6px 0 7px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  text-align: center;
  line-height: 1;
}

.event-date .m {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
}

.event-date .d {
  display: block;
  margin-top: 4px;
  font-size: 1.5rem;
  font-weight: 700;
}

.event-city {
  margin: 2px 0 2px;
  color: #111827;
  font-size: 1.1rem;
  font-weight: 700;
}

.event-prov {
  color: #6b7280;
  font-size: .85rem;
}

.event-venue {
  margin: 0 0 4px;
  color: #374151;
  font-size: .92rem;
  font-weight: 600;
}

.event-address,
.event-time {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: .88rem;
  line-height: 1.5;
}

.event-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.event-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}

.event-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.event-status.is-upcoming { background: #eff6ff; color: #2563eb; }
.event-status.is-past { background: #f0fdf4; color: #15803d; }

.event-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: .78rem;
  font-weight: 600;
}

.event-link {
  margin-left: auto;
  color: #2563eb;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.event-link:hover { text-decoration: underline; }

/* Past / Next up / Upcoming label */
.event-time { margin-bottom: 14px; }

.event-when {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.event-when.is-upcoming { background: #eff6ff; color: #2563eb; }
.event-when.is-next { background: #2563eb; color: #fff; }
.event-when.is-past { background: #f3f4f6; color: #6b7280; }

.event-card.is-past { background: #fafafa; }
.event-card.is-past .event-date { background: #9ca3af; }
.event-card.is-past .event-city,
.event-card.is-past .event-venue { color: #6b7280; }

/* "More to come" tile */
.event-card.event-more {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f9fafb;
  border-style: dashed;
  border-color: #cbd5e1;
  box-shadow: none;
}

.event-more .event-date {
  background: #fff;
  color: #2563eb;
  border: 1.5px dashed #93c5fd;
  margin: 0 auto 14px;
}

.event-more .event-date .d { font-size: 1.6rem; }

.event-more .event-city { margin-bottom: 6px; }

.event-more p {
  margin: 0;
  color: #6b7280;
  font-size: .9rem;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .events-intro { grid-template-columns: 1fr; gap: 32px; }
  .events-copy { text-align: center; }
}

@media (max-width: 768px) {
  .events { padding: 64px 18px; }
  .events-intro { margin-bottom: 36px; }
}

@media (max-width: 560px) {
  .events-grid { grid-template-columns: 1fr; }
}

/* Illustration row */
.events-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}

.events-gallery li { margin: 0; }

.events-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.05);
}

.events-gallery span {
  display: block;
  margin-top: 10px;
  color: #6b7280;
  font-size: .85rem;
  text-align: center;
}

@media (max-width: 760px) {
  .events-gallery { grid-template-columns: 1fr 1fr; }
  .events-gallery li:last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; }
}

@media (max-width: 480px) {
  .events-gallery { grid-template-columns: 1fr; }
  .events-gallery li:last-child { max-width: none; }
}

/* Slow, close sonar ping on the "Next up" tag: one thin ring fades in at the tag's
   edge, drifts a few pixels out while fading away, then rests. */
.event-when.is-next {
  position: relative;
}

.event-when.is-next::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid #2563eb;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  animation: nextUpPing 5s ease-in-out infinite;
}

@keyframes nextUpPing {
  0%   { inset: -1px; opacity: 0; }
  12%  { inset: -2px; opacity: .45; }
  55%  { inset: -7px; opacity: 0; }
  100% { inset: -7px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .event-when.is-next::after { animation: none; }
}
