/*
Theme Name: Rhodes Microcredentials
Theme URI: https://example.com/rhodes-microcredentials
Author: Rhodes Business School
Description: WordPress theme converted from the module_01_learning_platform_prototype HTML. Includes Landing, Sector Pathway, and Module Overview page templates.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: rhodes-microcredentials
*/

:root {
  --ink: #070c33;
  --muted: #5b5d74;
  --line: #d9d6e4;
  --surface: #ffffff;
  --wash: #f6f4fa;
  --wash-2: #ece8f4;
  --brand-purple: #410099;
  --brand-magenta: #963092;
  --brand-violet: #5c4da0;
  --brand-blue: #4040ff;
  --brand-navy: #070c33;
  --brand-rust: #993720;
  --brand-sky: #47a1da;
  --brand-teal: #05997d;
  --brand-gold: #d0a62a;
  --shadow: 0 18px 45px rgba(7, 12, 51, 0.14);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Avenir, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--wash);
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border-radius: var(--radius);
  text-decoration: none;
}
.brand img {
  width: 118px;
  height: 42px;
  object-fit: contain;
}
.brand-meta { min-width: 0; padding-left: 2px; }
.brand-kicker { display: none; }
.brand-title {
  overflow: hidden;
  max-width: 44vw;
  color: var(--brand-purple);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-nav label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.header-nav select {
  min-height: 40px;
  max-width: 230px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.primary-button,
.ghost-button,
.sector-card,
.landing-sector-card,
.module-preview-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.primary-button,
.ghost-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.primary-button {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-magenta) 58%, var(--brand-blue));
  color: #fff;
  box-shadow: 0 12px 24px rgba(65, 0, 153, 0.22);
}
.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.primary-button:hover,
.ghost-button:hover,
.sector-card:hover,
.landing-sector-card:hover,
.module-preview-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(7, 12, 51, 0.09);
}
.primary-button:hover { box-shadow: 0 16px 30px rgba(65, 0, 153, 0.3); }
.ghost-button:hover { border-color: rgba(65, 0, 153, 0.25); }

.prototype-landing {
  min-height: calc(100vh - 64px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 12, 51, 0.98) 0%, rgba(65, 0, 153, 0.86) 55%, rgba(64, 64, 255, 0.52) 100%),
    var(--landing-bg, linear-gradient(135deg, #070c33, #410099)) center / cover;
}
.landing-inner,
.home-inner,
.catalog-inner {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
}
.landing-inner {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 64px);
  padding: 44px 0 56px;
}
.landing-logo {
  display: inline-flex;
  align-items: center;
  width: min(220px, 62vw);
  margin-bottom: 22px;
  overflow: hidden;
  background: transparent;
}
.landing-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.landing-title {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 500;
  line-height: 1;
}
.landing-copy {
  max-width: 760px;
  margin: 20px 0 30px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}
.landing-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.landing-actions { margin-top: 24px; }
.landing-sector-intro {
  margin: 36px 0 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.landing-sector-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 18px;
  max-width: 1480px;
}
.landing-sector-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(7, 12, 51, 0.06) 0%, rgba(7, 12, 51, 0.48) 54%, rgba(7, 12, 51, 0.86) 100%),
    var(--sector-bg, linear-gradient(135deg, #410099, #05997d)) center / cover;
  color: #fff;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 18px 34px rgba(7, 12, 51, 0.2);
}
.landing-sector-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(65, 0, 153, 0.08), rgba(5, 153, 125, 0.08));
}
.landing-sector-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 24px 42px rgba(7, 12, 51, 0.28);
}
.landing-sector-code {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 900;
}
.landing-sector-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  line-height: 1.08;
  text-shadow: 0 2px 8px rgba(7, 12, 51, 0.55);
}
.landing-sector-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.landing-footer,
.site-footer {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}
.landing-footer {
  margin-top: 42px;
  padding-top: 26px;
}
.site-footer {
  background: var(--brand-navy);
  padding: 28px 0;
}
.landing-footer-grid,
.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.4fr);
  gap: 22px;
  max-width: 980px;
}
.site-footer-grid {
  width: min(1440px, calc(100% - 64px));
  max-width: 1440px;
  margin: 0 auto;
}
.landing-footer h2,
.landing-footer h3,
.site-footer h2,
.site-footer h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 14px;
}
.landing-footer p,
.site-footer p { margin: 0 0 10px; }

.home-page,
.catalog-page,
.course-overview-page {
  min-height: calc(100vh - 64px);
  padding: 42px 0 64px;
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-header h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.08;
}
.page-header p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.section-kicker {
  margin-bottom: 8px;
  color: var(--brand-purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sector-grid,
.module-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sector-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(7, 12, 51, 0.04);
}
.sector-card-image {
  min-height: 180px;
  display: flex;
  align-items: flex-start;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(7, 12, 51, 0.06), rgba(7, 12, 51, 0.62)),
    var(--sector-card-image, linear-gradient(135deg, #410099, #4040ff)) center / cover;
}
.sector-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}
.sector-card:hover,
.module-preview-card:hover {
  border-color: var(--brand-purple);
  box-shadow: var(--shadow);
}
.sector-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-purple);
  color: #fff;
  font-weight: 900;
}
.sector-card:nth-child(2) .sector-mark { background: var(--brand-teal); }
.sector-card:nth-child(3) .sector-mark { background: var(--brand-violet); }
.sector-card:nth-child(4) .sector-mark { background: var(--brand-rust); }
.sector-card:nth-child(5) .sector-mark { background: var(--brand-blue); }
.sector-card h2,
.module-preview-card h2 {
  margin: 18px 0 8px;
  font-size: 22px;
  line-height: 1.15;
}
.sector-card p,
.module-preview-card p {
  margin: 0;
  color: var(--muted);
}
.sector-meta,
.module-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7edfb;
  color: var(--brand-navy);
  font-size: 11px;
  font-weight: 800;
}
.sector-open,
.module-open {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.pathway-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 22px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.pathway-intro h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
}
.pathway-intro p {
  margin: 0;
  color: var(--muted);
}
.pathway-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.pathway-point {
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-violet));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(65, 0, 153, 0.14);
}
.pathway-point:nth-child(2) { background: linear-gradient(135deg, var(--brand-teal), var(--brand-sky)); }
.pathway-point:nth-child(3) { background: linear-gradient(135deg, var(--brand-rust), var(--brand-magenta)); }
.pathway-image {
  min-height: 260px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(7, 12, 51, 0.08), rgba(7, 12, 51, 0.55)),
    var(--pathway-image, linear-gradient(135deg, #410099, #05997d)) center / cover;
}
.module-preview-card {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 22px 44px rgba(7, 12, 51, 0.11);
}
.module-preview-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 28px 54px rgba(7, 12, 51, 0.16);
}
.module-preview-top {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(7, 12, 51, 0.08) 0%, rgba(7, 12, 51, 0.78) 100%),
    var(--module-image, linear-gradient(135deg, #070c33, #410099)) center / cover;
  color: #fff;
}
.module-preview-number {
  align-self: flex-start;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-purple);
  font-size: 12px;
  font-weight: 900;
}
.case-region {
  align-self: flex-start;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-navy);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.module-preview-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 8px 6px;
}
.module-preview-card h2 {
  margin-top: 0;
  font-size: 21px;
}

.course-overview-inner {
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
}
.course-overview-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 0;
  align-items: stretch;
  margin-bottom: 22px;
  border-radius: 28px;
  background: linear-gradient(90deg, #fff 0 47%, var(--brand-teal) 47% 70%, var(--brand-magenta) 70% 100%);
  box-shadow: 0 28px 64px rgba(7, 12, 51, 0.16);
}
.course-overview-copy {
  position: relative;
  z-index: 2;
  align-content: center;
  padding: clamp(24px, 3.2vw, 42px);
  background: rgba(255, 255, 255, 0.96);
}
.course-overview-copy::before {
  content: "";
  position: absolute;
  top: 28px;
  right: 24px;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-magenta));
}
.course-overview-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
}
.course-overview-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.course-cover {
  position: relative;
  z-index: 1;
  min-height: 430px;
  margin: 28px 28px 28px 0;
  border: 8px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(7, 12, 51, 0.02), rgba(7, 12, 51, 0.16)),
    var(--overview-image, linear-gradient(135deg, #410099, #47a1da)) center / cover;
  box-shadow: 0 26px 52px rgba(7, 12, 51, 0.24);
}
.course-cover::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-sky), var(--brand-blue));
  opacity: 0.86;
}
.overview-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(7, 12, 51, 0.07);
}
.overview-card.combined {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  background: linear-gradient(135deg, #fff, #f5f1fb);
}
.overview-panel {
  height: 100%;
  padding: 24px;
  border-radius: 16px;
}
.overview-panel.summary {
  background: #f3fbf8;
  border: 1px solid rgba(5, 153, 125, 0.22);
}
.overview-panel.objectives {
  background: #f6f2fb;
  border: 1px solid rgba(65, 0, 153, 0.18);
}
.overview-card h2 { margin: 0 0 12px; }
.overview-card p,
.overview-card li {
  color: var(--muted);
}
.overview-card li { margin-bottom: 9px; }

@media (max-width: 1080px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding: 10px 18px;
  }
  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .landing-sector-grid,
  .sector-grid,
  .module-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pathway-intro,
  .course-overview-hero,
  .overview-card.combined {
    grid-template-columns: 1fr;
  }
  .course-overview-hero {
    background: linear-gradient(180deg, #fff 0 48%, var(--brand-teal) 48% 72%, var(--brand-magenta) 72% 100%);
  }
  .course-cover {
    min-height: 340px;
    margin: 0 24px 24px;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 64px;
    padding: 10px 14px;
  }
  .brand img { width: 96px; }
  .brand-title {
    max-width: 46vw;
    font-size: 14px;
  }
  .header-nav { width: 100%; }
  .header-nav select {
    width: 100%;
    max-width: none;
  }
  .landing-inner,
  .home-inner,
  .catalog-inner,
  .course-overview-inner,
  .site-footer-grid {
    width: min(100% - 28px, 1140px);
  }
  .landing-sector-grid,
  .landing-footer-grid,
  .site-footer-grid,
  .sector-grid,
  .module-preview-grid,
  .pathway-points {
    grid-template-columns: 1fr;
  }
  .landing-sector-card { min-height: 280px; }
  .page-header { display: grid; }
  .course-cover {
    min-height: 300px;
    margin: 0 14px 18px;
    border-width: 6px;
  }
  .course-cover::after {
    width: 68px;
    height: 68px;
    right: -18px;
    bottom: -18px;
  }
}
