/* assets/css/events.css - event cards (/events and place pages) and the event page /event/<id>. Uses the tokens from places.css. */

.evEmpty { padding: 20px; border-radius: 14px; background: var(--bg); color: var(--muted); text-align: center; }

.plEvents { margin: 8px 0 24px; }
.plEvents h2 { margin: 0 0 10px; font-size: 20px; }


/* ---------- picture cards, three in a row (/events and place pages), each opens /event/<id> ---------- */
.evGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* three in a row; fewer on narrow screens (below) */
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.evCard {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface, #fff);
  box-shadow: 0 1px 6px rgba(21, 34, 51, .06);
  scroll-margin-top: 110px;
  transition: box-shadow .15s, transform .15s;
}
.evCard::before { content: none !important; }
.evCard:hover { box-shadow: 0 6px 18px rgba(21, 34, 51, .12); transform: translateY(-2px); }
.evCardImg { position: relative; flex: none; height: 0; padding-bottom: 52%; overflow: hidden; background: var(--blue-soft, #EEF0FE); }   /* same size for every picture */
.evCardImg img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.evCardBody { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.evCardTitle {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.evCardTitle::after { content: ""; position: absolute; inset: 0; }   /* the whole card is the link */
.evCard:hover .evCardTitle { color: var(--blue); }
.evCardTitle:focus-visible { outline: none; }
.evCard:has(.evCardTitle:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.evCardWhen { color: var(--muted); font-size: 13px; font-weight: 600; }
.evCard:target { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .evCard, .evCard:hover { transition: none; transform: none; } }

/* ---------- the event page: /event/{id} (templates/tmpl_event.php) ---------- */
.evPage { max-width: 760px; }
.evCover { display: block; width: 100%; height: auto; max-height: 460px; margin: 4px 0 22px; object-fit: cover; border-radius: 20px; background: var(--bg); }
.evPageTitle { margin: 0 0 14px; }
.evPast { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: #FFF6DB; color: #7A5B00; font-weight: 600; }

.evFacts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 0 0 20px; }
.evFacts dt { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.evFacts dd { margin: 0; font-size: 18px; font-weight: 700; }
.evFacts .evPlace { margin: 0; }

.evActions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.evBtnMain, .evBtnSecond {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.evBtnMain { background: var(--blue); color: #fff; }
.evBtnMain:hover { opacity: .9; }
.evBtnSecond { border: 2px solid var(--stroke, #E6E9F0); color: var(--ink); }
.evBtnSecond:hover { border-color: var(--blue); color: var(--blue); }
[dir="rtl"] .evBtnMain .evExtIcon, [dir="rtl"] .evBtnSecond .evExtIcon { transform: scaleX(-1); }

.evContent { margin: 0 0 10px; }
.evContent p { margin: 0 0 14px; font-size: 17px; line-height: 1.7; }
.evSource { margin: 0 0 32px; color: var(--muted); font-size: 13px; }
.evMap { margin: 8px 0 40px; }

/* ---------- past and cancelled events: greyed out, still clickable ---------- */
.evBadge {
  display: inline-block;
  margin-inline-end: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #E3E6EC;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.evBadge--canceled { background: #FDE8E8; color: #B42318; }
.evCardImg .evBadge { position: absolute; z-index: 1; top: 10px; inset-inline-start: 10px; margin: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

.is-inactive .evCardImg img { filter: grayscale(1); opacity: .6; transition: filter .2s, opacity .2s; }
.is-inactive .evCardTitle { color: var(--muted) !important; }
.is-inactive.evCard { box-shadow: none; background: transparent; outline: 1px solid var(--stroke, #E6E9F0); outline-offset: -1px; }
.is-inactive:hover .evCardImg img { filter: grayscale(.3); opacity: .9; }
.is-inactive.evCard:hover .evCardTitle { color: var(--blue) !important; }

.plEvents h2 + .evGrid { margin-top: 0; }
.plEvents .evGrid + h2 { margin-top: 8px; }
.evPast--canceled { background: #FDE8E8; color: #B42318; }

@media (max-width: 860px) { .evGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .evGrid { grid-template-columns: 1fr; } }

/* /events: the cards, wider than the text column of other text pages */
.evAll { box-sizing: border-box; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.evAll .evEmpty { margin-bottom: 28px; }
.evAll .evPastTitle { margin: 40px 0 16px !important; font-size: 26px; }
.evCardPlace { color: var(--ink); font-size: 13px; font-weight: 600; }
.evCardPlace + .evCardWhen { margin-top: -4px; }

.evIntro { max-width: 680px; margin: -32px auto 36px; color: var(--muted); font-size: 18px; line-height: 1.6; text-align: center; }
.evIntro p { margin: 0; }
