/* ==========================================================================
   Implementation Science in Mental Health — shared stylesheet (design v2)
   ========================================================================== */

:root {
  /* Palette */
  --cream: #f4ebe0;          /* hero & footer background */
  --cream-card: #f6eee4;     /* cards on white sections */
  --cream-card-alt: #f3e8db; /* cards on purple sections */
  --white: #ffffff;
  --wine: #7a2d54;           /* primary purple/magenta band & buttons */
  --wine-dark: #6a2147;      /* serif display page titles */
  --wine-mid: #8a3a63;       /* card sub-headings */
  --ink: #1c1c1c;            /* body text + section headings */
  --ink-soft: #2c2c2c;
  --line: #d9c9bb;           /* hairline dividers on cream */
  --line-soft: rgba(122, 45, 84, 0.25);
  --card-border: rgba(122, 45, 84, 0.45);

  /* Type */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wide { max-width: 1320px; }

/* -------------------------------------------------- Announcement bar (home only, below header) */
.announce {
  background: var(--wine);
  color: #fff;
  text-align: center;
  font-family: var(--sans);
  font-size: 15px;
  padding: 13px 16px;
  letter-spacing: 0.1px;
}
.announce a { color: #fff; text-decoration: underline; }

/* -------------------------------------------------- Header / nav */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--gutter);
  max-width: 1320px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  background: var(--wine);
  color: #fff;
  border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.brand-text {
  font-family: var(--sans);
  line-height: 1.15;
  font-size: 15px;
  color: var(--ink);
}
.brand-text b { display: block; font-weight: 700; }
.brand-text span { font-weight: 400; }

.main-nav {
  display: flex;
  gap: 26px;
  font-family: var(--sans);
  font-size: 15.5px;
  flex: 1;
  justify-content: center;
}
.main-nav a { color: var(--ink); padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--wine); }
.main-nav a.active { color: var(--wine); border-bottom-color: var(--wine); }

.partner-logos { display: flex; align-items: center; gap: 14px; }
.partner-logos .plogo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}
.partner-logos .plogo-sep {
  width: 1px;
  align-self: stretch;
  background: #555;
}
.partner-logos.footer .plogo-sep { display: none; }

.nav-toggle { display: none; }

/* -------------------------------------------------- Buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  padding: 11px 22px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid var(--wine);
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-dark); }
.btn-outline { background: transparent; color: var(--wine); }
.btn-outline:hover { background: var(--wine); color: #fff; }
.btn-white { background: #fff; color: var(--wine); border-color: #fff; }
.btn-white:hover { background: #f1ddec; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* -------------------------------------------------- Sections */
section { position: relative; }
.sec { padding: 78px 0; }
.sec-tight { padding: 56px 0; }

.bg-cream { background: var(--cream); }
.bg-white { background: #fff; }
.bg-wine { background: var(--wine); color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
h1 { color: var(--wine-dark); }
/* Section headings are dark ink in design v2 */
.section-title { font-size: 32px; font-weight: 500; margin-bottom: 40px; color: var(--ink); }
.bg-wine .section-title, .bg-wine h2 { color: #fff; }

/* -------------------------------------------------- Hero (page headers) */
.page-hero { background: var(--cream); text-align: center; padding: 70px 0 64px; }
.page-hero h1 { font-size: 60px; line-height: 1.08; font-weight: 500; color: var(--wine-dark); }
.page-hero .lede {
  max-width: 640px; margin: 26px auto 0; font-size: 19px; color: var(--ink);
}

/* -------------------------------------------------- Home hero carousel */
.hero { background: var(--cream); position: relative; overflow: hidden; display: grid; }
/* all slides share one grid cell: hero height = tallest slide, no jump on change */
.hero-slide { grid-area: 1 / 1; visibility: hidden; min-height: 460px; display: grid; }
.hero-slide.active { visibility: visible; }
.hero-slide > .container.wide { display: grid; align-content: center; width: 100%; }

.hero-slide .container.wide { padding-top: 64px; padding-bottom: 64px; }
.hero-text-only { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.hero-title { font-size: 64px; line-height: 1.06; font-weight: 500; color: var(--wine-dark); }
.hero-copy { font-family: var(--sans); font-size: 18px; color: var(--ink); border-left: 1px solid #9a8f83; padding-left: 44px; }
.hero-copy p { margin: 0 0 26px; }

/* slides 2 & 3 — photo bleeds to the left viewport edge */
.hero-media { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; min-height: 460px; }
.hero-media .photo { min-height: 460px; }
.hero-media .panel { display: grid; align-items: center; padding: 40px 9vw 40px 56px; }
.hero-media h2 { font-size: 32px; line-height: 1.15; margin-bottom: 18px; color: var(--ink); font-weight: 500; }
.hero-media p { font-size: 16px; color: var(--ink-soft); margin: 0; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.45);
  color: var(--wine); font-size: 20px;
  display: grid; place-items: center; cursor: pointer; border-radius: 4px;
  z-index: 5;
}
.hero-arrow:hover { background: #fff; }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots { display: flex; gap: 9px; justify-content: center; padding: 8px 0 30px; }
.hero .hero-dots {
  position: absolute; left: 0; right: 0; bottom: 12px;
  padding: 0; z-index: 6;
}
.hero-dots-shell {
  display: inline-flex; gap: 9px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 4px; background: rgba(255,255,255,.5);
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none;
  background: #cbb9aa; cursor: pointer; padding: 0;
}
.hero-dots button.active { background: var(--wine); }

/* -------------------------------------------------- Photo / placeholders */
.photo {
  background: linear-gradient(135deg, #e7d8c8, #d9c4b4);
  position: relative;
  display: grid; place-items: center;
  color: #8a6f5c; font-family: var(--sans); font-size: 13px; letter-spacing: .4px;
  text-align: center;
  overflow: hidden;
}
.photo span { opacity: .8; padding: 8px 14px; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* -------------------------------------------------- Icon card grids */
.card-grid { display: grid; gap: 26px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.icard {
  background: var(--cream-card);
  border-radius: 8px;
  padding: 30px 28px;
}
.icard .ic { margin-bottom: 20px; }
.icard .ic img { width: 40px; height: 40px; object-fit: contain; }
.icard h3 {
  font-family: var(--sans);
  color: var(--wine-mid); font-size: 20px; margin-bottom: 12px; font-weight: 600; line-height: 1.25;
}
.icard p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* Course structure flow — outlined white cards */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.flow .arrow { display: grid; place-items: center; color: var(--wine); font-size: 24px; padding: 0 18px; }
.flow .icard { height: 100%; border: 1px solid var(--card-border); background: #fff; border-radius: 8px; }

.center-btn { text-align: center; margin-top: 44px; }

/* -------------------------------------------------- "For you if" columns (3) */
.foryou { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; max-width: 980px; }
.foryou .col { padding: 0 30px; font-family: var(--sans); font-size: 15.5px; line-height: 1.55; color: #f3e3ee; }
.foryou .col + .col { border-left: 1px solid rgba(255,255,255,.35); }
.foryou .col:first-child { padding-left: 0; }

/* -------------------------------------------------- Audience pills */
.audience { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start; }
.audience .lead-copy { font-family: var(--sans); }
.audience .lead-copy p:first-child { font-size: 19px; }
.audience .lead-copy p { color: #f1e2ec; font-size: 15px; }
.pill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pill {
  background: var(--cream-card-alt);
  color: var(--wine-dark);
  border-radius: 6px;
  padding: 20px 18px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  display: grid; align-items: center; justify-items: center; text-align: center;
  min-height: 78px;
}

/* -------------------------------------------------- Learning outcomes (stacked) */
.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.outcome {
  background: var(--cream-card);
  border-radius: 8px;
  padding: 26px 24px;
}
.outcome .num {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--wine); color: var(--wine);
  display: grid; place-items: center; font-family: var(--serif); font-size: 18px;
  margin-bottom: 18px;
}
.outcome p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }

/* -------------------------------------------------- Stat block */
.stat-block { text-align: center; padding: 26px 0; margin: 34px 0; }
.stat-block .big { font-size: 56px; color: var(--wine); font-weight: 500; line-height: 1; }
.stat-block .cap { font-family: var(--sans); font-size: 14px; color: var(--wine-mid); margin-top: 10px; }

.prose { max-width: 760px; margin: 0 auto; }
.prose p { margin: 0 0 20px; font-size: 16px; color: var(--ink-soft); }

/* -------------------------------------------------- Modules list */
.modules { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 50px; align-items: start; }
.modules h1 { font-size: 56px; line-height: 1.1; color: var(--wine-dark); }
.mod-wrap { border-left: 1px solid #9a8f83; padding-left: 40px; }
.mod-wrap h2 { font-size: 30px; color: var(--ink); margin-bottom: 26px; }
.mod-item { margin-bottom: 22px; }
.mod-item .mlabel { font-family: var(--sans); font-weight: 700; font-size: 13px; color: var(--ink); }
.mod-item .mtitle { font-family: var(--sans); font-size: 19px; color: var(--ink); margin-top: 2px; line-height: 1.35; }

/* -------------------------------------------------- Tables */
.split { display: grid; grid-template-columns: 0.55fr 1.45fr; gap: 40px; align-items: start; }
.split h2 { font-size: 34px; color: var(--ink); }
.dtable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.dtable caption { text-align: left; font-family: var(--sans); font-weight: 600; font-size: 20px; margin-bottom: 18px; color: var(--ink); }
.dtable th { text-align: left; font-family: var(--sans); font-size: 14px; font-weight: 700; padding: 10px 12px 12px; border-bottom: 1px solid #555; }
.dtable td { padding: 15px 12px; border-bottom: 1px solid #555; vertical-align: top; color: var(--ink-soft); }
.dtable ul { margin: 0; padding-left: 18px; }
.split-rule { border: none; border-top: 1px solid #999; margin: 54px 0; }

/* -------------------------------------------------- Fee cards */
.fee-head { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 50px; align-items: start; }
.fee-head h1 { font-size: 58px; line-height: 1.05; }
.fee-head .note { font-size: 15px; color: var(--ink-soft); margin-top: 26px; font-family: var(--sans); }
.fee-head .note b { font-family: var(--serif); }
.fee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.fee-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 26px 28px;
  min-height: 185px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.fee-card .label { font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .4px; color: var(--wine); text-transform: uppercase; }
.fee-card .amt { font-size: 32px; text-align: right; color: var(--ink); line-height: 1.35; }

/* -------------------------------------------------- FAQ accordion */
.faq { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: 26px 0; text-align: left;
  font-family: var(--sans); font-size: 19px; color: var(--ink);
}
.faq-q .chev {
  flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--line-soft); border-radius: 4px;
  display: grid; place-items: center; color: var(--wine); transition: transform .2s; font-size: 13px;
}
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { margin: 0 0 26px; font-size: 16px; color: var(--ink-soft); }
.faq-rule { border: none; border-top: 1px solid #777; margin: 30px 0 0; }
.faq-contact { text-align: center; margin-top: 44px; font-size: 16px; color: var(--ink-soft); }
.faq-contact .email { font-family: var(--sans); font-size: 22px; color: var(--ink); margin-top: 6px; text-decoration: underline; display: inline-block; }

/* -------------------------------------------------- About Us (photo carousel + columns) */
.photo-carousel { position: relative; }
.photo-carousel .hero-slide { min-height: 0; display: none; visibility: visible; }
.photo-carousel .hero-slide.active { display: block; }
.pc-frame { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.pc-photo { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 1390 / 692; }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; }
.pc-badge {
  position: absolute; left: 34px; bottom: 30px;
  background: var(--cream);
  color: var(--wine);
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .8px;
  padding: 14px 26px; border-radius: 14px; text-transform: uppercase;
}

.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.about-cols .col { padding-right: 56px; }
.about-cols .col + .col { border-left: 1px solid #555; padding-left: 56px; padding-right: 0; }
.about-cols h2 { font-size: 30px; line-height: 1.15; margin-bottom: 22px; color: var(--ink); font-weight: 500; }
.about-cols p { font-size: 15px; color: var(--ink-soft); margin: 0 0 18px; }
.about-cols .col-btn { margin-top: 30px; }

/* -------------------------------------------------- Team grid */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.team-card .pic { background: var(--cream-card); border-radius: 8px; aspect-ratio: 1/1.18; margin-bottom: 16px; }
.team-card .tname { font-family: var(--sans); font-size: 18px; color: var(--ink); }
.team-card .trole { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--ink); text-transform: uppercase; margin-top: 4px; }

/* -------------------------------------------------- CTA band */
.cta-band { background: var(--wine); color: #fff; text-align: center; padding: 70px 0; }
.cta-band h2 { color: #fff; font-size: 38px; line-height: 1.15; max-width: 560px; margin: 0 auto 28px; font-weight: 500; }
.cta-band .btn-row { justify-content: center; }

/* -------------------------------------------------- Footer */
.site-footer { background: var(--cream); padding: 64px 0 70px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 0.85fr 0.85fr; gap: 0; }
.footer-about { padding-right: 50px; }
.footer-about p { font-family: var(--sans); font-size: 16px; color: var(--ink); max-width: 420px; margin: 0; }
.partner-logos.footer { gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.partner-logos.footer .plogo { height: 52px; }
.footer-col { border-left: 1px solid #555; padding-left: 34px; }
.footer-col h4 { font-family: var(--sans); font-weight: 700; color: var(--wine); font-size: 18px; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-family: var(--sans); font-weight: 600; font-size: 15px; color: var(--ink); }
.footer-col a:hover { color: var(--wine); }

/* -------------------------------------------------- Responsive */
@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 16px; display: none; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-soft); background: none; border-radius: 5px; color: var(--wine); font-size: 20px; cursor: pointer; }
  .card-grid.cols-3 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); padding: 12px 0; }
  .foryou { grid-template-columns: 1fr; gap: 24px; }
  .foryou .col { padding: 0; }
  .foryou .col + .col { border-left: none; }
  .outcomes { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .hero-text-only, .audience, .modules, .split, .fee-head, .about-cols { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { border-left: none; padding-left: 0; }
  .hero-media { grid-template-columns: 1fr; }
  .hero-media .panel { padding: 28px 40px; }
  .mod-wrap { border-left: none; padding-left: 0; }
  .about-cols .col { padding-right: 0; }
  .about-cols .col + .col { border-left: none; padding-left: 0; border-top: 1px solid #777; padding-top: 30px; margin-top: 30px; }
  .fee-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-col { border-left: none; padding-left: 0; }
  .hero-title { font-size: 46px; }
  .page-hero h1 { font-size: 42px; }
  .fee-head h1, .modules h1 { font-size: 44px; }
  .pc-badge { left: 16px; bottom: 14px; padding: 10px 16px; }
}

@media (max-width: 560px) {
  .pill-grid, .outcomes, .team-grid { grid-template-columns: 1fr; }
  .hero-title, .page-hero h1 { font-size: 36px; }
  .fee-card .amt { font-size: 26px; }
}
