/* ==============================================
   LMS Portal Styles — In-Dev Microcredentials
   ============================================== */

/* ── FORCE FULL-WIDTH ── */
body.page-template-page-login #content,
body.page-template-page-register #content,
body.page-template-page-portal #content,
body.page-template-page-admin #content { display: block !important; width: 100% !important; }

body.page-template-page-login #primary,
body.page-template-page-register #primary,
body.page-template-page-portal #primary,
body.page-template-page-admin #primary {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.page-template-page-login #secondary,
body.page-template-page-register #secondary,
body.page-template-page-portal #secondary,
body.page-template-page-admin #secondary {
  display: none !important;
  width: 0 !important;
  overflow: hidden !important;
}

/* ── PORTAL HORIZONTAL PILL NAV ── */
.portal-tabnav {
  background: #f5f2fa;
  padding: 10px 0;
  position: sticky;
  top: 64px;
  z-index: 20;
}

.portal-tabnav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.portal-tabnav-inner a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #585871;
  text-decoration: none;
  background: #fff;
  border: 1.5px solid #d9d5e5;
  white-space: nowrap;
  transition: all 0.15s;
}

.portal-tabnav-inner a:hover {
  color: #410099;
  border-color: #410099;
  background: rgba(65,0,153,0.04);
}

.portal-tabnav-inner a:first-child {
  background: linear-gradient(135deg, #410099, #4040ff);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.portal-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  font-size: 10px;
  font-weight: 800;
}

.portal-tabnav-inner a:not(:first-child) .portal-tab-count {
  background: rgba(65,0,153,0.1);
  color: #410099;
}

.portal-tab-support {
  margin-left: auto;
  background: transparent !important;
  border-color: transparent !important;
  color: #585871 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.portal-tab-support:hover {
  background: transparent !important;
  color: #410099 !important;
  border-color: transparent !important;
}

/* ── PORTAL HERO ── */
.portal-hero {
  width: 100%;
  display: block;
  padding: 36px 0 34px;
  background:
    radial-gradient(circle at 86% 12%, rgba(71,161,218,0.24), transparent 26%),
    linear-gradient(135deg, #070c33, #410099 58%, #4330ce) !important;
  color: #fff;
}
.portal-hero-inner {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 260px;
  gap: 28px;
  align-items: end;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.portal-hero h1 {
  font-family: "Playfair Display", Georgia, serif !important;
  font-size: clamp(30px, 4.4vw, 52px) !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin: 0 0 10px !important;
  line-height: 1.1 !important;
}
.portal-hero p  { max-width: 720px; margin-top: 14px; color: rgba(255,255,255,0.86) !important; font-size: 17px; }
.portal-hero .kicker { color: #9fe1cb !important; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 10px; }

.brand-lockup-small { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; color: rgba(255,255,255,0.72); font-size: 22px; }
.brand-lockup-small img { max-width: 190px; max-height: 58px; object-fit: contain; }

/* Portal summary card */
.portal-summary-card {
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
}
.portal-summary-card .badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.18); color: #fff; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.portal-summary-card strong { display: block; font-size: 44px; font-family: "Playfair Display", Georgia, serif; color: #fff !important; line-height: 1; margin-bottom: 4px; }
.portal-summary-card p { color: rgba(255,255,255,0.72) !important; font-size: 13px; margin: 0; }

/* ── MAIN CONTENT ── */
.portal-main {
  background: #f5f2fa;
  padding: 36px 0 60px;
  display: block;
}
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.content-card {
  margin-bottom: 24px;
  padding: 28px 32px;
  border: 1px solid #d9d5e5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(7,12,51,0.06);
}

/* ── SECTION TITLES ── */
.section-title { margin-bottom: 20px; }
.section-title .kicker { display: block; color: #410099; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.section-title h2 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(22px, 2.8vw, 32px); font-weight: 600; color: #070c33 !important; margin: 0; line-height: 1.1; }

/* ── ALERTS ── */
.alert { padding: 14px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.alert-success { background: #e4f6f0; border: 1px solid rgba(5,153,125,0.3); color: #087863 !important; }
.alert-warn    { background: #fff8e5; border: 1px solid rgba(211,166,42,0.4); color: #7a5300 !important; }

/* ── MODULE CARD GRID ── */
.module-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 18px !important;
  margin-top: 8px;
}

/* ── MODULE CARDS ── */
.module-card {
  border: 1px solid #d9d5e5 !important;
  border-radius: 16px !important;
  background: #fff !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(7,12,51,0.06);
  transition: box-shadow 0.18s, transform 0.18s;
}
.module-card:hover { box-shadow: 0 8px 28px rgba(7,12,51,0.12); transform: translateY(-2px); }
.module-card.is-coming-soon { opacity: 0.72; }
.module-card.enrolled {
  border-color: rgba(65,0,153,0.2) !important;
  background: linear-gradient(180deg, #fff, #faf9fd) !important;
}
.module-card-header { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
.module-level-badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: #edf1fb; color: #070c33; font-size: 11px; font-weight: 700; }
.module-pathway { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #410099; margin-top: 2px; }
.module-card h3 { font-family: "Playfair Display", Georgia, serif !important; font-size: 17px !important; font-weight: 600 !important; color: #070c33 !important; margin: 0 !important; line-height: 1.3; }
.module-card p  { font-size: 13px !important; color: #585871 !important; line-height: 1.6; margin: 0; flex: 1; }
.module-card-actions { display: flex !important; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #edf1fb; color: #070c33; }
.badge.green { background: #e4f6f0 !important; color: #05997d !important; }
.badge.gold  { background: #fff5d7 !important; color: #7e5710 !important; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-primary,
.rbs-enrol-btn {
  background: linear-gradient(135deg, #410099, #4040ff) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(65,0,153,0.25);
}
.btn-primary:hover,
.rbs-enrol-btn:hover { opacity: 0.9; box-shadow: 0 6px 18px rgba(65,0,153,0.35); color: #fff !important; }
.btn-secondary { background: #fff !important; color: #410099 !important; border: 1.5px solid #d9d5e5; }
.btn-secondary:hover { border-color: #410099; }
.btn-disabled,
.btn:disabled { background: #e8e6ef !important; color: #6c6a78 !important; cursor: not-allowed; box-shadow: none; opacity: 1 !important; }

/* ── PROGRESS ── */
.progress-track { height: 8px; background: #e7e3ef; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-fill  { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #05997d, #47a1da, #410099); transition: width 0.4s ease; }

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .portal-hero-inner { grid-template-columns: 1fr !important; }
  .portal-summary-card { max-width: 360px; }
  .module-card-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .portal-hero { padding: 24px 0 20px; }
  .content-card { padding: 18px; }
}
