/* ---------- Events page (hero from history.css) ---------- */

.page-events .h-hero::after { background: var(--c-white); }
.page-events .h-hero__content { padding-bottom: calc(var(--h-curve) + 1.5rem); }
.page-events .h-hero + .section { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

.ev-list { background: var(--c-white); }
.ev-head { display: grid; justify-items: center; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); text-align: center; }
.ev-head .eyebrow::after { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
.ev-head .h2 { color: var(--c-maroon-900, var(--c-maroon-950)); }

.ev-list .ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.9rem, 2vw, 1.75rem); margin: 0; padding: 0; list-style: none; }

.ev-card a { display: grid; height: 100%; overflow: hidden; background: var(--c-soft, #f6f2eb); border-radius: 15px; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.ev-card a:hover, .ev-card a:focus-visible { transform: translateY(-6px); box-shadow: 0 28px 40px -30px rgb(var(--rgb-maroon-950) / 0.6); }
.ev-card__img { display: block; overflow: hidden; }
.ev-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 288 / 299; object-fit: cover; transition: transform 0.6s var(--ease); }
.ev-card a:hover .ev-card__img img { transform: scale(1.05); }
.ev-card__title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem 1.25rem; font-family: var(--f-serif); font-size-adjust: 0.4; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); font-weight: 600; line-height: 1.15; color: var(--c-maroon-900, var(--c-maroon-950)); border-top: 3px solid var(--c-gold-500); }
.ev-card__title .icon { flex: none; width: 1.1rem; height: 1.1rem; color: var(--c-gold-700); }

@media (max-width: 960px) { .ev-list .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ev-list .ev-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Event cards, redesigned: three columns of white cards. The photograph sits inset in the card with rounded corners and a
   numbered teal tag on it; beneath are the title and a round arrow button, with a teal line that grows along the card's
   foot on hover.
   ========================================================================== */
.ev-list .ev-grid { counter-reset: ev; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); align-items: stretch; }
.ev-card:first-child { grid-column: auto; grid-row: auto; }

.ev-card a { position: relative; display: flex; flex-direction: column; gap: 1.1rem; height: 100%; padding: 0.65rem 0.65rem 1.3rem; aspect-ratio: auto; overflow: hidden; background: var(--c-white); border: 1px solid var(--c-line); border-radius: 28px; box-shadow: 0 2px 0 rgb(25 47 37 / 0.02); isolation: auto; transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.25s ease; }
.ev-card a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--c-gold-500), var(--c-maroon-700)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.45s var(--ease); inset: auto 0 0 0; z-index: 1; }
.ev-card a:hover, .ev-card a:focus-visible { transform: translateY(-6px); border-color: rgb(var(--rgb-gold-500) / 0.5); box-shadow: 0 28px 50px -26px rgb(25 47 37 / 0.28); }
.ev-card a:hover::after, .ev-card a:focus-visible::after { transform: scaleX(1); }

.ev-card__img { position: relative; inset: auto; z-index: auto; display: block; overflow: hidden; border-radius: 20px; box-shadow: none; }
.ev-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.8s var(--ease); }
.ev-card a:hover .ev-card__img img, .ev-card a:focus-visible .ev-card__img img { transform: scale(1.07); }
/* the numbered tag on the photograph */
.ev-card__img::after { counter-increment: ev; content: counter(ev, decimal-leading-zero); position: absolute; left: 0.85rem; top: 0.85rem; padding: 0.35rem 0.8rem; font-family: var(--f-sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; color: var(--c-white); background: rgb(var(--rgb-maroon-950) / 0.62); border: 1px solid rgb(255 255 255 / 0.3); border-radius: 999px; backdrop-filter: blur(6px); }

.ev-card__title { position: static; display: flex; flex: 1; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0 0.8rem; font-family: var(--f-serif); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--c-maroon-900); background: none; border: 0; }
.ev-card__title::before { content: none; }
.ev-card__title .icon { flex: none; box-sizing: content-box; width: 1rem; height: 1rem; padding: 0.65rem; color: var(--c-maroon-800); background: var(--c-soft); border: 0; border-radius: 50%; backdrop-filter: none; transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s var(--ease); }
.ev-card a:hover .ev-card__title .icon, .ev-card a:focus-visible .ev-card__title .icon { color: var(--c-white); background: var(--c-gold-700); transform: rotate(-45deg); }

@media (max-width: 960px) { .ev-list .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ev-list .ev-grid { grid-template-columns: 1fr; } }
