:root{
  --accent:#143b63;
  --bg:#f7f8fa;
  --card:#ffffff;
  --text:#2c2c2c;
  --border:#d9dde3;
}

*{box-sizing:border-box;}

body{
  margin:0;
  font-family:Segoe UI,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}

.container{
  max-width:1200px;
  margin:auto;
  padding:1rem;
}

.site-header{
  background:#fff;
  border-bottom:1px solid var(--border);
}

.site-header h1{
  margin:.25rem 0;
}

.tagline{
  color:#666;
  margin-top:0;
}

.main-nav{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  margin-top:1rem;
}

.main-nav a{
  text-decoration:none;
  color:var(--accent);
  font-weight:600;
}

.intro{
  margin:2rem 0;
}

.tile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1.25rem;
}

.tile{
  display:block;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  padding:1rem;
  text-align:center;
  text-decoration:none;
  color:inherit;
  transition:.15s ease;
}

.tile:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}

.tile img{
  width:94px;
  height:94px;
  object-fit:contain;
}

.site-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    background: #fff;
    color: #003b6f;
}

.site-footer a,
.site-footer a:link,
.site-footer a:visited,
.site-footer a:hover,
.site-footer a:active,
.site-footer a:focus {
    color: inherit;
    text-decoration: none;
}

@media (max-width:700px){
  .main-nav{
    flex-direction:column;
  }
}

.page-title {
    margin: 0;
    font-size: 2.2rem;
    font-variant: small-caps;
    letter-spacing: .04em;
}

.page-subtitle {
    margin: .3rem 0 1rem;
    color: #003b6f;
    font-size: 1.05rem;
    font-weight: 500;
}

.page-subtitle.chapter {
    color: #6f2633;
 }

 
.page-subtitle.mark {
    color: #4A2C52;
 }

.page-subtitle.ram {
    color: #2F5D3A;
 }

.maintenance-job__meta {
    display:flex;
    flex-wrap:wrap;
    gap:1rem 2rem;
    margin:.4rem 0;
    font-size:.95rem;
}

.maintenance-job__meta span {
    white-space:nowrap;
}


/* ================= Calendar ================= */

/* Calendar header: intentionally separate from the calendar grid. */
.calendar-header-table {
  width: 100%;
  margin: 0 0 1rem 0;
  border-collapse: collapse;
  table-layout: auto;
}

.calendar-header-table td {
  vertical-align: top;
  padding: .5rem;
  border: 0;
}

.calendar-header-table .calendar-links-column {
  width: 30%;
}

.calendar-header-table ul {
  margin: 0;
  padding-left: 1.25rem;
}

.calendar-header-table .calendar-navigation-media {
  width: 40%;
  text-align: center;
}

.calendar-header-table .calendar-media {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin: 0 auto;
}

/* Calendar grid. */
.events-calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.events-calendar .calendar-month-title,
.events-calendar .calendar-weekdays,
.events-calendar .event-details-heading {
  background: #000;
  color: #fff;
}

.events-calendar .calendar-month-title th,
.events-calendar .calendar-weekdays th {
  border: 1px solid #777;
  text-align: center;
}

.events-calendar .calendar-month-title h3,
.events-calendar .calendar-weekdays h3 {
  margin: .35rem;
  color: inherit;
}

/* Every calendar position is visibly boxed. */
.events-calendar td.calendar-day,
.events-calendar td.calendar-empty-day {
  width: 14.285%;
  min-height: 8rem;
  padding: 0;
  vertical-align: top;
  border: 1px solid #777;
}

.events-calendar td.calendar-empty-day {
  background: #f2f2f2;
}

.events-calendar .calendar-date {
  display: block;
  padding: .3rem .4rem;
  border-bottom: 1px solid #aaa;
  text-align: center;
}

.events-calendar .calendar-date strong {
  font-weight: 700;
}

.events-calendar .calendar-events {
  padding: .25rem;
}

.events-calendar .calendar-event {
  margin: .2rem 0;
  padding: .35rem;
  border: 1px solid #9aa0a6;
  line-height: 1.3;
  text-align: center;
}

/* Event colours. */
.events-calendar .calendar-event-regular,
.events-calendar .calendar-event-meeting {
  background: #dcecff;
  border-color: #8aaed0;
}

.events-calendar .calendar-event-installation {
  background: #f4dfaa;
  border-color: #c59c43;
}

.events-calendar .calendar-event-social,
.events-calendar .calendar-event-bbq,
.events-calendar .calendar-event-ladies-night {
  background: #dff0df;
  border-color: #7ea77f;
}

.events-calendar .calendar-event-committee {
  background: #eadff2;
  border-color: #9c83b1;
}

.events-calendar .calendar-event-dining,
.events-calendar .calendar-event-festive-board {
  background: #f3dddd;
  border-color: #b98a8a;
}

/* Existing event details presentation. */
.events-calendar .event-details > td {
  vertical-align: top;
  padding: 1rem;
}

.events-calendar .event-details-divider {
  width: 3rem;
  border-right: 1px solid var(--accent);
}

.events-calendar .event-image,
.events-calendar .organiser-image,
.events-calendar .event-flyer,
.events-calendar .event-table-plan {
  display: block;
  max-width: 100%;
  height: auto;
}

.events-calendar .event-image {
  max-width: 300px;
}

.events-calendar .organiser-image {
  max-height: 125px;
}

.events-calendar .event-attachment {
  text-align: center;
}

.events-calendar .event-attachment img {
  width: 75%;
  margin: auto;
}

@media (max-width: 700px) {
  .calendar-header-table,
  .events-calendar {
    display: block;
    overflow-x: auto;
  }

  .events-calendar .event-details-divider {
    display: none;
  }
}


.events-calendar .calendar-event a,
.events-calendar .calendar-event a:visited {
    color: inherit;
    text-decoration: underline;
}

.events-calendar .calendar-event a:hover {
    opacity: 0.8;
}


/* ======================================================
   Reusable navigation buttons
   ====================================================== */

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin: 1rem 0;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;

    padding: 0.65rem 1rem;

    border: 1px solid #c7cfd8;
    border-radius: 0.45rem;

    background: #ffffff;
    color: #003b6f;

    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    background: #edf3f8;
    border-color: #7f9bb4;
    color: #002f59;
    text-decoration: none;
}

.site-nav__link:focus-visible {
    outline: 3px solid rgba(0, 59, 111, 0.2);
    outline-offset: 2px;
}

.site-nav__link:active {
    transform: translateY(1px);
}

.site-nav__link--active,
.site-nav__link[aria-current="page"] {
    background: #003b6f;
    border-color: #003b6f;
    color: #ffffff;
}

.site-nav__count {
    min-width: 1.45rem;
    padding: 0.1rem 0.4rem;

    border-radius: 999px;

    background: rgba(0, 59, 111, 0.1);
    font-size: 0.8em;
    font-weight: 700;
    text-align: center;
}

.site-nav__link--active .site-nav__count,
.site-nav__link[aria-current="page"] .site-nav__count {
    background: rgba(255, 255, 255, 0.2);
}


/* Compact variant: filters, tabs and secondary navigation */

.site-nav--compact {
    gap: 0.4rem;
}

.site-nav--compact .site-nav__link {
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.9rem;
}


.page-hero {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
}

.page-hero img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 700px) {
    .page-hero img {
        height: 240px;
    }
}


.menu-divider {
    position: relative;
    width: min(32rem, 100%);
    margin: 2.5rem 0 1.5rem;
    padding: 0.65rem 0 0.65rem 1.1rem;

    border-top: 2px solid #064b7f;
    border-bottom: 2px solid #064b7f;
}

.menu-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: -2px;
    bottom: -2px;
    width: 6px;
    background: #064b7f;
}

.menu-divider span {
    color: #064b7f;
    font-size: 1.25rem;
    font-weight: 700;
}


.mySlides {
    width: 100%;
    max-width: 800px;   
    height: auto;
}


table.event-details {
    width: auto;
    max-width: 850px;
    table-layout: auto;
}

table.event-details td {
    vertical-align: top;
}


.history-timeline {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0;

    background: #004477;
    color: white;

    padding: 28px 20px 24px 20px;
    margin: 25px 0;

    border-radius: 8px;
}

.timeline-item {
    position: relative;
    text-align: center;
    min-width: 0;
}

.timeline-year {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 14px;
}

.timeline-dot {
    position: relative;
    width: 14px;
    height: 14px;

    background: white;
    border-radius: 50%;

    margin: 0 auto 14px auto;
    z-index: 2;
}

.timeline-item:not(:last-child) .timeline-dot::after {
    content: "";

    position: absolute;
    top: 6px;
    left: 14px;

    width: calc(100% + 100%);
    height: 2px;

    background: white;
    opacity: 0.75;
    z-index: 1;
}

.timeline-text {
    font-size: 15px;
    line-height: 1.35;
    padding: 0 8px;
}

/* -------------------------------------------------
   EGMC – At a Glance panel
------------------------------------------------- */

.at-a-glance {
    margin: 30px 0;
    padding: 26px 30px;

    background: #004477;
    color: #ffffff;

    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.at-a-glance h2 {
    margin: 0 0 20px 0;

    color: #ffffff;
    font-size: 26px;
    line-height: 1.2;
}

.at-a-glance-intro {
    margin: -8px 0 20px 0;
    color: rgba(255, 255, 255, 0.85);
}

.at-a-glance table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
}

.at-a-glance th,
.at-a-glance td {
    padding: 12px 0;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.at-a-glance tr:last-child th,
.at-a-glance tr:last-child td {
    border-bottom: none;
}

.at-a-glance th {
    width: 35%;
    padding-right: 25px;

    color: rgba(255, 255, 255, 0.78);
    font-weight: 450;
    text-align: left;
}

.at-a-glance td {
    font-weight: 400;
    text-align: right;
}

.at-a-glance a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.at-a-glance a:hover,
.at-a-glance a:focus {
    text-decoration-thickness: 2px;
}

.at-a-glance.chapter {
    background: #6f2633;
    color: white;
}

.at-a-glance.mark {
    background: #4A2C52;
    color: white;
}

.at-a-glance.ram {
    background: #2F5D3A;
    color: white;
}


/* Mobile layout */

@media (max-width: 650px) {

    .at-a-glance {
        padding: 22px 20px;
    }

    .at-a-glance h2 {
        font-size: 23px;
    }

    .at-a-glance th,
    .at-a-glance td {
        display: block;
        width: 100%;
        padding-right: 0;
        text-align: left;
    }

    .at-a-glance th {
        padding-top: 12px;
        padding-bottom: 3px;
        border-bottom: none;
        font-size: 14px;
    }

    .at-a-glance td {
        padding-top: 0;
        padding-bottom: 12px;
    }

    .at-a-glance tr:last-child td {
        padding-bottom: 0;
    }
}

/* =========================================================
   Centre activity: Today, Tomorrow and next three event dates
   ========================================================= */

.centre-activity {
  margin: 2rem 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.centre-activity > h2 {
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
}

.centre-activity-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.centre-activity-day {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.centre-activity-day:last-child {
  border-right: 0;
}

.centre-activity-day h3 {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #eef2f6;
  color: var(--accent);
  font-size: 1rem;
  text-align: center;
}

.centre-activity-events {
  padding: 0.8rem;
}

.centre-activity-event,
.centre-activity-empty {
  margin: 0;
  padding: 0.45rem 0;
  line-height: 1.4;
  text-align: center;
}

.centre-activity-event + .centre-activity-event {
  border-top: 1px solid var(--border);
}

.centre-activity-empty {
  color: #666;
  font-style: italic;
}

.centre-activity-separator {
  white-space: nowrap;
}

.centre-activity-event {
  font-weight: 500;
}

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

  .centre-activity-day {
    border-bottom: 1px solid var(--border);
  }

  .centre-activity-day:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .centre-activity-list {
    display: block;
  }

  .centre-activity-day {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .centre-activity-day:last-child {
    border-bottom: 0;
  }
}


.subtle {
    color: #5f7385;
    font-style: italic;
}