/*
Theme Name: HBA Trainer Portal
Theme URI: https://hba.edu.au/
Author: HBA Learning Centres
Description: A focused HBA-branded trainer portal login cover page with a learner redirect.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hba-trainer-portal
*/

:root {
  --hba-green: #006b5f;
  --hba-green-dark: #004b43;
  --hba-lime: #b8d432;
  --hba-ink: #173c3a;
  --hba-soft: #eef5f2;
  --hba-white: #ffffff;
  --hba-muted: #5d706e;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--hba-ink);
  background: var(--hba-soft);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
}

.portal-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 76px);
  color: var(--hba-white);
  background: linear-gradient(145deg, var(--hba-green-dark), var(--hba-green) 68%, #058174);
}

.portal-brand::before,
.portal-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.portal-brand::before {
  width: 420px;
  height: 420px;
  right: -190px;
  top: -150px;
  border: 72px solid rgba(184, 212, 50, .18);
}

.portal-brand::after {
  width: 260px;
  height: 260px;
  left: -110px;
  bottom: -110px;
  background: rgba(184, 212, 50, .12);
}

.portal-logo, .portal-message, .portal-brand-footer { position: relative; z-index: 1; }

.portal-logo img { display: block; width: auto; height: auto; max-width: 220px; max-height: 92px; }

.portal-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.portal-wordmark-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--hba-green-dark);
  background: var(--hba-lime);
  font-size: 1rem;
  font-weight: 800;
}

.portal-eyebrow {
  margin: 0 0 20px;
  color: var(--hba-lime);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.portal-message h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2.6rem, 5.3vw, 5.8rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.portal-message p {
  max-width: 610px;
  margin: 28px 0 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
}

.portal-brand-footer { color: rgba(255,255,255,.65); font-size: .85rem; }

.portal-access {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 90px);
  background: var(--hba-white);
}

.portal-panel { width: 100%; max-width: 480px; }

.portal-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  letter-spacing: -.035em;
}

.portal-intro { margin: 0 0 32px; color: var(--hba-muted); line-height: 1.6; }

.portal-form p { margin: 0 0 20px; }

.portal-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--hba-ink);
  font-size: .88rem;
  font-weight: 700;
}

.portal-form input[type="text"],
.portal-form input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  color: var(--hba-ink);
  border: 1px solid #cad8d5;
  border-radius: 7px;
  background: #fbfdfc;
  font: inherit;
  transition: border-color .18s, box-shadow .18s;
}

.portal-form input:focus {
  outline: none;
  border-color: var(--hba-green);
  box-shadow: 0 0 0 4px rgba(0, 107, 95, .13);
}

.portal-form .login-remember label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--hba-muted);
}

.portal-form input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--hba-green); }

.portal-form .button-primary,
.portal-learner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 13px 20px;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.portal-form .button-primary { color: var(--hba-white); background: var(--hba-green); }
.portal-form .button-primary:hover { background: var(--hba-green-dark); }

.portal-help-row { margin-top: -7px; text-align: right; }
.portal-help-row a { color: var(--hba-green); font-size: .9rem; font-weight: 700; }

.portal-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0 22px;
  color: #80908e;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portal-divider::before, .portal-divider::after { content: ""; flex: 1; height: 1px; background: #dfe8e6; }

.portal-learner-note { margin: 0 0 14px; color: var(--hba-muted); font-size: .93rem; line-height: 1.5; text-align: center; }
.portal-learner-link { color: var(--hba-green-dark); border: 2px solid var(--hba-lime); background: #f8fbe9; }
.portal-learner-link:hover { background: var(--hba-lime); }

.portal-security { margin: 26px 0 0; color: #7d8b89; font-size: .78rem; line-height: 1.5; text-align: center; }

@media (max-width: 900px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-brand { min-height: 440px; gap: 90px; }
  .portal-access { padding-block: 62px; }
}

@media (max-width: 520px) {
  .portal-brand { min-height: 390px; padding: 28px 24px 36px; gap: 66px; }
  .portal-access { padding: 46px 24px; }
  .portal-message h1 { font-size: 2.65rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Internal trainer portal */
.trainer-area { min-height: 100vh; background: #f3f7f5; }
.trainer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(24px, 5vw, 72px);
  color: var(--hba-white);
  background: var(--hba-green-dark);
}
.trainer-header a { text-decoration: none; }
.trainer-header .portal-wordmark-mark { width: 44px; height: 44px; font-size: .78rem; }
.trainer-header .portal-wordmark { font-size: 1rem; }
.trainer-actions { display: flex; align-items: center; gap: 18px; font-size: .88rem; font-weight: 700; }
.trainer-actions a:hover { color: var(--hba-lime); }
.trainer-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 80px; }
.trainer-kicker { margin: 0 0 12px; color: var(--hba-green); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.trainer-main h1 { max-width: 850px; margin: 0; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: -.045em; }
.trainer-lead { max-width: 720px; margin: 22px 0 0; color: var(--hba-muted); font-size: 1.08rem; line-height: 1.7; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 48px; }
.course-card {
  position: relative;
  min-height: 220px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #dce7e4;
  border-radius: 14px;
  background: var(--hba-white);
  box-shadow: 0 12px 35px rgba(0, 75, 67, .06);
  text-decoration: none;
  transition: transform .18s, box-shadow .18s;
}
.course-card::after { content: "→"; position: absolute; right: 28px; bottom: 24px; color: var(--hba-green); font-size: 1.8rem; font-weight: 800; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(0, 75, 67, .12); }
.course-code { display: inline-block; margin-bottom: 34px; padding: 8px 11px; border-radius: 5px; color: var(--hba-green-dark); background: #edf5c7; font-size: .83rem; font-weight: 800; letter-spacing: .06em; }
.course-card h2 { max-width: 85%; margin: 0; font-size: 1.4rem; line-height: 1.25; }
.trainer-breadcrumb { margin-bottom: 32px; color: var(--hba-muted); font-size: .9rem; }
.trainer-breadcrumb a { color: var(--hba-green); font-weight: 700; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; margin-top: 44px; align-items: start; }
.course-content, .course-sidebar { padding: clamp(24px, 4vw, 42px); border: 1px solid #dce7e4; border-radius: 14px; background: var(--hba-white); }
.course-content { line-height: 1.7; }
.course-content h2, .course-content h3 { color: var(--hba-green-dark); }
.course-sidebar { padding: 24px; }
.course-sidebar h2 { margin: 0 0 16px; font-size: 1rem; }
.course-sidebar a { display: block; padding: 11px 0; border-top: 1px solid #e5ecea; color: var(--hba-green); font-size: .9rem; font-weight: 700; text-decoration: none; }
.course-sidebar a[aria-current="page"] { color: var(--hba-ink); }
@media (max-width: 760px) {
  .trainer-header { align-items: flex-start; }
  .trainer-actions { flex-direction: column; align-items: flex-end; gap: 9px; }
  .course-grid, .course-layout { grid-template-columns: 1fr; }
  .trainer-main { width: min(100% - 32px, 1180px); padding-top: 44px; }
}
