.events-page,
.event-detail-page {
    min-height: 56vh;
    padding: clamp(44px, 6vw, 84px) 24px;
    background: #f6f9fc;
}

.events-container,
.event-detail {
    max-width: 1240px;
    margin: 0 auto;
}

.events-heading {
    max-width: 760px;
    margin-bottom: 30px;
}

.events-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #16729d;
    font: 700 12px/1.2 'Montserrat', sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.events-heading h1,
.event-detail h1 {
    margin: 0;
    color: #003366;
    font: 700 clamp(32px, 4vw, 48px)/1.12 'Montserrat', sans-serif;
}

.events-heading > p,
.events-introduction {
    margin: 14px 0 0;
    color: #4d6475;
    font-size: 17px;
    line-height: 1.65;
}

.events-introduction p {
    margin: 0;
}

.events-view-switcher {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 32px;
    padding: 5px;
    border: 1px solid #d7e4ed;
    border-radius: 12px;
    background: #fff;
}

.events-view-switcher a {
    padding: 10px 16px;
    border-radius: 8px;
    color: #315468;
    font: 700 14px/1.2 'Montserrat', sans-serif;
    text-decoration: none;
}

.events-view-switcher a:hover,
.events-view-switcher a.is-active {
    background: #003366;
    color: #fff;
}

.events-view-switcher a:focus-visible,
.event-card a:focus-visible,
.events-pagination a:focus-visible,
.events-calendar a:focus-visible,
.event-detail a:focus-visible {
    outline: 3px solid #f7b733;
    outline-offset: 3px;
}

.events-list {
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid #dce7ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 51, 102, .06);
}

.events-list + .events-list {
    margin-top: 36px;
}

.events-list--past {
    background: #fbfcfd;
}

.events-list__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.events-list__heading h2,
.events-calendar h2,
.event-detail__info h2 {
    margin: 0;
    color: #003366;
    font: 700 clamp(23px, 2.5vw, 30px)/1.2 'Montserrat', sans-serif;
}

.events-list__heading p {
    margin: 0;
    color: #60798a;
    font-size: 14px;
}

.events-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.event-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9e5ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 51, 102, .06);
}

.event-card--past {
    opacity: .84;
}

.event-card__image {
    width: 100%;
    height: 185px;
    object-fit: cover;
}

.event-card__body {
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
}

.event-card__type {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e3f3fa;
    color: #075b86;
    font: 700 12px/1 'Montserrat', sans-serif;
}

.event-card__date,
.event-detail__date {
    margin: 0;
    color: #12709a;
    font: 700 13px/1.45 'Montserrat', sans-serif;
}

.event-card h3 {
    margin: 10px 0;
    color: #003366;
    font: 700 20px/1.28 'Montserrat', sans-serif;
}

.event-card h3 a {
    color: inherit;
    text-decoration: none;
}

.event-card h3 a:hover {
    color: #0675a8;
    text-decoration: underline;
}

.event-card__body > p:not(.event-card__date) {
    margin: 0 0 18px;
    color: #4d6475;
    font-size: 14px;
    line-height: 1.6;
}

.event-card__link {
    margin-top: auto;
    color: #005f94;
    font: 700 14px/1.2 'Montserrat', sans-serif;
    text-decoration: none;
}

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

.events-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
    color: #4d6475;
    font-size: 14px;
}

.events-pagination a {
    color: #005f94;
    font-weight: 700;
    text-decoration: none;
}

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

.events-empty-state {
    padding: 34px;
    border: 1px dashed #b7cbd9;
    border-radius: 12px;
    background: #f6fbfe;
    color: #4d6475;
    text-align: center;
}

.events-empty-state h3 {
    margin: 0 0 8px;
    color: #003366;
    font: 700 20px/1.3 'Montserrat', sans-serif;
}

.events-empty-state p {
    margin: 0;
}

.events-calendar {
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid #dce7ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 51, 102, .06);
}

.events-calendar__header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
    text-align: center;
}

.events-calendar__navigation {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #bfd1df;
    border-radius: 50%;
    color: #005f94;
    font-size: 22px;
    text-decoration: none;
}

.events-calendar__navigation:hover {
    background: #e6f3f9;
}

.events-calendar__hint {
    margin: 0 0 20px;
    color: #60798a;
    font-size: 12px;
    text-align: center;
}

.events-calendar__weekdays,
.events-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.events-calendar__weekdays span {
    padding: 8px;
    color: #45677e;
    font: 700 12px/1.2 'Montserrat', sans-serif;
    text-align: center;
    text-transform: uppercase;
}

.events-calendar__day {
    min-height: 118px;
    padding: 8px;
    border-top: 1px solid #dce7ef;
    border-left: 1px solid #dce7ef;
    background: #fff;
}

.events-calendar__day:nth-child(7n) {
    border-right: 1px solid #dce7ef;
}

.events-calendar__day:nth-last-child(-n + 7) {
    border-bottom: 1px solid #dce7ef;
}

.events-calendar__day-number {
    display: inline-grid;
    width: 27px;
    height: 27px;
    place-items: center;
    margin-bottom: 6px;
    border-radius: 50%;
    color: #35586e;
    font: 700 13px/1 'Montserrat', sans-serif;
}

.events-calendar__day.is-outside-month {
    background: #f8fafc;
}

.events-calendar__day.is-outside-month .events-calendar__day-number {
    color: #9aabb6;
}

.events-calendar__day.is-today .events-calendar__day-number {
    background: #003366;
    color: #fff;
}

.events-calendar__event {
    display: block;
    overflow: hidden;
    margin: 3px 0;
    padding: 4px 6px;
    border-radius: 4px;
    background: #dff2fa;
    color: #004a73;
    font: 700 11px/1.3 'Montserrat', sans-serif;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.events-calendar__event:hover {
    background: #bde4f2;
    text-decoration: underline;
}

.event-detail {
    padding: clamp(24px, 4vw, 52px);
    border: 1px solid #dce7ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 51, 102, .06);
}

.event-detail__back {
    display: inline-block;
    margin-bottom: 28px;
    color: #005f94;
    font: 700 14px/1.2 'Montserrat', sans-serif;
    text-decoration: none;
}

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

.event-detail__header {
    max-width: 850px;
    margin-bottom: 30px;
}

.event-detail__header .event-card__type {
    margin-bottom: 14px;
}

.event-detail__date {
    margin-top: 16px;
    font-size: 15px;
}

.event-detail__image {
    width: 100%;
    max-height: 500px;
    margin-bottom: 34px;
    border-radius: 14px;
    object-fit: cover;
}

.event-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: clamp(30px, 5vw, 70px);
}

.event-detail__summary {
    margin: 0 0 24px;
    color: #204c67;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.55;
}

.event-detail__body {
    color: #405b6c;
    font-size: 16px;
    line-height: 1.75;
}

.event-detail__body :first-child {
    margin-top: 0;
}

.event-detail__info {
    align-self: start;
    padding: 24px;
    border-radius: 14px;
    background: #eef7fb;
}

.event-detail__info h2 {
    margin-bottom: 20px;
    font-size: 21px;
}

.event-detail__info dl {
    display: grid;
    gap: 16px;
    margin: 0;
}

.event-detail__info dl div {
    display: grid;
    gap: 4px;
}

.event-detail__info dt {
    color: #315a72;
    font: 700 12px/1.2 'Montserrat', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.event-detail__info dd {
    margin: 0;
    color: #23465c;
    font-size: 15px;
    line-height: 1.5;
}

.event-detail__cta {
    display: inline-flex;
    gap: 8px;
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #003366;
    color: #fff;
    font: 700 14px/1.2 'Montserrat', sans-serif;
    text-decoration: none;
}

.event-detail__cta:hover {
    background: #075b86;
}

@media (max-width: 900px) {
    .events-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-detail__layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .events-page,
    .event-detail-page { padding: 36px 14px; }
    .events-list,
    .event-detail { padding: 22px; }
    .events-list__heading { display: block; }
    .events-list__heading p { margin-top: 7px; }
    .events-card-grid { grid-template-columns: 1fr; }
    .events-calendar { overflow-x: auto; }
    .events-calendar__weekdays,
    .events-calendar__grid { min-width: 630px; }
    .events-calendar__day { min-height: 106px; }
    .events-calendar__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .events-page *,
    .event-detail-page * { scroll-behavior: auto !important; transition: none !important; }
}
