:root {
  /* Global design tokens: colors, glass effect and default radius. */
  --sage: #8FBC8F;
  --petrol: #0b3b46;
  --petrol-dark: #06262e;
  --gold: #B8860B;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --text: #061417;
  --shadow: 0 24px 60px rgba(0,0,0,.28);
  --radius: 26px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (min-width: 941px) {
  html {
    /* Desktop content was intentionally designed large; a 90% base size uses
       normal 16:9 monitors better without hurting readability. */
    font-size: 90%;
  }
}

body {
  margin: 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--petrol-dark);
  overflow-x: hidden;
}

.fixed-bg {
  /* Full-page background image and color treatment behind the content. */
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(143,188,143,.45), transparent 28%),
    radial-gradient(circle at 85% 5%, rgba(184,134,11,.3), transparent 22%),
    linear-gradient(135deg, rgba(6,38,46,.97), rgba(11,59,70,.94)),
    url("./assets/background.jpg");
  background-size: cover;
  background-position: center;
  background-blend-mode: screen, screen, multiply, normal;
}

.site-header {
  /* Fixed glass-style navigation header. */
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1360px, calc(100% - 32px));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(12, 77, 77, 0.5);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0,0,0,.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-section-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-section-dropdown {
  left: 0;
  right: auto;
}

.brand-logo {
  width: 44px;
  height: 44px;

  object-fit: contain;

  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.brand-text {
  color: white;

  font-weight: 700;

  letter-spacing: 0.03em;

  white-space: nowrap;
}

.brand:hover .brand-logo {
  transform: scale(1.04);

  filter:
    drop-shadow(0 0 10px rgba(184,134,11,.55));
}

.save-home-btn {
  display: none;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255,255,255,.92);
  color: var(--petrol);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.mobile-intro-text-card {
  display: none;
}


nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-size: .88rem;
}

nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  transition: all 0.2s ease;
}

nav a:hover {
  color: #b88f0b;

  text-shadow:
    0 0 8px rgba(184,134,11,.55),
    0 0 18px rgba(184,134,11,.35);

  transition: all 0.2s ease;
}

nav a.is-active {
  color: #d39a16;
  text-shadow:
    0 0 7px rgba(184,134,11,.65),
    0 0 16px rgba(184,134,11,.38),
    0 0 26px rgba(184,134,11,.22);
}

select {
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
}

.panel-section,
.hero {
  /* Full-screen sections used for hero, news, members and contact. */
  min-height: 100vh;
  padding: 116px 24px 58px;
  display: grid;
  place-items: center;
}

.hero-logo {
  width: min(680px, 78vw);
  height: auto;
  display: block;

  filter:
    drop-shadow(0 18px 38px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 24px rgba(184, 134, 11, 0.18));
}

.section-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.glass {
  /* Reusable translucent panel style used across cards, modals and sections. */
  background: rgba(255, 255, 255, 0.692);

  border: 1px solid rgba(255,255,255,0.55);

  border-radius: var(--radius);

  backdrop-filter: blur(10px);

  box-shadow: var(--shadow);
}

.hero-card {
  width: min(1080px, calc(100% - 24px));
  padding: clamp(28px, 5vw, 62px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

h1, h2, h3 { margin-top: 0; }

h1 {
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: .94;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  margin-bottom: 16px;
}

p { line-height: 1.65; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary { background: var(--gold); color: white; }
.secondary { background: var(--petrol); color: white; }

.hero-actions,
.vote-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.intro-box {
  width: min(1320px, 100%);
  padding: clamp(16px, 2.4vw, 28px);
  margin: 0 auto 20px;
}

.news-grid,
.member-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.small-card,
.calendar,
.contact-card,
.contact-form,
.programme-card {
  padding: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.35fr);
  gap: 18px;
  align-items: stretch;
}

.contact-info-column {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.contact-form h3 {
  margin: 0 0 4px;
}

.contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

.contact-guest-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-guest-fields #contactEmail {
  grid-column: 1 / -1;
}

.office-map-preview {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  display: grid;
  align-content: end;
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04), rgba(255,255,255,.04)),
    url("assets/iars-office-map-preview.svg");
  background-position: center;
  background-size: cover;
}

.office-map-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.35) 100%);
}

.map-caption {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.45);
}

.map-caption strong,
.map-caption span {
  display: block;
}

.calendar {
  margin-top: 20px;
}

.calendar-list {
  display: grid;
  gap: 10px;
}

.gallery-tile {
  min-height: 190px;
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.45);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.gallery-btn {
  margin-left: 8px;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
}

.gallery-modal.is-open {
  display: block;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(5px);
}

.gallery-modal-content {
  position: relative;
  z-index: 1;

  width: min(1280px, calc(100% - 32px));
  height: min(88vh, 860px);

  margin: 6vh auto;

  display: grid;
  place-items: center;

  border-radius: 28px;
  background: rgba(255,255,255,0.08);
  border: 3px solid rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);

  box-shadow: 0 24px 80px rgba(0,0,0,.36);

  overflow: hidden;
}

.gallery-modal-slider {
  position: relative;

  width: 100%;
  height: 100%;

  display: grid;
  place-items: center;
}

.gallery-slide {
  position: absolute;

  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;
  object-position: center;

  opacity: 0;

  transition: opacity 1s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.scroll-stage {
  /* Long scroll sections where the content remains sticky while timeline cards
     move through the viewport. */
  position: relative;
  min-height: 420vh;
  padding-top: 0;
}

.scroll-stage.long-stage {
  min-height: 560vh;
}

#leadership {
  scroll-margin-top: 116px;
}

.leadership-year-timeline {
  position: relative;

  width: min(1120px, 100%);
  height: calc(100vh - 360px);
  min-height: 300px;

  margin: 0 auto;

  overflow: hidden;
}

.leadership-year-timeline::before {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;
  left: 50%;

  width: 3px;

  transform: translateX(-50%);

  background: linear-gradient(to bottom, transparent, var(--gold), transparent);

  box-shadow: 0 0 18px rgba(184,134,11,.65);
}

.leadership-year-row {
  position: absolute;

  left: 0;
  top: 0;

  width: 100%;

  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  align-items: center;
  gap: 16px;

  opacity: 0;

  transition: opacity 0.16s linear;
}

.leadership-year-cell {
  display: flex;
}

.left-cell {
  justify-content: flex-end;
  text-align: right;
}

.right-cell {
  justify-content: flex-start;
  text-align: left;
}

.leadership-year-card {
  width: min(330px, 100%);

  padding: 10px 14px;

  border-radius: 16px;

  background: rgba(255,255,255,.82);

  border: 1px solid rgba(255,255,255,.5);

  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.leadership-year-card strong {
  display: block;

  color: var(--petrol);

  font-size: .95rem;
}

.leadership-year-card span {
  display: block;

  margin-top: 3px;

  font-size: .78rem;

  color: rgba(0,0,0,.72);
}

.leadership-year-placeholder {
  width: min(330px, 100%);
  height: 1px;
}

.leadership-year-dot {
  position: relative;

  display: grid;
  place-items: center;
}

.leadership-year-dot::before {
  content: "";

  width: 14px;
  height: 14px;

  border-radius: 999px;

  background: var(--gold);

  box-shadow: 0 0 0 6px rgba(184,134,11,.18);
}

.leadership-year-dot span {
  position: absolute;

  top: 18px;

  font-size: .72rem;
  font-weight: 1000;

  letter-spacing: 0.24em;

  color: #B8860B;

  text-shadow: 0 0 8px rgba(0,0,0,.75);
}

.scroll-stage.leadership-stage {
  min-height: 620vh;
}

.leadership-combined-stage {
  min-height: 720vh;
}

.leadership-fixed-row {
  width: min(1120px, 100%);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dual-timeline {
  height: calc(100vh - 430px);
  min-height: 300px;
}

.dual-timeline .timeline-item.left {
  text-align: right;
}

.dual-timeline .timeline-item.right {
  text-align: left;
}

.hidden-stage.is-open {
  display: block;
}

.sticky-box {
  position: sticky;
  top: 0;
  height: 100vh;
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 104px;
  overflow: hidden;
}

.viewport-timeline {
  /* Container for generated timeline cards in the About and Events sections. */
  position: relative;
  height: calc(100vh - 310px);
  min-height: 330px;
  margin: 0 auto;
  width: min(1120px, 100%);
}

.viewport-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  box-shadow: 0 0 18px rgba(184,134,11,.65);
}

.timeline-item {
  --card-width: min(480px, 43%);
  --timeline-dot-radius: 7px;
  --timeline-lane-gap: 40px;
  position: absolute;
  left: 50%;
  width: var(--card-width);
  padding: 16px 18px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 22px;
  box-shadow: var(--shadow);
  transform: translateY(120vh);
  transition: opacity .18s linear;
  overflow: visible;
}

.timeline-item.left {
  margin-left: calc(-1 * (var(--card-width) + var(--timeline-lane-gap)));
  text-align: right;
}

.timeline-item.right {
  margin-left: var(--timeline-lane-gap);
  text-align: left;
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 28px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(184,134,11,.18);
}

.timeline-item.left::after {
  right: calc(-1 * (var(--timeline-lane-gap) + var(--timeline-dot-radius)));
}

.timeline-item.right::after {
  left: calc(-1 * (var(--timeline-lane-gap) + var(--timeline-dot-radius)));
}

.timeline-item h3 {
  margin-bottom: 8px;
  color: var(--petrol);
}

.timeline-thumb {
  width: 100%;
  height: 84px;
  margin-bottom: 10px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(143,188,143,.85), rgba(11,59,70,.75)),
    url("https://images.unsplash.com/photo-1474302770737-173ee21bab63?auto=format&fit=crop&w=800&q=70");
  background-size: cover;
  background-position: center;
}

.timeline-extra {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all .28s ease;
  font-size: .9rem;
}

.timeline-item:hover .timeline-extra {
  max-height: 120px;
  opacity: 1;
  margin-top: 8px;
  overflow-y: auto;
}

#eventsTimeline .timeline-item {
  --card-width: min(500px, 44%);
  padding: 18px 20px;
}

#eventsTimeline .timeline-item.left::after {
  right: calc(-1 * (var(--timeline-lane-gap) + var(--timeline-dot-radius)));
}

#eventsTimeline .timeline-item:hover .timeline-extra {
  max-height: 170px;
  overflow: visible;
}

.timeline-item:hover {
  z-index: 5;
}


.leadership-grid {
  display: grid;
  gap: 20px;
}

.cold-top {
  max-width: 1120px;
  margin: 0 auto;
}

.programme-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;
}

.mobile-programme-section {
  display: contents;
}

.mobile-leadership-years {
  display: none;
}

.clickable-programme {
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.clickable-programme:hover,
.clickable-programme.is-active {
  transform: translateY(-4px);
  background: var(--glass-strong);
}

.clickable-programme span {
  color: var(--gold);
  font-weight: 800;
}

.kyc-form {
  display: grid;
  gap: 12px;
}

input {
  width: 100%;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 14px;
  padding: 12px 14px;
}

pre {
  white-space: pre-wrap;
  background: rgba(6,38,46,.9);
  color: white;
  padding: 14px;
  border-radius: 16px;
  min-height: 80px;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.role-hidden {
  display: none !important;
}

@media (max-width: 940px) {
  .site-header {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 10px 12px;
    border: 1.5px solid rgba(255,255,255,0.75);
    border-radius: 22px;
    background: rgba(12, 77, 77, 0.72);
    backdrop-filter: blur(14px);
    box-shadow:
      0 8px 28px rgba(0,0,0,.28),
      0 0 0 1px rgba(255,255,255,.08) inset,
      0 1px 12px rgba(255,255,255,.08) inset;
  }

  .mobile-section-menu {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .brand {
    min-width: 0;
  }

  .save-home-btn {
    display: none;
  }

  .brand-text {
    font-size: 0;
  }

  .brand-text::before {
    content: "IARS";
    font-size: .98rem;
    letter-spacing: .08em;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  nav a {
    flex: 0 0 auto;
  }

  .auth-area {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .auth-login-btn,
  .auth-menu-toggle {
    padding: 8px 12px;
  }

  .panel-section,
  .hero {
    min-height: auto;
    padding: 178px 16px 48px;
  }

  .section-shell,
  .intro-box,
  .hero-card {
    width: min(100%, 760px);
  }

  .sticky-box {
    width: min(100% - 24px, 760px);
    padding-top: 178px;
  }

  .viewport-timeline {
    height: calc(100vh - 380px);
  }

  .viewport-timeline::before {
    left: 24px;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    width: calc(100% - 58px);
    margin-left: 58px;
    text-align: left;
  }

  .timeline-item.left::after,
  .timeline-item.right::after {
    left: -41px;
    right: auto;
  }

  .news-grid,
  .member-grid,
  .gallery-grid,
  .programme-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 950px) {
  body {
    font-size: 16px;
  }

  :root {
    --mobile-title-top: 92px;
    --mobile-programme-top: 92px;
  }

  .fixed-bg {
    background-position: center top;
  }

  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .save-home-btn {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 88px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: .66rem;
    line-height: 1;
  }

  .auth-area {
    grid-column: 3;
  }

  .auth-login-btn,
  .auth-menu-toggle {
    width: 104px;
    height: 40px;
  }

  .hero-logo {
    width: min(420px, 88vw);
  }

  .hero-card,
  .intro-box,
  .small-card,
  .calendar,
  .contact-card,
  .contact-form,
  .programme-card {
    border-radius: 18px;
    padding: 18px;
  }

  .panel-section .intro-box,
  .scroll-stage > .intro-box,
  .sticky-box > .intro-box {
    position: sticky;
    top: var(--mobile-title-top);
    z-index: 34;
    margin-bottom: 12px;
    overflow: visible;
  }

  #leadership > .intro-box {
    position: relative;
    top: auto;
    z-index: auto;
    pointer-events: auto;
  }

  #news .section-shell > .intro-box .latest-news-copy,
  #news .section-shell > .intro-box p:not(.eyebrow),
  #about .intro-box p:not(.eyebrow),
  #events .intro-box p:not(.eyebrow),
  #members .section-shell > .intro-box p:not(.eyebrow),
  #contact .section-shell > .intro-box p:not(.eyebrow) {
    display: none;
  }

  #news .section-shell > .intro-box h2,
  #about .intro-box h2,
  #events .intro-box h2,
  #members .section-shell > .intro-box h2,
  #contact .section-shell > .intro-box h2 {
    margin-bottom: 0;
    font-size: clamp(1.8rem, 8vw, 2.7rem);
  }

  .mobile-intro-text-card {
    display: block;
    margin: 0 0 16px;
    padding: 18px;
  }

  .mobile-intro-text-card p {
    margin: 0 0 12px;
  }

  .mobile-intro-text-card p:last-child {
    margin-bottom: 0;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 3rem);
  }

  .scroll-stage,
  .scroll-stage.long-stage,
  .scroll-stage.leadership-stage,
  .leadership-combined-stage {
    min-height: auto;
  }

  .sticky-box {
    position: relative;
    top: auto;
    height: auto;
    min-height: auto;
    overflow: visible;
    padding-top: 150px;
    padding-bottom: 36px;
  }

  .viewport-timeline,
  .leadership-year-timeline,
  .dual-timeline {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    display: grid;
    gap: 14px;
  }

  .viewport-timeline::before,
  .leadership-year-timeline::before {
    display: none;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin-left: 0;
    transform: none !important;
    opacity: 1 !important;
    text-align: left;
  }

  .leadership-year-row {
    position: relative;
    left: auto;
    top: auto;
    transform: none !important;
    opacity: 1 !important;
    text-align: left;
  }

  .timeline-item.left::after,
  .timeline-item.right::after {
    display: none;
  }

  .timeline-extra,
  .timeline-item:hover .timeline-extra {
    max-height: none;
    opacity: 1;
    margin-top: 8px;
    overflow: visible;
  }

  #eventsTimeline .touch-card,
  #eventsTimeline .touch-card:hover,
  #eventsTimeline .touch-card:focus,
  #eventsTimeline .touch-card:focus-within {
    z-index: auto !important;
  }

  #eventsTimeline .touch-card .timeline-buttons,
  #eventsTimeline .touch-card .read-more-btn,
  #eventsTimeline .touch-card .gallery-btn {
    position: relative;
    z-index: 1;
    touch-action: manipulation;
    pointer-events: auto;
  }

  .leadership-year-row {
    grid-template-columns: 24px 1fr;
    gap: 10px;
    margin-left: 0;
    width: 100%;
    align-items: start;
  }

  .leadership-year-cell,
  .left-cell,
  .right-cell {
    grid-column: 2;
    justify-content: flex-start;
    text-align: left;
  }

  .left-cell {
    grid-row: 1;
  }

  .right-cell {
    grid-row: 2;
  }

  .leadership-year-placeholder {
    display: none;
  }

  .leadership-year-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 8px;
  }

  .leadership-year-dot span {
    position: static;
    display: block;
    margin-top: 8px;
    color: var(--gold);
    font-size: .72rem;
    letter-spacing: 0;
    text-shadow: none;
    writing-mode: vertical-rl;
  }

  .leadership-year-card {
    width: 100%;
  }

  .leadership-fixed-row {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .mobile-programme-section {
    display: grid;
    gap: 12px;
    align-items: start;
  }

  .mobile-programme-section .programme-card {
    position: sticky;
    top: var(--mobile-programme-top);
    z-index: 33;
    margin-bottom: 12px;
  }

  .mobile-programme-section .programme-card .eyebrow {
    margin-bottom: 6px;
  }

  .mobile-programme-section .programme-card h3 {
    margin-bottom: 0;
    font-size: clamp(1.18rem, 5.8vw, 1.55rem);
    line-height: 1.08;
  }

  .mobile-programme-section .programme-card .read-more-btn {
    margin-top: 14px;
  }

  #leadershipTimeline {
    display: none;
  }

  .mobile-leadership-years {
    display: grid;
    gap: 10px;
    margin: -4px 0 18px;
  }

  .leadership-mobile-year {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.55);
  }

  .leadership-mobile-year strong,
  .leadership-mobile-year span,
  .leadership-mobile-year small {
    display: block;
  }

  .leadership-mobile-year strong {
    color: var(--petrol);
  }

  .leadership-mobile-year span {
    margin-top: 4px;
    font-weight: 800;
  }

  .leadership-mobile-year small {
    margin-top: 3px;
    color: rgba(0,0,0,.68);
  }

  nav {
    display: none;
  }

  .mobile-section-menu.is-open .mobile-section-dropdown {
    display: grid;
    gap: 6px;
    left: -12px;
    right: auto;
    width: max-content;
    max-width: calc(100vw - 24px);
  }

  .auth-dropdown {
    right: -12px;
    left: auto;
    max-width: calc(100vw - 24px);
  }

  .site-header {
    gap: 8px;
  }

  .event-modal-content:not(.text-only-modal) {
    width: calc(100% - 18px);
    height: calc(100dvh - 24px);
    margin: 12px auto;
    padding: 10px;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    border-radius: 20px;
  }

  .event-modal,
  .gallery-modal {
    z-index: 1200;
  }

  .event-modal-backdrop,
  .gallery-modal-backdrop {
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(10px);
  }

  .event-modal-content:not(.text-only-modal) .event-modal-slider {
    height: clamp(230px, 42dvh, 350px);
    max-height: none;
    aspect-ratio: auto;
    border-radius: 16px;
    background: rgba(0,0,0,.12);
  }

  .event-modal-content:not(.text-only-modal) .modal-slide {
    object-fit: cover;
  }

  .event-modal-content:not(.text-only-modal) .event-modal-text {
    padding: 0 4px 4px;
  }

  .event-modal-content:not(.text-only-modal) .event-modal-text h2 {
    font-size: clamp(1.35rem, 6vw, 2rem);
    margin-bottom: 8px;
  }

  .event-modal-content:not(.text-only-modal) .event-modal-text h3 {
    margin-top: 16px;
  }

  .gallery-modal-content {
    width: calc(100% - 18px);
    height: calc(100dvh - 24px);
    margin: 12px auto;
    border-radius: 20px;
    background: rgba(6,38,46,.34);
  }

  .gallery-modal-slider {
    padding: 8px;
  }

  .gallery-slide {
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
  }

  .event-modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}

.read-more-btn {
  margin-top: 14px;

  border: 0;
  border-radius: 999px;

  padding: 8px 14px;

  background: var(--petrol);

  color: white;

  font-weight: 800;

  cursor: pointer;
}

.read-more-btn:hover {
  background: var(--gold);
}

.event-modal {
  /* Large read-more modal for timeline content and event detail. */
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.event-modal.is-open {
  display: block;
}

.event-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
}

.event-modal-content {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  height: min(86vh, 820px);
  margin: 7vh auto;
  padding: 24px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 52% 1fr;
}

.event-modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--petrol);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.event-modal-slider {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(0,0,0,.28);
  aspect-ratio: 21 / 9;
  width: 100%;
  max-height: 42vh;
}

.modal-slide {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  opacity: 0;
  transition: opacity 1s ease;
}

.modal-slide.active {
  opacity: 1;
}

.event-modal-text {
  overflow-y: auto;
  padding: 24px 8px 0;
}

.event-modal-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.event-modal-text h3 {
  margin-top: 22px;
  color: var(--petrol);
}

.text-only-modal {
  grid-template-rows: 1fr;
}

.text-only-modal .event-modal-text {
  padding: 32px;
}

/* Backend integration UI: login/menu controls and app modals connected by app.js. */
.auth-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.auth-login-btn,
.auth-menu-toggle {
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  width: 112px;
  height: 42px;
  padding: 9px 14px;
  background: rgba(255,255,255,.92);
  color: var(--petrol);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}

.auth-menu {
  position: relative;
}

.auth-menu-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

#authUserLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 230px;
  display: none;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.auth-menu.is-open .auth-dropdown {
  display: grid;
  gap: 6px;
}

.auth-dropdown button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.auth-dropdown button:hover {
  background: rgba(11,59,70,.12);
}

.news-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.event-detail-grid,
.event-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.event-admin-form {
  margin-bottom: 18px;
}

.danger-button {
  background: rgba(122, 31, 31, .12);
  color: #7a1f1f;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.workspace-card .compact-list + .btn,
.voting-card .compact-list + .btn {
  margin-top: 18px;
}

.compact-list span,
.compact-list a,
.event-list-item,
.document-list-item,
.folder-list-item {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  color: var(--text);
  text-decoration: none;
}

.event-list-item strong,
.document-list-item strong,
.folder-list-item strong {
  display: block;
  color: var(--petrol);
}

.event-list-item small,
.document-list-item small,
.folder-list-item small {
  display: block;
  margin-top: 4px;
  color: rgba(0,0,0,.66);
}

.app-modal {
  /* Generic modal wrapper for login, registration, profile, KYC, files,
     voting and admin dashboard. */
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
}

.app-modal.is-open {
  display: block;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
}

.app-modal-content {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100% - 40px));
  max-height: 84vh;
  margin: 8vh auto;
  padding: 30px;
  overflow-y: auto;
}

.wide-app-modal {
  width: min(980px, calc(100% - 40px));
}

body.file-service-page {
  overflow: auto !important;
}

body.file-service-page main {
  display: none;
}

body.file-service-page #fileServiceModal {
  position: static;
  display: block;
  min-height: 100vh;
  padding: 112px 32px 40px;
  background: var(--soft);
}

body.file-service-page #fileServiceModal .app-modal-backdrop,
body.file-service-page #fileServiceModal .event-modal-close {
  display: none;
}

body.file-service-page #fileServiceModal .app-modal-content {
  width: min(1480px, 100%);
  max-height: none;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
}

body.file-service-page .file-browser-grid {
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

body.file-service-page #fileServiceDocuments,
body.file-service-page #fileServiceFolders {
  max-height: none;
}

body.file-service-page .document-list-item,
body.file-service-page .folder-list-item {
  padding: 16px 18px;
}

body.file-service-page .document-actions {
  margin-top: 12px;
}

.app-form {
  display: grid;
  gap: 12px;
}

.app-form input,
.app-form select,
.app-form textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.4;
  font-size: .95rem;
}

.checkbox-row input {
  width: auto;
  margin-top: 3px;
}

.form-message {
  margin: 0;
  font-weight: 700;
}

.form-message.is-error {
  color: #8b1a1a;
}

.form-message.is-success {
  color: #145c2a;
}

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

.dashboard-tile {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
}

.dashboard-tile strong {
  display: block;
  font-size: 1.8rem;
  color: var(--petrol);
}

.dashboard-tile span {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}

.member-grid.is-verified {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-grid.is-verified .workspace-card,
.member-grid.is-verified .voting-card {
  min-height: 250px;
}

@media (max-width: 940px) {
  .news-grid-two,
  .contact-grid,
  .dashboard-grid,
  .member-grid.is-verified {
    grid-template-columns: 1fr;
  }

  .auth-dropdown {
    right: 0;
    left: auto;
    max-width: calc(100vw - 24px);
  }
}


.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nested-form-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.45);
}

.captcha-row {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70px;
}

.app-form label:not(.checkbox-row) {
  font-weight: 800;
  color: var(--petrol);
}

@media (max-width: 940px) {
  .form-grid-two,
  .contact-guest-fields,
  .captcha-row,
  .event-detail-grid,
  .event-admin-grid {
    grid-template-columns: 1fr;
  }
}


.profile-image-editor {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--petrol), var(--gold));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.profile-avatar.small {
  width: 54px;
  height: 54px;
  font-size: .95rem;
  flex: 0 0 auto;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-image-editor small {
  display: block;
  margin-top: 6px;
  color: rgba(0,0,0,.62);
  line-height: 1.35;
}

.profile-official-hint {
  display: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11,59,70,.12);
  color: var(--petrol);
  font-weight: 700;
}

.profile-official-hint.is-visible {
  display: block;
}

.directory-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.directory-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(255,255,255,.55);
}

.directory-card strong,
.directory-card small,
.directory-card span {
  display: block;
}

.directory-card small {
  margin: 3px 0 8px;
  color: var(--petrol);
  font-weight: 800;
}

.file-service-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.file-service-actions .btn:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.file-upload-form,
.file-version-panel {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.44);
  border: 1px solid rgba(255,255,255,.5);
}

.file-browser-grid {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.4fr);
  gap: 16px;
  margin-top: 16px;
}

#fileUploadFolder option[data-depth="0"] {
  font-weight: 800;
}

#fileUploadFolder option[data-depth="1"] {
  font-size: .94rem;
  padding-left: 18px;
}

.folder-tree-group {
  display: grid;
  gap: 8px;
}

.folder-tree-children {
  display: grid;
  gap: 8px;
  margin-left: 18px;
  padding-left: 12px;
  border-left: 2px solid rgba(11,59,70,.16);
}

.folder-tree-children.is-depth-2 {
  margin-left: 14px;
  padding-left: 10px;
  gap: 6px;
}

.folder-list-item,
.document-list-item {
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.folder-list-item.is-active,
.document-list-item.is-active {
  outline: 2px solid var(--gold);
  background: rgba(255,255,255,.84);
}

.folder-list-item.is-root-folder {
  font-weight: 800;
  background: rgba(255,255,255,.68);
}

.folder-list-item.is-child-folder {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.46);
  font-size: .9rem;
}

.folder-list-item.is-child-folder strong {
  font-size: .95rem;
}

.folder-list-item.is-depth-2 {
  padding: 7px 9px;
  border-radius: 10px;
  font-size: .84rem;
  background: rgba(255,255,255,.38);
}

.folder-list-item.is-depth-2 strong {
  font-size: .88rem;
}

.document-actions,
.version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.document-actions .btn,
.version-actions .btn {
  padding: 8px 12px;
  font-size: .84rem;
}

.office-editor-modal {
  width: min(1680px, calc(100vw - 32px));
  height: min(940px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  padding: 12px;
}

.office-editor-host {
  width: 100%;
  height: 100%;
  min-height: 720px;
  border-radius: 18px;
  overflow: hidden;
  background: white;
}

.version-item {
  display: grid;
  gap: 8px;
}

.folder-list-item span {
  display: block;
  margin-top: 5px;
  color: rgba(0,0,0,.62);
  font-size: .86rem;
}

@media (max-width: 950px) {
  .file-browser-grid {
    grid-template-columns: 1fr;
  }
}


textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  resize: vertical;
}

.voting-admin-form {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(255,255,255,.55);
}

.voting-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.voting-summary span {
  display: block;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.5);
  font-weight: 800;
}

.voting-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(255,255,255,.55);
}

.voting-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.voting-item strong,
.voting-item small,
.voting-item span {
  display: block;
}

.voting-pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--petrol);
  color: white;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}

.voting-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.voting-actions .btn {
  padding: 8px 12px;
  font-size: .85rem;
}

@media (max-width: 950px) {
  .voting-summary {
    grid-template-columns: 1fr 1fr;
  }
}


/* Enhanced voting dashboard */
.voting-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.voting-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.voting-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(11,59,70,.12);
  color: var(--petrol);
}

.voting-section h3 span {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--petrol);
  color: white;
  font-size: .9rem;
}

.voting-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0;
}

.voting-metrics span {
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.5);
}

.voting-metrics strong {
  color: var(--petrol);
  font-size: 1.05rem;
}

.voting-metrics small {
  margin-top: 2px;
  font-size: .72rem;
}

.voting-pill-approved {
  background: #145c2a;
}

.voting-pill-rejected,
.voting-pill-veto_used {
  background: #8b1a1a;
}

.voting-pill-pending {
  background: var(--petrol);
}

@media (max-width: 950px) {
  .voting-summary,
  .voting-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 950px) {
  body.modal-is-open .timeline-item,
  body.modal-is-open .timeline-item:hover {
    z-index: 0 !important;
  }

  .event-modal.is-open,
  .gallery-modal.is-open {
    z-index: 5000;
  }

  .event-modal.is-open .event-modal-backdrop,
  .gallery-modal.is-open .gallery-modal-backdrop {
    background: rgba(0,0,0,.82);
    backdrop-filter: blur(12px);
  }

  .event-modal.is-open .event-modal-content,
  .gallery-modal.is-open .gallery-modal-content {
    position: relative;
    z-index: 2;
  }
}

/* IJOLD uses the same modal family as the slideshow read-more views, but with one static hero image instead of a rotating slider. */
.single-image-modal {
  grid-template-rows: minmax(220px, 42%) minmax(0, 1fr);
  gap: 18px;
}

.single-image-modal .event-modal-text {
  padding: 0 32px 32px;
}

.single-image-modal-hero {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(0,0,0,.18);
}

.single-image-modal-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 950px) {
  .single-image-modal {
    width: calc(100% - 18px);
    height: calc(100dvh - 24px);
    margin: 12px auto;
    padding: 10px;
    grid-template-rows: clamp(230px, 42dvh, 350px) minmax(0, 1fr);
    gap: 10px;
    border-radius: 20px;
  }

  .single-image-modal .single-image-modal-hero {
    border-radius: 16px;
  }

  .single-image-modal .event-modal-text {
    padding: 0 4px 4px;
  }
}

.latest-news-copy {
  display: grid;
  gap: 10px;
}

.latest-news-copy p,
.latest-news-copy ul,
.latest-news-copy ol {
  margin: 0;
}

.latest-news-copy h3 {
  margin: 0;
  color: var(--petrol);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.latest-news-copy a {
  color: var(--petrol);
  font-weight: 800;
}
