/* ==========================================================================
   Clinical Research Learning — redesign theme layer
   Bulma 1.0.2 is loaded first; everything below re-skins it so no stock
   framework fingerprint survives. Prefix for the bespoke system: crlp
   ========================================================================== */

:root {
  --crlp-maroon: #8b0000;
  --crlp-maroon-deep: #6d0000;
  --crlp-rust: #a11a00;
  --crlp-wine: #991122;
  --crlp-teal: #1a6f6a;
  --crlp-teal-deep: #124f4b;
  --crlp-ink: #333333;
  --crlp-slate: #5f5f5f;
  --crlp-rule: #d8d2cc;
  --crlp-paper: #ffffff;
  --crlp-mist: #f5f2ee;
  --crlp-panel: #efeae4;
  --crlp-field: #f0eeeb;
  --crlp-gold: #b07a2a;

  --crlp-step: 18px;
  --crlp-radius-tile: 6px;
  --crlp-radius-btn: 3px;
  --crlp-shadow: 0 4px 14px rgba(60, 20, 20, .07);

  --crlp-shell: 1140px;
  --crlp-font: "Arimo", Arial, Helvetica, sans-serif;

  /* Bulma variable overrides — re-tint the framework */
  --bulma-primary-h: 0;
  --bulma-primary-s: 100%;
  --bulma-primary-l: 27%;
  --bulma-link-h: 350;
  --bulma-link-s: 80%;
  --bulma-link-l: 33%;
  --bulma-family-primary: var(--crlp-font);
  --bulma-family-secondary: var(--crlp-font);
  --bulma-body-color: var(--crlp-ink);
  --bulma-radius: var(--crlp-radius-tile);
  --bulma-radius-small: var(--crlp-radius-btn);
  --bulma-border: var(--crlp-rule);
  --bulma-title-color: var(--crlp-wine);
  --bulma-strong-color: var(--crlp-ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--crlp-font);
  color: var(--crlp-ink);
  background: var(--crlp-paper);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--crlp-wine); }
a:hover { color: var(--crlp-rust); }

h1, h2, h3, h4, h5 {
  font-family: var(--crlp-font);
  color: var(--crlp-wine);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

.crlp-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--crlp-paper);
  color: var(--crlp-wine);
  padding: 10px 16px;
  z-index: 5000;
}
.crlp-skip:focus { left: 12px; top: 12px; }

.crlp-wrap {
  width: 100%;
  max-width: var(--crlp-shell);
  margin: 0 auto;
  padding: 0 22px;
}

/* ------------------------------------------------------------------ header */

.crlp-masthead {
  background: var(--crlp-maroon);
  border-bottom: 3px solid var(--crlp-maroon-deep);
}
.crlp-masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--crlp-step);
  padding: 14px 0 12px;
  flex-wrap: wrap;
}
.crlp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.crlp-brand img { width: 44px; height: 50px; }
.crlp-brand-text { display: flex; flex-direction: column; }
.crlp-brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .01em;
  line-height: 1.1;
}
.crlp-brand-sub {
  color: #f3d9d9;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.crlp-utility { display: flex; align-items: center; gap: 10px; }
.crlp-utility a {
  color: #f6e3e3;
  font-size: .86rem;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--crlp-radius-btn);
}
.crlp-utility a:hover { color: #fff; background: rgba(255,255,255,.12); }
.crlp-utility .crlp-utility-cta {
  background: #fff;
  color: var(--crlp-maroon);
  font-weight: 700;
}
.crlp-utility .crlp-utility-cta:hover { background: var(--crlp-mist); color: var(--crlp-maroon-deep); }

/* -------------------------------------------------------------------- nav */

.crlp-nav { background: var(--crlp-rust); position: relative; }
.crlp-nav-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.crlp-nav ul { list-style: none; margin: 0; padding: 0; }
.crlp-nav-top { display: flex; flex-wrap: wrap; justify-content: center; }
.crlp-nav-top > li { position: relative; }
.crlp-nav-top > li > a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 15px 16px;
}
.crlp-nav-top > li > a:hover,
.crlp-nav-top > li.crlp-on > a { background: var(--crlp-maroon); }

.crlp-drop {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--crlp-paper);
  border: 1px solid var(--crlp-rule);
  border-top: 3px solid var(--crlp-teal);
  box-shadow: var(--crlp-shadow);
  padding: 8px 0;
  display: none;
  z-index: 60;
}
.crlp-nav-top > li:hover > .crlp-drop,
.crlp-nav-top > li:focus-within > .crlp-drop { display: block; }
.crlp-drop a {
  display: block;
  padding: 9px 18px;
  color: var(--crlp-ink);
  text-decoration: none;
  font-size: .9rem;
}
.crlp-drop a:hover { background: var(--crlp-mist); color: var(--crlp-wine); }

.crlp-burger {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 18px;
  cursor: pointer;
}

/* --------------------------------------------------------------- hero/cta */

.crlp-hero {
  background: linear-gradient(180deg, var(--crlp-mist) 0%, var(--crlp-paper) 100%);
  border-bottom: 1px solid var(--crlp-rule);
  padding: 52px 0 44px;
}
.crlp-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
}
.crlp-eyebrow {
  display: inline-block;
  color: var(--crlp-teal-deep);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.crlp-hero h1 { font-size: 2.35rem; margin-bottom: 16px; }
.crlp-hero p { font-size: 1.05rem; color: var(--crlp-slate); max-width: 46ch; }
.crlp-hero-art {
  border: 1px solid var(--crlp-rule);
  border-radius: var(--crlp-radius-tile);
  overflow: hidden;
  background: var(--crlp-paper);
  box-shadow: var(--crlp-shadow);
}
.crlp-hero-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* --------------------------------------------------------------- buttons */

.crlp-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--crlp-radius-btn);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.crlp-btn-solid { background: var(--crlp-maroon); color: #fff; }
.crlp-btn-solid:hover { background: var(--crlp-maroon-deep); color: #fff; }
.crlp-btn-line { border-color: var(--crlp-maroon); color: var(--crlp-maroon); background: transparent; }
.crlp-btn-line:hover { background: var(--crlp-maroon); color: #fff; }
.crlp-btn-teal { background: var(--crlp-teal); color: #fff; }
.crlp-btn-teal:hover { background: var(--crlp-teal-deep); color: #fff; }

/* -------------------------------------------------------------- sections */

.crlp-sec { padding: 52px 0; }
.crlp-sec.alt { background: var(--crlp-mist); border-top: 1px solid var(--crlp-rule); border-bottom: 1px solid var(--crlp-rule); }
.crlp-sec-head { max-width: 62ch; margin-bottom: 30px; }
.crlp-sec-head h2 { font-size: 1.7rem; }
.crlp-sec-head p { color: var(--crlp-slate); }

.crlp-grid { display: grid; gap: 24px; }
.crlp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.crlp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.crlp-grid-4 { grid-template-columns: repeat(4, 1fr); }

.crlp-tile {
  background: var(--crlp-paper);
  border: 1px solid var(--crlp-rule);
  border-top: 3px solid var(--crlp-maroon);
  border-radius: var(--crlp-radius-tile);
  padding: 24px;
  box-shadow: var(--crlp-shadow);
  display: flex;
  flex-direction: column;
}
.crlp-tile h3 { font-size: 1.12rem; margin-bottom: 10px; }
.crlp-tile p { color: var(--crlp-slate); font-size: .95rem; }
.crlp-tile .crlp-more { margin-top: auto; font-weight: 700; text-decoration: none; }
.crlp-tile.teal { border-top-color: var(--crlp-teal); }
.crlp-tile.gold { border-top-color: var(--crlp-gold); }

.crlp-stat {
  border-left: 3px solid var(--crlp-teal);
  padding-left: 16px;
}
.crlp-stat strong { display: block; font-size: 1.6rem; color: var(--crlp-maroon); }
.crlp-stat span { color: var(--crlp-slate); font-size: .9rem; }

/* --------------------------------------------------------- inner template */

.crlp-band {
  background: var(--crlp-maroon);
  color: #fff;
  padding: 34px 0;
}
.crlp-band h1 { color: #fff; font-size: 1.9rem; margin-bottom: 6px; }
.crlp-crumb { font-size: .82rem; color: #f0cccc; }
.crlp-crumb a { color: #f6dede; text-decoration: none; }
.crlp-crumb a:hover { text-decoration: underline; }
.crlp-crumb span { margin: 0 7px; color: #d8a6a6; }

.crlp-body { padding: 44px 0 60px; }
.crlp-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 44px;
}
.crlp-body-grid.wide { grid-template-columns: minmax(0, 1fr); }
.crlp-prose h2 { font-size: 1.4rem; margin-top: 1.4em; }
.crlp-prose h3 { font-size: 1.12rem; margin-top: 1.3em; }
.crlp-prose ul, .crlp-prose ol { margin: 0 0 1.1em 1.2em; }
.crlp-prose li { margin-bottom: .45em; }
.crlp-lead { font-size: 1.08rem; color: var(--crlp-slate); }
.crlp-rule { border: 0; border-top: 1px solid var(--crlp-rule); margin: 30px 0; }

.crlp-aside-block {
  background: var(--crlp-panel);
  border: 1px solid var(--crlp-rule);
  border-radius: var(--crlp-radius-tile);
  padding: 20px;
  margin-bottom: 22px;
}
.crlp-aside-block h3 { font-size: 1rem; margin-bottom: 12px; }
.crlp-aside-block ul { list-style: none; margin: 0; padding: 0; }
.crlp-aside-block li { border-bottom: 1px solid var(--crlp-rule); }
.crlp-aside-block li:last-child { border-bottom: 0; }
.crlp-aside-block a { display: block; padding: 9px 0; text-decoration: none; font-size: .92rem; }
.crlp-aside-block a:hover { color: var(--crlp-rust); }
.crlp-aside-block p { font-size: .9rem; color: var(--crlp-slate); margin-bottom: 0; }

.crlp-quot {
  border-left: 3px solid var(--crlp-teal);
  background: var(--crlp-mist);
  padding: 18px 20px;
  margin: 0 0 18px;
  border-radius: 0 var(--crlp-radius-tile) var(--crlp-radius-tile) 0;
}
.crlp-quot p { font-style: italic; margin-bottom: 6px; }
.crlp-quot cite { font-size: .85rem; color: var(--crlp-slate); font-style: normal; }

.crlp-list-clean { list-style: none; margin: 0; padding: 0; }
.crlp-list-clean li {
  padding: 12px 0 12px 22px;
  border-bottom: 1px solid var(--crlp-rule);
  position: relative;
}
.crlp-list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 8px;
  background: var(--crlp-teal);
  border-radius: 50%;
}

.crlp-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.crlp-table caption {
  text-align: left;
  font-weight: 700;
  color: var(--crlp-wine);
  padding-bottom: 10px;
}
.crlp-table th, .crlp-table td {
  border: 1px solid var(--crlp-rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.crlp-table thead th { background: var(--crlp-panel); }
.crlp-table tbody tr:nth-child(even) { background: var(--crlp-mist); }

/* --------------------------------------------------------------- forms */

.crlp-field { margin-bottom: 18px; }
.crlp-field label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--crlp-ink);
}
.crlp-field .crlp-hint { font-weight: 400; color: var(--crlp-slate); font-size: .82rem; }
.crlp-input, .crlp-select, .crlp-textarea {
  width: 100%;
  background: var(--crlp-field);
  border: 1px solid #b5ada5;
  border-radius: var(--crlp-radius-btn);
  color: var(--crlp-ink);
  font-family: var(--crlp-font);
  font-size: .95rem;
  padding: 10px 12px;
}
.crlp-input:focus, .crlp-select:focus, .crlp-textarea:focus {
  outline: 3px solid rgba(26, 111, 106, .35);
  border-color: var(--crlp-teal);
  background: #fff;
}
.crlp-radio-row { display: flex; flex-wrap: wrap; gap: 16px; }
.crlp-radio-row label { font-weight: 400; }
.crlp-req { color: var(--crlp-maroon); }

/* --------------------------------------------------------------- calendar */

.crlp-cal-month { margin-bottom: 26px; }
.crlp-cal-month h3 { border-bottom: 2px solid var(--crlp-maroon); padding-bottom: 8px; }
.crlp-event {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--crlp-rule);
}
.crlp-event time { color: var(--crlp-teal-deep); font-weight: 700; font-size: .88rem; }
.crlp-event p { margin: 0; }
.crlp-event .crlp-tag {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--crlp-slate);
}

/* --------------------------------------------------------------- footer */

.crlp-foot {
  background: var(--crlp-maroon-deep);
  color: #f0dcdc;
  padding: 44px 0 0;
  margin-top: 20px;
}
.crlp-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
.crlp-foot h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.crlp-foot a { color: #f3dada; text-decoration: none; font-size: .9rem; }
.crlp-foot a:hover { color: #fff; text-decoration: underline; }
.crlp-foot ul { list-style: none; margin: 0; padding: 0; }
.crlp-foot li { margin-bottom: 8px; }
.crlp-foot-note { font-size: .9rem; color: #e6c9c9; }
.crlp-foot-bottom {
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: 32px;
  padding: 16px 0;
  font-size: .82rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: #e6c9c9;
}

/* --------------------------------------------------------------- reveal */

.crlp-reveal { animation: crlp-rise .55s ease both; }

@keyframes crlp-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .crlp-reveal { animation: none; }
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .crlp-hero-grid { grid-template-columns: 1fr; }
  .crlp-body-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .crlp-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .crlp-foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .crlp-burger { display: block; }
  .crlp-nav-inner { justify-content: flex-start; }
  .crlp-nav-top {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .crlp-nav-top.open { display: flex; }
  .crlp-nav-top > li { border-top: 1px solid rgba(255,255,255,.16); }
  .crlp-nav-top > li > a { padding-left: 22px; }
  .crlp-drop {
    position: static;
    display: block;
    border: 0;
    border-top: 0;
    box-shadow: none;
    background: var(--crlp-maroon);
    padding: 0 0 8px;
  }
  .crlp-drop a { color: #f6e3e3; padding-left: 40px; }
  .crlp-drop a:hover { background: rgba(0,0,0,.18); color: #fff; }
  .crlp-grid-3, .crlp-grid-2 { grid-template-columns: 1fr; }
  .crlp-hero h1 { font-size: 1.9rem; }
  .crlp-band h1 { font-size: 1.5rem; }
}

@media (max-width: 520px) {
  .crlp-grid-4 { grid-template-columns: 1fr; }
  .crlp-foot-grid { grid-template-columns: 1fr; }
  .crlp-event { grid-template-columns: 1fr; gap: 4px; }
  .crlp-masthead-row { justify-content: center; text-align: center; }
  .crlp-brand { justify-content: center; }
}
