
/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
  --tile-radius: 12px;
  --tile-img-height: 220px;
  --tile-img-padding: 12px;
  --tile-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --tile-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.12);
  --container-gap: 16px;
}

/* ===========================
   GLOBAL LAYOUT
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
  margin: 0 auto;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===========================
   HEADER
   =========================== */

.portal-header {
  background-color: #ffdb59; /* enforced brand color */
  padding: 8px 0;
}

/*.header-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--container-gap);
}

.header-left,
.header-right {
  flex: 1 1 300px;
  min-width: 280px;
}*/

.portal-header h1 {
  margin: 0 0 8px 0;
}

/*.balance-label {
  margin: 0;
  text-align: right;
  color: var(--portalThemeColor9, #333);
}

.balance-amount {
  margin: 0;
  text-align: right;
}
*/
/* ===========================
   ROLE SECTIONS
   =========================== */

.role-section {
  padding: 8px 0;
}

.role-section .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===========================
   TILE GRID & CARDS
   =========================== */

.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--container-gap);
}

.tile-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: var(--tile-radius);
  overflow: hidden;
  box-shadow: var(--tile-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  flex: 1 1 calc(33.333% - var(--container-gap));
  min-width: 260px;
}

.tile-card:hover {
  box-shadow: var(--tile-shadow-hover);
  transform: translateY(-2px);
}

.tile-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--tile-img-height);
  padding: var(--tile-img-padding);
  width: 100%;
  background: transparent;
}

.tile-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  background-color: transparent;
  padding: 12px 10px;
}

.tile-link h3 {
  margin: 8px 6px;
  text-align: center;
}

/* For non-anchor tile-link used in School/Students cards */
.tile-link[role="link"] {
  cursor: pointer;
}

/* ===========================
   UNAUTHENTICATED
   =========================== */

.unauthenticated {
  padding: 24px 0;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 992px) {
  .tile-card {
    flex: 1 1 calc(50% - var(--container-gap));
  }
}

@media (max-width: 576px) {
  :root {
    --tile-img-height: 160px;
    --tile-img-padding: 10px;
    --tile-radius: 10px;
  }

  /*.header-left,
  .header-right {
    min-width: 100%;
  }*/

  .tile-card {
    flex: 1 1 100%;
  }
}



/* Page heading container */
.page-heading {
  background-color: #FFD966;   /* yellow bar */
  margin-bottom: 16px;
}

/* Align heading with table/list width */
.page-heading-inner {
  max-width: 1140px;          /* match table container */
  margin: 0 auto;
  padding: 10px 16px;
}

/* Make header logo bigger (works even if nested) */
.navbar .navbar-brand img,
.navbar .navbar-brand svg {
  height: 80px !important;   /* desktop target */
  width: auto !important;
  max-height: 60px !important;
}

/* Mobile */
@media (max-width: 991px) {
  .navbar .navbar-brand img,
  .navbar .navbar-brand svg {
    height: 40px !important;
    max-height: 40px !important;
  }
}

/* Keep the brand area aligned vertically */
.navbar .navbar-brand {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}


.breadcrumb {
  display: none !important;
}

/* Standard Entity List - remove vertical scroll on list when row expands */
.entitylist .table-responsive {
    max-height: none !important;   /* remove any height cap */
    overflow-y: visible !important; /* don't show a scroll bar */
}

/* Just in case the tbody was given its own scrolling */
.entitylist .table-responsive tbody {
    max-height: none !important;
    overflow-y: visible !important;
}


/* === REGISTRATION OPTIONS === */
.registration-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;

  margin-top: 40px;
  padding: 20px;
}

.option-card {
  display: block;
  width: 70%;
  max-width: 600px;

  padding: 20px 30px;

  background-color: #ffffff;
  border-radius: 10px;

  text-align: center;
  font-weight: bold;
  text-decoration: none;
  color: #000;

  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}



a.option-card,
a.option-card:hover,
a.option-card:focus,
a.option-card:active {
  text-decoration: none !important;
  color: #000;
}

/* ✅ Remove underline from inner text */
.option-card * {
  text-decoration: none !important;
}


.option-card:hover {
  background-color: #ffdb59;
  transform: translateY(-3px);
}




.option-card:hover {
  background-color: #ffdb59;
  transform: translateY(-3px);
}


/* === BANNER IMAGE === */

.home-banner {
  width: 100%;
  overflow: hidden;
  background-color: #000;
}



.banner-img {
  width: 100%;
  height: auto;
  max-height: 220px;   /* ✅ control height here */
  object-fit: cover;
  object-position: center;
  display: block;
}



@media (max-width: 768px) {
  .banner-img {
    max-height: 160px;   /* ✅ reduce on mobile */
  }
}

/* ✅ Center & bold Welcome text (all users) */


/* === INTRO TEXT (Landing Page) === */
.intro-text {
  max-width: 800px;
  margin: 30px auto 10px auto;   /* spacing above & below */
  text-align: center;
  color: #333;
  line-height: 1.6;
  font-size: 16px;
}

.intro-text p {
  margin-bottom: 12px;
}


/* === Instructions text above buttons (NOT bold) === */
.options-intro {
  text-align: center;

  margin-top: 50px;    /* ✅ push it down (away from intro text) */
  margin-bottom: -20px; /* ✅ pull it closer to the button */

  color: #333;
  font-size: 16px;
  font-weight: normal;
}


/* === Button title (bold main line) === */
.option-title {
  font-weight: bold;
  margin-bottom: 6px;
}

/* === Button subtitle (italic line) === */
.option-subtext {
  font-style: italic;
  font-size: 14px;
  font-weight: normal; 
}



/* ✅  FOOTER CSS  */

.footer-help {
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
  color: #555;
}

.footer-help div {
  margin-bottom: 3px;
}

/* ✅ Make footer a positioning reference */
footer {
  position: relative;
}

/* ✅ Perfect center placement */
.footer-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 11px;
  color: #555;
  max-width: 350px;
  line-height: 1.2;
}

/* ✅ spacing */
.footer-center div {
  margin-bottom: 3px;
}






/* =========================
   DEFAULT HEADER BASE
   ========================= */

.header-container {
  display: flex;
  align-items: center;
  font-weight: bold;
  width: 100%;
}

/* =========================
   1. NOT LOGGED IN
   ========================= */

.header-container.role-anonymous {
  justify-content: center;
}

.header-container.role-anonymous .header-left {
  flex: 0 0 auto;
  text-align: center;
}


/* =========================
   2. APPRENTICE / WORKER
   ========================= */

.header-container.role-apprentice-worker {
  justify-content: space-between;
}

/* ✅ Split layout properly */
.header-container.role-apprentice-worker .header-left {
  flex: 1;
  text-align: left;
}

.header-container.role-apprentice-worker .header-right {
  flex: 1;
  text-align: right;
  display: block;
}


/* =========================
   3. OTHER USERS
   ========================= */

.header-container.role-other-user {
  justify-content: center;   /* center the flex item itself */
}

/* ✅ Make header-left NOT take full width */
.header-container.role-other-user .header-left {
  flex: 0 0 auto;
  text-align: center;
}

/* ✅ Centre text properly */
.header-container.role-other-user .header-left h1 {
  text-align: center;
  margin: 0 auto;
}

/* ✅ Hide right */
.header-container.role-other-user .header-right {
  display: none;
}

.header-container .header-left h1 {
  font-weight: bold !important;
}
