/* ==========================================================
   BSYC – Erasmus section styles
   Paste ALL of this into: Appearance → Customize → Additional CSS
   (keep the @import line at the very top).
   Every rule is scoped to .ers so it won't affect the rest of the site.
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Source+Sans+3:wght@400;600;700&display=swap');

.ers {
  --ers-navy: #0E1B2C;
  --ers-navy-2: #13243A;
  --ers-navy-3: #1B3150;
  --ers-line-dark: #2E4767;
  --ers-gold: #E3CC4F;
  --ers-gold-dark: #6B5A10;
  --ers-sand: #F4F1E8;
  --ers-sand-2: #E4DFD0;
  --ers-line: #DCD6C4;
  --ers-ink: #0E1B2C;
  --ers-ink-2: #3C4A5C;
  --ers-muted: #5D6B7C;
  --ers-on-dark: #F4F1E8;
  --ers-on-dark-2: #C9CFD8;
  --ers-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --ers-body: 'Source Sans 3', system-ui, sans-serif;

  font-family: var(--ers-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ers-ink);
  background: var(--ers-sand);
}
.ers *, .ers *::before, .ers *::after { box-sizing: border-box; }
.ers img { max-width: 100%; height: auto; display: block; }
.ers a { color: var(--ers-ink); }
.ers a:hover { color: var(--ers-gold-dark); }
.ers h1, .ers h2, .ers h3 {
  font-family: var(--ers-display);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  color: inherit;
  letter-spacing: 0.005em;
}
.ers p { margin: 0; }

/* Layout */
.ers-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ers-section { padding: 56px 0; }
.ers-section--tight { padding: 32px 0; }
.ers-dark { background: var(--ers-navy); color: var(--ers-on-dark); }
.ers-dark a { color: var(--ers-gold); }
.ers-dark-2 { background: var(--ers-navy-2); color: var(--ers-on-dark); }
.ers-row { display: flex; flex-wrap: wrap; gap: 24px; }
.ers-row > * { flex: 1 1 320px; min-width: 0; }
.ers-split { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.ers-split > * { flex: 1 1 420px; min-width: 0; }
.ers-stack { display: flex; flex-direction: column; gap: 16px; }
.ers-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 24px; }

/* Type */
.ers-kicker {
  font-family: var(--ers-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ers-gold-dark);
}
.ers-dark .ers-kicker, .ers-dark-2 .ers-kicker { color: var(--ers-gold); }
.ers-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ers-muted);
}
.ers-dark .ers-label, .ers-card--dark .ers-label { color: var(--ers-gold); }
.ers-h1 { font-size: clamp(64px, 11vw, 120px); font-weight: 800; line-height: 0.88; text-transform: uppercase; }
.ers-h1--sm { font-size: clamp(52px, 8vw, 80px); }
.ers-h2 { font-size: clamp(34px, 4.5vw, 48px); }
.ers-h3 { font-size: 26px; line-height: 1.1; }
.ers-lead { font-size: 20px; color: var(--ers-ink-2); max-width: 560px; }
.ers-dark .ers-lead { color: var(--ers-on-dark-2); }
.ers-muted { color: var(--ers-muted); font-size: 15px; }
.ers-dark .ers-muted, .ers-dark-2 .ers-muted, .ers-card--dark .ers-muted { color: var(--ers-on-dark-2); }
.ers-h3 a { text-decoration: none; }
.ers-h3 a:hover { text-decoration: underline; }

/* Section sub-navigation */
.ers-subnav { background: var(--ers-navy-2); border-bottom: 1px solid #24384F; }
.ers-subnav ul { list-style: none; margin: 0 auto; max-width: 1200px; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 4px; }
.ers-subnav a {
  display: block;
  padding: 13px 12px 10px;
  border-bottom: 3px solid transparent;
  color: var(--ers-on-dark-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.ers-subnav a:hover { color: var(--ers-on-dark); }
.ers-subnav a[aria-current="page"] { color: var(--ers-gold); border-bottom-color: var(--ers-gold); }

/* Buttons */
.ers-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ers .ers-btn {
  display: inline-block;
  background: var(--ers-gold);
  color: var(--ers-navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 24px;
  min-height: 44px;
  border: 2px solid var(--ers-gold);
}
.ers .ers-btn:hover { background: #F0DC6E; color: var(--ers-navy); }
.ers .ers-btn--ghost { background: transparent; color: var(--ers-on-dark); border-color: #4A5E78; }
.ers .ers-btn--ghost:hover { background: rgba(255,255,255,0.06); color: var(--ers-on-dark); }
.ers-link { font-weight: 700; }

/* Hero */
.ers-hero .ers-wrap { padding-top: 56px; padding-bottom: 64px; }
.ers-hero__text { display: flex; flex-direction: column; gap: 18px; }

/* Photo slots: replace the <div class="ers-photo">…</div> with an <img> */
.ers-photo {
  margin: 0;
  min-height: 340px;
  background: var(--ers-sand-2);
  border: 1px solid #D2CBB5;
  color: #6B6450;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-weight: 600;
  font-size: 15px;
}
.ers-dark .ers-photo { background: var(--ers-navy-3); border-color: var(--ers-line-dark); color: #8FA0B6; min-height: 400px; }
.ers-photo--sm { min-height: 180px; }
.ers-figure { margin: 0; }
.ers-figure img { width: 100%; object-fit: cover; }
.ers-figure figcaption { font-size: 14px; color: var(--ers-muted); margin-top: 8px; }

/* Stat strip */
.ers-stats { background: var(--ers-gold); color: var(--ers-navy); }
.ers-stats ul { list-style: none; margin: 0 auto; max-width: 1200px; padding: 0 24px; display: flex; flex-wrap: wrap; }
.ers-stats li { flex: 1 1 180px; padding: 22px 16px; border-right: 1px solid #C4AE3A; }
.ers-stats li:last-child { border-right: 0; }
.ers-stats .ers-label { color: #4A3F0C; }
.ers-stats strong { display: block; font-family: var(--ers-display); font-weight: 700; font-size: 32px; line-height: 1.1; }

/* Cards */
.ers-card { background: #FFFFFF; border: 1px solid var(--ers-line); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.ers-card--dark { background: var(--ers-navy); color: var(--ers-on-dark); border-color: var(--ers-navy); }
.ers-card--dark a { color: var(--ers-gold); }
.ers-card--flush { padding: 0; gap: 0; }
.ers-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.ers-card__body p { color: var(--ers-ink-2); font-size: 16px; }
.ers-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 16px; color: var(--ers-ink-2); }
.ers-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #EEF2F6; color: #24384F; font-size: 15px; }
.ers-note svg { flex: none; }
.ers-big { font-family: var(--ers-display); font-weight: 800; font-size: 84px; line-height: 1; color: var(--ers-gold); }
.ers-result { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Key facts / spec list */
.ers-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.ers-dl dt { color: var(--ers-muted); font-size: 15px; }
.ers-dl dd { margin: 0; font-weight: 700; }
.ers-spec { width: 100%; border-collapse: collapse; background: #FFFFFF; border: 1px solid var(--ers-line); }
.ers-spec th, .ers-spec td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #E8E3D4; vertical-align: top; }
.ers-spec th { width: 40%; color: var(--ers-muted); font-weight: 600; }
.ers-spec td { font-weight: 700; }
.ers-spec caption { text-align: left; font-family: var(--ers-display); font-weight: 700; font-size: 26px; padding-bottom: 10px; }

/* Results table */
.ers-table-wrap { overflow-x: auto; background: #FFFFFF; border: 1px solid var(--ers-line); }
.ers-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 16px; }
.ers-table th { background: var(--ers-navy); color: var(--ers-on-dark); text-align: left; padding: 14px 16px; font-weight: 700; }
.ers-table td { padding: 14px 16px; border-bottom: 1px solid #E8E3D4; }
.ers-table tr:last-child td { border-bottom: 0; }
.ers-table .ers-num { font-variant-numeric: tabular-nums; }
.ers-table .ers-right { text-align: right; }
.ers-pill { display: inline-block; background: var(--ers-gold); color: var(--ers-navy); padding: 3px 10px; font-weight: 700; }

/* Season summary tiles */
.ers-tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.ers-tile { flex: 1 1 200px; background: #FFFFFF; border: 1px solid var(--ers-line); padding: 20px; }
.ers-tile strong { display: block; font-family: var(--ers-display); font-weight: 800; font-size: 56px; line-height: 1; }
.ers-tile--dark { background: var(--ers-navy); border-color: var(--ers-navy); color: var(--ers-on-dark); }
.ers-tile--dark .ers-label { color: var(--ers-gold); }
.ers-tile--dark strong { color: var(--ers-gold); }

/* Crew grid */
.ers-crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.ers-crew .ers-photo { min-height: 220px; }
.ers-crew h3 { font-size: 24px; margin-top: 12px; }
.ers-crew p { color: var(--ers-ink-2); font-size: 15px; }

/* Gallery */
.ers-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ers-gallery .ers-photo, .ers-gallery img { min-height: 220px; aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }

/* Call to action band */
.ers-cta .ers-wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }

/* Article (race report) body */
.ers-article { max-width: 760px; margin: 0 auto; }
.ers-article p { margin-bottom: 1em; font-size: 18px; line-height: 1.65; color: var(--ers-ink-2); }

@media (max-width: 640px) {
  .ers { font-size: 16px; }
  .ers-section { padding: 40px 0; }
  .ers-hero .ers-wrap { padding-top: 36px; padding-bottom: 40px; }
  .ers-stats li { border-right: 0; border-bottom: 1px solid #C4AE3A; padding: 14px 8px; }
  .ers-big { font-size: 64px; }
  .ers-dl { grid-template-columns: minmax(0, 1fr); }
}

/* Upcoming races and day sails, from the crew manager ([erasmus_events]) */
.ers-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--ers-line); }
.ers-event { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; border-top: 1px solid var(--ers-line); }
.ers-event:first-child { border-top: 0; }
.ers-event-date { flex: 0 0 84px; font: 700 15px var(--ers-body); color: var(--ers-ink); white-space: nowrap; }
.ers-event-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ers-event-body strong { font-weight: 700; color: var(--ers-ink); overflow-wrap: anywhere; }
.ers-event-body .ers-muted { font-size: 14px; }
.ers-event--sail { border-left: 4px solid var(--ers-gold); }

/* Gallery from the Google Photos album ([erasmus_album]) and its viewer */
.ers-album { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.ers-album a { display: block; background: var(--ers-sand-2); }
.ers-album a:focus-visible { outline: 3px solid var(--ers-gold); outline-offset: 2px; }
.ers-album img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 480px) { .ers-album { grid-template-columns: repeat(3, 1fr); gap: 4px; } }
.ers-viewer { position: fixed; inset: 0; z-index: 100000; background: rgba(14, 27, 44, 0.96); display: flex; align-items: center; justify-content: center; }
.ers-viewer[hidden] { display: none; }
.ers-viewer img { max-width: 94vw; max-height: 86vh; object-fit: contain; }
.ers-viewer button {
  position: absolute; border: 0; cursor: pointer; background: rgba(244, 241, 232, 0.12); color: var(--ers-on-dark);
  font: 400 36px/1 var(--ers-body); width: 52px; height: 52px; border-radius: 50%;
}
.ers-viewer button:hover, .ers-viewer button:focus-visible { background: var(--ers-gold); color: var(--ers-navy); outline: none; }
.ers-viewer-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.ers-viewer-next { right: 12px; top: 50%; transform: translateY(-50%); }
.ers-viewer-close { right: 12px; top: 12px; }
.ers-viewer-count { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: var(--ers-on-dark-2); font: 600 14px var(--ers-body); }
html.ers-viewer-open { overflow: hidden; }

/* Photos in the places the templates once had placeholder slots */
.ers-pic { display: block; width: 100%; height: auto; min-height: 340px; max-height: 560px; object-fit: cover; border: 0; }
.ers-dark .ers-pic { min-height: 400px; }
@media (max-width: 640px) { .ers-pic, .ers-dark .ers-pic { min-height: 0; aspect-ratio: 3 / 2; } }

/* Jobs done, from the Trello board ([erasmus_jobs]) */
.ers-jobs { margin: 0; padding-left: 20px; color: var(--ers-ink-2); display: flex; flex-direction: column; gap: 4px; }
.ers-jobs .ers-muted { font-size: 13px; margin-left: 6px; white-space: nowrap; }
