@import url('https://fonts.googleapis.com/css2?family=Allison&family=Bebas+Neue&family=Dancing+Script:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&family=Passion+One:wght@400;700;900&family=Petit+Formal+Script&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&family=Tiny5&display=swap');
@import url('/assets/css/recent-events.css');

/* Prevent horizontal overflow causing background cutoffs.
   IMPORTANT: do NOT put overflow-x:hidden on <body>. Together with html it
   turns body into a scroll container and breaks the sticky navbar.
   overflow-x:clip hides the overflow without creating a scroll container. */
html {
    overflow-x: hidden;
    max-width: 100%;
}
body {
    overflow-x: clip;
    max-width: 100%;
}

.campus-event-intro,
.campus-event-about,
.campus-event-programs,
.campus-event-dean,
.campus-event-requirements {
    --gnc-green: #0b4228;
    --gnc-green-light: #1F5E2C;
    --gnc-green-dark: #08331e;
    --gnc-gold: #d3a63a;
    --gnc-gold-light: #e9b93c;
    --gnc-maroon: #8f1230;
    --gnc-cream: #f9f6f1;
    --gnc-text-dark: #202020;
    --gnc-text-gray: #6b6b66;
    --gnc-border: #e6e1d8;
    font-family: 'Noto Serif', serif;
}

.campus-event-intro,
.campus-event-about {
    background-color: var(--gnc-cream);
}

/* ---------- Hero ---------- */
.campus-event-hero {
    position: relative;
    background-color: var(--gnc-cream);
    background-image: url('/assets/images/admission-header.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    border-bottom: 1px solid var(--gnc-border);
}

.campus-event-hero-inner {
    padding: 40px 15px 44px;
    max-width: 1200px;
    margin: 0 auto;
}

.campus-event-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: white;
    margin-bottom: 14px;
}

.campus-event-breadcrumb a {
    color: white;
    text-decoration: none;
}

.campus-event-breadcrumb a:hover {
    text-decoration: underline;
}

.campus-event-breadcrumb i {
    font-size: 10px;
    color: white;
    opacity: 0.8;
}

.campus-event-breadcrumb .campus-event-current {
    color: white;
}

.campus-event-hero h1 {
    font-family: 'Noto Serif', serif;
    font-weight: 700;
    color: var(--gnc-gold);
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 8px;
}

.campus-event-hero p {
    font-family: 'Inter', sans-serif;
    color: white;
    font-size: 14px;
    max-width: 900px;
    margin: 0;
}

/* Calendar styles from the homepage, without its page-wide layout and animations. */
.gnc-cal-card, .gnc-upcoming-card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden; height: 100%;
}
.gnc-cal-header {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid #f0f0f0;
}
.gnc-cal-title { font-weight: 700; color: #1F5E2C; font-size: 1.05rem; }
.gnc-cal-nav {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f5; color: #094024; text-decoration: none;
    transition: background .15s;
}
.gnc-cal-nav:hover { background: #e8e8e8; }
.gnc-cal-nav:last-of-type { margin-left: auto; }
.gnc-cal-grid {
    display: grid; grid-template-columns: repeat(7,1fr);
    gap: 2px; padding: 1rem 1.25rem;
}
.gnc-cal-dow {
    text-align: center; font-size: .68rem; font-weight: 700;
    color: #999; text-transform: none; padding-bottom: 6px;
}
.gnc-cal-cell {
    min-height: 88px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    font-size: .82rem; color: #444; border-radius: 6px; position: relative;
    padding: 5px 4px; gap: 3px; overflow: hidden;
}
.gnc-cal-empty { background: none; min-height: auto; }
.gnc-cal-daynum { line-height: 1; }
.gnc-cal-today { background: #F0E4C2; font-weight: 700; color: #094024; border: 1px solid #EABA3B; }
.gnc-cal-hasevent {
    background: #f3f6f3; font-weight: 700; cursor: default;
}
.gnc-cal-hasevent.gnc-cal-today { background: #F0E4C2; border-color: #EABA3B; }
.gnc-cal-events {
    display: flex; flex-direction: column; gap: 2px; width: 100%;
}
.gnc-cal-event-chip {
    display: flex; align-items: center; gap: 4px;
    font-size: .62rem; font-weight: 600; line-height: 1.2;
    padding: 2px 4px; border-radius: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%;
}
.gnc-cal-event-more {
    font-size: .6rem; font-weight: 600; color: #888; padding: 0 4px;
}
.gnc-cal-dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.gnc-cal-legend {
    display: flex; flex-wrap: wrap; gap: 14px; padding: 0 1.25rem 1rem;
    font-size: .78rem; color: #555;
}
.gnc-cal-legend .gnc-cal-dot { width: 9px; height: 9px; margin-right: 5px; }
.gnc-cal-dot-holiday { background: #EABA3B; }
.gnc-cal-dot-school { background: #1F5E2C; }
.gnc-cal-dot-emergency { background: #B3312D; }

.gnc-cal-sec {
    background: #F9F6F1;
    padding: 4.5rem 0 4rem;
}

/* heading */
.gnc-cal-head { max-width: 560px; margin: 0 auto 2.5rem; text-align: center; }
.gnc-cal-kicker {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: #094024;
    margin-bottom: .6rem;
}
.gnc-cal-kicker i { color: #EABA3B; font-size: 1.1rem; }
.gnc-cal-heading {
    font-family: 'Noto Serif', serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 4.2vw, 2.6rem);
    line-height: 1.1;
    color: #094024;
    margin: 0 0 .8rem;
}
.gnc-cal-heading span {
    font-weight: 500;
    background: linear-gradient(transparent 64%, rgba(234, 186, 59, .6) 64%);
    background-repeat: no-repeat;
    background-position: left center;
    padding: 0 .1em;
}
.gnc-cal-sub { color: #5d6b62; font-size: .98rem; line-height: 1.6; margin: 0; }

/* panels: square, white, soft green shadow */
.gnc-cal-sec .gnc-cal-card,
.gnc-cal-sec .gnc-upcoming-card {
    border-radius: 0;
    background: #fff;
    box-shadow: 0 14px 34px rgba(9, 64, 36, .14);
}

/* month bar */
.gnc-cal-sec .gnc-cal-header {
    background: #fff;
    border-bottom: 0;
    padding: 1.1rem 1.25rem;
}
.gnc-cal-sec .gnc-cal-title {
    font-family: 'Noto Serif', serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: #094024;
}
.gnc-cal-sec .gnc-cal-title span {
    font-weight: 800;
    border-bottom: 3px solid #EABA3B;
    padding-bottom: 1px;
}
.gnc-cal-sec .gnc-cal-nav {
    width: 36px; height: 36px;
    border-radius: 0;
    background: #094024;
    color: #fff;
    border-bottom: 3px solid #EABA3B;
    transition: background .2s, color .2s, transform .2s;
}
.gnc-cal-sec .gnc-cal-nav:hover { background: #EABA3B; color: #094024; transform: translateY(-2px); }
.gnc-cal-sec .gnc-cal-nav[aria-disabled="true"] { opacity: .35; cursor: default; background: transparent; color: inherit; transform: none; }

/* edge-to-edge table-style grid */
.gnc-cal-sec .gnc-cal-grid {
    gap: 0;
    padding: 0;
    border-left: 1px solid #e4e9e5;
    border-top: 0;
}
.gnc-cal-sec .gnc-cal-dow {
    background: #094024;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .6rem 0;
    margin: 0;
    border-right: 1px solid rgba(255, 255, 255, .08);
}
.gnc-cal-sec .gnc-cal-cell {
    border-radius: 0;
    background: #fff;
    border-right: 1px solid #e4e9e5;
    border-bottom: 1px solid #e4e9e5;
    padding: 6px 5px;
}
.gnc-cal-sec .gnc-cal-empty { background: #fbfaf7; min-height: 88px; }
.gnc-cal-sec .gnc-cal-daynum {
    font-family: 'Noto Serif', serif;
    font-weight: 700;
    font-size: .9rem;
    color: #094024;
}
.gnc-cal-sec .gnc-cal-hasevent { background: #fff; }
.gnc-cal-sec .gnc-cal-hasevent .gnc-cal-daynum::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    margin-left: 5px;
    background: #EABA3B;
    transform: rotate(45deg);
    vertical-align: middle;
}
.gnc-cal-sec .gnc-cal-event-chip { border-radius: 0; border-left: 3px solid currentColor; }

/* today: solid green square with a gold edge */
.gnc-cal-sec .gnc-cal-today,
.gnc-cal-sec .gnc-cal-hasevent.gnc-cal-today {
    background: #D1DBD2;
    border-color: #e4e9e5;
    border-bottom: 3px solid #EABA3B;
    animation: none;
}
.gnc-cal-sec .gnc-cal-today .gnc-cal-daynum { color: #094024; }

.gnc-cal-sec .gnc-cal-legend {
    background: #fbfaf7;
    padding: .85rem 1.25rem;
    color: #3b4a40;
    font-weight: 600;
    border-top: 0;
}
.gnc-cal-sec .gnc-cal-legend .gnc-cal-dot { border-radius: 0; }

@media (max-width: 767px) {
    .gnc-cal-sec { padding: 3rem 0 2.5rem; }
    .gnc-cal-head { margin-bottom: 1.75rem; }
    .gnc-cal-sec .gnc-cal-title { font-size: 1.2rem; }
    .gnc-cal-sec .gnc-cal-grid { padding: 0; }
    .gnc-cal-sec .gnc-cal-empty { min-height: 65px; }
    .gnc-cal-sec .gnc-cal-daynum { font-size: .8rem; }
}


.gnc-cal-sec { font-family: 'Inter', sans-serif; }
.gnc-cal-sec .gnc-cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gnc-cal-header .gnc-cal-nav:last-child { margin-left: auto; }
.campus-calendar-empty { margin: 1.5rem 0 0; color: #5d6b62; text-align: center; }
.campus-calendar-scope { margin: 0 0 1rem; color: #5d6b62; text-align: center; }
.gnc-program-widget .gnc-upcoming-header { background: #094024; color: #fff; font-size: .85rem; font-weight: 700; gap: 1rem; }
.gnc-program-widget .gnc-upcoming-header i { color: #EABA3B; }
.gnc-program-widget .gnc-programs-count { background: #EABA3B; color: #094024; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; }
.gnc-program-widget .gnc-programs-list-item { display: flex; align-items: center; gap: .65rem; padding: .65rem 1.25rem; border-bottom: 1px solid #eef1ee; line-height: 1.35; }
.gnc-program-widget .gnc-programs-list-item:hover { background: #faf8f3; }
.gnc-program-widget .gnc-programs-code { flex: none; background: #eaf5ee; color: #094024; font-size: .72rem; font-weight: 800; padding: .28rem .55rem; }
.gnc-program-widget .gnc-programs-list-fullname { min-width: 0; color: #333; font-size: .83rem; font-weight: 600; overflow-wrap: anywhere; }
.gnc-program-widget .gnc-programs-list-item-active { background: #edf3ec; box-shadow: inset 4px 0 0 #EABA3B; }
.gnc-program-widget .gnc-programs-list-item-active .gnc-programs-code { background: #094024; color: #fff; }

/* School event news and announcements below the calendar. */
/* Match the homepage calendar animations and event-day hover effect. */
@keyframes gnc-chip-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gnc-today-glow {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(234, 186, 59, 0); }
    50% { box-shadow: inset 0 0 0 4px rgba(234, 186, 59, .45); }
}
.gnc-cal-sec .gnc-cal-event-chip { animation: gnc-chip-in .35s ease backwards; }
.gnc-cal-sec .gnc-cal-event-chip:nth-child(2) { animation-delay: .07s; }
.gnc-cal-sec .gnc-cal-event-chip:nth-child(3) { animation-delay: .14s; }
.gnc-cal-sec .gnc-cal-today { animation: gnc-today-glow 2.6s ease-in-out infinite; }
.gnc-cal-sec .gnc-cal-hasevent {
    transition: transform .2s ease, box-shadow .2s ease;
}
.gnc-cal-sec .gnc-cal-hasevent:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 22px rgba(9, 64, 36, .18);
    z-index: 3;
}
@media (prefers-reduced-motion: reduce) {
    .gnc-cal-sec .gnc-cal-event-chip,
    .gnc-cal-sec .gnc-cal-today {
        animation: none !important;
    }
}

/* Upcoming events: same date cards and hover treatment as the homepage. */
.gnc-evs {
    background: #fff;
    box-shadow: 0 14px 34px rgba(9, 64, 36, .14);
    padding: 1.4rem 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
}
.gnc-evs-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding-bottom: .9rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid #e4e9e5;
}
.gnc-evs-title {
    font-family: 'Noto Serif', serif;
    font-weight: 500; font-size: 1.15rem; color: #094024;
}
.gnc-evs-title i { color: #EABA3B; margin-right: .45rem; }
.gnc-evs-empty { margin: 0; padding: .5rem 0; color: #5d6b62; }

.gnc-evs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem 1.5rem;
}
.gnc-evs-item {
    display: flex; align-items: flex-start; gap: 1rem;
    min-width: 0;
}

/* the date box: white tile, green top bar, big day over a gold month */
.gnc-datebox {
    flex: 0 0 68px;
    width: 68px;
    display: flex; flex-direction: column; align-items: center;
    padding: .45rem 0 .5rem;
    text-align: center;
    background: #fff;
    border: 1px solid #dfe5e0;
    border-top: 4px solid #1F5E2C;
    box-shadow: 0 2px 8px rgba(9, 64, 36, .08);
}
.gnc-datebox-day {
    font-family: 'Noto Serif', serif;
    font-size: 1.75rem; font-weight: 800;
    line-height: 1.1;
    color: #094024;
}
.gnc-datebox-mon {
    font-family: 'Inter', sans-serif;
    font-size: .72rem; font-weight: 800;
    letter-spacing: .12em;
    line-height: 1;
    margin-top: 2px;
    color: #C9A227;
}

/* text beside the date box */
.gnc-evs-info { min-width: 0; padding-top: 2px; }
.gnc-evs-name {
    font-family: 'Noto Serif', serif;
    font-weight: 800; font-size: 1.05rem; line-height: 1.25;
    color: #094024;
    margin-bottom: .55rem;
    overflow-wrap: anywhere;
}
.gnc-evs-meta {
    display: flex; align-items: flex-start; gap: .5rem;
    font-size: .8rem; line-height: 1.4;
    color: #5d6b62;
    margin-top: .35rem;
    overflow-wrap: anywhere;
}
.gnc-evs-meta i { color: #8a8f8c; font-size: .85rem; margin-top: 1px; flex-shrink: 0; }

@media (max-width: 1199px) {
    .gnc-evs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .gnc-evs { padding: 1.2rem 1rem 1.3rem; }
    .gnc-evs-grid { grid-template-columns: 1fr; }
}

.gnc-evs-item { transition: transform .25s ease; }
.gnc-evs-item:hover { transform: translateY(-3px); }
.gnc-datebox {
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.gnc-evs-item:hover .gnc-datebox {
    border-top-color: #EABA3B;
    transform: translateY(-2px) rotate(-2deg);
    box-shadow: 0 8px 16px rgba(9, 64, 36, .14);
}

.gnc-evs-head .gnc-programs-count {
    background: #EABA3B; color: #094024; font-size: .72rem;
    font-weight: 700; padding: .2rem .55rem; line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
    .gnc-evs-item, .gnc-datebox { transition: none; }
    .gnc-evs-item:hover, .gnc-evs-item:hover .gnc-datebox { transform: none; }
}

/* =====================================================================
   PAGE ANIMATIONS
   Fill mode is "backwards" everywhere on purpose: "both"/"forwards" would
   freeze the final transform and block the hover lift effects.
   ===================================================================== */
@keyframes cev-fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cev-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes cev-slide-right {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes cev-line-grow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
@keyframes cev-highlight {
    from { background-size: 0% 100%; }
    to   { background-size: 100% 100%; }
}
@keyframes cev-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@keyframes cev-reveal {
    from { opacity: 0; transform: translateY(34px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.campus-event-hero          { animation: cev-fade-in .8s ease backwards; }
.campus-event-breadcrumb    { animation: cev-slide-right .6s .05s ease-out backwards; }
.campus-event-hero h1       { animation: cev-fade-up .7s .15s cubic-bezier(.22,.61,.36,1) backwards; }
.campus-event-hero p        { animation: cev-fade-up .7s .28s cubic-bezier(.22,.61,.36,1) backwards; }

/* ---------- Calendar section heading ---------- */
.gnc-cal-kicker  { animation: cev-fade-up .6s .35s cubic-bezier(.22,.61,.36,1) backwards; }
.gnc-cal-heading { animation: cev-fade-up .7s .45s cubic-bezier(.22,.61,.36,1) backwards; }
.gnc-cal-heading span { animation: cev-highlight .8s 1s ease-out backwards; }
.gnc-cal-sub     { animation: cev-fade-up .6s .6s cubic-bezier(.22,.61,.36,1) backwards; }
.campus-calendar-scope { animation: cev-fade-in .5s .7s ease backwards; }

/* ---------- Calendar and upcoming panels ---------- */
.gnc-cal-sec .gnc-cal-card     { animation: cev-fade-up .7s .35s cubic-bezier(.22,.61,.36,1) backwards; }
.gnc-cal-sec .gnc-upcoming-card,
.gnc-cal-sec .gnc-evs          { animation: cev-fade-up .7s .45s cubic-bezier(.22,.61,.36,1) backwards; }
.campus-calendar-empty         { animation: cev-fade-in .5s .5s ease backwards; }




/* upcoming-event date cards stagger in */
.gnc-evs-item { animation: cev-fade-up .5s cubic-bezier(.22,.61,.36,1) backwards; }
.gnc-evs-item:nth-child(1) { animation-delay: .85s; }
.gnc-evs-item:nth-child(2) { animation-delay: .93s; }
.gnc-evs-item:nth-child(3) { animation-delay: 1.01s; }
.gnc-evs-item:nth-child(4) { animation-delay: 1.09s; }
.gnc-evs-item:nth-child(5) { animation-delay: 1.17s; }
.gnc-evs-item:nth-child(6) { animation-delay: 1.25s; }
.gnc-evs-item:nth-child(n+7) { animation-delay: 1.3s; }

/* program widget rows slide in */
.gnc-program-widget .gnc-programs-list-item { animation: cev-slide-right .45s ease-out backwards; transition: background .2s ease, padding-left .2s ease; }
.gnc-program-widget .gnc-programs-list-item:nth-child(1) { animation-delay: .8s; }
.gnc-program-widget .gnc-programs-list-item:nth-child(2) { animation-delay: .86s; }
.gnc-program-widget .gnc-programs-list-item:nth-child(3) { animation-delay: .92s; }
.gnc-program-widget .gnc-programs-list-item:nth-child(4) { animation-delay: .98s; }
.gnc-program-widget .gnc-programs-list-item:nth-child(5) { animation-delay: 1.04s; }
.gnc-program-widget .gnc-programs-list-item:nth-child(n+6) { animation-delay: 1.1s; }
.gnc-program-widget .gnc-programs-list-item:hover { padding-left: 1.5rem; }
.gnc-program-widget .gnc-programs-code { transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .2s ease; }
.gnc-program-widget .gnc-programs-list-item:hover .gnc-programs-code { transform: scale(1.08); }

/* calendar nav arrows and title */
.gnc-cal-sec .gnc-cal-nav:active { transform: scale(.94); }
.gnc-cal-sec .gnc-cal-event-chip { transition: transform .2s ease, filter .2s ease; }
.gnc-cal-sec .gnc-cal-event-chip:hover { transform: translateX(2px); filter: brightness(.96); }
.gnc-cal-sec .gnc-cal-hasevent .gnc-cal-daynum::after { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.gnc-cal-sec .gnc-cal-hasevent:hover .gnc-cal-daynum::after { transform: rotate(225deg) scale(1.4); }

/* ---------- Recent events ---------- */
.campus-recent-events h2::after { animation: cev-line-grow .6s .25s ease-out backwards; }
.campus-recent-card {
    animation: cev-fade-up .7s cubic-bezier(.22,.61,.36,1) backwards;
    transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease;
}
.campus-recent-image { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.campus-recent-card:hover .campus-recent-image { transform: scale(1.08); }
.campus-recent-content { transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.campus-recent-card:hover .campus-recent-content { transform: translateY(-5px); }
.campus-recent-date { transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .2s ease; }
.campus-recent-card:hover .campus-recent-date { transform: scale(1.08) rotate(-3deg); background: #EABA3B; color: #094024; }
.campus-recent-meta i { transition: transform .3s ease; }
.campus-recent-card:hover .campus-recent-meta i { transform: scale(1.25) rotate(-8deg); }
.campus-recent-placeholder i { display: inline-block; animation: cev-float 3.6s ease-in-out infinite; }
.campus-recent-card:active { transform: translateY(-1px) scale(.99); }

.campus-recent-pagination a { transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
.campus-recent-pagination a:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(9, 64, 36, .18); }
.campus-recent-pagination a:active { transform: scale(.94); }
.campus-recent-pagination { animation: cev-fade-in .5s ease backwards; }

/* Browsers without scroll-driven animation: staggered fade as the page loads. */
@supports not (animation-timeline: view()) {
    .campus-recent-card:nth-child(3n+1) { animation-delay: .1s; }
    .campus-recent-card:nth-child(3n+2) { animation-delay: .22s; }
    .campus-recent-card:nth-child(3n)   { animation-delay: .34s; }
}

/* Chrome / Edge: reveal the lower sections as they scroll into view. */
@supports (animation-timeline: view()) {
    .campus-recent-events h2,
    .campus-recent-card,
    .campus-recent-pagination,
    .campus-recent-empty {
        animation: cev-reveal linear backwards;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
    .campus-recent-events h2::after {
        animation: cev-line-grow linear backwards;
        animation-timeline: view();
        animation-range: entry 10% entry 70%;
    }
    .campus-recent-card:nth-child(3n+2) { animation-range: entry 6% entry 66%; }
    .campus-recent-card:nth-child(3n)   { animation-range: entry 12% entry 72%; }
}

/* ---------- Respect reduced-motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================================
   RESPONSIVE LAYER (appended)
   Bootstrap breakpoints: xs <576 | sm 576-767 | md 768-991 | lg 992-1199 | xl 1200-1399 | xxl 1400+
   Kept at the end of the file so it overrides the base rules above.
   ===================================================================== */

/* ---------- Hero ---------- */
.campus-event-hero { background-color: #0b4228; }   /* white text stays readable if the image is slow or missing */

@media (max-width: 767px) {
    .campus-event-hero-inner { padding: 28px 16px 32px; }
    .campus-event-hero p { font-size: 13.5px; line-height: 1.6; }
    .campus-event-breadcrumb { font-size: .68rem; margin-bottom: 10px; }
}
@media (max-width: 575px) {
    .campus-event-hero { background-position: 70% center; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .campus-event-hero-inner { padding-top: 20px; padding-bottom: 22px; }
}

/* ---------- Calendar section: heading + filter row ---------- */
@media (max-width: 991px) {
    .gnc-cal-sec .gnc-cal-heading-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .gnc-cal-sec .gnc-cal-head { max-width: 100%; margin-bottom: 1rem; }
    .gnc-cal-sec .gnc-cal-heading-row > * { min-width: 0; max-width: 100%; }

    /* stacked columns: let cards size to their content instead of stretching */
    .gnc-cal-sec .gnc-cal-card,
    .gnc-cal-sec .gnc-upcoming-card,
    .gnc-cal-sec .gnc-evs { height: auto; }
}

/* ---------- Calendar card ---------- */
@media (max-width: 767px) {
    .gnc-cal-sec .gnc-cal-header { padding: .9rem 1rem; gap: .5rem; }
    .gnc-cal-sec .gnc-cal-title { min-width: 0; text-align: center; flex: 1 1 auto; }
    .gnc-cal-sec .gnc-cal-dow {
        font-size: .62rem;
        letter-spacing: .02em;
        padding: .5rem 0;
        overflow: hidden;
        text-overflow: clip;
        white-space: nowrap;
    }
    .gnc-cal-sec .gnc-cal-cell { min-height: 64px; padding: 4px 3px; }
    .gnc-cal-sec .gnc-cal-event-chip { font-size: .55rem; padding: 1px 3px; }
    .gnc-cal-sec .gnc-cal-event-more { font-size: .55rem; }
    .gnc-cal-sec .gnc-cal-legend { gap: 8px 14px; padding: .75rem 1rem; font-size: .72rem; }
}

/* Phones: seven narrow columns can't fit chip text, so each event becomes a coloured dot.
   Full event details are in the "Upcoming Events" card below the calendar. */
@media (max-width: 575px) {
    .gnc-cal-sec .gnc-cal-cell {
        min-height: 52px;
        align-items: center;
        padding: 5px 2px;
    }
    .gnc-cal-sec .gnc-cal-daynum { font-size: .78rem; }
    .gnc-cal-sec .gnc-cal-events {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
    }
    .gnc-cal-sec .gnc-cal-event-chip {
        font-size: 0;            /* hides the label text, keeps the dot */
        line-height: 0;
        padding: 0;
        width: auto;
        background: none;
        border-left: 0;
    }
    .gnc-cal-sec .gnc-cal-event-chip .gnc-cal-dot { width: 7px; height: 7px; }
    .gnc-cal-sec .gnc-cal-event-more { font-size: .55rem; padding: 0; }
    .gnc-cal-sec .gnc-cal-hasevent .gnc-cal-daynum::after { margin-left: 3px; }
}

/* ---------- Upcoming events card ---------- */
/* It lives in col-lg-4 (a narrow sidebar) on desktop, so use a single column there. */
@media (min-width: 992px) {
    .gnc-cal-sec .col-lg-4 .gnc-evs-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 576px) and (max-width: 991px) {
    .gnc-cal-sec .gnc-evs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .gnc-evs { margin-bottom: 0; }
    .gnc-evs-head { margin-bottom: 1.1rem; }
    .gnc-evs-title { font-size: 1.05rem; }
    .gnc-evs-grid { gap: 1.25rem; }
}
@media (max-width: 575px) {
    .gnc-datebox { flex-basis: 60px; width: 60px; }
    .gnc-datebox-day { font-size: 1.5rem; }
    .gnc-evs-name { font-size: 1rem; }
}

/* ---------- Program widget ---------- */
@media (max-width: 575px) {
    .gnc-program-widget .gnc-programs-list-item { padding: .65rem 1rem; }
    .gnc-program-widget .gnc-upcoming-header { gap: .5rem; flex-wrap: wrap; }
}

/* ---------- Recent events ---------- */
.campus-recent-content h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;       /* long Facebook titles no longer blow up the card */
    line-clamp: 3;
    overflow: hidden;
}
@media (max-width: 767px) {
    .campus-recent-events { padding-bottom: 3rem; }
    .campus-recent-events h2 { margin-bottom: 1.5rem; }
    .campus-recent-grid { gap: 1rem; }
}
@media (max-width: 575px) {
    .campus-recent-card { min-height: 230px; aspect-ratio: auto; }
    .campus-recent-date { top: 10px; left: 10px; padding: 6px 8px; }
    .campus-recent-date strong { font-size: 1.35rem; }
    .campus-recent-content { padding: .9rem; }
    .campus-recent-content h3 { font-size: .95rem; }
    .campus-recent-pagination { gap: .35rem; margin-top: 1.5rem; }
}

/* ---------- Touch devices ---------- */
@media (pointer: coarse) {
    .gnc-cal-sec .gnc-cal-nav { width: 44px; height: 44px; }
    .campus-recent-pagination a { min-width: 44px; min-height: 44px; }
}

/* Hover effects get "stuck" after a tap on touch screens, so switch them off there. */
@media (hover: none) {
    .gnc-cal-sec .gnc-cal-hasevent:hover { transform: none; box-shadow: none; }
    .gnc-cal-sec .gnc-cal-hasevent:hover .gnc-cal-daynum::after { transform: rotate(45deg); }
    .gnc-cal-sec .gnc-cal-event-chip:hover { transform: none; filter: none; }
    .gnc-evs-item:hover,
    .gnc-evs-item:hover .gnc-datebox { transform: none; box-shadow: 0 2px 8px rgba(9, 64, 36, .08); }
    .gnc-evs-item:hover .gnc-datebox { border-top-color: #1F5E2C; }
    .gnc-program-widget .gnc-programs-list-item:hover { padding-left: 1.25rem; }
    .gnc-program-widget .gnc-programs-list-item:hover .gnc-programs-code { transform: none; }
    .campus-recent-card:hover { transform: none; box-shadow: none; }
    .campus-recent-card:hover .campus-recent-image,
    .campus-recent-card:hover .campus-recent-content,
    .campus-recent-card:hover .campus-recent-meta i { transform: none; }
    .campus-recent-card:hover .campus-recent-date { transform: none; background: #1F5E2Cee; color: #fff; }
    .campus-recent-pagination a:hover:not([aria-current="page"]) { background: #fff; color: #1F5E2C; box-shadow: none; transform: none; }
}


/* ---------- Mobile centering (appended) ---------- */
@media (max-width: 767px) {
    /* hero */
    .campus-event-hero-inner { text-align: center; }
    .campus-event-breadcrumb { justify-content: safe center; }
    .campus-event-hero p { margin-left: auto; margin-right: auto; }

    /* calendar heading + filter */
    .gnc-cal-sec .gnc-cal-heading-row { align-items: center; text-align: center; }
    .gnc-cal-sec .gnc-cal-heading-row > * { margin-left: auto; margin-right: auto; }
    .gnc-cal-sec .gnc-cal-heading-row form,
    .gnc-cal-sec .gnc-cal-heading-row [class*="filter"] {
        justify-content: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .campus-calendar-scope,
    .campus-calendar-empty { text-align: center; }

    /* calendar legend */
    .gnc-cal-sec .gnc-cal-legend { justify-content: center; }

    .gnc-program-widget .gnc-upcoming-header { justify-content: center; text-align: center; }
}

@media (max-width: 575px) {
    /* recent events */
    .campus-recent-content { text-align: center; }
    .campus-recent-meta { justify-content: center; }
}


/* ---------- Mobile hero centering (stronger selectors) ---------- */
@media (max-width: 767px) {
    .campus-event-intro .campus-event-hero .campus-event-hero-inner,
    .campus-event-intro .campus-event-hero h1,
    .campus-event-intro .campus-event-hero p {
        text-align: center !important;
    }
    .campus-event-intro .campus-event-hero .campus-event-breadcrumb {
        justify-content: safe center !important;
        text-align: center;
    }
    .campus-event-intro .campus-event-hero p {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* ---------- Fix: Recent Events cards overflowing their grid columns ----------
   aspect-ratio (1.6) combined with min-height (250px) forced each card to be at
   least 250 x 1.6 = 400px wide, which is wider than the column on tablets/laptops.
   The cards then overlapped each other and ran past the container edge. */
.campus-recent-card {
    aspect-ratio: auto;
    min-width: 0;
    width: 100%;
}
.campus-recent-grid > * { min-width: 0; }


/* ---------- Rounded corners: Recent Events cards ---------- */
.campus-recent-card { border-radius: 20px; }
.campus-recent-date { border-radius: 12px; }
.campus-recent-pagination a { border-radius: 10px; }
@media (max-width: 575px) {
    .campus-recent-card { border-radius: 16px; }
    .campus-recent-date { border-radius: 10px; }
}


/* ---------- Sharp (square) edges for Recent Events ---------- */
.campus-recent-card,
.campus-recent-date,
.campus-recent-pagination a {
    border-radius: 0;
}
