/* =========================================================
   Additions for the dynamic (ASP.NET) site. The original design
   lives unchanged in style.css; this file only styles elements
   that are new in the CMS version (forms, pagers, listings).
   ========================================================= */

/* Web Forms wraps the page in one <form>; keep it layout-neutral */
.site-form { display: contents; }

/* Deeper menu levels (level 3+) inside a dropdown */
.nav__sublink--l3 { padding-left: 34px; font-size: .9rem; }
.nav__sublink--l4 { padding-left: 46px; font-size: .88rem; }

/* Footer phone links on two lines */
.footer__contact span a + br + a { display: inline; }

/* Alumni photo inside the round monogram */
.alum__mono { overflow: hidden; }
.alum__mono img { width: 100%; height: 100%; object-fit: cover; }

/* Server-side gallery category links look like the filter buttons */
a.filter { display: inline-flex; align-items: center; text-decoration: none; }
a.filter[aria-current="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--white); }

/* ---------- Forms (enquiry / contact) ---------- */
.form select, .form input[type="text"], .form textarea, .form input:not([type]) {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid #D9CFC2; background: var(--white); font-size: 1rem;
}
.form .field__err { margin-top: 4px; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__success {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 14px 16px; border-radius: 12px;
  background: #EAF6EE; border: 1px solid #B9DFC6; color: #1F5A33;
}
.form__success .i { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form__error { margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: #FDECEA; border: 1px solid #F3C1BB; color: #8A1F14; font-size: .92rem; }

/* ---------- Pager ---------- */
.pager { margin-top: 40px; }
.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager a, .pager span {
  display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-2); font-size: .9rem; font-weight: 500; text-decoration: none;
}
.pager a:hover { border-color: var(--gold); color: var(--maroon); }
.pager .is-current { background: var(--maroon); border-color: var(--maroon); color: var(--white); }
.pager .is-disabled { opacity: .45; }
.pager .pager__gap { border: 0; background: none; min-width: 20px; }

/* ---------- News / events / notices / downloads ---------- */
.news-card__link { color: inherit; text-decoration: none; }
.news-card__link:hover { color: var(--maroon); }
.news-card__link::after { content: ""; position: absolute; inset: 0; }
.news-card { position: relative; }
.list-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 36px; }
.empty-state { max-width: 520px; margin: 0 auto; padding: 48px 24px; text-align: center; border-radius: var(--r-lg); background: var(--white); border: 1px dashed var(--line); color: var(--muted); }
.empty-state .i { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--gold-600); }

.article { max-width: 820px; margin: 0 auto; }
.article__meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 24px; color: var(--muted); font-size: .9rem; }
.article__meta .cat { padding: 3px 10px; border-radius: 6px; background: rgb(240 176 0 / .16); color: var(--gold-ink); font-weight: 600; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.article__image { margin-bottom: 28px; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.article__image { background: var(--cream, #FAF6EF); }
/* whole photo, never cropped: tall (portrait) photos are limited in height and centred */
.article__image img { display: block; width: 100%; max-height: 80vh; object-fit: contain; margin: 0 auto; }
.article__body { font-size: 1.05rem; color: var(--ink-2); }
.article__body > * + * { margin-top: 1em; }
.article__body a { color: var(--maroon); }
.article__foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

.event-list { display: grid; gap: 20px; }
.event {
  display: grid; grid-template-columns: 96px 1fr 220px; gap: 24px; align-items: center; padding: 20px; border-radius: var(--r-lg);
  background: var(--white); border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.event:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.event__date { display: grid; place-items: center; align-content: center; height: 96px; border-radius: 16px; background: var(--grad-maroon); color: var(--white); text-align: center; }
.event__day { font-family: var(--ff-display); font-size: 2.2rem; line-height: 1; }
.event__mon { font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); }
.event h3 { font-size: 1.35rem; margin-bottom: 6px; }
.event h3 a { color: inherit; text-decoration: none; }
.event h3 a:hover { color: var(--maroon); }
.event__info { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
.event__info span { display: inline-flex; align-items: center; gap: 6px; }
.event__info .i { width: 16px; height: 16px; color: var(--gold-600); }
.event__img { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; }
.event__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .event { grid-template-columns: 76px 1fr; } .event__date { height: 76px; } .event__day { font-size: 1.7rem; } .event__img { display: none; } }

.doc-list { display: grid; gap: 14px; }
.doc {
  display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line);
  transition: border-color .3s, transform .3s var(--ease);
}
.doc:hover { border-color: var(--gold); transform: translateY(-2px); }
.doc__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 12px; background: rgb(240 176 0 / .16); color: var(--maroon); }
.doc__icon .i { width: 22px; height: 22px; }
.doc__body { flex: 1; min-width: 0; }
.doc__body h3 { font-family: var(--ff-body); font-size: 1.02rem; font-weight: 600; }
.doc__body p { font-size: .9rem; color: var(--muted); }
.doc__meta { font-size: .8rem; color: var(--muted); }
.doc .btn { flex: none; }
@media (max-width: 560px) { .doc { flex-wrap: wrap; } .doc .btn { width: 100%; } }

/* ---------- Error pages ---------- */
.status-page { display: grid; justify-items: center; gap: 14px; max-width: 560px; margin: 0 auto; padding: 12vh 24px; text-align: center; }
.status-page h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.status-page p { color: var(--muted); }

/* =========================================================
   Event cards (events.aspx): date tile + status on the photo,
   time / place rows, "View event details" button
   ========================================================= */
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ev-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: 0 2px 6px rgb(23 23 23 / .04); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.ev-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgb(240 176 0 / .6); }
.ev-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--maroon-900), var(--maroon)); }
.ev-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.ev-card:hover .ev-card__media img { transform: scale(1.05); }
.ev-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 55%, rgb(40 4 4 / .45)); pointer-events: none; }
.ev-card__noimg { position: absolute; inset: 0; display: grid; place-items: center; color: rgb(255 255 255 / .35); }
.ev-card__noimg .i { width: 56px; height: 56px; }

/* date tile */
.ev-date { position: absolute; left: 16px; top: 16px; z-index: 1; display: grid; justify-items: center; min-width: 70px; padding: 8px 10px 9px; border-radius: 14px; background: var(--white); box-shadow: 0 10px 24px -10px rgb(40 4 4 / .55); line-height: 1; text-align: center; }
.ev-date::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 14px 14px 0 0; background: linear-gradient(90deg, var(--gold), var(--gold-600)); }
.ev-date__day { font-family: var(--ff-display); font-size: 2rem; font-weight: 600; color: var(--maroon); margin-top: 4px; }
.ev-date__mon { margin-top: 4px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink, #1c1c1c); }
.ev-date__yr { margin-top: 3px; font-size: .7rem; color: var(--muted); }

/* status badge */
.ev-status { position: absolute; right: 14px; top: 14px; z-index: 1; padding: 5px 12px; border-radius: 999px; background: var(--gold); color: var(--maroon-950); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ev-card--past .ev-status { background: rgb(255 255 255 / .9); color: var(--muted); }

.ev-card__body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px 22px 24px; }
.ev-card__title { font-size: 1.3rem; line-height: 1.3; }
.ev-card__title a { color: inherit; text-decoration: none; }
.ev-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }   /* whole card is clickable */
.ev-card:hover .ev-card__title a { color: var(--maroon); }
.ev-card__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; color: var(--ink-2); }
.ev-card__facts li { display: flex; align-items: flex-start; gap: 9px; }
.ev-card__facts .i { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; color: var(--gold-ink); }
.ev-card__text { color: var(--muted); font-size: .93rem; }
.ev-card__btn { margin-top: auto; align-self: flex-start; }
.ev-card__btn .i { width: 16px; height: 16px; }

@media (max-width: 1000px) { .ev-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px)  { .ev-grid { grid-template-columns: 1fr; gap: 20px; } }
@media (prefers-reduced-motion: reduce) { .ev-card, .ev-card__media img { transition: none; } .ev-card:hover { transform: none; } .ev-card:hover .ev-card__media img { transform: none; } }

/* =========================================================
   Event details page (event-details.aspx): main column +
   sticky "Event details" panel; panel first on phones
   ========================================================= */
.evd { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.evd__main { grid-column: 1; grid-row: 1; min-width: 0; }
.evd__panel { grid-column: 2; grid-row: 1; position: sticky; top: 110px; padding: 26px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.evd__panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--maroon), var(--maroon-600) 55%, var(--gold)); }
.evd__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.evd__date { position: relative; left: auto; top: auto; box-shadow: none; border: 1px solid var(--line); }
.evd__status { position: static; }
.evd__status--past { background: #F1EEEA; color: var(--muted); }
.evd__facts { display: grid; gap: 16px; margin: 0 0 22px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.evd__fact { display: flex; gap: 12px; align-items: flex-start; }
.evd__fact > .i { flex-shrink: 0; width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: rgb(240 176 0 / .14); color: var(--gold-ink); }
.evd__fact dt { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.evd__fact dd { margin: 2px 0 0; font-weight: 600; color: var(--ink-2); line-height: 1.4; }
.evd__actions { display: grid; gap: 10px; }
.evd__actions .btn { justify-content: center; width: 100%; }
.evd__actions .btn .i { width: 18px; height: 18px; }
.evd__image { margin-bottom: 30px; }
.evd__heading { font-size: 1.5rem; margin-bottom: 14px; }
.evd__heading::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 10px; border-radius: 3px; background: var(--gold); }

@media (max-width: 900px) {
  .evd { grid-template-columns: 1fr; gap: 28px; }
  .evd__panel { grid-column: 1; grid-row: 1; position: static; }
  .evd__main { grid-row: 2; }
}
